コード例 #1
0
  /* (non-Javadoc)
   * @see org.integratedmodelling.thinklab.IKnowledgeBase#getLeastGeneralCommonConcept(java.util.Collection)
   */
  public IConcept getLeastGeneralCommonConcept(Collection<IConcept> cc) {

    IConcept ret = null;
    Iterator<IConcept> ii = cc.iterator();

    if (ii.hasNext()) {

      ret = ii.next();

      if (ret != null)
        while (ii.hasNext()) {
          ret = ret.getLeastGeneralCommonConcept(ii.next());
          if (ret == null) break;
        }
    }

    return ret;
  }
コード例 #2
0
  /* (non-Javadoc)
   * @see org.integratedmodelling.thinklab.IKnowledgeBase#validateLiteral(org.integratedmodelling.thinklab.interfaces.IConcept, java.lang.String, org.integratedmodelling.thinklab.interfaces.IOntology)
   */
  public IValue validateLiteral(IConcept c, String literal) throws ThinklabException {

    ParsedLiteralValue ret = getRawLiteral(c);
    if (ret != null) ret.parseLiteral(literal);
    else
      throw new ThinklabValidationException(
          "don't know how to validate a literal of type " + c.toString());

    return ret;
  }
コード例 #3
0
ファイル: GISArchive.java プロジェクト: ariesteam/thinklab
  public File getFileForState(IConcept c) {

    File ret = new File(directory + File.separator + getLocation());

    ret.mkdirs();

    ret = new File(ret + File.separator + c.toString().replaceAll(":", "_").toLowerCase() + ".tif");

    return ret;
  }
コード例 #4
0
 public boolean match(IConcept c) {
   Class<?> cc = coll.get(c.getSemanticType().toString());
   return (cc != null);
 }
コード例 #5
0
 public boolean match(IConcept c) {
   ret = coll.get(c.getSemanticType().toString());
   return (ret != null);
 }
コード例 #6
0
 /* (non-Javadoc)
  * @see org.integratedmodelling.thinklab.IKnowledgeBase#getLeastGeneralCommonConcept(org.integratedmodelling.thinklab.interfaces.IConcept, org.integratedmodelling.thinklab.interfaces.IConcept)
  */
 public IConcept getLeastGeneralCommonConcept(IConcept concept1, IConcept c) {
   return concept1.getLeastGeneralCommonConcept(c);
 }
コード例 #7
0
ファイル: GISArchive.java プロジェクト: ariesteam/thinklab
  public String getStateRelativePath(IConcept c) {

    return getLocation() + "/" + c.toString().replaceAll(":", ".").toLowerCase();
  }