On 05/05/12 03:38, Justin Deoliveira wrote: > Second would be to stick unrecognized attributes in the user data of the > feature rather than fail on parsing.
While I admit a certain fondness for immutable objects, the immutability of FeatureTypeImpl has caused many problems for app-schema as well. As soon as you have complex types, you have the opportunity for cyclically defined types; which feature type do you define first? Even worse, how do you define equals and hashCode on cyclically-defined types? Strict conformance requires that equals be defined by analysing the directed graph that defines these related types; this is not possible with the Java Object API without breaking encapsulation. My solution (if you can call it that) was to declare that types are equal if they have the same name. (Yes, I do feel dirty.) Further problems occur when CRS information is not set on the top-level type but inside a nested property. The ugly workaround was to smuggle CRS information in user data. Niels just finished adding additional workarounds to app-schema WMS to make this ugly workaround keep on limping. Adam is currently working on a complex feature builder. I don't think he will be affected by FeatureType changes, as his types should already be built, but he will be exposed to the issues. To cut a long story short, if you feel that the implied SimpleFeatureType contract (immutability) is too constraining, it would be worthwhile examining this at the FeatureType level, not just as a new subclass. Making FeatureTypeImpl mutable would have major consequences (although it is arguable that user data has done this already). Andrea, even though you are seeing this in JSON, your varying properties look like polymorphism to me (the duck-typing variety). Kind regards, -- Ben Caradoc-Davies <[email protected]> Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
