Hi Justin,

I do need the DataStore to live between instances of GeoServer -- I
just want to be able to connect to it from the WFS Request post test
page.  I want to drop in an XML query like this:

<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:topp="http://www.openplans.org/topp";
  xmlns:wfs="http://www.opengis.net/wfs";
  xmlns:ogc="http://www.opengis.net/ogc";
  xmlns:gml="http://www.opengis.net/gml";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xmlns:myNamespace="http://myNamespace.com";
  xsi:schemaLocation="http://www.opengis.net/wfs
                      http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd";>
  <wfs:Query typeName="myNamespace:myFeatureID">
  </wfs:Query>
</wfs:GetFeature>

and have it find my DataStore through through the plugin factory

Here is what I did:

1) wrote ObjectDataStore.java that implements AbstractDataStore
2) wrote ObjectDataStoreFactory.java that extends
AbstractDataStoreFactory and implements DataStoreFactorySpi
3) wrote ObjectFeatureReader that implements FeatureReader
4) wrote other code that gives the data to these things when called
upon (e.g. wrote a class RoadElement that implements Feature -- this
has the data and it is retrieved from some other code)
6) Packaged up as Jar with
META-INF/services/org.geotools.data.DataStoreFactorySpi =
my.package.hierarchy.ObjectDataStoreFactory
7) Added the Jar to GeoTools project libraries.
8) Edited ..\rel_1_3_0_rc6\server\geoserver\WEB-INF\catalog.xml (using
Jetty) to add my datastore and namespace as follows:

<datastore namespace = "myNamespace" enabled = "true" id="RoadElement">
<connectionParams><parameter value = "myNamespace"
name="namespace"/></connectionParams></datastore>

<namespace uri="http://myNamespace.com"; prefix = "myNamespace" />

9) Killed GeoServer: ant->stop
10) Started GeoServer: ant->start
11) http://localhost:8080/geoserver

checked Config -> Data -> Stores .. my DataStore does not show up --
hence my WFS sample post above surely won't work.

Please excuse my ignorance -- I know I'm probably missing multiple
steps here.  Any hand-holding that anyone has any free time for is
immensely appreciated!

Regards,
Davis

PS: If I get better at it -- I promise to help document on the Wiki

On 12/2/05, Justin Deoliveira <[EMAIL PROTECTED]> wrote:
> Hi Davis,
>
> Davis Ford wrote:
> > Hello, I have some basic questions on how to link up a new DataStore
> > we created with GeoServer.  The way I understand it, we need to create
> > a DataStoreFactory that implements DataStoreFactorSpi and package our
> > DataStore up in a jar with
> > META-INF/services/org.geotools.data.DataStoreFactorySpi that contains
> > the string our.package.name.OurDataStoreFactory
> >
> > Then do we add that jar to the GeoServer lib path?
>
> Currently geoserver does not support the memory datastore, but you
> should be able to add it to the lib path and have it show up in the
> geoserver datastore config. However since memory datastores are volatile
> your data  would not live in between running instances of geoserver.
> >
> > One note, since this is a MemoryDataStore -- we don't really have a
> > need for the params Map that contains things like username/passwd for
> > database or URL for a file.  I don't do any params key/value checking
> > in the Factory...it just returns OurDataStore.
> >
> > However, looking into GeoServer, I am struggling to understand how it
> > is linked to a WFS FeatureRequest from above.  It seems the main code
> > that does this is in
> > org.vfny.geoserver.responses.wfs.FeatureResponse.execute( )
> >
> > I have reverse-engineered a seq. diagram of this method, but am still
> > not clear on how GeoServer finds our DataStore.
> After you add your datastore to geoserver, you need to add feature type
> (s). Feature types are uniquly named and you must include the name in
> the query you are making.
> >
> > Can someone point me to the right area to look, or any pointers on
> > getting a test of a new DataStore working with GeoTools.  My basic
> > test environment consists of setting a breakpoint in the GeoServer's
> > org.vfny.geoserver.wfs.servlets.TestWfsPost.doPost( ) and go to the
> > local URL: http://localhost:8080/geoserver/wfs/TestWfsPost, input some
> > XML as a WFS request, and then walk through it in Eclipse debugger --
> > trying to get it linked up with OurDataStore.
>
> Here are some docs on how to set up a datastores / feature types in
> geosever.
>
> http://docs.codehaus.org/display/GEOSDOC/Data+Configuration
> >
> > Please let me know if I am making any incorrect assumptions, or if
> > there is a better way.
> >
> > Thanks in advance,
> >
> > Davis
> >
> >
> > -------------------------------------------------------
> > 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://ads.osdn.com/?ad_idv37&alloc_id865&op=click
> > _______________________________________________
> > Geotools-gt2-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> >
>
>
> --
> Justin Deoliveira
> The Open Planning Project
> http://topp.openplans.org
>


-------------------------------------------------------
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://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to