Exemplo n.º 1
0
  public IProperty retrieveProperty(SemanticType t) {

    IProperty ret = null;
    IOntology o = knowledgeRepository.retrieveOntology(t.getConceptSpace());
    if (o != null) ret = o.getProperty(t.getLocalName());
    return ret;
  }
Exemplo n.º 2
0
  /* (non-Javadoc)
   * @see org.integratedmodelling.thinklab.IKnowledgeBase#getPropertyFromURI(java.lang.String)
   */
  public IProperty getPropertyFromURI(String uri) {

    IProperty 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.getProperty(ss[1]);
    } catch (ThinklabResourceNotFoundException e) {
    }
    return ret;
  }