from discussion with @pnrobinson, this pseudocode gives the basic idea:
import org.bla.hpoapi.*
ontology hpo = new ontology(bla)
annotationset as = new annotationset(hpo,bla);
double ic = as.getInformationConent("HP:0001234");
ArrayList<Gene> as.getGenesAnnotatedTo("Arachnodactly");
ArrayList<Term> as.getAncestorsOf("Overgrowth");
moving up to items like
double lr as.getLikelihoodRatio(<some phenotype>,<some disease>);
or
ArrayList<Gene> = as.getHPOandGOIntersectingGenes(<some HPO term>,<some GO term>);
from discussion with @pnrobinson, this pseudocode gives the basic idea: