class OntologyAlgorithm {

  public static Set<TermId> getParentTerms(
    Ontology ontology, Set<TermId> childTermIdSet) {
    ImmutableSet.Builder<TermId> parents = new ImmutableSet.Builder<>();
    for (TermId tid : childTermIdSet) {
      parents.addAll(getParentTerms(ontology, tid));
    }
    return parents.build();
  }

  private  OntologyAlgorithm();

}