users@jaxb.java.net

Customization help needed

From: Belliveau, Francis - 0995 - MITLL <belliveau_at_ll.mit.edu>
Date: Tue, 23 Feb 2010 13:35:17 -0500

To all who read this: Thanks for trying to help.

I am working on a project that uses XML files to communicate between two applications. One application is basically a GUI that interfaces with a relational database to create, and reuse, configuration objects for a simulation application. JAXB is used to write and read the XML files.

What we seem to need most are some extras in the generated Java classes. Most important are:
  1. A Constructor that has an argument for each member variable.
  2. A custom toString() method.

Of lesser importance would be additional validation logic.
  For Example: In a "range" class that contained both "max" and "min" members, you would not only want to restrict the values allowed for each member, but you would also want to restrict the values such that "max>=min".

I have looked through the entire tutorial and find that this kind of thing is totally missing from the "customization" concept. If I could create my own tags that took XSLT transforms or something, things would be great.

Having such extensions would greatly reduce our maintenance efforts. Of special importance would be to have the constructor(s) generated automatically since the JAXB logic knows all the member arguments.

Is there any possibilities for such enhancements?

Thanks,
Fran