package jalview.datamodel.ontology; import java.util.List; import java.util.Set; public interface OntologyI { /** * Answers true if childTerm is the same as, or a sub-type * (specialisation of) parentTerm, else false * * @param childTerm * @param parentTerm * @return */ boolean isA(String childTerm, String parentTerm); /** * Answers those terms in the given set which are not child terms of some * other term in the set. That is, returns a set of parent terms. The input * set is not modified. * * @param terms * @return */ Set getParentTerms(Set terms); /** * Answers a (possibly empty) list of those terms in the supplied list which * are a child (directly or indirectly) of parent. The parent * term itself is not included (even if in the input list) * * @param parent * @param terms * @return */ List getChildTerms(String parent, List terms); /** * Returns a sorted list of all valid terms queried for (i.e. terms processed * which were valid in the SO), using the friendly description. * * This can be used to check that any hard-coded stand-in for the full SO * includes all the terms needed for correct processing. * * @return */ List termsFound(); /** * Returns a sorted list of all invalid terms queried for (i.e. terms * processed which were not found in the SO), using the friendly description. * * This can be used to report any 'non-compliance' in data, and/or to report * valid terms missing from any hard-coded stand-in for the full SO. * * @return */ List termsNotFound(); }