it.geosolutions.geoserver.rest.decoder
Class RESTDataStore

java.lang.Object
  extended by it.geosolutions.geoserver.rest.decoder.RESTDataStore

public class RESTDataStore
extends Object

Parse DataStores returned as XML REST objects.

This is the XML document returned by GeoServer when requesting a DataStore:

 <dataStore>
    <name>sf</name>
    <enabled>true</enabled>
    <workspace>
        <name>sf</name>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate"
            href="http://localhost:8080/geoserver/rest/workspaces/sf.xml"
            type="application/xml"/>
    </workspace>
    <connectionParameters>
        <entry key="namespace">http://www.openplans.org/spearfish</entry>
        <entry key="url">file:data/sf</entry>
    </connectionParameters>
    <featureTypes>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate"
            href="http://localhost:8080/geoserver/rest/workspaces/sf/datastores/sf/featuretypes.xml"
            type="application/xml"/>
    </featureTypes>
</dataStore>
 
 
Note: the whole XML fragment is stored in memory. At the moment, there are methods to retrieve only the more useful data.

Author:
etj

Nested Class Summary
static class RESTDataStore.DBType
           
 
Constructor Summary
protected RESTDataStore(org.jdom.Element dsElem)
           
 
Method Summary
static RESTDataStore build(String xml)
           
protected  String getConnectionParameter(String paramName)
           
 Map<String,String> getConnectionParameters()
           
 String getDescription()
           
 String getName()
           
 String getStoreType()
           
 RESTDataStore.DBType getType()
           
 String getWorkspaceName()
           
 boolean isEnabled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RESTDataStore

protected RESTDataStore(org.jdom.Element dsElem)
Method Detail

build

public static RESTDataStore build(String xml)

getName

public String getName()

getStoreType

public String getStoreType()

getDescription

public String getDescription()

isEnabled

public boolean isEnabled()

getWorkspaceName

public String getWorkspaceName()

getConnectionParameters

public Map<String,String> getConnectionParameters()

getConnectionParameter

protected String getConnectionParameter(String paramName)

getType

public RESTDataStore.DBType getType()


Copyright © 2007-2013 GeoSolutions. All Rights Reserved.