This repository was archived by the owner on Aug 25, 2022. It is now read-only.
This repository was archived by the owner on Aug 25, 2022. It is now read-only.
Upgrade the taxonomy term loading #90
Open
Description
The \Drupal\rdf_taxonomy\TermRdfStorage::loadTree
method is using the following hardcoded query to load the terms:
SELECT DISTINCT ?tid ?label ?parent
WHERE {
?tid ?relation <$concept_schema> .
?tid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2004/02/skos/core#Concept> .
?tid <http://www.w3.org/2004/02/skos/core#prefLabel> ?label .
FILTER (?relation IN (<http://www.w3.org/2004/02/skos/core#inScheme>, <http://www.w3.org/2004/02/skos/core#topConceptOf>) ) .
FILTER (lang(?label) = 'en') .
OPTIONAL {?tid <http://www.w3.org/2004/02/skos/core#broaderTransitive> ?parent }
}
ORDER BY (STR(?label))
Now that the mapping entities are in place, the predicate (the ?relation
variable) can be predictable and the rest of the properties are not restricted. The terms don't need to use the http://www.w3.org/2004/02/skos/core#broaderTransitive
to designate the parent.
Metadata
Metadata
Assignees
Labels
No labels
Activity