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.

Jody

On Mon, Jun 15, 2009 at 9:10 PM, Andrea Aime<[email protected]> wrote:
> Hi,
> I've been working a bit more on the user map comparison that's
> preventing me from committing the 3d work.
>
> Basically, I want retyping to work when the user map is different,
> but the retyping wrappers do no take into account the user maps
> when checking for types equality and blow up with an exception
> stating I'm trying to retype to the same type (so retyping makes
> no sense).
>
> JTS in the geometry has two kinds of equality, the equals(...)
> and the equalsExact(...) (aka "equal equal" ;-) )
>
> Taking inspiriation from that, and aggreing that in the
> general case people are not interested in such a deep equality,
> I looked for making an utility method that does the equality
> instead.
>
> FeatureTypes already has a equals(type1, type2) method,
> so I took it and added a extended version,
> equals(type1, type2, compareUserMap) that allows the
> user to compare the user map contents.
>
> The retyping wrappers will use that one.
>
> Is this ok?
> 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
>

------------------------------------------------------------------------------
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

Reply via email to