Hi all,
I noticed that in SimpleFeatureImpl the setAttribute() methods attempt
to convert an Object into the correct type based on the
AttributeDescriptor but the setAttributes() method takes an entire list
of values and does NOT do conversion. The ResultSetFeature
implementation does not attempt to convert types when setting but does
convert types when in the next() method.
Example from SimpleFeatureImpl:
public void setAttribute(int index, Object value) throws
IndexOutOfBoundsException {
// first do conversion
Object converted = Converters.convert(value,
getFeatureType().getDescriptor(index).getType().getBinding());
...
}
Question: If I am making my own simple feature implementation, is it
expected that I do type conversion in the setAttribute method? Is there
any history behind why there are two pathways (one which converts and
one that doesn't)? It seems that if the user wanted that they could use
the validating option (though its nice to do a conversion for them).
Though I'd like to not do conversions, I wanted to check to see if there
was that expectation or convention.
Thanks,
Andrew Hulbert
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel