Commit ff401af5 authored by kolafson's avatar kolafson
Browse files

Beta 3 - doing schema.org mapping with rdfx

parent 1a9777c4
......@@ -52,3 +52,82 @@ function uw_ct_event_node_info() {
);
return $items;
}
/**
* Implements hook_rdf_default_mappings().
*/
function uw_ct_event_rdf_default_mappings() {
$rdf_mappings = array();
// Exported RDF mapping: uw_event
$rdf_mappings['node']['uw_event'] = array(
'rdftype' => array(
0 => 'schema:Event',
1 => 'sioc:Item',
2 => 'foaf:Document',
),
'title' => array(
'predicates' => array(
0 => 'schema:name',
1 => 'dc:title',
),
),
'created' => array(
'predicates' => array(
0 => 'dc:date',
1 => 'dc:created',
),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'changed' => array(
'predicates' => array(
0 => 'dc:modified',
),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'body' => array(
'predicates' => array(
0 => 'schema:description',
1 => 'content:encoded',
),
),
'uid' => array(
'predicates' => array(
0 => 'sioc:has_creator',
),
'type' => 'rel',
),
'name' => array(
'predicates' => array(
0 => 'foaf:name',
),
),
'comment_count' => array(
'predicates' => array(
0 => 'sioc:num_replies',
),
'datatype' => 'xsd:integer',
),
'last_activity' => array(
'predicates' => array(
0 => 'sioc:last_activity_date',
),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'field_event_location' => array(
'predicates' => array(
0 => 'schema:location',
),
),
'field_event_date' => array(
'predicates' => array(
0 => 'schema:startDate',
),
),
);
return $rdf_mappings;
}
......@@ -11,6 +11,8 @@ dependencies[] = "link"
dependencies[] = "location_cck"
dependencies[] = "node_reference"
dependencies[] = "override_node_options"
dependencies[] = "rdfx"
dependencies[] = "schemaorg"
dependencies[] = "strongarm"
dependencies[] = "term_reference_tree"
dependencies[] = "uw_roles_fdsu"
......@@ -32,6 +34,7 @@ features[field][] = "node-uw_event-field_event_moreinfo_link"
features[field][] = "node-uw_location-field_location_details"
features[node][] = "uw_event"
features[node][] = "uw_location"
features[rdf_mappings][] = "node-uw_event"
features[user_permission][] = "create uw_event content"
features[user_permission][] = "delete any uw_event content"
features[user_permission][] = "delete own uw_event content"
......@@ -75,6 +78,12 @@ features[variable][] = "node_submitted_uw_location"
features[variable][] = "pathauto_node_uw_event_pattern"
features[variable][] = "publishcontent_uw_event"
features[variable][] = "publishcontent_uw_location"
features[variable][] = "rdf_rdftype_uw_event"
features[variable][] = "rdf_title_datatype_uw_event"
features[variable][] = "rdf_title_predicates_uw_event"
features[variable][] = "rdf_title_type_uw_event"
features[variable][] = "schemaorg_title_uw_event"
features[variable][] = "schemaorg_type_uw_event"
features[variable][] = "workbench_moderation_default_state_uw_event"
features[variable][] = "xmlsitemap_settings_node_uw_event"
features[views_view][] = "event_category_blocks"
......@@ -84,4 +93,4 @@ package = "uWaterloo Content Types"
php = "5.2.4"
project = "uw_ct_event"
project status url = "http://wms-sand6.uwaterloo.ca/features/fserver/uw_ct_event/7.x"
version = "7.x-1.0-beta2"
version = "7.x-1.0-beta3"
......@@ -26,7 +26,9 @@ function uw_ct_event_install() {
* Adding RDF markup
*/
function uw_ct_event_update_7001() {
/** Removing this update - now being done with features **/
// Insert default pre-defined RDF mapping into the database.
/*
$rdf_mappings = array(
array(
'type' => 'node',
......@@ -54,6 +56,7 @@ function uw_ct_event_update_7001() {
foreach ($rdf_mappings as $rdf_mapping) {
rdf_mapping_save($rdf_mapping);
}
*/
}
/**
......
......@@ -9,6 +9,10 @@ include_once('uw_ct_event.features.inc');
/**
* Implements hook_rdf_namespaces().
*/
/*
/* Removing for now, trying to accomplish with features */
/*
function uw_ct_event_rdf_namespaces() {
return array(
'content' => 'http://purl.org/rss/1.0/modules/content/',
......@@ -23,6 +27,7 @@ function uw_ct_event_rdf_namespaces() {
'xsd' => 'http://www.w3.org/2001/XMLSchema#',
);
}
*/
/**
* Implements hook_disable().
......
......@@ -401,11 +401,53 @@ function uw_ct_event_strongarm() {
$strongarm->value = 0;
$export['publishcontent_uw_location'] = $strongarm;
$strongarm = new stdClass;
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'rdf_rdftype_uw_event';
$strongarm->value = 'sioc:Item, foaf:Document';
$export['rdf_rdftype_uw_event'] = $strongarm;
$strongarm = new stdClass;
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'rdf_title_datatype_uw_event';
$strongarm->value = 'xsd:string';
$export['rdf_title_datatype_uw_event'] = $strongarm;
$strongarm = new stdClass;
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'rdf_title_predicates_uw_event';
$strongarm->value = 'dc:title';
$export['rdf_title_predicates_uw_event'] = $strongarm;
$strongarm = new stdClass;
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'rdf_title_type_uw_event';
$strongarm->value = 'property';
$export['rdf_title_type_uw_event'] = $strongarm;
$strongarm = new stdClass;
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'schemaorg_title_uw_event';
$strongarm->value = 'name';
$export['schemaorg_title_uw_event'] = $strongarm;
$strongarm = new stdClass;
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'schemaorg_type_uw_event';
$strongarm->value = 'Event';
$export['schemaorg_type_uw_event'] = $strongarm;
$strongarm = new stdClass;
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'workbench_moderation_default_state_uw_event';
$strongarm->value = 'draft';
$strongarm->value = 'published';
$export['workbench_moderation_default_state_uw_event'] = $strongarm;
$strongarm = new stdClass;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment