Commit 30acc414 authored by Élodie Thiéblin's avatar Élodie Thiéblin
Browse files

feat: update queries to import DCterms

parent f8ce72703882
......@@ -38,7 +38,7 @@
def fragment_from_uri(uri: str, titling=False) -> Optional[str]:
if uri == OWL.Thing:
if uri == OWL.Thing or uri == RDFS.Class:
return None
url = urlparse(uri)
# if url.fragment is not None, the fragment is done with `#`
......@@ -97,6 +97,7 @@
{?uri a owl:Class}
UNION {?rangeprop rdfs:range ?uri.}
UNION {?domainprop rdfs:domain ?uri.}
UNION{?uri a rdfs:Class.}
}
"""
......@@ -134,6 +135,7 @@
datatype_property_query = """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?uri WHERE {
{?uri a owl:DatatypeProperty}
UNION {?uri a owl:AnnotationProperty.}
......@@ -137,6 +139,8 @@
SELECT DISTINCT ?uri WHERE {
{?uri a owl:DatatypeProperty}
UNION {?uri a owl:AnnotationProperty.}
UNION {?uri rdfs:range ?z.
FILTER (?z in (xsd:int, rdfs:Literal, xsd:date, xsd:float, xsd:integer))}
}
"""
for datatype_property_res in owl_model.query(datatype_property_query):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment