rdf_test.module

You are here

Test API interaction with the RDF module.

Functions

File

modules/rdf/tests/rdf_test.module
View source
  1. <?php
  2. /**
  3. * @file
  4. * Test API interaction with the RDF module.
  5. */
  6. /**
  7. * Implements hook_rdf_mapping().
  8. */
  9. function rdf_test_rdf_mapping() {
  10. return array(
  11. array(
  12. 'type' => 'test_entity',
  13. 'bundle' => 'test_bundle',
  14. 'mapping' => array(
  15. 'rdftype' => array('sioc:Post'),
  16. 'title' => array(
  17. 'predicates' => array('dc:title'),
  18. ),
  19. 'created' => array(
  20. 'predicates' => array('dc:created'),
  21. 'datatype' => 'xsd:dateTime',
  22. 'callback' => 'date_iso8601',
  23. ),
  24. 'uid' => array(
  25. 'predicates' => array('sioc:has_creator', 'dc:creator'),
  26. 'type' => 'rel',
  27. ),
  28. 'foobar' => array(
  29. 'predicates' => array('foo:bar'),
  30. ),
  31. 'foobar1' => array(
  32. 'datatype' => 'foo:bar1type',
  33. 'predicates' => array('foo:bar1'),
  34. ),
  35. 'foobar_objproperty1' => array(
  36. 'predicates' => array('sioc:has_creator', 'dc:creator'),
  37. 'type' => 'rel',
  38. ),
  39. 'foobar_objproperty2' => array(
  40. 'predicates' => array('sioc:reply_of'),
  41. 'type' => 'rev',
  42. ),
  43. ),
  44. ),
  45. array(
  46. 'type' => 'node',
  47. 'bundle' => 'blog',
  48. 'mapping' => array(
  49. 'rdftype' => array('sioct:Weblog'),
  50. ),
  51. ),
  52. );
  53. }
  54. /**
  55. * Implements hook_rdf_namespaces().
  56. */
  57. function rdf_test_rdf_namespaces() {
  58. return array(
  59. 'dc' => 'http://purl.org/conflicting/namespace',
  60. 'foaf' => 'http://xmlns.com/foaf/0.1/',
  61. 'foaf1' => 'http://xmlns.com/foaf/0.1/',
  62. );
  63. }