Hello geotools developers,
I've submitted a patch against the 2.1.x branch head which causes
geotools to attempt to use the sde-reported "rowid" column for a
particular table as the FID for featuretypes based on that table.
The particular itch this scratches for me was that I wanted to support
tables which had "null" geometries, and the current sde code used the
SeShape object to determine the fid, which was unfortunately not present
in my table.
To do this I wrapped the generic AttributeType schema objects in
ArcSDEAttributeType objects which were simply pass-thrus that tracked an
extra attribute, "isFeatureIdAttribute".
In an earlier email about namespaces in ArcSDE featuretypes I noted that
the ArcSDE adapter builds its own featureType schema cache, rather
than sharing the geoserver ones. Since this "rowid column" stuff is
figured out at the ArcSDE level (and in the "scope" of the
ArcSDEAdapter's copy of the featureType schema), but the FID is written
out in the "scope" of the geotools client's query schema (geoserver's
copy in this case) the name of the rowid column is figured out and
communicated from the first scope to the second.
I guess this isn't optimal. It seems like the best way would be for
there to be some kind of a global featuretype cache, and for every
geotools-related module/application to be able to fetch from that same
global featuretype cache, including annotating the featuretypes within
the cache in just these kinds of ways.
Since geoserver is currently tied to the 2.1.x geotools branch, and my
primary motivation is geoserver, I've patched the 2.1.x branch. But
when geoserver moves to 2.2.x I'll forward-port this patch (along with
some other ones) and maybe try to round up some time to approach the
"global featuretype cache" problem better.
Comments/feedback on the patch are welcome!
--saul
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel