void handleChild(AnnEH h) { ((BaseBuilder<?, ?>) builder).withAnnotation(h.getOWLObject()); }
@Override public List<OWLOntologyChange> applyChanges(OWLOntology o) { T object = buildObject(); if (!(object instanceof OWLAxiom)) { return Collections.emptyList(); } // create and apply the new change AddAxiom change = new AddAxiom(o, (OWLAxiom) object); o.applyChange(change); // check conformity to the profile OWLProfileReport report = Profiles.OWL2_DL.checkOntology(o); // collect all changes to fix the ontology List<OWLOntologyChange> changes = asList( report.getViolations().stream().flatMap(v -> v.repair().stream())); // fix the ontology o.getOWLOntologyManager().applyChanges(changes); // return all applied changes for reference changes.add(change); return changes; } }
@Override public List<OWLOntologyChange> applyChanges(OWLOntology o) { T object = buildObject(); if (!(object instanceof OWLAxiom)) { return Collections.emptyList(); } // create and apply the new change AddAxiom change = new AddAxiom(o, (OWLAxiom) object); o.applyChange(change); // check conformity to the profile OWLProfileReport report = Profiles.OWL2_DL.checkOntology(o); // collect all changes to fix the ontology List<OWLOntologyChange> changes = asList( report.getViolations().stream().flatMap(v -> v.repair().stream())); // fix the ontology o.getOWLOntologyManager().applyChanges(changes); // return all applied changes for reference changes.add(change); return changes; } }
@Override public List<OWLOntologyChange> applyChanges(OWLOntology o) { T object = buildObject(); if (!(object instanceof OWLAxiom)) { return Collections.emptyList(); } // create and apply the new change AddAxiom change = new AddAxiom(o, (OWLAxiom) object); o.applyChange(change); // check conformity to the profile OWLProfileReport report = Profiles.OWL2_DL.checkOntology(o); // collect all changes to fix the ontology List<OWLOntologyChange> changes = asList(report.getViolations().stream().flatMap(v -> v.repair().stream())); // fix the ontology o.getOWLOntologyManager().applyChanges(changes); // return all applied changes for reference changes.add(change); return changes; } }
void handleChild(AnnEH h) { ((BaseBuilder<?, ?>) builder).withAnnotation(h.getOWLObject()); }
@Override public List<OWLOntologyChange> applyChanges(OWLOntology o) { T object = buildObject(); if (!(object instanceof OWLAxiom)) { return Collections.emptyList(); } // create and apply the new change AddAxiom change = new AddAxiom(o, (OWLAxiom) object); o.applyChange(change); // check conformity to the profile OWLProfileReport report = Profiles.OWL2_DL.checkOntology(o); // collect all changes to fix the ontology List<OWLOntologyChange> changes = asList( report.getViolations().stream().flatMap(v -> v.repair().stream())); // fix the ontology o.getOWLOntologyManager().applyChanges(changes); // return all applied changes for reference changes.add(change); return changes; } }
void handleChild(AnnEH h) { ((BaseBuilder<?, ?>) builder).withAnnotation(h.getOWLObject()); }
void handleChild(AnnEH h) { ((BaseBuilder<?, ?>) builder).withAnnotation(h.getOWLObject()); }