OWLGraphWrapperExtended extends OWLGraphWrapperBasic { public IRI getIRIByIdentifier(String id) { return getIRIByIdentifier(id, false); } protected  OWLGraphWrapperExtended(OWLOntology ontology); protected  OWLGraphWrapperExtended(String iri); String getLabel(OWLObject c); String getLabel(OWLObject c, List<String> sargs); String getLabelOrDisplayId(OWLObject c); boolean isObsolete(OWLObject c); String getComment(OWLObject c); String getComment(OWLObject c, List<String> sargs); List<String> getComments(OWLObject c); List<String> getComments(OWLObject c, List<String> sargs); String getAnnotationValue(OWLObject c, OWLAnnotationProperty lap); List<String> getAnnotationValues(OWLObject c, OWLAnnotationProperty lap); String getDef(OWLObject c); String getDef(OWLObject c, List<String> sargs); boolean getIsMetaTag(OWLObject c); List<String> getSubsets(OWLObject c); List<String> getSubsets(OWLObject c, List<String> sargs); Set<String> getAllUsedSubsets(); Set<OWLObject> getOWLObjectsInSubset(String subset); Set<OWLClass> getOWLClassesInSubset(String subset); String getDomain(OWLObjectProperty prop); String getRange(OWLObjectProperty prop); List<String> getReplacedBy(OWLObject c); List<String> getConsider(OWLObject c); boolean getIsObsolete(OWLObject c); String getIsObsoleteBinaryString(OWLObject c, List<String> sargs); String getAnnotationPropertyValue(OWLObject c, String tag); String getAnnotationPropertyValue(OWLObject c, List<String> tags); List<String> getAnnotationPropertyValues(OWLObject c, String tag); List<String> getAnnotationPropertyValues(OWLObject c, List<String> tags); List<String> getAltIds(OWLObject c); OWLObject getObjectByAltId(String altId); @Deprecated boolean getBuiltin(OWLObject c); @Deprecated boolean getIsAnonymous(OWLObject c); OWLAnnotationProperty getAnnotationProperty(String tag); String getNamespace(OWLObject c); String getNamespace(OWLObject c, List<String> sargs); String getCreatedBy(OWLObject c); boolean getIsAntiSymmetric(OWLObject c); boolean getIsCyclic(OWLObject c); boolean getIsTransitive(OWLObjectProperty c); boolean getIsFunctional(OWLObjectProperty c); boolean getIsInverseFunctional(OWLObjectProperty c); boolean getIsReflexive(OWLObjectProperty c); boolean getIsSymmetric(OWLObjectProperty c); List<String> getXref(OWLObject c); List<String> getXref(OWLObject c, List<String> sargs); List<String> getDefXref(OWLObject c); List<String> getDefXref(OWLObject c, List<String> sargs); String getIdentifier(OWLObject owlObject); String getIdentifier(OWLObject owlObject, boolean useShorthand); String getIdentifier(OWLObject owlObject, List<String> sargs); String getIdentifier(IRI iriId); IRI getIRIByIdentifier(String id); IRI getIRIByIdentifier(String id, boolean isAutoResolve); OWLObject getOWLObjectByIdentifier(String id); OWLObjectProperty getOWLObjectPropertyByIdentifier(String id); OWLNamedIndividual getOWLIndividualByIdentifier(String id); OWLClass getOWLClassByIdentifier(String id); OWLClass getOWLClassByIdentifierNoAltIds(String id); boolean isOboAltId(OWLEntity e); OWLClass getOWLClassByIdentifier(String id, boolean isAutoResolve); OWLObject getOWLObjectByLabel(String label); IRI getIRIByLabel(String label); IRI getIRIByLabel(String label, boolean isEnforceUnivocal); OWLObject getOWLObjectByAltId(String altIds); Map<String, OWLObject> getOWLObjectsByAltId(Set<String> altIds); Map<String, OWLObject> getAllOWLObjectsByAltId(); OWLClass getOWLClass(String s); OWLClass getOWLClass(IRI iri); OWLClass getOWLClass(OWLObject x); OWLNamedIndividual getOWLIndividual(IRI iri); OWLNamedIndividual getOWLIndividual(String s); OWLObjectProperty getOWLObjectProperty(String iri); OWLObjectProperty getOWLObjectProperty(IRI iri); OWLAnnotationProperty getOWLAnnotationProperty(IRI iri); OWLObject getOWLObject(String s); OWLObject getOWLObject(IRI s); String getOntologyId(); Map<String, String> getVersions(); String getIdSpace(OWLObject obj); String getIdSpace(OWLObject obj, List<String> sargs); String getOboGraphJSONString(OWLObject obj);  }
@Test public void testGetIRIByIdentifier() throws Exception { OWLGraphWrapper wrapper = getGraph("graph/sub-go-gaf-with-dummy-prop.owl"); IRI iri1 = wrapper.getIRIByIdentifier("results_in_formation_of", false); assertEquals("results_in_formation_of is supposed to be mapped to RO_0002297 but it is not.", iri1.toString(), "http: IRI iri2 = wrapper.getIRIByIdentifier("dummy1", false); assertEquals("dummy1 is supposed to be mapped to so#dummy1 but it is not.", iri2.toString(), "http: IRI iri3 = wrapper.getIRIByIdentifier("part_of", false); assertEquals("part_of is supposed to be mapped to BFO_0000050 but it is not.", iri3.toString(), "http: thrown.expect(RuntimeException.class); thrown.expectMessage("Multiple candidate IRIs are found for id: dummy2. None of them are from BFO or RO."); wrapper.getIRIByIdentifier("dummy2", false); }