OWLDataFactory df = getDataFactory();
OWLAnnotationProperty property = getSynonymAnnotationProperty(matcher);
Set<OWLAnnotation> annotations = new HashSet<>();
annotations.addAll(getSynonymTypeAnnotations(matcher));
annotations.addAll(getXRefAnnotations(matcher));
OWLEntity subject = getConsumer().getCurrentEntity();
String synonym = matcher.group(VALUE_GROUP);
assert synonym != null;
OWLLiteral synonymLiteral = df.getOWLLiteral(synonym);
OWLAnnotationAssertionAxiom annoAssertion = df
.getOWLAnnotationAssertionAxiom(property, subject.getIRI(),
synonymLiteral, annotations);
applyChange(new AddAxiom(getOntology(), annoAssertion));
}
}