public IConcept retrieveConcept(SemanticType t) { IConcept ret = null; IOntology o = knowledgeRepository.retrieveOntology(t.getConceptSpace()); if (o != null) ret = o.getConcept(t.getLocalName()); if (ret == null && t.toString().equals(rootTypeID.toString())) { ret = getRootConcept(); } return ret; }
/* (non-Javadoc) * @see org.integratedmodelling.thinklab.IKnowledgeBase#getConceptFromURI(java.lang.String) */ public IConcept getConceptFromURI(String uri) { IConcept ret = null; String[] ss = uri.split("#"); if (ss.length != 2) return ret; IOntology o = null; try { String csp = getConceptSpaceFromURI(ss[0] + "#"); if (csp == null) return ret; o = knowledgeRepository.retrieveOntology(csp); if (o != null) ret = o.getConcept(ss[1]); } catch (ThinklabResourceNotFoundException e) { } return ret; }