/** * returns all the terms parsed from an ontology * * @return a set of OBOClass/Instance objects, or null if session is not initialized */ public Set<OBOObject> getTerms() { LinkDatabase lnkDb = session.getLinkDatabase(); HashSet<OBOObject> terms = new HashSet<OBOObject>(); for (IdentifiedObject io : lnkDb.getObjects()) { //do not return built-in obo: constructs if ((io instanceof OBOClass || io instanceof Instance) && !io.getID().toLowerCase().startsWith("obo:")) { terms.add((OBOObject) io); } } return terms; }
/** * returns all the terms parsed from an ontology * * @return a set of OBOClass/Instance objects, or null if session is not initialized */ public Set<OBOObject> getTerms() { LinkDatabase lnkDb = session.getLinkDatabase(); HashSet<OBOObject> terms = new HashSet<OBOObject>(); for (IdentifiedObject io : lnkDb.getObjects()) { //do not return built-in obo: constructs if ((io instanceof OBOClass || io instanceof Instance) && !io.getID().startsWith("obo:")) { terms.add((OBOObject) io); } // else { // if (io instanceof OBOProperty){ // System.out.println(((OBOProperty) io).getID()); // } // } } return terms; }
/** * returns all the terms parsed from an ontology * * @return a set of OBOClass/Instance objects, or null if session is not initialized */ public Set<OBOObject> getTerms() { LinkDatabase lnkDb = session.getLinkDatabase(); HashSet<OBOObject> terms = new HashSet<OBOObject>(); for (IdentifiedObject io : lnkDb.getObjects()) { //do not return built-in obo: constructs if ((io instanceof OBOClass || io instanceof Instance) && !io.getID().startsWith("obo:")) { terms.add((OBOObject) io); } // else { // if (io instanceof OBOProperty){ // System.out.println(((OBOProperty) io).getID()); // } // } } return terms; }