org.semanticweb.owlapi.model.parameters.AxiomAnnotations Java Examples

The following examples show how to use org.semanticweb.owlapi.model.parameters.AxiomAnnotations. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EquivalentClassReasoning.java    From robot with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
/**
 * This is how we define the failure behavior given a Reasoning Mode.
 *
 * @param mode one of the enum instances that define how reasoning behavior should be over
 *     equivalent axioms
 * @param ontology Ontology to reason over
 * @return The EquivalentAxiomReasoningTest instance with the implementation of how to detect a
 *     failing Equivalence Axiom
 */
private static EquivalentAxiomReasoningTest createTest(
    EquivalentClassReasoningMode mode, OWLOntology ontology) {
  EquivalentAxiomReasoningTest test = null;
  switch (mode) {
    case ALL:
      test = axiom -> false;
      break;
    case NONE:
      test = axiom -> true;
      break;
    case ASSERTED_ONLY:
      test =
          axiom ->
              !ontology.containsAxiom(
                  axiom, Imports.INCLUDED, AxiomAnnotations.IGNORE_AXIOM_ANNOTATIONS);
      break;
  }
  return test;
}
 
Example #2
Source File: GraphReasoner.java    From owltools with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public boolean isEntailed(OWLAxiom axiom)
throws ReasonerInterruptedException,
UnsupportedEntailmentTypeException, TimeOutException,
AxiomNotInProfileException, FreshEntitiesException,
InconsistentOntologyException {
	return getRootOntology().containsAxiom(axiom, Imports.INCLUDED, AxiomAnnotations.IGNORE_AXIOM_ANNOTATIONS);
}
 
Example #3
Source File: GraphReasoner.java    From owltools with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public boolean isEntailed(Set<? extends OWLAxiom> axioms)
throws ReasonerInterruptedException,
UnsupportedEntailmentTypeException, TimeOutException,
AxiomNotInProfileException, FreshEntitiesException,
InconsistentOntologyException {
	for (OWLAxiom ax : axioms) {
		if (!getRootOntology().containsAxiom(ax, Imports.INCLUDED, AxiomAnnotations.IGNORE_AXIOM_ANNOTATIONS)) {
			return false;
		}
	}
	return true;
}
 
Example #4
Source File: PropertyViewOntologyBuilderTest.java    From owltools with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
private void assertOntologyContainsSubClassOf(String c, String p) {
	OWLSubClassOfAxiom testAx = 
		g.getDataFactory().getOWLSubClassOfAxiom(resolveClass(c), resolveClass(p));
	assertTrue(g.getSourceOntology().containsAxiom(testAx, Imports.INCLUDED, AxiomAnnotations.IGNORE_AXIOM_ANNOTATIONS));

}