Page tree

Versions Compared


  • 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
# BIND ("" as ?ontStr)
BIND ("" as ?ontStr)
# BIND ("" 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)))

junk test

Find Ontologies

that need to be Imported


 FILTER (!(strstarts(str(?x), ?ontStr)))
FILTER (!(strstarts(str(?x), "")))
FILTER (!(strstarts(str(?x), "")))
FILTER (!(strstarts(str(?x), "")))
FILTER (!(strstarts(str(?x), "")))
 FILTER (!(strstarts(str(?x), "")))

Preparing to Review Definitions and Other Annotations


TODO: generalize so that the loans URL is not hard coded, making it useful for other FCTs.



# Returns every resource of one or more specified types in the loan namespace along with their selected annotations. 
SELECT ?Resource ?Label ?Type ?Def ?ExpNote ?EdNote ?UseNote ?NormRef ?Comment
WHERE { ?Resource rdf:type ?Type .
FILTER(?Type in (owl:Class, owl:DatatypeProperty,owl:ObjectProperty ))
OPTIONAL { ?Resource skos:definition ?Def. }
OPTIONAL { ?Resource rdfs:label ?Label. }
OPTIONAL { ?Resource rdfs:comment ?Comment. }
OPTIONAL { ?Resource skos:editorialNote ?EdNote. }
OPTIONAL { ?Resource sm:normativeReference ?NormRef. }
OPTIONAL { ?Resource fibo-fnd-utl-av:usageNote ?UseNote. }
OPTIONAL { ?Resource fibo-fnd-utl-av:explanatoryNote ?ExpNote. }
#FILTER# FILTER(STRSTARTS(STR(?Resource), # use this to get URIs in the loan loansHMDA namespace
# "http") )
#FILTER(!# FILTER(STRSTARTS(STR(?Resource), # use this to avoidget URIs in prefixedthe withloans fibo-namespace
# "http") ))
# FILTERFILTER(STRSTARTS(STR(?Resource), # use this to get URIs prefixed with lnufibo-ln-ln-lgn:
"http") )
# FILTER(!(STRSTARTS(STR(?Resource), # use this to get things not in loans namespace
# "")) )
FILTER(!(STRSTARTS(STR(?Resource), # ignore things in owl namespace
"") ))
ORDER BY ?Type ?Resource


  1. AllFibo: uncomment out the last two filter statements
    NEXT: remove the import statement so only stuff in loans ontology is left 
  2. UsedFromFibo: Run same query as for AllFibo (the definitions will be missing)
  3. AddToFibo: use only the 3rd filter filter for LoanUpperTemp
  4. Loans: use only the first two filters