Hi.
> I think it would be much nice if someone develops a framework to check
> constraints on a Java object graph. Then JAXB can produce a contraint
> set from a given schema. Such a framework would do a much better job of
> reporting errors, it would allow you to add more constraints, and it
> would have enough hook to connect errors to your application.
I was thinking about this.
Maybe we could develop a basic exception/event infrastructure which
would be detailed enough to give proper diagnosis/provide users with
comprehensible messages.
The task will then be to compile the expression grammar into a structure
of "verifier" (just not to mix it up with "validator") objects. Verifier
would check the object for proper structure, proper values in properties
and report errors if any.
As I understand it, object structure validation has basically two
levels: structure validation and datatype validation. Structure
validation means the way properties of the object are set matches
expression of the class item. Datatype validation must be similar to the
way values are checked in JAXB RI right now. The biggest problem I see
is in the first part: expression tree must be transform.ed into a
logical predicate. I'll try to experiment with this..
Bye.
/lexi
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net