Ok, here's a re-thinking of this problem. ReTypeFeatureReader was really a "ReOrderFeatureReader" because it used the same "equals()" call to determine whether the featureTypes were really the same *and* to determine whether they were "compatible" or maybe "retype-able".
So the question is, what sorts of similarities do two attributeTypes have to have to each other in order to be "ReType" compatible? Well, minimum: 1 they must have the same name (otherwise there's no way to create a mapping). 2 they need to have similar cardinalities. 3 their underlying types should be compatible I.e. newType.getType().isInstance(origType.getType()) should return true. 4 they should have the same 'nillability' I'm not totally sure about 2 and 4. This all came up because I decided to override "equals()" in the GeometricAttributeType class so that two GeometricAttributeTypes weren't the same if their CRS were different. This meant that my use of ReTypeFeatureReader was a non-reordering, type-compatible retyping, but used the same "equals()" call to determine whether the featuretypes were the same (they aren't) and whether they are compatible (they *are). Any thoughts on this? By the way, I got the list 1-4 from the code in DefaultAttributeType.equals(), which is what was being called currently. This just makes explicit what we're checking for when we mean "compatible". --saul ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
