Search code examples
javataxonomyutility

Java API for processing of taxonomies


Looking for API that helps me with processing of taxonomies. It should be possible to work with taxonomy in object model (loading from xml file), list categories, traverse tree of categories (if it's tree taxonomy), getting name and value for category, etc. Read only mode is sufficient. Google hasn't helped a lot :(

Usage can be as follows:

Taxonomy taxonomy = Taxonomy.loadFromStream(XMLInputStream);

List categories = taxonomy.listAllCategories();

Category rootCategory = taxonomy.getRootCategory();

What's important about it is that I don't want to handle XML directly. It's useless. If there will be some YAML adapter, taxonomy can be in YAML format and my code stays unaffected...


Solution

  • I don't think that you will ever find an XML based library for taxonomy: it is too specific.

    However you can implement taxonomy model yourself on top of a library like XStream of JAXB in order to serialize to XML without writing verbose XML manipulation code.