function taxonomy_xml_rdf_mapping in Taxonomy import/export via XML 6.2
Implements hook_rdf_mapping().
Copied back from D7. Defines the predicate labels to be used when generating RDF
Return value
array The rdf mapping for vocabularies and terms.
File
- ./
taxonomy_xml.module, line 2611 - This module makes it possible to import and export taxonomies as XML documents.
Code
function taxonomy_xml_rdf_mapping() {
$RDF_DEFAULT_BUNDLE = '';
return array(
array(
'type' => 'taxonomy_term',
'bundle' => $RDF_DEFAULT_BUNDLE,
'mapping' => array(
'rdftype' => array(
'skos:Concept',
),
'name' => array(
'predicates' => array(
'rdfs:label',
'skos:prefLabel',
),
),
'description' => array(
'predicates' => array(
'skos:definition',
),
),
'vid' => array(
'predicates' => array(
'skos:inScheme',
),
'type' => 'rel',
'callback' => 'taxonomy_xml_taxonomy_vocabulary_uri',
),
'parent' => array(
'predicates' => array(
'skos:broader',
),
'type' => 'rel',
'callback' => 'taxonomy_xml_taxonomy_term_uri',
),
'child' => array(
'predicates' => array(
'skos:narrower',
),
'type' => 'rel',
'callback' => 'taxonomy_xml_taxonomy_term_uri',
),
'synonyms_array' => array(
'predicates' => array(
'skos:altLabel',
),
),
'related' => array(
'predicates' => array(
'skos:related',
),
'type' => 'rel',
'callback' => 'taxonomy_xml_taxonomy_term_uri',
),
),
),
array(
'type' => 'taxonomy_vocabulary',
'bundle' => $RDF_DEFAULT_BUNDLE,
'mapping' => array(
'rdftype' => array(
'skos:ConceptScheme',
),
'name' => array(
'predicates' => array(
'dc:title',
),
),
'description' => array(
'predicates' => array(
'rdfs:comment',
),
),
),
),
);
}