private void generateChanges(OWLClass cls, OWLObjectPropertyExpression property, Collection<OWLOntology> ontologies, OWLOntology targetOntology) { // We collect all of the fillers for existential restrictions along // the target property and all of the fillers for hasValue restrictions // as nominals FillerCollector collector = new FillerCollector(property); ontologies.forEach(o -> o.subClassAxiomsForSubClass(cls) .forEach(ax -> ax.getSuperClass().accept(collector))); if (collector.fillers.isEmpty()) { return; } OWLObjectUnionOf union = df.getOWLObjectUnionOf(collector.fillers); OWLClassExpression closureAxiomDesc = df.getOWLObjectAllValuesFrom(property, union); addChange(new AddAxiom(targetOntology, df.getOWLSubClassOfAxiom(cls, closureAxiomDesc))); }
private void generateChanges(OWLClass cls, OWLObjectPropertyExpression property, Collection<OWLOntology> ontologies, OWLOntology targetOntology) { // We collect all of the fillers for existential restrictions along // the target property and all of the fillers for hasValue restrictions // as nominals FillerCollector collector = new FillerCollector(property); ontologies.forEach(o -> o.subClassAxiomsForSubClass(cls) .forEach(ax -> ax.getSuperClass().accept(collector))); if (collector.fillers.isEmpty()) { return; } OWLObjectUnionOf union = df.getOWLObjectUnionOf(collector.fillers); OWLClassExpression closureAxiomDesc = df.getOWLObjectAllValuesFrom(property, union); addChange(new AddAxiom(targetOntology, df.getOWLSubClassOfAxiom(cls, closureAxiomDesc))); }
private void generateChanges(OWLClass cls, OWLObjectPropertyExpression property, Collection<OWLOntology> ontologies, OWLOntology targetOntology) { // We collect all of the fillers for existential restrictions along // the target property and all of the fillers for hasValue restrictions // as nominals FillerCollector collector = new FillerCollector(property); ontologies.forEach(o -> o.subClassAxiomsForSubClass(cls) .forEach(ax -> ax.getSuperClass().accept(collector))); if (collector.fillers.isEmpty()) { return; } OWLObjectUnionOf union = df.getOWLObjectUnionOf(collector.fillers); OWLClassExpression closureAxiomDesc = df.getOWLObjectAllValuesFrom(property, union); addChange(new AddAxiom(targetOntology, df.getOWLSubClassOfAxiom(cls, closureAxiomDesc))); }