Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

# 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(?ontologyontStr) as ?ontURIont)
?ontologyont 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

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))
 FILTER (!(strstarts(str(?x), ?ontStr)))
FILTER (!(strstarts(str(?x), "http://www.w3.org/2002/07/owl#")))
FILTER (!(strstarts(str(?x), "http://www.w3.org/1999/02/22-rdf-syntax-ns#")))
FILTER (!(strstarts(str(?x), "http://www.w3.org/2000/01/rdf-schema#")))
FILTER (!(strstarts(str(?x), "http://www.w3.org/2001/XMLSchema#")))
}
ORDER BY ?x







Preparing to Review Definitions and Other Annotations

...