Optimize methods for searching OWLAxioms by OWLObject & Position & AxiomType
sszuev opened this issue · 2 comments
sszuev commented
Not all methods of such kind have optimizations yet.
This could be critical for some systems and big ontologies.
This is the old issue, the source: https://github.com/avicomp/ont-api/issues/33
List of methods for optimization --
- for
OWLDatatype
:
1 ::: Stream<OWLDatatypeDefinitionAxiom> axioms(OWLDatatype)
2 ::: Stream<OWLDatatypeDefinitionAxiom> datatypeDefinitions(OWLDatatype)
- for
OWLClass
:
1 ::: Stream<OWLClassAxiom> axioms(OWLClass)
2 ::: Stream<OWLEquivalentClassesAxiom> equivalentClassesAxioms(OWLClass)
3 ::: Stream<OWLSubClassOfAxiom> subClassAxiomsForSuperClass(OWLClass)
4 ::: Stream<OWLSubClassOfAxiom> subClassAxiomsForSubClass(OWLClass)
5 ::: Stream<OWLDisjointClassesAxiom> disjointClassesAxioms(OWLClass)
6 ::: Stream<OWLDisjointUnionAxiom> disjointUnionAxioms(OWLClass)
7 ::: Stream<OWLClassAssertionAxiom> classAssertionAxioms(OWLClassExpression)
8 ::: Stream<OWLHasKeyAxiom> hasKeyAxioms(OWLClass)
- for
OWLIndividual
:
1 ::: Stream<OWLIndividualAxiom> axioms(OWLIndividual)
2 ::: Stream<OWLClassAssertionAxiom> classAssertionAxioms(OWLIndividual)
3 ::: Stream<OWLSameIndividualAxiom> sameIndividualAxioms(OWLIndividual)
4 ::: Stream<OWLDifferentIndividualsAxiom> differentIndividualAxioms(OWLIndividual)
5 ::: Stream<OWLObjectPropertyAssertionAxiom> objectPropertyAssertionAxioms(OWLIndividual)
6 ::: Stream<OWLNegativeObjectPropertyAssertionAxiom> negativeObjectPropertyAssertionAxioms(OWLIndividual)
7 ::: Stream<OWLDataPropertyAssertionAxiom> dataPropertyAssertionAxioms(OWLIndividual)
8 ::: Stream<OWLNegativeDataPropertyAssertionAxiom> negativeDataPropertyAssertionAxioms(OWLIndividual)
- for
OWLObjectProperty
:
1 ::: Stream<OWLObjectPropertyAxiom> axioms(OWLObjectPropertyExpression)
2 ::: Stream<OWLEquivalentObjectPropertiesAxiom> equivalentObjectPropertiesAxioms(OWLObjectPropertyExpression)
3 ::: Stream<OWLSubObjectPropertyOfAxiom> objectSubPropertyAxiomsForSuperProperty(OWLObjectPropertyExpression)
4 ::: Stream<OWLSubObjectPropertyOfAxiom> objectSubPropertyAxiomsForSubProperty(OWLObjectPropertyExpression)
5 ::: Stream<OWLInverseObjectPropertiesAxiom> inverseObjectPropertyAxioms(OWLObjectPropertyExpression)
6 ::: Stream<OWLFunctionalObjectPropertyAxiom> functionalObjectPropertyAxioms(OWLObjectPropertyExpression)
7 ::: Stream<OWLInverseFunctionalObjectPropertyAxiom> inverseFunctionalObjectPropertyAxioms(OWLObjectPropertyExpression)
8 ::: Stream<OWLSymmetricObjectPropertyAxiom> symmetricObjectPropertyAxioms(OWLObjectPropertyExpression)
9 ::: Stream<OWLAsymmetricObjectPropertyAxiom> asymmetricObjectPropertyAxioms(OWLObjectPropertyExpression)
10 ::: Stream<OWLTransitiveObjectPropertyAxiom> transitiveObjectPropertyAxioms(OWLObjectPropertyExpression)
11 ::: Stream<OWLReflexiveObjectPropertyAxiom> reflexiveObjectPropertyAxioms(OWLObjectPropertyExpression)
12 ::: Stream<OWLIrreflexiveObjectPropertyAxiom> irreflexiveObjectPropertyAxioms(OWLObjectPropertyExpression)
13 ::: Stream<OWLObjectPropertyDomainAxiom> objectPropertyDomainAxioms(OWLObjectPropertyExpression)
14 ::: Stream<OWLObjectPropertyRangeAxiom> objectPropertyRangeAxioms(OWLObjectPropertyExpression)
15 ::: Stream<OWLDisjointObjectPropertiesAxiom> disjointObjectPropertiesAxioms(OWLObjectPropertyExpression)
- for
OWLDataProperty
:
1 ::: Stream<OWLDataPropertyAxiom> axioms(OWLDataProperty)
2 ::: Stream<OWLEquivalentDataPropertiesAxiom> equivalentDataPropertiesAxioms(OWLDataProperty)
3 ::: Stream<OWLSubDataPropertyOfAxiom> dataSubPropertyAxiomsForSuperProperty(OWLDataPropertyExpression)
4 ::: Stream<OWLSubDataPropertyOfAxiom> dataSubPropertyAxiomsForSubProperty(OWLDataProperty)
5 ::: Stream<OWLFunctionalDataPropertyAxiom> functionalDataPropertyAxioms(OWLDataPropertyExpression)
6 ::: Stream<OWLDataPropertyDomainAxiom> dataPropertyDomainAxioms(OWLDataProperty)
7 ::: Stream<OWLDataPropertyRangeAxiom> dataPropertyRangeAxioms(OWLDataProperty)
8 ::: Stream<OWLDisjointDataPropertiesAxiom> disjointDataPropertiesAxioms(OWLDataProperty)
- for
OWLAnnotationProperty
:
1 ::: Stream<OWLAnnotationAxiom> axioms(OWLAnnotationProperty)
2 ::: Stream<OWLSubAnnotationPropertyOfAxiom> subAnnotationPropertyOfAxioms(OWLAnnotationProperty)
3 ::: Stream<OWLAnnotationPropertyRangeAxiom> annotationPropertyRangeAxioms(OWLAnnotationProperty)
4 ::: Stream<OWLAnnotationPropertyDomainAxiom> annotationPropertyDomainAxioms(OWLAnnotationProperty)
sszuev commented
Note that the optimizations for OWLClass
number 2 (equivalentClassesAxioms
) and 4 (subClassAxiomsForSubClass
) are already done.
The following two optimizations are also ready:
Stream<OWLDeclarationAxiom> declarationAxioms(OWLEntity)
Stream<OWLAnnotationAssertionAxiom> annotationAssertionAxioms(OWLAnnotationSubject)
sszuev commented
The main cases are covered, all others are rare.
Optimizations for these rest cases can be proposed later, when an understanding of their need arises: right now the existing mechanisms seem to be good enough.