I am trying to encode XML attributes on arbitrary ComplexAttribute instances. In GeoServer 1.6.x / GeoTools 2.4.x community-schemas this was done by smuggling attributes in a UserData map. In org.geotools.xml.Encoder a GetPropertyExecutor is used to get XML attributes, which suggest the possibility of passing XML attributes directly as GeoAPI properties.
What is the preferred way to pass XML attributes in GeoAPI ComplexAttribute instances? (A) Store them in the UserData, and unpack them in bindings for processing by the Encoder. (B) Store them directly as GeoAPI properties for processing by the Encoder. I know (A) works, because this is the approach used in GeoServer 1.6 community schemas. The downside is that bindings must support unpacking of XML attributes from UserData. Straightforward but a bit hacky. (B) seems cleaner at first, but as I deeper into implementing it, I encounter problems. 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. Which is the preferred way of using GeoAPI to transport XML attributes? 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
