Ben Caradoc-Davies wrote:
> Justin Deoliveira wrote:
>> Ideally everything is handed by bindings, and there is only a
>> BindingPropertyExtractor. My advise to you is to have everything
>> handled by a special AbstractFeatureTypeBinding for complex content.
>
> (1) How do I register a second binding for GML.AbstractFeatureType when
> one already exists? If I do this, many unit tests break.
You will have to override it. What I would expect to see is a separate
Configuration instance for "complex GML", which re-uses much of the non
complex stuff. In the complex configuration a different binding will be
attached to GML.AbstractFeatureType
>
> (2) If I can have multiple bindings for the same GML type, would you
> expect them to be applied in any predictable order?
There should be only one.
>
> (3) How do I write a binding for GML types whose name is not known at
> compile time? In my earlier example GeologicFeaturePropertyType is a
> complex type defined in an application schema.
The binding will have to be dynamic in nature, like
AbstractFeatureTypeBinding is today. It does not not know what actual
feature type it is parsing, it looks it up dynamically basked on the
element actually being parsed. Although it uses a fall back to get
around the fact that most people do not ever specify there application
schema properly.
But if you look at the class and follow it down you will eventually hit
the method:
GML2ParsingUtils.featureType(XSDElementDeclaration element,
BindingWalkerFactory bwFactory);
This is the method that takes an xml element declaration and from its
type builds a feature type from it. I imagine you will have to write a
complex version of this method which handles complex content.
-Justin
>
> Kind regards,
>
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
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
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel