Ontolib is a modern Java library for working with (biological) ontologies. It is freely available at https://github.com/Phenomics/ontolib.

Edit