Jody Garnett wrote:
Gabriel Roldán wrote:
I've got to the situation where I need to model what in xml schema is
a list of simple types, like in:
public interface List<B, AttributeType<B>> extends AttributeType<List>{
public AttributeType<B> getMembersType();
}
my Java5 skills aren't so good, but hopefully you already seen what I
want to mean.
Yes, you could bind an AttributeType to a Collection class, but you
would lose something. Try instead using multiplicity to get what you want.
Often (very) in a gml schema we have:
<simpleType name='listOfString'>
<list itemType='string'/>
</simpleType>
a sample instance:
<someElement xsi:type='listOfString'>string1 string2
string3</someElement>
ListOfStringType has a "member" Descriptor with multiplicity 0:*, the
descriptor is of StringElementType. where StringElementType is bound to
the Java class String and is marked as "inline".
Pefect - that should exactly do what you want, and communicate what is
going on in modeling terms.
But isn't the problem that this is a simple type. Not sure what you are
trying to say here with inline. Are you saying you can essentially make
it a simple type by creating a complex type with inline content?
the same goes for union (of simple types), but in this case I think we
should have something like:
public interface Union extends AttributeType{ //making it java5 seems
too much for me
public Set<AttributeType> getMemberTypes();
I need to be told more about union, could be you are looking for
something based on associations as with FeatureCollection?
I was trying to figure out if we could avoid creating this two new
interfaces with the current GeoAPI modeling power, but failed, so this
message.
Hopefully you'll bring some light into this.
Not sure if that helped, perhaps Justin can explain better?
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&kid0944&bid$1720&dat1642
_______________________________________________
Geoapi-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/geoapi-devel
-------------------------------------------------------
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&kid0944&bid$1720&dat1642
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel