Page tree

Versions Compared

Key

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

Ensure that there are no definitions in the wrong ontology

This uses a 'magic property' called 'definesStatements' that is only available in TopBraid Composer. This should probably migrate to the hygiene tests suite. It's here for now for my own use.

# Find all URIs for Classes, Object, Datatype and Annotation Properties that are defined
# in a given ontology whose namespace does not match the current ontology.
# The definition should be in an imported ontology.
SELECT ?s ?p ?o
WHERE {
BIND ("https://spec.edmcouncil.org/fibo/LOAN/LoanContracts/LoanHMDA/" as ?ontStr)
BIND (uri(?ontology) as ?ontURI)
?ontology 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

Preparing to Review Definitions and Other Annotations

...

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. 

...

I did a thorough look through the loans ontology and considered which things are not loan-specific, and thus eventually should be somewhere else in FIBO.  

 


The convention I am using is to prefix the URI of all non- loan-specific  concepts with: “fibo-“.  I grouped some of them by topic (using skoc:editorialNote), to give an idea where they should go. In some cases, I was pretty sure where they would go, so I gave a more specific prefix like: “fibo-alx” which means the concept belongs in the ontology: http://spec.edmcouncil.org/fibo/FND/Utilities/Analytics/ or fibo-fnd-utl-alx, which is the standard prefix for this.

 


For example:

  • loan:fibo-InsuranceContract       Topic: Insurance
  • loan:fibo-MetroDivision              Topic: Regions
  • loan:fibo-ScheduledPayment     Topic: Payments
  • loan:fibo-ContactInfo                  Topic: BE
  • loan:fibo-alx-Measurement        Ontology: http://spec.edmcouncil.org/fibo/FND/Utilities/Analytics/ or fibo-fnd-utl-alx

 


 This spreadsheet  below was generated from SPARQL, and has all the annotations for all the classes and properties in the ontology, but for convenience, I have a filter on the leftmost column so only the ones prefixed with “fibo-“ show up. All of this will be updated in due course.

View file
nameLoansAnnotations-ToMikeB.xlsx
height150