On Friday 18 April 2008 01:07:29 am Jody Garnett wrote:
> Gabriel Roldán wrote:
> > Truth is, I'm afraid we don't have enough modeling power as to make an
> > AttributeType bound to a List and still know a list of what...
>
> Let me try; that is an AttributeDescriptor with minOccurs=0,
> maxOccurs=Integer.MAX
so you would model a gml:posList element like that? leading to potentially 
thousands of Attribute instances, one for each Double instance?
And also does it really capture the semantics of a List? (we only have the 
notion of a Collection afaik)
>
> > I seem to remember we discused about that a couple times and never got to
> > an agreement. Some told it should just be a ComplexAttribute bound to,
> > eg. Int, and multiplicity 0..*, others it should be its own
> > ListAttributeType interface, keep being simple but extended to expose its
> > content type (int, long, etc). All the grief due to generics runtime
> > erasure?
>
> The problem is indeed split into two:
> - AttributeType captures the description of what is being used (like a
> Java Class does for programming)
> - AttributeDescritptor captures the part that describes how it is used
> right here  (like a Java field does for programming). How it is being
> used covers nillability, minOccurs, maxOccurs etc...
>
> > Which recalls me we still also don't have a clear mapping of xml
> > attributes to our FeatureModel, and are making use of tricks like
> > userData but without a well known key (ie,
> > putUserData(javax.xml.sax.Attributes.class, Map<String, String>) and
> > monstruosities like that)
>
> I don't think userData tricks were needed at the end of the day...
>
> > These are basically the two gaps I still see in the FM once we got rid of
> > "xml particles" like choice, sequence, etc for good.
>
> The xml specific subclasses were removed since they were only holding
> javadocs and did not contribute any API.
> - ComplexAttribute defined as a List<AttributeDescriptor> is a good
> mapping for sequence
> - ComplexAttribute defined as a List<AttributeDescriptor> where all are
> optional, and minOccurs=1, maxOccurs=2 is a good mapping for Choice
> - finally ComplexAttribute defined as a Set<AttributeDescriptor> covers
> the last xml use case
yup, that's what I tried to mean by "for good".

Gabriel
>
> > Sorry Anaxa I'm not answering your question... guess there's not a clear
> > answer actually, but place to debate.
>
> Cheers,
> Jody
>
> !DSPAM:4045,4807d83a185922458217002!



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to