rdf.api.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * @file
  4. * Hooks provided by the RDF module.
  5. */
  6. /**
  7. * @addtogroup hooks
  8. * @{
  9. */
  10. /**
  11. * Allow modules to define namespaces for RDF mappings.
  12. *
  13. * Many common namespace prefixes are defined in rdf_rdf_namespaces(). However,
  14. * if a module implements rdf mappings that use prefixes that are not
  15. * defined in rdf_rdf_namespaces(), this hook should be used to define the new
  16. * namespace prefixes.
  17. *
  18. * @return string[]
  19. * An associative array of namespaces where the key is the namespace prefix
  20. * and the value is the namespace URI.
  21. *
  22. * @ingroup rdf
  23. */
  24. function hook_rdf_namespaces() {
  25. return [
  26. 'content' => 'http://purl.org/rss/1.0/modules/content/',
  27. 'dc' => 'http://purl.org/dc/terms/',
  28. 'foaf' => 'http://xmlns.com/foaf/0.1/',
  29. 'og' => 'http://ogp.me/ns#',
  30. 'rdfs' => 'http://www.w3.org/2000/01/rdf-schema#',
  31. 'sioc' => 'http://rdfs.org/sioc/ns#',
  32. 'sioct' => 'http://rdfs.org/sioc/types#',
  33. 'skos' => 'http://www.w3.org/2004/02/skos/core#',
  34. 'xsd' => 'http://www.w3.org/2001/XMLSchema#',
  35. ];
  36. }
  37. /**
  38. * @} End of "addtogroup hooks".
  39. */