rdf.install 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * @file
  4. * Install, update and uninstall functions for the rdf module.
  5. */
  6. /**
  7. * Implements hook_schema().
  8. */
  9. function rdf_schema() {
  10. $schema['rdf_mapping'] = array(
  11. 'description' => 'Stores custom RDF mappings for user defined content types or overriden module-defined mappings',
  12. 'fields' => array(
  13. 'type' => array(
  14. 'type' => 'varchar',
  15. 'length' => 128,
  16. 'not null' => TRUE,
  17. 'description' => 'The name of the entity type a mapping applies to (node, user, comment, etc.).',
  18. ),
  19. 'bundle' => array(
  20. 'type' => 'varchar',
  21. 'length' => 128,
  22. 'not null' => TRUE,
  23. 'description' => 'The name of the bundle a mapping applies to.',
  24. ),
  25. 'mapping' => array(
  26. 'description' => 'The serialized mapping of the bundle type and fields to RDF terms.',
  27. 'type' => 'blob',
  28. 'not null' => FALSE,
  29. 'size' => 'big',
  30. 'serialize' => TRUE,
  31. ),
  32. ),
  33. 'primary key' => array('type', 'bundle'),
  34. );
  35. return $schema;
  36. }
  37. /**
  38. * Implements hook_install().
  39. */
  40. function rdf_install() {
  41. // Collect any RDF mappings that were declared by modules installed before
  42. // this one.
  43. $modules = module_implements('rdf_mapping');
  44. rdf_modules_installed($modules);
  45. }