Justin Deoliveira wrote:
Gabriel and I had a discussion about this before and I have run across
it recently as well, the question of wether a type can be anonymous.
The javadoc on ComplexTypeBuilder says name *must* be set before
calling build(). I think we need to relax this restriction and allow
people to have types will no names. I guess my only example of such a
case is an xml schema element which defines its type inline.
Indeed, remember the builder is only an assist, those working with
anonymous types can call the factory method themselves for now.
However you may wish to make a special builder that helps those dealing
with XML schema, and has support for "createGroup" "createSequence",
"extend( Sequence, Sequence )" and so on ...
If agreed, the question is how do we represent it in our model. With
our TypeName / AttributeName system we can do it in a couple of ways.
We could:
1. Just set the name to null
Name should not be null (make up a name like "group1", "group2" if you
have to) without a name those coming at this from a modeling background
will get scared :-)
However the you can indicate with the Type system that the name should
be ignored for XPath queries.
2. Create a name object in which both the local name and namespace uri
are not null.
I like one better, I think it makes it simple for client code to check.
No go sorry.
Jody
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel