summaryrefslogtreecommitdiff
path: root/modules/rdf/tests/rdf_test.module
blob: 46144951b15c16da5b83ff4a88573bd713fa679c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
// $Id$

/**
 * @file
 * Test API interaction with the RDF module.
 */

/**
 * Implements hook_rdf_mapping().
 */
function rdf_test_rdf_mapping() {
  return array(
    array(
      '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'),
        ),
        'foobar' => array(
          'predicates' => array('foo:bar'),
        ),
      ),
    ),
    array(
      'type' => 'node',
      'bundle' => 'blog',
      'mapping' => array(
        'rdftype' => array('sioct:Weblog'),
      ),
    ),
  );
}