private void generateChanges() { Set<OWLClassExpression> supers = new HashSet<>(); for (OWLOntology o : ontologies) { o.equivalentClassesAxioms(cls).forEach(ax -> { addChange(new RemoveAxiom(o, ax)); ax.classExpressions().forEach(c -> collectClassExpressions(c, supers)); }); } supers.remove(cls); supers.forEach( sup -> addChange(new AddAxiom(targetOntology, df.getOWLSubClassOfAxiom(cls, sup)))); }
/** * Instantiates a new convert equivalent classes to super classes. * * @param dataFactory the data factory * @param cls the class to convert * @param ontologies the ontologies to use * @param targetOntology the target ontology * @param splitIntersections whether or not intersections should be split */ public ConvertEquivalentClassesToSuperClasses(OWLDataFactory dataFactory, OWLClass cls, Collection<OWLOntology> ontologies, OWLOntology targetOntology, boolean splitIntersections) { super(dataFactory); this.targetOntology = checkNotNull(targetOntology, "targetOntology cannot be null"); this.cls = checkNotNull(cls, "cls cannot be null"); this.ontologies = checkNotNull(ontologies, "ontologies cannot be null"); this.splitIntersections = splitIntersections; generateChanges(); }
/** * Instantiates a new convert equivalent classes to super classes. * * @param dataFactory the data factory * @param cls the class to convert * @param ontologies the ontologies to use * @param targetOntology the target ontology * @param splitIntersections whether or not intersections should be split */ public ConvertEquivalentClassesToSuperClasses(OWLDataFactory dataFactory, OWLClass cls, Collection<OWLOntology> ontologies, OWLOntology targetOntology, boolean splitIntersections) { super(dataFactory); this.targetOntology = checkNotNull(targetOntology, "targetOntology cannot be null"); this.cls = checkNotNull(cls, "cls cannot be null"); this.ontologies = checkNotNull(ontologies, "ontologies cannot be null"); this.splitIntersections = splitIntersections; generateChanges(); }
private void generateChanges() { Set<OWLClassExpression> supers = new HashSet<>(); for (OWLOntology o : ontologies) { o.equivalentClassesAxioms(cls).forEach(ax -> { addChange(new RemoveAxiom(o, ax)); ax.classExpressions().forEach(c -> collectClassExpressions(c, supers)); }); } supers.remove(cls); supers.forEach( sup -> addChange(new AddAxiom(targetOntology, df.getOWLSubClassOfAxiom(cls, sup)))); }
/** * Instantiates a new convert equivalent classes to super classes. * * @param dataFactory the data factory * @param cls the class to convert * @param ontologies the ontologies to use * @param targetOntology the target ontology * @param splitIntersections whether or not intersections should be split */ public ConvertEquivalentClassesToSuperClasses(OWLDataFactory dataFactory, OWLClass cls, Collection<OWLOntology> ontologies, OWLOntology targetOntology, boolean splitIntersections) { super(dataFactory); this.targetOntology = checkNotNull(targetOntology, "targetOntology cannot be null"); this.cls = checkNotNull(cls, "cls cannot be null"); this.ontologies = checkNotNull(ontologies, "ontologies cannot be null"); this.splitIntersections = splitIntersections; generateChanges(); }
private void generateChanges() { Set<OWLClassExpression> supers = new HashSet<>(); for (OWLOntology o : ontologies) { o.equivalentClassesAxioms(cls).forEach(ax -> { addChange(new RemoveAxiom(o, ax)); ax.classExpressions().forEach(c -> collectClassExpressions(c, supers)); }); } supers.remove(cls); supers.forEach( sup -> addChange(new AddAxiom(targetOntology, df.getOWLSubClassOfAxiom(cls, sup)))); }