Hi, first of all, thanks for you hints - they pushed me in the right direction so I can say now that I have been quite successful parsing data sets with complex properties.
In our application we're using a custom API to parse the application schema and create FeatureTypes that represent the definition in the schema (as good as we can) including complex property types and XML attributes. For all concrete feature and property types that are referenced in the schema a binding is created in the configuration, which creates features/complex-attributes quite similar to how it is done in GML2ParsingUtils. Because of our custom API for the schemas this solution can't be integrated directly back into Geotools, but I think there could be done something similar. In any case I hope our results may be useful to someone who also wants to parse features with complex properties. You can find the complete source code online (http://community.esdi-humboldt.eu/repositories/show/hale), for the classes that are relevant to the GML parsing look here: http://community.esdi-humboldt.eu/repositories/browse/hale/eu.esdihumboldt.hale.gmlparser/src/eu/esdihumboldt/hale/gmlparser (most interesting might be the HaleSchemaConfiguration class and its dependencies) Cheers, Simon Am 14.09.2010 13:05, schrieb Jody Garnett: > The parser pays attention to the schema referenced by your GML file; for > anything that it cannot find it will treat it as a hashmap. For things it can > find (that extend AbstractFeature) it will parse into a Feature. > > Ben have you tried parsing with the application application schema? Or just > encoding thus far. > > Simon there have been few examples of "complex" schemas to parse up till now; > you can review the test cases to see if that case has been tested (and how to > configure and run). > > I expect you need to set up your own configuration; and tell the parser where > your schema is located; prior to parsing or encoding. > > On trunk (ie 2.7) I started creating a GML utility class to help make > configuration easier; you can look at this code for examples of how to > configure. > > When you get something working please pass it back to the list; as I would > like to extend the GML class (and examples) showing how to work with complex > content. > > (Also in the GML class I have some code that will *try* and parse things into > a simple feature; even if the schema cannot be found). > > Jody ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users