Jody Garnett ha scritto:
> I will look over the code; I was not aware that the retyper was not
> aware of what it was doing; I thought we were going to explicitly ask
> it to look out for a few keys that mean something to the library.
I'm missing how this can be any manageable in the long term.
> Looks like the code you are working on is here:
>
> protected AttributeDescriptor[] typeAttributes(SimpleFeatureType target,
> SimpleFeatureType origional) {
> if (target.equals(origional)) {
> throw new IllegalArgumentException(
> "FeatureReader allready produces contents with the
> correct schema");
> }
> ....
> }
>
> What I do not want to set up is the situation where users can no
> longer use the user map (because if they add something the above
> equalsExact check will fail?). I was hoping to have the following....
>
> if( target.equalsExact( origional, new HashSet(Arrays.asList("_DIMENSION")) ){
> ...
> }
So next time we add a new interesting key we'll have to modify all
the points in which we need a strict equality?
What if a datastore adds a new one but its not being developed by
a core developer? How is that going to be handled?
I've asked this question a couple of times already but you seem
to dodge it every time :-)
The check in the retyper is there to avoid silly code that retyped
the same collection three times in a row to the same target feature
type. Ensuring that the source and target type are not picture perfect
equals is all the check needs to do to ensure retyping is not going
to be a complete waste of cpu cycles.
> Unless you would like to confirm that our retyping code is going to
> copy the entire user map along as it goes?
Humm.... copy? The retyper creates new features and attaches them
to the target feature type, which has the desired user map.
There is no user map copying.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel