function xtaxonomy_xml_rdf_mapping in Taxonomy import/export via XML 7
Implements hook_rdf_mapping().
REDUNDANT in D7 as it does it itself now TODO compare then delete
Return value
array Our own rdf mapping for vocabularies and terms.
See also
taxonomy_rdf_mapping
File
- ./
taxonomy_xml.module, line 1197 - Make it possible to import and export taxonomies as XML documents.
Code
function xtaxonomy_xml_rdf_mapping() {
return array(
array(
'type' => 'taxonomy_term',
'bundle' => 'taxonomy_xml',
'mapping' => array(
'rdftype' => array(
'skos:Concept',
),
'name' => array(
'predicates' => array(
'rdfs:label',
'skos:prefLabel',
),
),
'description' => array(
'predicates' => array(
'skos:definition',
),
),
// The vocabulary this term belongs to. The type 'rev' is used to denote
// the fact that the skos:member property domain is skos:Collection and
// its range is skos:Concept or skos:Collection.
'vid' => array(
'predicates' => array(
'skos:member',
),
'type' => 'rev',
),
'parent' => array(
'predicates' => array(
'skos:broader',
),
'type' => 'rel',
),
),
),
array(
'type' => 'taxonomy_vocabulary',
// By defining a specific bundle - matching the entirty type directly
// we can override the default rdf mapping with our own here.
// @see entity_extract_ids()
// @see entity_get_info()
'bundle' => 'taxonomy_vocabulary',
'mapping' => array(
'rdftype' => array(
'owl:Ontology',
),
'name' => array(
'predicates' => array(
'rdfs:label',
),
),
'description' => array(
'predicates' => array(
'rdfs:comment',
),
),
),
),
);
}