/** * Expands the axiom set by adding the referencing axioms for the * specified entity. */ private int expandWithReferencingAxioms(OWLEntity obj, int limit) throws OWLException { Set<OWLAxiom> expansionAxioms = new HashSet<OWLAxiom>(); // First expand by getting the defining axioms - if this doesn't // return any axioms, then get the axioms that reference the entity for (OWLOntology ont : owlOntologyManager.getImportsClosure(getOWLOntology())) { expansionAxioms.addAll(ont.getReferencingAxioms(obj)); } expansionAxioms.removeAll(debuggingAxioms); return addMax(expansionAxioms, debuggingAxioms, limit); }
/** * Expands the axiom set by adding the referencing axioms for the specified * entity. * * @param obj the obj * @param limit the limit * @return the int */ private int expandWithReferencingAxioms(OWLEntity obj, int limit) { // First expand by getting the defining axioms - if this doesn't // return any axioms, then get the axioms that reference the entity Set<OWLAxiom> expansionAxioms = asUnorderedSet( getOWLOntology().referencingAxioms(obj, INCLUDED)); expansionAxioms.removeAll(debuggingAxioms); return addMax(expansionAxioms, debuggingAxioms, limit); }
/** * Expands the axiom set by adding the referencing axioms for the specified * entity. * * @param obj the obj * @param limit the limit * @return the int */ private int expandWithReferencingAxioms(OWLEntity obj, int limit) { // First expand by getting the defining axioms - if this doesn't // return any axioms, then get the axioms that reference the entity Set<OWLAxiom> expansionAxioms = asUnorderedSet( getOWLOntology().referencingAxioms(obj, INCLUDED)); expansionAxioms.removeAll(debuggingAxioms); return addMax(expansionAxioms, debuggingAxioms, limit); }
/** * Expands the axiom set by adding the referencing axioms for the specified * entity. * * @param obj the obj * @param limit the limit * @return the int */ private int expandWithReferencingAxioms(OWLEntity obj, int limit) { // First expand by getting the defining axioms - if this doesn't // return any axioms, then get the axioms that reference the entity Set<OWLAxiom> expansionAxioms = asUnorderedSet( getOWLOntology().referencingAxioms(obj, INCLUDED)); expansionAxioms.removeAll(debuggingAxioms); return addMax(expansionAxioms, debuggingAxioms, limit); }
/** * Expands the axiom set by adding the referencing axioms for the specified * entity. * * @param obj the obj * @param limit the limit * @return the int */ private int expandWithReferencingAxioms(OWLEntity obj, int limit) { // First expand by getting the defining axioms - if this doesn't // return any axioms, then get the axioms that reference the entity Set<OWLAxiom> expansionAxioms = asUnorderedSet( getOWLOntology().referencingAxioms(obj, INCLUDED)); expansionAxioms.removeAll(debuggingAxioms); return addMax(expansionAxioms, debuggingAxioms, limit); }
/** * Creates a set of axioms to expands the debugging axiom set by adding the defining axioms for the * specified entity. */ private int expandWithDefiningAxioms(OWLEntity obj, int limit) throws OWLException { Set<OWLAxiom> expansionAxioms = new HashSet<OWLAxiom>(); for (OWLOntology ont : owlOntologyManager.getImportsClosure(getOWLOntology())) { if (obj instanceof OWLClass) { expansionAxioms.addAll(ont.getAxioms((OWLClass) obj)); } else if (obj instanceof OWLObjectProperty) { expansionAxioms.addAll(ont.getAxioms((OWLObjectProperty) obj)); } else if (obj instanceof OWLDataProperty) { expansionAxioms.addAll(ont.getAxioms((OWLDataProperty) obj)); } else if (obj instanceof OWLIndividual) { expansionAxioms.addAll(ont.getAxioms((OWLIndividual) obj)); } } expansionAxioms.removeAll(debuggingAxioms); return addMax(expansionAxioms, debuggingAxioms, limit); }
/** * Creates a set of axioms to expands the debugging axiom set by adding the * defining axioms for the specified entity. * * @param obj the obj * @param limit the limit * @return the int */ private int expandWithDefiningAxioms(OWLEntity obj, int limit) { Set<OWLAxiom> expansionAxioms = new HashSet<>(); if (obj instanceof OWLClass) { add(expansionAxioms, getOWLOntology().axioms((OWLClass) obj, INCLUDED)); } else if (obj.isOWLObjectProperty()) { add(expansionAxioms, getOWLOntology().axioms(obj.asOWLObjectProperty(), INCLUDED)); } else if (obj.isOWLDataProperty()) { add(expansionAxioms, getOWLOntology().axioms(obj.asOWLDataProperty(), INCLUDED)); } else if (obj instanceof OWLIndividual) { add(expansionAxioms, getOWLOntology().axioms((OWLIndividual) obj, INCLUDED)); } expansionAxioms.removeAll(debuggingAxioms); return addMax(expansionAxioms, debuggingAxioms, limit); }
/** * Creates a set of axioms to expands the debugging axiom set by adding the * defining axioms for the specified entity. * * @param obj the obj * @param limit the limit * @return the int */ private int expandWithDefiningAxioms(OWLEntity obj, int limit) { Set<OWLAxiom> expansionAxioms = new HashSet<>(); if (obj instanceof OWLClass) { add(expansionAxioms, getOWLOntology().axioms((OWLClass) obj, INCLUDED)); } else if (obj.isOWLObjectProperty()) { add(expansionAxioms, getOWLOntology().axioms(obj.asOWLObjectProperty(), INCLUDED)); } else if (obj.isOWLDataProperty()) { add(expansionAxioms, getOWLOntology().axioms(obj.asOWLDataProperty(), INCLUDED)); } else if (obj instanceof OWLIndividual) { add(expansionAxioms, getOWLOntology().axioms((OWLIndividual) obj, INCLUDED)); } expansionAxioms.removeAll(debuggingAxioms); return addMax(expansionAxioms, debuggingAxioms, limit); }
/** * Creates a set of axioms to expands the debugging axiom set by adding the * defining axioms for the specified entity. * * @param obj the obj * @param limit the limit * @return the int */ private int expandWithDefiningAxioms(OWLEntity obj, int limit) { Set<OWLAxiom> expansionAxioms = new HashSet<>(); if (obj instanceof OWLClass) { add(expansionAxioms, getOWLOntology().axioms((OWLClass) obj, INCLUDED)); } else if (obj.isOWLObjectProperty()) { add(expansionAxioms, getOWLOntology().axioms(obj.asOWLObjectProperty(), INCLUDED)); } else if (obj.isOWLDataProperty()) { add(expansionAxioms, getOWLOntology().axioms(obj.asOWLDataProperty(), INCLUDED)); } else if (obj instanceof OWLIndividual) { add(expansionAxioms, getOWLOntology().axioms((OWLIndividual) obj, INCLUDED)); } expansionAxioms.removeAll(debuggingAxioms); return addMax(expansionAxioms, debuggingAxioms, limit); }
/** * Creates a set of axioms to expands the debugging axiom set by adding the * defining axioms for the specified entity. * * @param obj the obj * @param limit the limit * @return the int */ private int expandWithDefiningAxioms(OWLEntity obj, int limit) { Set<OWLAxiom> expansionAxioms = new HashSet<>(); if (obj instanceof OWLClass) { add(expansionAxioms, getOWLOntology().axioms((OWLClass) obj, INCLUDED)); } else if (obj.isOWLObjectProperty()) { add(expansionAxioms, getOWLOntology().axioms(obj.asOWLObjectProperty(), INCLUDED)); } else if (obj.isOWLDataProperty()) { add(expansionAxioms, getOWLOntology().axioms(obj.asOWLDataProperty(), INCLUDED)); } else if (obj instanceof OWLIndividual) { add(expansionAxioms, getOWLOntology().axioms((OWLIndividual) obj, INCLUDED)); } expansionAxioms.removeAll(debuggingAxioms); return addMax(expansionAxioms, debuggingAxioms, limit); }