Rini you may wish to also look at some of the other implementations of
property accessor - including one that does full xpath support (thanks
to an apache project).

There are many PropertyAccessor implementations around ...
Jody

On Tue, Mar 9, 2010 at 6:42 PM,  <[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
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; 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
>
>

------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to