One of the reasons they are hard to follow is that they are very dynamic; consider the alternatives of generating a parser based on a schema for example - we are doing something similar; constructing a data structure based on the schema and then "executing" it to parse (or encode.
Have you read the manual in the user guide? - http://docs.codehaus.org/display/GEOTDOC/XML+Developers+Guide It has a nice step by step example with picture. - http://docs.codehaus.org/display/GEOTDOC/1+Encoding+Overview In your timezone RobA has a lot of hands on experience in this area and should be able to help. Ben I had a hard time following your example data structure; partly because I need to draw a UML diagram everytime I see examples like that :( Suffice to say that working with nested complex attributes (or do you have associations?) you will be breaking new ground. Please write test cases as you go for the next people through. Jody Jody On Wed, Mar 18, 2009 at 6:19 PM, Ben Caradoc-Davies <[email protected]> wrote: > Justin, > > Encoder and its friends are labyrinthine. It is very hard to follow what > it is doing. Is there any manual or documentation? > > Are PropertyExtractors additive? That is, are the properties extracted > by BindingPropertyExtractor added to those extracted by any other? > > Is seems impossible to add a PropertyExtractor and not have > BindingPropertyExtractor leap in at every moment. How can > BindingPropertyExtractor be overridden/disabled/silenced for types > without bindings, such as those defined in application schemas? > > Kind regards, > Ben. > > > Ben Caradoc-Davies wrote: >> Justin, >> >> I am having trouble encoding GML property types for application schemas. >> In GML property types, features (or other complex types) are stored in >> an enclosing property type so that an element indicating the enclosed >> type is encoded. The property type is a base complexType, and the >> permitted contents are indicated by the substitution group of a >> top-level element (ref). >> >> Do I need to write a new PropertyExtractor, or should I try to fix an >> existing ComplexBinding? >> >> In the schema there is an abstract element: >> >> <element abstract="true" name="GeologicFeature" >> substitutionGroup="gml:_Feature" type="gsml:GeologicFeatureType"/> >> >> The property type is then defined using the association pattern: >> >> <complexType name="GeologicFeaturePropertyType"> >> <sequence minOccurs="0"> >> <element ref="gsml:GeologicFeature"/> >> </sequence> >> <attributeGroup ref="gml:AssociationAttributeGroup"/> >> </complexType> >> >> The encoded output will look like this (where specification is a >> property of MappedFeature of type GeologicFeaturePropertyType): >> >> ... >> <gsml:MappedFeature> >> <gsml:specification> >> <gsml:GeologicUnit> >> ... >> >> There is a similar definition for gml:FeaturePropertyType; I have no >> problem encoding gml:FeaturePropertyType because there is an explicit >> binding FeaturePropertyTypeBinding defined for this GML type in >> GMLConfiguration. The problem is that, in general, users can define new >> association pattern property types in their application schema for which >> there are no bindings. The combination of containment and an abstract >> type is an effective firewall that prevents Encoder from getting to the >> contained complex type. >> >> Suggestions? >> >> 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 > _______________________________________________ > Geotools-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-devel > ------------------------------------------------------------------------------ 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
