Justin Deoliveira wrote: > This is indeed a trade off we ran up against when doing the initial > implementation of the model. The plan was basically to leave the object > structure mirroring the xml schema structure (and I am just assuming xml > schema for simplicity sake). > > Then basically have the implementation responsible for searching the > parent types when asked for a descriptor. I seem to remember a > convenience method on the "Types" class that did this. > > So imo having the child type return null from getDescriptor(gml:name) is > a bug. agreed. Once upon a time we were faced with the perf trade of of searching the type hierarchy whenever a property was required and decided to build the sub type directly containing the super type properties, so a given type contains all the properties of the super type plus its own ones. Not sure where that ended, since it was an implementation detail, but it seemed clear that getDescroptor(gml:name) shouldn't return null.
Gabriel > > -Justin > > Ben Caradoc-Davies wrote: >> Jody, >> >> is it expected that ComplexType.getDescriptor will return a descriptor >> from a Complex super type? ComplexTypeImpl does not do this. For >> example, if you create a FeatureType that has a supertype of >> GMLSchema.ABSTRACTFEATURETYPE_TYPE, getDescriptor(gml:name) returns >> null, because the supertype is not searched and the schema does not >> contain this descriptor. >> >> Where is the division of responsibility in constructing the schema of a >> derived type? Should the caller build a schema including parent >> descriptors, or should ComplexTypeImpl constructor do this? >> >> Regards, >> > > -- Gabriel Roldan OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
