Below is an example from
https://jena.apache.org/documentation/notes/rdf-frames.html (rewritten
in ofn due to minor syntax error in example and my greater familiarity
with ofn), with one minor addition. I declared an object property that
is not used anywhere else.
Prefix(purl:=<http://purl.org/dc/elements/1.1#>)
Prefix(rf:=<http://www.adventium.com/rdf_frame_ofn#>)
Ontology( <http://www.galois.com/rdf_frame_ofn>
Annotation( purl:title "Test RDF Frames" )
Declaration( Class( rf:LivingThing ) )
Declaration( Class( rf:Animal ) )
SubClassOf(rf:Animal rf:LivingThing )
Declaration( Class( rf:Mammal ) )
SubClassOf(rf:Mammal rf:Animal )
Declaration( ObjectProperty ( rf:hasSkeleton ) )
ObjectPropertyDomain( rf:hasSkeleton rf:Animal )
Declaration( ObjectProperty ( rf:unused ) ) # added to example
)
When I call OntClass.listDeclaredProperties, the rf:unused property
appears in the list for all the classes in the ontology. Otherwise it
behaves as in the example. I have done some other simple tests, and it
seems to list almost all the properties in the ontology for all
classes. What I would like to do is have it list for a class only the
properties that are known (can be proven) to be used in the definition
of that class, e.g., where removal of that property might change what
appears in the ABox for a particular knowledge base. I would appreciate
help understanding this behavior and how I might get something closer to
the desired list. Where am I getting bitten by the open world assumption?