Show ThinkcapPortfolio.java syntax highlighted
package org.integratedmodelling.thinkcap.portfolio;
import java.util.Hashtable;
import org.integratedmodelling.thinklab.interfaces.IConcept;
import org.integratedmodelling.thinkcap.ResultContainer;
public class ThinkcapPortfolio {
Hashtable<String, IConcept> concepts = new Hashtable<String, IConcept>();
public boolean containsConcept(IConcept concept) {
return concepts.get(concept.toString()) != null;
}
public void toggleConcept(IConcept cc) {
if (concepts.get(cc.toString()) != null)
concepts.remove(cc);
else
concepts.put(cc.toString(), cc);
}
public int nConcepts() {
return concepts.size();
}
public ResultContainer getConcepts() {
ResultContainer ret = new ResultContainer();
ret.setTotalResultCount(concepts.size());
for (String c : concepts.keySet()) {
ret.add(concepts.get(c), 100.0);
}
return ret;
}
}
See more files for this project here
A portal to explore and edit the knowledge contained in a set of ontologies in intuitive ways. Presents a Dictionary view (a Google-like interface), a Thesaurus view (a graphical display with simplified relationships) and a full graphical Concept view.
Project homepage:
http://sourceforge.net/projects/thinkcap
Programming language(s): Java,JavaScript,XML
License: other
ThinkcapPortfolio.java