Page tree

Versions Compared

Key

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

...

# Returns every resource of one or more specified types in the loan namespace along with their selected annotations.
SELECT ?Resource ?Type ?Def ?Comment ?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
# "http://spec.edmcouncil.org/fibo/LOAN/LoanContracts/LoanCore/") )
#FILTER(!(STRSTARTS(STR(?Resource), # use this to avoid URIs prefixed with fibo-
# "http://spec.edmcouncil.org/fibo/LOAN/LoanContracts/LoanCore/fibo-") ))
# FILTER(STRSTARTS(STR(?Resource), # use this to get URIs prefixed with fibo-
# "http://spec.edmcouncil.org/fibo/LOAN/LoanContracts/LoanCore/fibo-") )
FILTER(!(STRSTARTS(STR(?Resource), # use this to get things not in loans namespace
"http://spec.edmcouncil.org/fibo/LOAN/LoanContracts/LoanCore/")) )
FILTER(!(STRSTARTS(STR(?Resource), # ignore thyings in owl namespace
"http://www.w3.org/2002/07/owl#") ))
}
ORDER BY ?Type ?Resource

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

SELECT ?Resource ?Type ?Comment
WHERE { ?Resource rdf:type ?Type .
?Resource rdfs:comment ?Comment.
FILTER(?Type in (owl:Class, owl:DatatypeProperty,owl:ObjectProperty ))
FILTER(!(STRSTARTS(STR(?Resource), # ignore things in owl namespace
"http://www.w3.org/2002/07/owl#") ))
FILTER(!(STRSTARTS(STR(?Resource), # ignore things in skos namespace
"http://www.w3.org/2004/02/skos/core#") ))
}
ORDER BY ?Type ?Resource

Concepts that are not specific to loans.

...