@Test public void testGetOBOSynonymsMultipleScopes() throws Exception{ OWLGraphWrapper wrapper = getOBO2OWLOntologyWrapper("ncbi_taxon_slim.obo"); OWLObject cls = wrapper.getOWLClass(OWLGraphWrapper.DEFAULT_IRI_PREFIX + "NCBITaxon_10088"); List<ISynonym> synonyms = wrapper.getOBOSynonyms(cls); assertEquals(2, synonyms.size()); ISynonym synonym1 = synonyms.get(0); ISynonym synonym2 = synonyms.get(1); if (synonym1.getLabel().equals("mice")) { ISynonym temp = synonym1; synonym1 = synonym2; synonym2 = temp; } assertEquals("Nannomys", synonym1.getLabel()); assertEquals("RELATED", synonym1.getScope()); assertNull(synonym1.getCategory()); assertNull(synonym1.getXrefs()); assertEquals("mice", synonym2.getLabel()); assertEquals("EXACT", synonym2.getScope()); assertNull(synonym2.getCategory()); assertNull(synonym2.getXrefs()); }
public List<ISynonym> getOBOSynonyms(OWLObject c) { OWLEntity e; if (c instanceof OWLEntity) { e = (OWLEntity) c; } else { return null; } List<ISynonym> synonyms = null; synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasExactSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasRelatedSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasNarrowSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasBroadSynonym)); return synonyms; }
OWLGraphWrapper extends OWLGraphWrapperEdgesAdvanced { public List<ISynonym> getOBOSynonyms(OWLObject c) { OWLEntity e; if (c instanceof OWLEntity) { e = (OWLEntity) c; } else { return null; } List<ISynonym> synonyms = null; synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasExactSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasRelatedSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasNarrowSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasBroadSynonym)); return synonyms; } }
OWLGraphWrapper extends OWLGraphWrapperEdgesAdvanced { public List<ISynonym> getOBOSynonyms(OWLObject c) { OWLEntity e; if (c instanceof OWLEntity) { e = (OWLEntity) c; } else { return null; } List<ISynonym> synonyms = null; synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasExactSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasRelatedSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasNarrowSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasBroadSynonym)); return synonyms; } OWLGraphWrapper(OWLOntology ontology); @Deprecated  OWLGraphWrapper(OWLOntology ontology, boolean isMergeImportClosure);  OWLGraphWrapper(String iri); }
OWLGraphWrapper extends OWLGraphWrapperEdgesAdvanced { public List<ISynonym> getOBOSynonyms(OWLObject c) { OWLEntity e; if (c instanceof OWLEntity) { e = (OWLEntity) c; } else { return null; } List<ISynonym> synonyms = null; synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasExactSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasRelatedSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasNarrowSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasBroadSynonym)); return synonyms; } OWLGraphWrapper(OWLOntology ontology); @Deprecated  OWLGraphWrapper(OWLOntology ontology, boolean isMergeImportClosure);  OWLGraphWrapper(String iri); @Deprecated void useImportClosureForQueries(); @Deprecated void addQueryOntology(OWLOntology extOnt); @Deprecated OWLOntology getOntology(); @Deprecated void setOntology(OWLOntology ontology); @Deprecated String[] getSynonymStrings(OWLObject c); List<ISynonym> getOBOSynonyms(OWLObject c); List<String> getOBOSynonymStrings(OWLObject c, List<String> sargs); }
OWLGraphWrapper extends OWLGraphWrapperEdgesAdvanced { public List<ISynonym> getOBOSynonyms(OWLObject c) { OWLEntity e; if (c instanceof OWLEntity) { e = (OWLEntity) c; } else { return null; } List<ISynonym> synonyms = null; synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasExactSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasRelatedSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasNarrowSynonym)); synonyms = merge(synonyms, getOBOSynonyms(e, Obo2OWLVocabulary.IRI_OIO_hasBroadSynonym)); return synonyms; } OWLGraphWrapper(OWLOntology ontology); @Deprecated  OWLGraphWrapper(OWLOntology ontology, boolean isMergeImportClosure);  OWLGraphWrapper(String iri); @Deprecated void useImportClosureForQueries(); @Deprecated void addQueryOntology(OWLOntology extOnt); @Deprecated OWLOntology getOntology(); @Deprecated void setOntology(OWLOntology ontology); @Deprecated String[] getSynonymStrings(OWLObject c); List<ISynonym> getOBOSynonyms(OWLObject c); List<String> getOBOSynonymStrings(OWLObject c, List<String> sargs); static final String DEFAULT_IRI_PREFIX; }