Hi Rini, I see your point. And off the top of my head I can't think of any specific reason for that behavior. That said I would be a little weary of changing it as I am guessing it was done for some reason that is escaping me at the moment.
I am open to changing it but I think we would want to do a good set of regression testing if we do. -Justin On 3/9/10 2:42 AM, [email protected] wrote: > Hi Justin, > Since you're the author of the class, I'm wondering if you could help me. > In SimpleFeaturePropertyAccessor.canHandle(), it does this: > * * > > *if* ( object *instanceof* SimpleFeature ) { > > *return* ((SimpleFeature) object).getAttribute( xpath ) != *null*; > > } > > When we have a null value in the database, it then starts using the next > accessor for the next rows, which is XPathPropertyAccessor. > > XPathPropertyAccessor doesn't only return the value of the column, but > wrapping it with an xpath place holder. > i.e. this is what's encoded: > <gsml:mineralName > xlink:href="http://resource.nvcl.au/classifier/auscope/tsa/6.1/mineral/SimpleFeatureImpl.Attribute: > CLASSTEXT<CLASSTEXT > id=LOGDATA10M.fid--5710a6a2_125b91b4e25_-7fe8>=Sulfate" /> > whereas, this is what we want: > <gsml:mineralName > xlink:href="http://resource.nvcl.au/classifier/auscope/tsa/6.1/mineral/Sulfate" > /> > Our workaround so far is to replace null values with null string > representations in the database, e.g. 'N/A'. > Is this a bug? > Is it meant to check if the attribute exists in the feature, i.e. > * return* ((SimpleFeature) object).getProperty( xpath ) != *null*; > instead? > Thank you and regards, > Rini -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
