Skip to content

Commit

Permalink
fix(rdfimport): rename .toml file; entity, field name
Browse files Browse the repository at this point in the history
Replace references to "Institution" from file with
SPARQL query meant for importing `Group` data from
Wikidata with "Group", including in file name itself.
Also replace references to "name" field with `label`
to match the actual model definition.
  • Loading branch information
koeaw committed Jan 30, 2025
1 parent 5407fae commit bbbce49
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#########################################
# Create an `apis_ontology.Institution` #
# Create an `apis_ontology.Group` #
# from a wikidata RDF endpoint #
#########################################
superclass = "apis_ontology.models.Institution"
superclass = "apis_ontology.models.Group"
regex = "http://www.wikidata.org.*"
[[attributes]]
# name
# label
sparql = """
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
Expand All @@ -21,6 +21,6 @@ WHERE {
FILTER(lang(?label_en) = "en")
}
?institution rdfs:label ?label .
BIND(COALESCE(?label_de, ?label_en, ?label) AS ?name)
BIND(COALESCE(?label_de, ?label_en, ?label) AS ?label)
}
"""

0 comments on commit bbbce49

Please sign in to comment.