To re-inforce the point, here are a couple of extracts from GML 3.2 spec 
(equally applicable to GML 3.1, GML 3.0, GML 2.X but never quite spelled out 
before):

===
9.8 Defining application-specific feature types
All specific feature types defined in application schemas shall be implemented 
as global XML elements whose content model (XML Schema types) are derived from 
gml:AbstractFeatureType,
===
21.3.3 Elements representing features
All geographic features and feature collections in the application schema shall 
be declared as global elements in the schema, i.e. they shall be immediate 
child elements of the XML Schema <schema> element.
The name of an element that instantiates a GML feature shall be its feature 
type, in the sense described in ISO 19109. 
===

The key point here is that each UML Class (feature type) is implemented by an 
XML Element. 
The XML Schema types are just apparatus used by XML Schema to build element 
declarations, and are of no interest externally. 

Simon

______
[email protected]  CSIRO Exploration & Mining
26 Dick Perry Avenue, Kensington WA 6151 
PO Box 1130, Bentley WA 6102  AUSTRALIA
T: +61 (0)8 6436 8639  Cell: +61 (0) 403 302 672
Polycom PVX: 130.116.146.28
<http://www.csiro.au>

ABN: 41 687 119 230
 

> -----Original Message-----
> From: Caradoc-Davies, Ben (E&M, Kensington) 
> Sent: Thursday, 12 March 2009 11:45 AM
> To: Jody Garnett
> Cc: Gabriel Roldan; Justin Deoliveira; Atkinson, Rob (CLW, 
> Lucas Heights); Geotools-Devel list; Geoserver-devel; Cox, 
> Simon (E&M, Kensington)
> Subject: Broken GML3OutputFormat feature type name assumption
> 
> Jody,
> 
> I have run into a problem at the last step of getting 
> GeoServer to encode a complex feature WFS response. I hope 
> you can help by suggesting a way forward.
> 
> GeoServer GML3OutputFormat uses
> org.geotools.feature.FeatureCollection.getSchema() to get the 
> FeatureType that is to be returned (the content model), and 
> uses it to find the name of the WFS feature type, to locate 
> the FeatureTypeInfo in the catalog. GML3OutputFormat appears 
> to make the unwarranted assumption that the WFS feature type 
> name is the same as the XML schema type name. 
> In general, this is not the case. For example, in GeoSciML we 
> have a WFS feature type gsml:MappedFeature which has XML 
> schema type gsml:MappedFeatureType.
> 
> As Simon Cox kindly explained to me yesterday:
> (1) The XML schema complex type definition provides the 
> content model for an XML schema element declaration. [This is 
> the type returned by getSchema().]
> (2) The XML element declaration defines the WFS feature type 
> and name. 
> [This is the feature attribute descriptor name.]
> 
> Looking at the old GeoServer 1.6 community-schemas fork, I 
> see that a concrete feature collection implementation was 
> used that allowed access to the underlying feature attribute 
> descriptor, and hence the WFS feature type name.
> 
> A possible solution is to add a getName() method to 
> FeatureCollection to allow the discovery of the WFS feature 
> type name used to create the FeatureCollection. This will 
> require modification of numerous implementations. To avoid 
> changing many implementations, I could instead add a new 
> interface (e.g. NamedFeatureCollection) extending 
> FeatureCollection, and use instanceof in GML3OutputFormat.
> 
> Which would you prefer?
> 
> 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
> 
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to