Hi Jody,
Sorry for the late response to your mail.
Ok, I explain you why I need to use the connection API directly:
1. The geotools filter API does not allow all possible filter (where or order
by clause) from SDE. For example I can use an:
" FID IN ( 100, 101, 122, 155 )" with SDE. When I use the geotools filter API I
need to transform this SQL statement to
" FID = 100 or FID = 101 or ...". This is just a simple example, but I shows
the problem I have. My library uses a lot of standard SQL statements, that's
why the IN clause.
2. The "childState" SDE code that I use, is needed if your SDE layer is
versioned. I do need to use this when I update the features in SDE.
You can find some code here:
http://edndoc.esri.com/arcsde/9.2/samples/com/esri/sde/devhelp/versioning/VersioningExample1.java
3. My library uses SDE annotations. A SeAnno is a simple annotation object with
a hook point and some text, as well as font, size... . The hook point is a
SeShape which is stored in the SHAPE field. All the other properties are stored
in the field ELEMENT in binary form or since SDE 9.2 as simple feature
attributes. I only found some code to load SDE annotation but I haven't seen
anything to update them. I will send you some code to show the loading of the
annotation features.
example:
SeShape seShape = row.getShape(geom);
if (seShape.hasAnno()) {
SeShapeAnno annotation = seShape.getAnno();
SeShape pos = annotation.getPlacement();
... = annotation.getXOffset();
... = annotation.getXOffset();
... = annotation.getJustification()
} else {
// there is no "binary" annotation
height = row.getInt("HEIGHT");
xOffset = row.getInt(....)
}
If you need more information, just tell me.
Thank you
Manfred
Manfred PAUL wrote:
> Hi,
>
> I do need access to the "connection API", because I am also loading sde
> annotations that are not supported by the geotools and I do not want to
> handle the connections myself. There has been some problems while adding sde
> features using the geotools. When adding features I do need create a
> childstate that might not be the case in the older version of the geotools.
>
Manfred the class does not appear to be entirely closed off; the ArcGrid
support makes use of some of the concepts. We have stopped allowing
direct access to an SeConnection; and instead try and set up a queue of
commands. You know how SwingUtilties.invokeLayer( Runnable ) can be used
to safely work on the event thread? A command queue is handled in a
similar fashion; basically we are making sure that only one thread has
access to the SeConnection at a time.
So you should be able to work within this model.
> Like:
> conn.startTransaction();
>
> SeVersion userOneVersion = new SeVersion(conn,
> SeVersion.SE_QUALIFIED_DEFAULT_VERSION_NAME);
> SeState parentState = new SeState(conn, userOneVersion.getStateId());
> SeState stateOne = createChildState(parentState, conn);
>
One kind of work are you doing in your childState? Is there any way we
can tell that sde annotations are needed? I would much rather have a
solid story for supporting your needs than try and help you hack around
limitations in our library.
> By the way, I found the "huge" bug in version 2.4.4:
>
> //@Override
> public String[] getPropertiesToFetch(SimpleFeatureType schema) throws
> IOException {
> List/*<String>*/ attNames = new
> ArrayList/*<String>*/(schema.getAttributeCount() + 1);
>
> Has to be:
>
> //@Override
> public String[] getPropertiesToFetch(FeatureType schema) throws
> IOException {
> List/*<String>*/ attNames = new
> ArrayList/*<String>*/(schema.getAttributeCount() + 1);
>
> Otherwise there will be no "1.4 java override", cause the method in the
> abstract class is:
>
> /**
> * Returns the attribute names of the FeatureType passed to the
> constructor.
> *
> * @return DOCUMENT ME!
> *
> * @throws IOException
> * if the SeLayer can't be obtained (only if the geomety
> * attribute was not included in the request).
> */
> public String[] getPropertiesToFetch(FeatureType schema) throws
> IOException {
>
> Will there be an update 2.4.5 in the near future?
>
There are no plans for a release at this time. The procedure for making
one is public; if your project is interested we do accept volunteers. My
understanding is the GeoServer project may be kind enough to release one
(if they need a copy for a n additional GeoServer 1.6.x release).
There are plans to release from the 2.2.x and a 2.5.x branches. If
possible I recommend the 2.5.x branch as the improvements made to
ArcSDEDataStore are substantial.
Jody
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users