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.
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")) ){
...
}
Unless you would like to confirm that our retyping code is going to
copy the entire user map along as it goes?
Jody
On Tue, Jun 16, 2009 at 12:42 AM, Andrea Aime<[email protected]> wrote:
> Jody Garnett ha scritto:
>>
>> Hi Andrea:
>>
>> That approach works for me; however I am a bit worried that the check
>> will be fragile.
>>
>> Could the method be phrased as:
>> FeatureTypes.equals( type1, type2, keys )
>>
>> And only the user map keys mentioned would be involved in the
>> comparison? This would allow you to exactly represent the check you
>> want to perform.
>
> This would defeat the purpose I've written the patch for.
>
> The retyper is generic, does not know what it's retyping:
> http://svn.osgeo.org/geotools/branches/2.5.x/modules/library/main/src/main/java/org/geotools/data/ReTypeFeatureReader.java
>
> (you can get a patch that transform is, along with FeatureTypes,
> attached to this message).
>
> 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