Jody Garnett wrote:
>> The reason I want to change SimpleFeatureTypeBuilder is that I want to 
>> change GML2EncoderUtils to add support for complex feature encoding.
> 
> To clarify; I do not want you to change SimpleFeatureTypeBuilder - I want us 
> to create a new one. SimpleFeatureTypeBuilder is only to help assist building 
> SimpleFeatureType....

We keep on going in circles. I want to fix SimpleFeatureTypeBuilder so I 
can fix GML2EncoderUtils so I can use it to encode complex features. I 
have no interest in SimpleFeatureTypeBuilder other than not breaking it.

>> While making these changes, I discovered the unwritten contract: 
>> SimpleFeatureTypeBuilder discards namespaces, and GML2EncoderUtils 
>> fabricates them. I don't fancy my chances of getting changes to 
>> GML2EncoderUtils accepted if they break SimpleFeatureTypeBuilder.
> 
> That may be a mistake; what do you mean by discards namespaces?

SimpleFeatureTypeBuilder.add(String, ...) builds types with properties 
with no namespaces. For example, see in GML3ParserUtils the use of 
SimpleFeatureTypeBuilder.add() with a name obtained from 
XDSElementDeclaration.getName(), that is, the local (unqualified) name 
of an element that has a namespace. Users of 
SimpleFeatureTypeBuilder.add() thus discard namespaces when creating 
simple types.

> I am not familiar with GML2EncoderUtils - I would hope that for the rich 
> feature model work we are using the GML bindings?

GeoServer GMLOutputFormat uses WFSConfiguration to encode features, 
using the binding AbstractFeatureTypeBinding, which gets properties 
using GML3EncoderUtils, which is mainly implemented in GML2EncoderUtils. 
The bindings are specified in WFSConfiguration, and bind to GML3.

GML{2,3}EncoderUtils can be persuaded, with minor tweaks, to encode 
complex features (mostly, I am working on it). However, these minor 
tweaks break SimpleFeatureTypeBuilder.

I can either:
(1) Fix SimpleFeatureTypeBuilder.
(2) Implement a new WFSConfiguration that does not use 
GML{2,3}EncoderUtils, and figure out how to get GeoServer to use it.

-- 
Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au>
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to