GeoServer app-schema developers,
please use UniqueNameFeatureTypeImpl and UniqueNameFeatureTypeFactoryImpl when creating app-schema feature types. UniqueNameFeatureTypeImpl overrides equals/hashCode so that feature types are considered equal if and only if their name is the same. This allows us to avoid having to analyse cyclically defined graphs of multiple feature types to determine if they are equal (could be done, but would require major core-code API changes).
Using UniqueNameFeatureTypeImpl allows us to get all the benefits of the existing xsd-gml2 FeatureTypeCache at encode time; the only new restriction is that an app-schema deployment cannot use multiple definitions of the same XSD type. The only way I think users could be bitten is if they try to simultaneously use multiple versions of the same application schema with the same namespace but different XSD type definitions (maybe different patch versions; even this would be hard to arrange).
I'm not sure how this will affect the use of targetAttributeNode, and when it is applied. (Will this change break it? Need more unit tests.)
The bug this fixes is here:
GEOT-3354: Support encoding multiple app-schema WFS feature types with the same XSD type
http://jira.codehaus.org/browse/GEOT-3354
Everything in app-schema (trunk and stable) has been fixed to use the new classes. New code should as well.
Kind regards,
--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre