Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Better instructiosn for creating loans annotations spreadsheet


# Returns every resource of one or more specified types in the loan namespace along with their selected annotations.
SELECT ?Resource ?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: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(STRSTARTS(STR(?Resource), # use this to get URIs in the loans namespace
# "") )
#FILTER(!(STRSTARTS(STR(?Resource), # use this to avoid URIs prefixed with fibo-
# "") ))
# FILTER(STRSTARTS(STR(?Resource), # use this to get URIs prefixed with fibo-
# "") )
FILTER(!(STRSTARTS(STR(?Resource), # use this to get things not in loans namespace
"")) )
FILTER(!(STRSTARTS(STR(?Resource), # ignore thyings things in owl namespace
"") ))
ORDER BY ?Type ?Resource

Usage instructions:

  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
  4. Loans: use only the first two filters

Then take a prior version of a loansannotations spreadsheet, remove the existing contents and bring in the new content from the new .txt files exported by TBC.


Find uses of rdfs:comment, it should not be used at all. Probably have it be an ASK query.