RDF Mapping API

  1. cis7 modules/rdf/rdf.module rdf
  2. cle7 modules/rdf/rdf.module rdf
  3. elmsmedia7 modules/rdf/rdf.module rdf
  4. icor7 modules/rdf/rdf.module rdf
  5. meedjum_blog7 modules/rdf/rdf.module rdf
  6. mooc7 modules/rdf/rdf.module rdf

Functions to describe entities and bundles in RDF.

The RDF module introduces RDF and RDFa to Drupal. RDF is a W3C standard to describe structured data. RDF can be serialized as RDFa in XHTML attributes to augment visual data with machine-readable hints.

Modules can provide mappings of their bundles' data and metadata to RDF classes and properties. This module takes care of injecting these mappings into variables available to theme functions and templates. All Drupal core themes are coded to be RDFa compatible.

Example mapping from node.module:

  array(
    'type' => 'node',
    'bundle' => RDF_DEFAULT_BUNDLE,
    'mapping' => array(
      'rdftype' => array('sioc:Item', 'foaf:Document'),
      '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'),
      ),
      'name' => array(
        'predicates' => array('foaf:name'),
      ),
    ),
  );

See also

http://www.w3.org/RDF/

http://www.w3.org/TR/xhtml-rdfa-primer/

Functions

Namesort descending Location Description
hook_rdf_mapping modules/rdf/rdf.api.php Allow modules to define RDF mappings for field bundles.
hook_rdf_namespaces modules/rdf/rdf.api.php Allow modules to define namespaces for RDF mappings.
rdf_get_namespaces modules/rdf/rdf.module Returns an array of RDF namespaces defined in modules that implement hook_rdf_namespaces().
rdf_mapping_delete modules/rdf/rdf.module Deletes the mapping for the given bundle from the database.
rdf_mapping_load modules/rdf/rdf.module Returns the mapping for attributes of a given entity type/bundle pair.
rdf_mapping_save modules/rdf/rdf.module Saves an RDF mapping to the database.
rdf_rdfa_attributes modules/rdf/rdf.module Builds an array of RDFa attributes for a given mapping. This array will typically be passed through drupal_attributes() to create the attributes variables that are available to template files. These include $attributes, $title_attributes,…
rdf_rdf_namespaces modules/rdf/rdf.module Implements hook_rdf_namespaces().
theme_rdf_metadata modules/rdf/rdf.module Returns HTML for a series of empty spans for exporting RDF metadata in RDFa.
theme_rdf_template_variable_wrapper modules/rdf/rdf.module Returns HTML for a template variable wrapped in an HTML element with the RDF attributes.

Constants

Namesort descending Location Description
RDF_DEFAULT_BUNDLE modules/rdf/rdf.module RDF bundle flag: Default bundle.

File

modules/rdf/rdf.module, line 21
Enables semantically enriched output for Drupal sites in the form of RDFa.

Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.