Closed namedgraph closed 9 years ago
It could be possible to express the inheritance as Jena rules: https://jena.apache.org/documentation/inference/
[inheritance: (?class ?p ?o), (?p rdf:type owl:AnnotationProperty), (?subClass rdfs:subClassOf ?class), noValue(?subClass ?p) -> (?subClass ?p ?o) ]
[inheritance: (?class ?p ?o), (?p rdf:type owl:AnnotationProperty), (?p rdfs:isDefinedBy <http://graphity.org/gp#>), (?subClass rdfs:subClassOf ?class), noValue(?subClass ?p) -> (?subClass ?p ?o) ]
[gpInheritance: (?template rdf:type <http://graphity.org/gp#Template>), (?template ?p ?o), (?p rdf:type owl:AnnotationProperty), (?p rdfs:isDefinedBy <http://graphity.org/gp#>), (?subClass rdfs:subClassOf ?template), noValue(?subClass ?p) -> (?subClass ?p ?o) ] [spinInheritance: (?template rdf:type <http://graphity.org/gp#Template>), (?template <http://spinrdf.org/spin#constraint> ?o), (?subClass rdfs:subClassOf ?template), noValue(?subClass <http://spinrdf.org/spin#constraint>) -> (?subClass <http://spinrdf.org/spin#constraint> ?o) ]
Currently
OntologyProvider.inheritAnnotations()
is using a very inefficient algorithm. Need to look into how SPIN does the same thing forspin:constraint
and/or what utilities Jena provides to improve the performance.