diff -r 07239de796bb -r e756a8c72c3d cms/drupal/modules/rdf/rdf.api.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cms/drupal/modules/rdf/rdf.api.php Fri Sep 08 12:04:06 2017 +0200 @@ -0,0 +1,106 @@ + 'node', + 'bundle' => 'blog', + 'mapping' => array( + 'rdftype' => array('sioct:Weblog'), + 'title' => array( + 'predicates' => array('dc:title'), + ), + 'created' => array( + 'predicates' => array('dc:date', 'dc:created'), + 'datatype' => 'xsd:dateTime', + 'callback' => 'date_iso8601', + ), + 'body' => array( + 'predicates' => array('content:encoded'), + ), + 'uid' => array( + 'predicates' => array('sioc:has_creator'), + 'type' => 'rel', + ), + 'name' => array( + 'predicates' => array('foaf:name'), + ), + ), + ), + ); +} + +/** + * Allow modules to define namespaces for RDF mappings. + * + * Many common namespace prefixes are defined in rdf_rdf_namespaces(). However, + * if a module implements hook_rdf_mapping() and uses a prefix that is not + * defined in rdf_rdf_namespaces(), this hook should be used to define the new + * namespace prefix. + * + * @return + * An associative array of namespaces where the key is the namespace prefix + * and the value is the namespace URI. + * + * @ingroup rdf + */ +function hook_rdf_namespaces() { + return array( + 'content' => 'http://purl.org/rss/1.0/modules/content/', + 'dc' => 'http://purl.org/dc/terms/', + 'foaf' => 'http://xmlns.com/foaf/0.1/', + 'og' => 'http://ogp.me/ns#', + 'rdfs' => 'http://www.w3.org/2000/01/rdf-schema#', + 'sioc' => 'http://rdfs.org/sioc/ns#', + 'sioct' => 'http://rdfs.org/sioc/types#', + 'skos' => 'http://www.w3.org/2004/02/skos/core#', + 'xsd' => 'http://www.w3.org/2001/XMLSchema#', + ); +} + +/** + * @} End of "addtogroup hooks". + */