use of edu.stanford.bmir.protege.web.shared.event.EntityDeprecatedChangedEvent in project webprotege by protegeproject.
the class EntityDeprecatedChangedEventTranslator method translateOntologyChanges.
@Override
public void translateOntologyChanges(Revision revision, ChangeApplicationResult<?> changes, List<ProjectEvent<?>> projectEventList) {
for (OWLOntologyChange change : changes.getChangeList()) {
if (change.isAxiomChange()) {
if (change.getAxiom() instanceof OWLAnnotationAssertionAxiom) {
OWLAnnotationAssertionAxiom axiom = (OWLAnnotationAssertionAxiom) change.getAxiom();
if (axiom.getProperty().isDeprecated()) {
if (axiom.getSubject() instanceof IRI) {
IRI subject = (IRI) axiom.getSubject();
for (OWLEntity entity : hasGetEntitiesWithIRI.getEntitiesWithIRI(subject)) {
boolean deprecated = deprecatedEntityChecker.isDeprecated(entity);
projectEventList.add(new EntityDeprecatedChangedEvent(projectId, entity, deprecated));
}
}
}
}
}
}
}
Aggregations