Identity constraint accessor/mutator generation
Hi! I have been working on some XML schemas to represent projections of object extents, and been looking into using identity constraints to model foreign keys/object references. Having a good programmer model for these seems to be a pretty basic construct in the binding model: I was encouraged to see that identity constraint support is a goal for JAXB2 and hence JAXRPC2. I was wondering if there has been any thought devoted to definining accessors/mutators for these references.
So for example if I have an XML schema for the following XML:
and I said in the XML schema that the @identity attributes were the keys and the @assignedto attribute was constrained to the set of project identity values through a keyref constraint called "resourceProject", it would be very very nice to my mind if the object generated for a resource had a mutable property "resourceProject" typed to the binding for projects.
This would help me make a fairly generic data access web service that could provide a reasonably idiomatic programmer model for accessing the result sets. Since I build prepackaged applications rather than a custom web service for a single set of use cases its hard for me to design services for all the possible programmer needs for our system, which is what is driving me to think in these general terms.
I didn't see any specific verbage in the JAXB2.0 early draft release that gave me any insight into how this might be handled.
Thanks for any insight you can provide,