protected Stream<? extends OWLAxiom> getAxioms(OWLEntity entity) { if (entity.isOWLClass()) { return getOntology().axioms(entity.asOWLClass()); } if (entity.isOWLObjectProperty()) { return getOntology().axioms(entity.asOWLObjectProperty()); } if (entity.isOWLDataProperty()) { return getOntology().axioms(entity.asOWLDataProperty()); } if (entity.isOWLNamedIndividual()) { return getOntology().axioms(entity.asOWLNamedIndividual()); } return empty(); }
protected Stream<? extends OWLAxiom> getAxioms(OWLEntity entity) { if (entity.isOWLClass()) { return getOntology().axioms(entity.asOWLClass()); } if (entity.isOWLObjectProperty()) { return getOntology().axioms(entity.asOWLObjectProperty()); } if (entity.isOWLDataProperty()) { return getOntology().axioms(entity.asOWLDataProperty()); } if (entity.isOWLNamedIndividual()) { return getOntology().axioms(entity.asOWLNamedIndividual()); } return empty(); }
protected Stream<? extends OWLAxiom> getAxioms(OWLEntity entity) { if (entity.isOWLClass()) { return getOntology().axioms(entity.asOWLClass()); } if (entity.isOWLObjectProperty()) { return getOntology().axioms(entity.asOWLObjectProperty()); } if (entity.isOWLDataProperty()) { return getOntology().axioms(entity.asOWLDataProperty()); } if (entity.isOWLNamedIndividual()) { return getOntology().axioms(entity.asOWLNamedIndividual()); } return empty(); }
protected Stream<? extends OWLAxiom> getAxioms(OWLEntity entity) { if (entity.isOWLClass()) { return getOntology().axioms(entity.asOWLClass()); } if (entity.isOWLObjectProperty()) { return getOntology().axioms(entity.asOWLObjectProperty()); } if (entity.isOWLDataProperty()) { return getOntology().axioms(entity.asOWLDataProperty()); } if (entity.isOWLNamedIndividual()) { return getOntology().axioms(entity.asOWLNamedIndividual()); } return empty(); }
private void buildIndices() { reset(); AxiomMapBuilder builder = new AxiomMapBuilder(); currentExplanation.forEach(ax -> ax.accept(builder)); try { if (ont != null) { man.removeOntology(verifyNotNull(getOntology())); } ont = man .createOntology(IRI.create("http://www.semanticweb.org/", "ontology" + RANDOMSTART .incrementAndGet())); List<AddAxiom> changes = new ArrayList<>(); for (OWLAxiom ax : currentExplanation) { changes.add(new AddAxiom(getOntology(), ax)); ax.accept(builder); } man.applyChanges(changes); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } }
private void buildIndices() { reset(); AxiomMapBuilder builder = new AxiomMapBuilder(); currentExplanation.forEach(ax -> ax.accept(builder)); try { if (ont != null) { man.removeOntology(verifyNotNull(getOntology())); } ont = man .createOntology(IRI.create("http://www.semanticweb.org/", "ontology" + RANDOMSTART .incrementAndGet())); List<AddAxiom> changes = new ArrayList<>(); for (OWLAxiom ax : currentExplanation) { changes.add(new AddAxiom(getOntology(), ax)); ax.accept(builder); } man.applyChanges(changes); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } }
private void buildIndices() { reset(); AxiomMapBuilder builder = new AxiomMapBuilder(); currentExplanation.forEach(ax -> ax.accept(builder)); try { if (ont != null) { man.removeOntology(verifyNotNull(getOntology())); } ont = man .createOntology(IRI.create("http://www.semanticweb.org/", "ontology" + RANDOMSTART .incrementAndGet())); List<AddAxiom> changes = new ArrayList<>(); for (OWLAxiom ax : currentExplanation) { changes.add(new AddAxiom(getOntology(), ax)); ax.accept(builder); } man.applyChanges(changes); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } }
private void buildIndices() { reset(); AxiomMapBuilder builder = new AxiomMapBuilder(); currentExplanation.forEach(ax -> ax.accept(builder)); try { if (ont != null) { man.removeOntology(verifyNotNull(getOntology())); } ont = man .createOntology(IRI.create("http://www.semanticweb.org/", "ontology" + RANDOMSTART .incrementAndGet())); List<AddAxiom> changes = new ArrayList<>(); for (OWLAxiom ax : currentExplanation) { changes.add(new AddAxiom(getOntology(), ax)); ax.accept(builder); } man.applyChanges(changes); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } }
/** * Gets the target axioms. * * @param target the current target * @return the target axioms */ private Set<OWLAxiom> getTargetAxioms(OWLEntity target) { Set<OWLAxiom> axioms = new HashSet<>(); if (target.isOWLClass()) { add(axioms, getOntology().axioms(target.asOWLClass())); } if (target.isOWLObjectProperty()) { add(axioms, getOntology().axioms(target.asOWLObjectProperty())); } if (target.isOWLDataProperty()) { add(axioms, getOntology().axioms(target.asOWLDataProperty())); } if (target.isOWLNamedIndividual()) { add(axioms, getOntology().axioms(target.asOWLNamedIndividual())); } return axioms; }
/** * Gets the target axioms. * * @param target the current target * @return the target axioms */ private Set<OWLAxiom> getTargetAxioms(OWLEntity target) { Set<OWLAxiom> axioms = new HashSet<>(); if (target.isOWLClass()) { add(axioms, getOntology().axioms(target.asOWLClass())); } if (target.isOWLObjectProperty()) { add(axioms, getOntology().axioms(target.asOWLObjectProperty())); } if (target.isOWLDataProperty()) { add(axioms, getOntology().axioms(target.asOWLDataProperty())); } if (target.isOWLNamedIndividual()) { add(axioms, getOntology().axioms(target.asOWLNamedIndividual())); } return axioms; }
/** * Gets the target axioms. * * @param target the current target * @return the target axioms */ private Set<OWLAxiom> getTargetAxioms(OWLEntity target) { Set<OWLAxiom> axioms = new HashSet<>(); if (target.isOWLClass()) { add(axioms, getOntology().axioms(target.asOWLClass())); } if (target.isOWLObjectProperty()) { add(axioms, getOntology().axioms(target.asOWLObjectProperty())); } if (target.isOWLDataProperty()) { add(axioms, getOntology().axioms(target.asOWLDataProperty())); } if (target.isOWLNamedIndividual()) { add(axioms, getOntology().axioms(target.asOWLNamedIndividual())); } return axioms; }
/** * Gets the target axioms. * * @param target the current target * @return the target axioms */ private Set<OWLAxiom> getTargetAxioms(OWLEntity target) { Set<OWLAxiom> axioms = new HashSet<>(); if (target.isOWLClass()) { add(axioms, getOntology().axioms(target.asOWLClass())); } if (target.isOWLObjectProperty()) { add(axioms, getOntology().axioms(target.asOWLObjectProperty())); } if (target.isOWLDataProperty()) { add(axioms, getOntology().axioms(target.asOWLDataProperty())); } if (target.isOWLNamedIndividual()) { add(axioms, getOntology().axioms(target.asOWLNamedIndividual())); } return axioms; }