? .DS_Store ? head.db ? path_api.patch ? rdf.module.patch ? rdf.module31.patch ? test.txt ? modules/.DS_Store ? modules/rdf ? sites/default/files ? sites/default/private ? sites/default/settings.php Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.1145 diff -u -p -r1.1145 node.module --- modules/node/node.module 11 Oct 2009 03:07:18 -0000 1.1145 +++ modules/node/node.module 14 Oct 2009 18:22:10 -0000 @@ -750,6 +750,47 @@ function node_type_set_defaults($info = } /** + * Define the default RDF mapping for the node entity type. + * + * These default mapping properties are used by rdf_save_mapping() to populate + * non-existing properties before they are saved to the database. + * + * @return + * A list of default mapping properties for the node entity type. + */ +function node_rdf_mapping() { + return array( + array( + 'type' => 'node', + 'bundle' => RDF_DEFAULT_BUNDLE, + 'mapping' => array( + 'rdftype' => array('sioc:Item', 'foaf:Document'), + 'title' => array( + 'property' => array('dc:title'), + ), + 'created' => array( + 'property' => array('dc:date', 'dc:created'), + 'datatype' => 'xsd:dateTime', + 'callback' => 'date_iso8601', + ), + 'changed' => array( + 'property' => array('dc:modified'), + ), + 'body' => array( + 'property' => array('content:encoded'), + ), + 'uid' => array( + 'property' => array('sioc:has_creator', 'foaf:maker'), + ), + 'name' => array( + 'property' => array('foaf:name'), + ), + ), + ), + ); +} + +/** * Determine whether a node hook exists. * * @param $node Index: profiles/default/default.info =================================================================== RCS file: /cvs/drupal/drupal/profiles/default/default.info,v retrieving revision 1.5 diff -u -p -r1.5 default.info --- profiles/default/default.info 13 Oct 2009 13:54:55 -0000 1.5 +++ profiles/default/default.info 14 Oct 2009 18:22:11 -0000 @@ -17,4 +17,5 @@ dependencies[] = search dependencies[] = toolbar dependencies[] = field_ui dependencies[] = file +dependencies[] = rdf files[] = default.profile Index: profiles/default/default.install =================================================================== RCS file: /cvs/drupal/drupal/profiles/default/default.install,v retrieving revision 1.11 diff -u -p -r1.11 default.install --- profiles/default/default.install 14 Oct 2009 10:56:35 -0000 1.11 +++ profiles/default/default.install 14 Oct 2009 18:22:11 -0000 @@ -166,6 +166,28 @@ function default_install() { node_type_save($type); } + // Insert default user-defined RDF mapping into the database. + $rdf_mappings = array( + array( + 'type' => 'node', + 'bundle' => 'page', + 'mapping' => array( + 'rdftype' => array('foaf:Document'), + ), + ), + array( + 'type' => 'node', + 'bundle' => 'article', + 'mapping' => array( + 'rdftype' => array('sioc:Item', 'foaf:Document'), + ), + ), + ); + + foreach ($rdf_mappings as $rdf_mapping) { + rdf_save_mapping($rdf_mapping); + } + // Default page to not be promoted and have comments disabled. variable_set('node_options_page', array('status')); variable_set('comment_page', COMMENT_NODE_HIDDEN);