2009-10-19 18:28:16 +00:00
|
|
|
<?php
|
|
|
|
// $Id$
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
2009-10-20 17:33:43 +00:00
|
|
|
* Test API interaction with the RDF module.
|
2009-10-19 18:28:16 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2009-10-20 17:33:43 +00:00
|
|
|
* Implements hook_rdf_mapping().
|
2009-10-19 18:28:16 +00:00
|
|
|
*/
|
|
|
|
function rdf_test_rdf_mapping() {
|
|
|
|
return array(
|
2009-10-20 17:33:43 +00:00
|
|
|
array(
|
2009-10-19 18:28:16 +00:00
|
|
|
'type' => 'test_entity',
|
|
|
|
'bundle' => 'test_bundle',
|
|
|
|
'mapping' => array(
|
|
|
|
'rdftype' => array('sioc:Post'),
|
|
|
|
'title' => array(
|
|
|
|
'predicates' => array('dc:title'),
|
|
|
|
),
|
|
|
|
'created' => array(
|
|
|
|
'predicates' => array('dc:created'),
|
|
|
|
'datatype' => 'xsd:dateTime',
|
|
|
|
'callback' => 'date_iso8601',
|
|
|
|
),
|
|
|
|
'uid' => array(
|
|
|
|
'predicates' => array('sioc:has_creator', 'dc:creator'),
|
2010-01-14 06:31:45 +00:00
|
|
|
'type' => 'rel',
|
2009-10-19 18:28:16 +00:00
|
|
|
),
|
|
|
|
'foobar' => array(
|
|
|
|
'predicates' => array('foo:bar'),
|
|
|
|
),
|
2010-01-14 06:31:45 +00:00
|
|
|
'foobar1' => array(
|
|
|
|
'datatype' => 'foo:bar1type',
|
|
|
|
'predicates' => array('foo:bar1'),
|
|
|
|
),
|
|
|
|
'foobar_objproperty1' => array(
|
|
|
|
'predicates' => array('sioc:has_creator', 'dc:creator'),
|
|
|
|
'type' => 'rel',
|
|
|
|
),
|
|
|
|
'foobar_objproperty2' => array(
|
|
|
|
'predicates' => array('sioc:reply_of'),
|
|
|
|
'type' => 'rev',
|
|
|
|
),
|
2009-10-19 18:28:16 +00:00
|
|
|
),
|
|
|
|
),
|
2009-10-20 17:33:43 +00:00
|
|
|
array(
|
2009-10-19 18:28:16 +00:00
|
|
|
'type' => 'node',
|
|
|
|
'bundle' => 'blog',
|
|
|
|
'mapping' => array(
|
|
|
|
'rdftype' => array('sioct:Weblog'),
|
2009-10-20 17:33:43 +00:00
|
|
|
),
|
2009-10-19 18:28:16 +00:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
2010-04-22 21:41:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_rdf_namespaces().
|
|
|
|
*/
|
|
|
|
function rdf_test_rdf_namespaces() {
|
|
|
|
return array(
|
|
|
|
'dc' => 'http://purl.org/conflicting/namespace',
|
|
|
|
'foaf' => 'http://xmlns.com/foaf/0.1/',
|
|
|
|
'foaf1' => 'http://xmlns.com/foaf/0.1/',
|
|
|
|
);
|
|
|
|
}
|