From: Chris H. <ch...@op...> - 2005-08-24 22:24:35
|
From IanS - this argument definitely persuaded me. Sorry I haven't Status: O sounded in earlier, but yeah, don't do ft extends at. Chris -- ---------- Forwarded message ---------- Date: Tue, 8 Mar 2005 10:32:34 -0700 From: Ian Schneider <Ian...@ar...> To: Chris Holmes <ch...@op...> Subject: Re: [Geotools-devel] features-exp2 update On Thursday 03 March 2005 07:13 pm, Chris Holmes wrote: Hi Chris, I wanted to get back to you on this earlier, but been pretty busy. > For this round we just had FeatureType extend AttributeType, I understand that this seems like a good thing to do, but I will argue that it is wrong. Ok: Think about a features and attributes as java classes and fields. An AttributeType represents a field declarartion in a java class. It has a name, it has a type, and in addition, the restrictions on its data (this is actually analagous to a setter which throws an exception if the value is bad or a getter which returns a default value if none is set). A FeatureType can be seen as a java class with a number of field declarations. It also has a name, could be extended from another class, and could contain additional meta-data. In java, a Field implements Member and a class implements Member, but a Class does not extend Field. This is not my only argument for not having FeatureType extend AttributeType. Lets look at some example GML (the old cambridge example was on hand) : This is a FeatureType which extends AbstractFeatureType and adds the additional attribute of centerLineOf. <complexType name="RiverType"> <complexContent> <extension base="gml:AbstractFeatureType"> <sequence> <element ref="gml:centerLineOf"/> </sequence> </extension> </complexContent> </complexType> This is an AttributeType. Its name is River, and its type is a Feature, more specifically, a River. <element name="River" type="ex:RiverType" substitutionGroup="ex:_CityFeature"/> Now lets say there was an additional type (and I don't know if my schema is proper, but the idea is that the Basin contains more than 1 Rivers. <complexType name="Basin"> <complexContent> <extension base="gml:AbstractFeatureType"> <sequence> <element minOccurs="1" ref="ex:River"/> </sequence> </extension> </complexContent> </complexType> And another type (a land area which drains into a river segment) <complexType name="Reach"> <complexContent> <extension base="gml:Basin"> <sequence> <element ref="gml:Polygon"/> <element minOccurs="1" maxOccurs="1" ref="ex:River"/> </sequence> </extension> </complexContent> </complexType> So if FeatureType extends AttributeType, there is only one definition of the actual type River, but two differing definitions of AttributeTypes which reference River. The ideal way to represent this an AttributeType subclass whose "type" is a FeatureType - more specifically, a River. The point being that FeatureType, if it extends AttributeType, performs two roles, one of being a type definition of a complex entity, the other being a reference definition to that complex entity. Ideally, you would have a entity definition and then one or more differing definitions of references to that entity. > and rethought > what the AttributeType methods meant in the context of a FeatureType, > leading to decisions like deprecating getTypeName in favor of the getName > method of AttributeType. This is further proof that extending AttributeType is wrong. > We then also split out the AttributeType > hierarchy from hidden in DefaultFeatureType into the feature/types/ > directory. Like NumericAttributeType and TextualAttributeType. These > ended up being classes - the point is to show people that you can actually > implement your own AttributeTypes. This is good and definately needed to support all of the data types. The other thing I'd really love to see is more flexability with types. Our current framework is very similar to geotools - we have AttributeType and EntityType. The main difference is that we also have Attribute, which represents instance data (IntegerAttribute, DoubleAttribute, etc.) and geotools uses normal java objects. I will not argue that geotools should wrap data values in its own classes, but it does have its advantages. For instance, all of our Attribute subtypes can be converted to and from strings. This would be possible in geotools by having the Attribute subtypes providing this functionality. One problem I noticed in geotools is that data is sometimes to strongly typed - this arises in shapefile because arcinfo is(was?) so weakly typed in its enforcement of values. An example of this extended functionality would be to allow Strings to be used as Numbers and vice-versa. > > And again most are in the types directory. The point of all this is to > get featureType to extend attributeType, so that we can use them nested, > and support choices, multiplicity, and sets. Again, the proper thing to do is define a FeatureAttributeType or something along those lines. A final point I wanted to touch on is the XPath stuff. I don't remember if you mentioned a plan for its implementation, but I will strongly argue that Feature should know nothing about XPath, but only support the getting and setting of its own direct children attributes. The full XPath support would come from an external class. The reasons for this are two 1) Making Feature know about XPath is like making a web page developer know about google and its internals - its not right to enforce the search process on the data, but right to force the data to allow searching, and 2) XPath will be more efficient if exectued externally. Example - DOM apis. One uses the XPath object to 'compile' a query which can be resused over and over again. Sure, a Feature could internally delegate the search to an XPath object, but again, this makes the data know about the searching mechanism. Hopefully this was all understandable (I did kinda just rattle it off) and I understand that I haven't been an active developer of late, so please don't hesitate to ask any questions or continue this discussion. On a good note, I finally figured out how to get subversion access (and I will set up things here to allow Bryce Nordgren(?) access as well. If you have his email, could you send that to me as I seemed to have deleted it. Regards, Ian |
From: Jody G. <jga...@re...> - 2005-08-24 22:59:40
|
Chris Holmes wrote: >From IanS - this argument definitely persuaded me. Sorry I haven't >sounded in earlier, but yeah, don't do ft extends at. > So if I can sum up we have a conflict with our AttributeType information we use for validation (such as minOccurs and maxOccurs) and the idea of a FeatureType extending CompexType. In short we would like to reuse our FeatureType in a diferent context. We would like to define the FeatureType in terms of its contents, and then when it comes time to use that FeatureType as a child in a feature collection, or as an element in a complex type we don't want to get confused. Aside: Strangly enough this is exactly where Gabriel is stuck, only he is wanting to reuse SimpleAttributeType that provide the mappings from XMLSchema. His first cut was as a enumeration that would need to be consulted. It appears to me to be a poor case of code reuse, the enumeration would be a close set and client code would have to navigate to it. As an impelmentation detail (with the enumeration used as a directory of facets it may work), or we can break out an Attribtue.getSuper method. Idea: We have split out schema information (that is information that can only produce a validation error, not objects) into a separate construct. Min / Max Occurs really does fall into this category. MinOccurs / MaxOccurs is schema information (and not type information). I will try and walk through IanS's examples in the next email. Jody |
From: Jody G. <jga...@re...> - 2005-08-25 00:09:15
|
Jody Garnett wrote: > MinOccurs / MaxOccurs is schema information (and not type > information). I will try and walk through IanS's examples in the next > email. Justin and I tried it out on a whiteboard - seemed to work out: - Feature Model Design discussion moved to its own page: -<http://docs.codehaus.org/display/GEOTOOLS/Feature+Model+Design> The children of this page contain the individual points of debate - all ready for Gabriel to include in his document. Jody |
From: Justin D. <jde...@re...> - 2005-08-25 00:33:44
Attachments:
river.png
|
Jody and myself walked through Ian's example and came up with the following summary. Jody will reiterate tommorow. With the seperation of schema/validation from type, the gml example from before looks the attached diagram. The thing to note from the diagram is that since the schema information is seperated out, the river feature type just becomes another complex attribute type, and becomes available for reuse. Justin Jody Garnett wrote: > Chris Holmes wrote: > >> From IanS - this argument definitely persuaded me. Sorry I haven't >> sounded in earlier, but yeah, don't do ft extends at. >> > So if I can sum up we have a conflict with our AttributeType information > we use for validation (such as minOccurs and maxOccurs) and the idea of > a FeatureType extending CompexType. > > In short we would like to reuse our FeatureType in a diferent context. > We would like to define the FeatureType in terms of its contents, and > then when it comes time to use that FeatureType as a child in a feature > collection, or as an element in a complex type we don't want to get > confused. > > Aside: Strangly enough this is exactly where Gabriel is stuck, only he > is wanting to reuse SimpleAttributeType that provide the mappings from > XMLSchema. His first cut was as a enumeration that would need to be > consulted. It appears to me to be a poor case of code reuse, the > enumeration would be a close set and client code would have to navigate > to it. As an impelmentation detail (with the enumeration used as a > directory of facets it may work), or we can break out an > Attribtue.getSuper method. > > Idea: We have split out schema information (that is information that > can only produce a validation error, not objects) into a separate > construct. Min / Max Occurs really does fall into this category. > > MinOccurs / MaxOccurs is schema information (and not type information). > I will try and walk through IanS's examples in the next email. > > Jody > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel -- Justin Deoliveira Refractions Research Inc. Email: jde...@re... Phone: 250.885.4387 |
From: Jody G. <jga...@re...> - 2005-08-25 16:38:53
|
Justin Deoliveira wrote: > Jody and myself walked through Ian's example and came up with the > following summary. Jody will reiterate tommorow. > > With the seperation of schema/validation from type, the gml example > from before looks the attached diagram. > > The thing to note from the diagram is that since the schema > information is seperated out, the river feature type just becomes > another complex attribute type, and becomes available for reuse. > > Justin I do think we are all moving in the same direction - a need of a separation between Content, Reference and Type. Java: - Content: Object - Reference: Field - Type: Class GeoTools -Content: Object, Array, Feature, FeatureCollection - Reference: AttributeType - Type: FeatureType Proposal: - Content: Object, Complex, Feature, FeatureCollection - Reference: Schema - Type: Type, ComplexType, FeatureType, FeatureCollectionType The page where I am trying to record this discussion is here: -<http://docs.codehaus.org/display/GEOTOOLS/Feature+Model+Design#FeatureModelDesign-complex> I hope this discussion helps, Jody |
From: David Z. <dav...@gm...> - 2005-08-25 19:41:35
|
On 8/25/05, Jody Garnett <jga...@re...> wrote: > Justin Deoliveira wrote: >=20 > > Jody and myself walked through Ian's example and came up with the > > following summary. Jody will reiterate tommorow. > > > > With the seperation of schema/validation from type, the gml example > > from before looks the attached diagram. > > > > The thing to note from the diagram is that since the schema > > information is seperated out, the river feature type just becomes > > another complex attribute type, and becomes available for reuse. > > > > Justin >=20 > I do think we are all moving in the same direction - a need of a > separation between Content, Reference and Type. >=20 > Java: > - Content: Object > - Reference: Field > - Type: Class >=20 > GeoTools > -Content: Object, Array, Feature, FeatureCollection > - Reference: AttributeType > - Type: FeatureType >=20 > Proposal: Aside from the obvious 'Complex' is a overused noun ... what is it in you proposal. This still just looks like a rename to me. Is there an actual plan as to what this would look like (am I missing one of the many links floating around?)? I am still in favor of gabrial's email earlier ... it's alot simpler.=20 Oh, and so far as 'Type' goes ... well there are alot of classes called that too, which one are you refering to ... (same applies if this referes to a concept too). > - Content: Object, Complex, Feature, FeatureCollection > - Reference: Schema > - Type: Type, ComplexType, FeatureType, FeatureCollectionType >=20 > The page where I am trying to record this discussion is here: > -<http://docs.codehaus.org/display/GEOTOOLS/Feature+Model+Design#FeatureM= odelDesign-complex> >=20 Page is blank ... > I hope this discussion helps, Well ... it actualy confused me ...=20 David > Jody > |
From: Jody G. <jga...@re...> - 2005-08-25 20:28:27
|
David Zwiers wrote: >Aside from the obvious 'Complex' is a overused noun ... what is it in >you proposal. This still just looks like a rename to me. Is there an >actual plan as to what this would look like (am I missing one of the >many links floating around?)? > > It is more that the email & links cannot keep up with the discussion (that is mostly happening on IRC and privately). I am doing my best to keep up the email/documentation: To that end I have given up keeping discussion split out in terms of the modeling issues and gathered up everything into one page: - <http://docs.codehaus.org/display/GEOTOOLS/Feature+Model+Discussion> This should be the only link that matters until a decision is reached. My proposal is gathered together is interfaces, gabriels is a UML diagram. There is a short Q&A section and links to IRC discussions where progress has actually been made. >I am still in favor of gabrial's email earlier ... it's alot simpler. > > We are working from the same design card: separate out Type from Schema. >Oh, and so far as 'Type' goes ... well there are alot of classes >called that too, which one are you refering to ... (same applies if >this referes to a concept too). > > Understood, I felt I had to rename it as AttributeType is already lodged in peoples brain. >Page is blank ... > > Confluence is suffering hit reload. >>I hope this discussion helps, >> >> >Well ... it actualy confused me ... > > Fair enough, I don't fully understand Gabriels propsal yet (but I am working on it). Jody |
From: Paul S. <pa...@to...> - 2005-08-26 12:28:50
|
Interesting to see some of these discussions. The day, I learnt Feature is nothing but "properties" of something spatial, my life became simpler. Can someone tell me if there is any feature, be it GML3 or GML100, that cannot be modelled by something as simply as this? interface Feature { object GetProperty(string path); void SetProperty(string path, object obj); } For the implementation? another simply thing, just put one Hashtable in there and case closed. class DefaultFeature implements Feature { Hashtable properties; ... } It might give me ideas as to whether to worry about if ft is derived from Schema or Type or not. Best regards, Paul. > -----Original Message----- > From: geo...@li...=20 > [mailto:geo...@li...] On Behalf=20 > Of Jody Garnett > Sent: Friday, August 26, 2005 5:28 AM > To: David Zwiers > Cc: geo...@li...; Gabriel Rold=E1n; geoapi > Subject: [Geoapi-devel] Comparision of Propsals >=20 > David Zwiers wrote: >=20 > >Aside from the obvious 'Complex' is a overused noun ... what=20 > is it in=20 > >you proposal. This still just looks like a rename to me. Is there an=20 > >actual plan as to what this would look like (am I missing one of the=20 > >many links floating around?)? > > =20 > > > It is more that the email & links cannot keep up with the=20 > discussion (that is mostly happening on IRC and privately). > I am doing my best to keep up the email/documentation: >=20 > To that end I have given up keeping discussion split out in=20 > terms of the modeling issues and gathered up everything into one page: > - <http://docs.codehaus.org/display/GEOTOOLS/Feature+Model+Discussion> >=20 > This should be the only link that matters until a decision is=20 > reached.=20 > My proposal is gathered together is interfaces, gabriels is a=20 > UML diagram. There is a short Q&A section and links to IRC=20 > discussions where progress has actually been made. >=20 > >I am still in favor of gabrial's email earlier ... it's alot=20 > simpler.=20 > > =20 > > > We are working from the same design card: separate out Type=20 > from Schema. >=20 > >Oh, and so far as 'Type' goes ... well there are alot of=20 > classes called=20 > >that too, which one are you refering to ... (same applies if this=20 > >referes to a concept too). > > =20 > > > Understood, I felt I had to rename it as AttributeType is=20 > already lodged in peoples brain. >=20 > >Page is blank ... > > =20 > > > Confluence is suffering hit reload. >=20 > >>I hope this discussion helps, > >> =20 > >> > >Well ... it actualy confused me ...=20 > > =20 > > > Fair enough, I don't fully understand Gabriels propsal yet=20 > (but I am working on it). >=20 > Jody >=20 >=20 > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference &=20 > EXPO September 19-22, 2005 * San Francisco, CA * Development=20 > Lifecycle Practices Agile & Plan-Driven Development *=20 > Managing Projects & Teams * Testing & QA Security * Process=20 > Improvement & Measurement * http://www.sqe.com/bsce5sf=20 > _______________________________________________ > Geoapi-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geoapi-devel >=20 |
From: Gabriel <gr...@ax...> - 2005-08-25 09:45:13
|
The following is my rationale for FeatureType not extending AttributeType: As you will see, declaring a FeatureType attribute to be of another=20 =46eatureType type is bad GML practice. Instead, what you should do is to=20 follow the GML association type pattern, by declaring a container for your= =20 nested featuretype. That container is what will allow you to remotelly reference the nested=20 features with xlink:href, as well as provide multiplicity. The nested=20 =46eatureType is then reused, as you expect, and untouched. Consider the following example: <complexType name=3D"RiverType"> =A0 =A0 <complexContent> =A0 =A0 =A0 <extension base=3D"gml:AbstractFeatureType"> =A0 =A0 =A0 =A0 <sequence> =A0 =A0 =A0 =A0 =A0 <element ref=3D"gml:centerLineOf"/> =A0 =A0 =A0 =A0 </sequence> =A0 =A0 =A0 </extension> =A0 =A0 </complexContent> </complexType> RiverType IS the FeatureType we want to reuse: <complexType name=3D"Basin"> =A0 =A0 <complexContent> =A0 =A0 =A0 <extension base=3D"gml:AbstractFeatureType"> =A0 =A0 =A0 =A0 <sequence> =A0 =A0 =A0 =A0 =A0 <element minOccurs=3D"1" ref=3D"ex:River"/> =A0 =A0 =A0 =A0 </sequence> =A0 =A0 =A0 </extension> =A0 =A0 </complexContent> </complexType> WRONG. It should be: <xs:element name=3D"Basin" type=3D"test:BasinType"=20 substitutionGroup=3D"gml:_Feature"/> <xs:complexType name=3D"BasinType"> <xs:complexContent> <xs:extension base=3D"gml:AbstractFeatureType"> <xs:sequence> <xs:element name=3D"riverProperty"> <xs:complexType> <xs:complexContent> <xs:restriction base=3D"gml:FeaturePropertyType"> <xs:sequence minOccurs=3D"0"> <xs:element ref=3D"test:River"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:element> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> Note de definition of riverProperty element, restricting=20 gml:FeaturePropertyType to contain only River instances. Now suppose you have a Basin db table where one of its columns contains a=20 River feature instance. That model is consistent with the association type= =20 (riverProperty is the name of the column and the actual River Feature its=20 value) That's exactly what is modeled by: interface FeatureAttributeType extends ComplexAttributeType{ FeatureType getFeatureType(); } The other, though valid XMLSchema, is non valid GML. Gabriel. On Thursday 25 August 2005 02:33, Justin Deoliveira wrote: > Jody and myself walked through Ian's example and came up with the > following summary. Jody will reiterate tommorow. > > With the seperation of schema/validation from type, the gml example from > before looks the attached diagram. > > The thing to note from the diagram is that since the schema information > is seperated out, the river feature type just becomes another complex > attribute type, and becomes available for reuse. > > Justin > > Jody Garnett wrote: > > Chris Holmes wrote: > >> From IanS - this argument definitely persuaded me. Sorry I haven't > >> sounded in earlier, but yeah, don't do ft extends at. > > > > So if I can sum up we have a conflict with our AttributeType information > > we use for validation (such as minOccurs and maxOccurs) and the idea of > > a FeatureType extending CompexType. > > > > In short we would like to reuse our FeatureType in a diferent context. > > We would like to define the FeatureType in terms of its contents, and > > then when it comes time to use that FeatureType as a child in a feature > > collection, or as an element in a complex type we don't want to get > > confused. > > > > Aside: Strangly enough this is exactly where Gabriel is stuck, only he > > is wanting to reuse SimpleAttributeType that provide the mappings from > > XMLSchema. His first cut was as a enumeration that would need to be > > consulted. It appears to me to be a poor case of code reuse, the > > enumeration would be a close set and client code would have to navigate > > to it. As an impelmentation detail (with the enumeration used as a > > directory of facets it may work), or we can break out an > > Attribtue.getSuper method. > > > > Idea: We have split out schema information (that is information that > > can only produce a validation error, not objects) into a separate > > construct. Min / Max Occurs really does fall into this category. > > > > MinOccurs / MaxOccurs is schema information (and not type information). > > I will try and walk through IanS's examples in the next email. > > > > Jody > > > > > > ------------------------------------------------------- > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > > Practices Agile & Plan-Driven Development * Managing Projects & Teams * > > Testing & QA Security * Process Improvement & Measurement * > > http://www.sqe.com/bsce5sf > > _______________________________________________ > > Geotools-devel mailing list > > Geo...@li... > > https://lists.sourceforge.net/lists/listinfo/geotools-devel |
From: Jody G. <jga...@re...> - 2005-08-25 13:43:46
|
Gabriel Rold=C3=A1n wrote: > The following is my rationale for FeatureType not extending Attribu= teType: >=20 I think we are all heading down the same road. As it stands FeatureType does extend AttributeType, but AttributeType= is not the=20 same thing as Schema. We dont want FeatureType to extend Schema. In short the model has cha= nged since=20 yesterday afternoon and everyone will need to go look at it again. I = need people=20 to read the design document to make sure they are happy with the dire= ction we=20 are taking. I can some up the direction in one sentence: - if it can cause a validation error it is Schema - if it defines a Object (or Node) it is Type Here is the link: -<http://docs.codehaus.org/display/GEOTOOLS/Feature+Model+Design> If it helps the discussion we can rename AttribtueType to Type. Conce= rning the=20 origional analogy with Java Classes, schema can be thought of as some= of the=20 "coding conventions" that Java rarely rights down, but Java Coders al= ways=20 follows. Things like classs beginging with a Capital letter, or the c= odified=20 "JavaBean" naming conventions for bean introspection. Gabriel I am going to have to work through your example, in the meant= ime I have=20 moved the "facets" over to the Schema class. So everything is consist= ent. Jody |
From: Gabriel <gr...@ax...> - 2005-08-25 17:43:04
|
> Gabriel I am going to have to work through your example, in the meantime I > have moved the "facets" over to the Schema class. So everything is > consistent. > I am working with Mauricio and had arrived to almost the same conclusion, will update the diagram in short so we can check its finally consistent. Gabriel > Jody |
From: Jody G. <jga...@re...> - 2005-08-25 18:29:18
|
Gabriel Rold=C3=A1n wrote: >>Gabriel I am going to have to work through your example, in the meantim= e I >>have moved the "facets" over to the Schema class. So everything is >>consistent. >> >> =20 >> >I am working with Mauricio and had arrived to almost the same conclusion= , will=20 >update the diagram in short so we can check its finally consistent. > =20 > Okay - I gathered up your picture and started doing a QA session with=20 our previous IRC chats as reference here: -<http://docs.codehaus.org/display/GEOTOOLS/Feature+Model+Discussion> I am going to gather up the code outline of my plan, it is scattered as=20 examples of individual design decisions right now and was not ment to be=20 used other then for discussion. Jody |
From: David Z. <dav...@gm...> - 2005-08-25 15:40:10
|
This makes good sense to me ... even in the case of an unknown FeaturePropertyType name, you could just use anonymous types in the xml document, and reuse the child name for the parse. The result would still be consistent. DZ On 8/25/05, Gabriel Rold=E1n <gr...@ax...> wrote: > The following is my rationale for FeatureType not extending AttributeType= : >=20 > As you will see, declaring a FeatureType attribute to be of another > FeatureType type is bad GML practice. Instead, what you should do is to > follow the GML association type pattern, by declaring a container for you= r > nested featuretype. > That container is what will allow you to remotelly reference the nested > features with xlink:href, as well as provide multiplicity. The nested > FeatureType is then reused, as you expect, and untouched. >=20 > Consider the following example: >=20 > <complexType name=3D"RiverType"> > <complexContent> > <extension base=3D"gml:AbstractFeatureType"> > <sequence> > <element ref=3D"gml:centerLineOf"/> > </sequence> > </extension> > </complexContent> > </complexType> >=20 > RiverType IS the FeatureType we want to reuse: >=20 > <complexType name=3D"Basin"> > <complexContent> > <extension base=3D"gml:AbstractFeatureType"> > <sequence> > <element minOccurs=3D"1" ref=3D"ex:River"/> > </sequence> > </extension> > </complexContent> > </complexType> >=20 > WRONG. It should be: >=20 > <xs:element name=3D"Basin" type=3D"test:BasinType" > substitutionGroup=3D"gml:_Feature"/> > <xs:complexType name=3D"BasinType"> > <xs:complexContent> > <xs:extension base=3D"gml:AbstractFeatureType"> > <xs:sequence> > <xs:element name=3D"riverProperty"> > <xs:complexType> > <xs:complexContent> > <xs:restriction base=3D"gml:FeaturePropertyType"> > <xs:sequence minOccurs=3D"0"> > <xs:element ref=3D"test:River"/> > </xs:sequence> > </xs:restriction> > </xs:complexContent> > </xs:complexType> > </xs:element> > </xs:sequence> > </xs:extension> > </xs:complexContent> > </xs:complexType> >=20 > Note de definition of riverProperty element, restricting > gml:FeaturePropertyType to contain only River instances. >=20 > Now suppose you have a Basin db table where one of its columns contains a > River feature instance. That model is consistent with the association typ= e > (riverProperty is the name of the column and the actual River Feature its > value) > That's exactly what is modeled by: >=20 > interface FeatureAttributeType extends ComplexAttributeType{ > FeatureType getFeatureType(); > } >=20 > The other, though valid XMLSchema, is non valid GML. >=20 > Gabriel. >=20 > On Thursday 25 August 2005 02:33, Justin Deoliveira wrote: > > Jody and myself walked through Ian's example and came up with the > > following summary. Jody will reiterate tommorow. > > > > With the seperation of schema/validation from type, the gml example fro= m > > before looks the attached diagram. > > > > The thing to note from the diagram is that since the schema information > > is seperated out, the river feature type just becomes another complex > > attribute type, and becomes available for reuse. > > > > Justin > > > > Jody Garnett wrote: > > > Chris Holmes wrote: > > >> From IanS - this argument definitely persuaded me. Sorry I haven't > > >> sounded in earlier, but yeah, don't do ft extends at. > > > > > > So if I can sum up we have a conflict with our AttributeType informat= ion > > > we use for validation (such as minOccurs and maxOccurs) and the idea = of > > > a FeatureType extending CompexType. > > > > > > In short we would like to reuse our FeatureType in a diferent context= . > > > We would like to define the FeatureType in terms of its contents, and > > > then when it comes time to use that FeatureType as a child in a featu= re > > > collection, or as an element in a complex type we don't want to get > > > confused. > > > > > > Aside: Strangly enough this is exactly where Gabriel is stuck, only h= e > > > is wanting to reuse SimpleAttributeType that provide the mappings fro= m > > > XMLSchema. His first cut was as a enumeration that would need to be > > > consulted. It appears to me to be a poor case of code reuse, the > > > enumeration would be a close set and client code would have to naviga= te > > > to it. As an impelmentation detail (with the enumeration used as a > > > directory of facets it may work), or we can break out an > > > Attribtue.getSuper method. > > > > > > Idea: We have split out schema information (that is information that > > > can only produce a validation error, not objects) into a separate > > > construct. Min / Max Occurs really does fall into this category. > > > > > > MinOccurs / MaxOccurs is schema information (and not type information= ). > > > I will try and walk through IanS's examples in the next email. > > > > > > Jody > > > > > > > > > ------------------------------------------------------- > > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > > > Practices Agile & Plan-Driven Development * Managing Projects & Teams= * > > > Testing & QA Security * Process Improvement & Measurement * > > > http://www.sqe.com/bsce5sf > > > _______________________________________________ > > > Geotools-devel mailing list > > > Geo...@li... > > > https://lists.sourceforge.net/lists/listinfo/geotools-devel > |