Search in sources :

Example 1 with OBOTermSynonymScope

use of edu.stanford.bmir.protege.web.shared.obo.OBOTermSynonymScope in project webprotege by protegeproject.

the class TermSynonymsManager method getSynonyms.

public Collection<OBOTermSynonym> getSynonyms(OWLEntity term) {
    Set<OBOTermSynonym> result = new HashSet<>();
    for (OWLOntology ontology : rootOntology.getImportsClosure()) {
        Set<OWLAnnotationAssertionAxiom> annotationAssertionAxioms = ontology.getAnnotationAssertionAxioms(term.getIRI());
        for (OWLAnnotationAssertionAxiom ax : annotationAssertionAxioms) {
            OBOTermSynonymScope synonymScope = getSynonymScope(ax);
            if (synonymScope != null) {
                OBOTermSynonym termSynonym = new OBOTermSynonym(xRefExtractor.getXRefs(ax), getStringValue(ax), synonymScope);
                result.add(termSynonym);
            }
        }
    }
    return result;
}
Also used : OBOTermSynonymScope(edu.stanford.bmir.protege.web.shared.obo.OBOTermSynonymScope) OBOTermSynonym(edu.stanford.bmir.protege.web.shared.obo.OBOTermSynonym)

Aggregations

OBOTermSynonym (edu.stanford.bmir.protege.web.shared.obo.OBOTermSynonym)1 OBOTermSynonymScope (edu.stanford.bmir.protege.web.shared.obo.OBOTermSynonymScope)1