Jody Garnett wrote:
>> Every attribute must be added to the GeoAPI type
>> schema as a fake property. So rather than removing hacks, they have been
>> swept under a different carpet.
> 
> I do not think they are a fake property; but are a real property. I am
> not sure I see where the problem is occurring...

Some attributes such as xlink:href do not (in my albeit limited 
understanding) appear in the UML model. They are created as a 
consequence of encoding rules (I am not sure I am using the correct 
terminology). A UML property could be encoded inline, or could be by 
reference (xlink:href). Correct me if I am wrong! Either way 
org.geotools.xml.Encoder does not care. It Just Works.

I am close to a solution. Probably just hitting bits of the app-schema 
unit tests that make too many assumptions.

>> Which is the preferred way of using GeoAPI to transport XML attributes?
> 
> The geoapi feature model should be generated from your xml schema; and
> should capture all the attributes defined; as well as if they are
> required or not (multiplicity 0:1 or 1:1).  From the programming point
> of view they should be handled as is (ie as a GeoAPI
> attributedescriptor; referring to an AttributeType).

Yes, this is what I am doing.

> The bindings will make use of the original xsd schema to figure out
> how to encode/decode this content.

Yes, my recent gt-xsd-* patches walk the schema, so XML attributes 
should be encoded correctly.

My main concern was to confirm that I was using the GeoAPI architecture 
as intended. Thanks, Jody, for confirming this, and for your 
implementation hints.

Kind regards,

-- 
Ben Caradoc-Davies <[email protected]>
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to