/* (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; }
/* (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; }
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; }
public boolean match(IConcept c) { Class<?> cc = coll.get(c.getSemanticType().toString()); return (cc != null); }
public boolean match(IConcept c) { ret = coll.get(c.getSemanticType().toString()); return (ret != null); }
/* (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); }
public String getStateRelativePath(IConcept c) { return getLocation() + "/" + c.toString().replaceAll(":", ".").toLowerCase(); }