Search in sources :

Example 1 with OntologyChangeList

use of edu.stanford.bmir.protege.web.server.change.OntologyChangeList in project webprotege by protegeproject.

the class DeleteEntityChangeListGenerator method generateChanges.

@Override
public OntologyChangeList<OWLEntity> generateChanges(ChangeGenerationContext context) {
    OntologyChangeList.Builder<OWLEntity> builder = new OntologyChangeList.Builder<>();
    OWLEntityRemover remover = new OWLEntityRemover(rootOntology.getImportsClosure());
    entity.accept(remover);
    List<RemoveAxiom> changeList = remover.getChanges();
    builder.addAll(changeList);
    return builder.build(entity);
}
Also used : OntologyChangeList(edu.stanford.bmir.protege.web.server.change.OntologyChangeList) OWLEntity(org.semanticweb.owlapi.model.OWLEntity) OWLEntityRemover(org.semanticweb.owlapi.util.OWLEntityRemover) RemoveAxiom(org.semanticweb.owlapi.model.RemoveAxiom)

Aggregations

OntologyChangeList (edu.stanford.bmir.protege.web.server.change.OntologyChangeList)1 OWLEntity (org.semanticweb.owlapi.model.OWLEntity)1 RemoveAxiom (org.semanticweb.owlapi.model.RemoveAxiom)1 OWLEntityRemover (org.semanticweb.owlapi.util.OWLEntityRemover)1