...
# Find all URIs for Classes, Object, Datatype and Annotation Properties that are defined
# in a given ontology (?ont) whose namespace does not match the current ontology.
# The definition should already be in an imported ontology and removed from the given ontology.
SELECT ?s ?p ?o
WHERE {
# BIND ("https://spec.edmcouncil.org/fibo/LOAN/LoanContracts/LoanUpperTemp/" as ?ontStr)
BIND ("https://spec.edmcouncil.org/fibo/LOAN/LoanContracts/LoanCore/" as ?ontStr)
# BIND ("https://spec.edmcouncil.org/fibo/LOAN/LoanContracts/LoanHMDA/" as ?ontStr)
BIND (uri(?ontStr) as ?ont)
?ont tops:definesStatements (?s ?p ?o) .
FILTER (?p in (rdf:type))
FILTER (?o in (owl:Class, owl:ObjectProperty, owl:DatatypeProperty, owl:AnnotationProperty))
FILTER (!(strstarts(str(?s), ?ontStr)))
}
ORDER BY ?o
junk test
Find Ontologies
that need to be Imported
# Find all URIs that are referred to in a given ontology whose namespace does not match the ontology.
# This will help indicate what ontologies need to be imported.
SELECT distinct ?x
WHERE {
# BIND ("https://spec.edmcouncil.org/fibo/LOAN/LoanContracts/LoanUpperTemp/" as ?ontStr)
# BIND ("https://spec.edmcouncil.org/fibo/LOAN/LoanContracts/LoanCore/" as ?ontStr)
BIND ("https://spec.edmcouncil.org/fibo/LOAN/LoanContracts/LoanHMDA/" as ?ontStr)
BIND (uri(?ontStr) as ?ont)
{?ont tops:definesStatements (?x ?p ?o) .}
UNION {?ont tops:definesStatements (?s ?x ?o) .}
UNION {?ont tops:definesStatements (?s ?p ?x) .}
FILTER (isURI(?x))
...