On 04/09/2009, at 2:45 PM, Ben Caradoc-Davies wrote: > The problem is that the Collection in a ComplexAttribute is of > properties, not attributes.
I thought we went over this one? Perhaps it was just with Rob off list :-( The collection is supposed to be of properties; as that allows both attributes and associations to be used. > GeoAPI is a representation of the ISO Feature Model. XML attributes > are an encoding artifact. Right; but they are a concrete storage of data - thus represented in our feature model as an attribute. If it was UML they would be "class members" allowing both attributes and methods to be listed. > Not all attributes can be converted back to GeoAPI. Some are > calculated at > encoding time. For example, to remove a duplicate feature, a feature > property type might be encoded by xlink:href. In contrast, when > encoding > some feature property types, we may not have the property, only its > URN, > and so encode the property by reference by smuggling the URN in > UserData. I believe if you are using an xlink:href you are breaking out an association. Associations are used to account for duplication. Ie when two streets refer to the same junction it is a relationship you are capturing and this best done as an associations. You are describing a relationship not aggregation. > I often feel that we are misusing GeoAPI because we are building a > tree > to represent the encoded XML we want, and hacking the bindings to > accept > them. I am beginning to suspect that we should use GeoAPI to represent > the feature model, and have the encoder handle the encoding. Yep :-) > Another example is the use of property types. Are these even > present in the ISO > model, or are they a GML encoding artifact? They are present in the ISO model. > They appear to me to be present only to cause the striping rule to > be observed. > > Some UML (see properties, and no property types): > https://www.seegrid.csiro.au/twiki/bin/view/CGIModel/GeologicUnit > https://www.seegrid.csiro.au/twiki/bin/view/CGIModel/GeologicFeature Can you be more specific - I am not sure what I am looking at in these UML models. > > Can anyone tell me how gml:MeasureType should be represented as a > GeoAPI > ComplexAttribute? Where does the value live? Where does uom live? At > the > moment we smuggle uom in UserData and set the value in a property. I > suspect everything should just be a property. I have never got a > straight answer. To this day, I do not know if we are using GeoAPI > correctly. Do you have a definition of gml;MeasureType we can refer to? This is the kind of discussion I want as your team reviews the GeoAPI model. Looks like our discussion is going to be stuck until we find something - is this good enough? - http://xml.fmi.fi/namespace/meteorology/conceptual-model/meteorological-objects/2009/03/26/docindex657.html I was able to find: <element name="measure" type="gml:MeasureType"> With gml:MeasureType recording two pieces of information: - a double - that is unnamed - a uom which can be anyURI With this I expect the following: <measure uom="meter">3.0</measure> If this was a java class I would expect: class MeasureType { double value; URI uom; } And I expect the same thing out of our feature model: complex type "MeasureType" - attribute value double - attribute uom URI The only wrinkle; and it is a small one; is how to ensure that XPath works out at the end of the day: - "measure" should return 3.0 - "measure/uom" should return "meter" With that in mind we need to modify our feature model definition with a small hint: complex type "MeasureType" - attribute value double inline - attribute uom URI I hope that is a straight answer - I am willing to negotiate if we find a problem with that; but I would like to make sure you understand the above. I don't want to be modifying things out of confusion. Cheers, Jody ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
