|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.geosolutions.geoserver.rest.GeoServerRESTReader
public class GeoServerRESTReader
Connect to a GeoServer instance to read its data.
Info are returned as Strings or, for complex data, as XML elements
wrapped in proper parsers (e.g.: RESTLayer
, RESTCoverageStore
, ...).
Constructor Summary | |
---|---|
GeoServerRESTReader(String restUrl)
Creates a GeoServerRESTReader for a given GeoServer instance and no auth credentials. |
|
GeoServerRESTReader(String restUrl,
String username,
String password)
Creates a GeoServerRESTReader for a given GeoServer instance with the given auth credentials. |
|
GeoServerRESTReader(URL restUrl)
Creates a GeoServerRESTReader for a given GeoServer instance and no auth credentials. |
|
GeoServerRESTReader(URL restUrl,
String username,
String password)
Creates a GeoServerRESTReader for a given GeoServer instance with the given auth credentials. |
Method Summary | |
---|---|
boolean |
existGeoserver()
Check if a GeoServer instance is running at the given URL. |
boolean |
existsStyle(String styleName)
Check if a Style exists in the configured GeoServer instance. |
RESTCoverage |
getCoverage(RESTLayer layer)
Get detailed info about a Coverage given the Layer where it's published with. |
RESTCoverage |
getCoverage(String workspace,
String store,
String name)
Get detailed info about a given Coverage. |
RESTCoverageList |
getCoverages(String workspace,
String csName)
Get list of coverages (usually only one). |
RESTCoverageStore |
getCoverageStore(RESTCoverage coverage)
Get detailed info about a Coverage's Datastore. |
RESTCoverageStore |
getCoverageStore(String workspace,
String csName)
Get detailed info about a given CoverageStore in a given Workspace. |
RESTCoverageStoreList |
getCoverageStores(String workspace)
Get summary info about all CoverageStores in a WorkSpace. |
RESTDataStore |
getDatastore(RESTFeatureType featureType)
Get detailed info about a FeatureType's Datastore. |
RESTDataStore |
getDatastore(String workspace,
String dsName)
Get detailed info about a given Datastore in a given Workspace. |
RESTDataStoreList |
getDatastores(String workspace)
Get summary info about all DataStores in a WorkSpace. |
RESTFeatureType |
getFeatureType(RESTLayer layer)
Get detailed info about a FeatureType given the Layer where it's published with. |
RESTLayer |
getLayer(String name)
Get detailed info about a given Layer. |
RESTLayerGroup |
getLayerGroup(String name)
Get detailed info about a given LayerGroup. |
RESTLayerGroup |
getLayerGroup(String workspace,
String name)
Get detailed info about a given LayerGroup. |
RESTLayerGroupList |
getLayerGroups()
Get summary info about all LayerGroups. |
RESTLayerGroupList |
getLayerGroups(String workspace)
Get summary info about all LayerGroups in the given workspace. |
RESTLayerList |
getLayers()
Get summary info about all Layers. |
RESTNamespace |
getNamespace(String prefix)
Get a namespace. |
List<String> |
getNamespaceNames()
Get the names of all the Namespaces. |
RESTNamespaceList |
getNamespaces()
Get summary info about all Namespaces. |
RESTResource |
getResource(RESTLayer layer)
Get detailed info about a Resource given the Layer where it's published with. |
String |
getSLD(String styleName)
Get the SLD body of a Style. |
RESTStyleList |
getStyles()
Get summary info about all Styles. |
List<String> |
getWorkspaceNames()
Get the names of all the Workspaces. |
RESTWorkspaceList |
getWorkspaces()
Get summary info about all Workspaces. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeoServerRESTReader(URL restUrl)
Note that GeoServer 2.0 REST interface requires username/password credentials by default, if not otherwise configured. .
restUrl
- the base GeoServer URL(e.g.: http://localhost:8080/geoserver)public GeoServerRESTReader(String restUrl) throws MalformedURLException
Note that GeoServer 2.0 REST interface requires username/password credentials by default, if not otherwise configured. .
restUrl
- the base GeoServer URL (e.g.: http://localhost:8080/geoserver)
MalformedURLException
public GeoServerRESTReader(String restUrl, String username, String password) throws MalformedURLException
restUrl
- the base GeoServer URL (e.g.: http://localhost:8080/geoserver)username
- username auth credentialpassword
- password auth credential
MalformedURLException
public GeoServerRESTReader(URL restUrl, String username, String password)
restUrl
- the base GeoServer URL (e.g.: http://localhost:8080/geoserver)username
- username auth credentialpassword
- password auth credentialMethod Detail |
---|
public boolean existGeoserver()
public boolean existsStyle(String styleName) throws RuntimeException
styleName
- the name of the style to check for.
RuntimeException
- if any other HTTP code than 200 or 404 was retrieved.public RESTStyleList getStyles()
RESTStyleList
public String getSLD(String styleName)
public RESTDataStoreList getDatastores(String workspace)
workspace
- The name of the workspace
RESTDataStoreList
public RESTDataStore getDatastore(String workspace, String dsName)
workspace
- The name of the workspacedsName
- The name of the Datastore
RESTDataStore
public RESTDataStore getDatastore(RESTFeatureType featureType)
featureType
- the RESTFeatureType
RESTDataStore
public RESTFeatureType getFeatureType(RESTLayer layer)
layer
- A layer publishing the FeatureType
RESTCoverage
public RESTCoverageStoreList getCoverageStores(String workspace)
workspace
- The name of the workspace
RESTDataStoreList
public RESTCoverageStore getCoverageStore(String workspace, String csName)
workspace
- The name of the workspacecsName
- The name of the CoverageStore
RESTCoverageStore
public RESTCoverageStore getCoverageStore(RESTCoverage coverage)
coverage
- the RESTFeatureType
RESTCoverageStore
public RESTCoverageList getCoverages(String workspace, String csName)
workspace
- The name of the workspacecsName
- The name of the CoverageStore
RESTCoverageList
public RESTCoverage getCoverage(String workspace, String store, String name)
workspace
- The name of the workspacestore
- The name of the CoverageStorename
- The name of the Coverage
RESTCoverage
public RESTCoverage getCoverage(RESTLayer layer)
layer
- A layer publishing the CoverageStore
RESTCoverage
public RESTResource getResource(RESTLayer layer)
RESTResource
public RESTLayerGroupList getLayerGroups(String workspace)
workspace
- name of the workspace
RESTLayerGroupList
public RESTLayerGroup getLayerGroup(String workspace, String name)
workspace
- name of the workspacename
- the name of the LayerGroup
RESTLayerGroup
public RESTLayerGroupList getLayerGroups()
RESTLayerGroupList
public RESTLayerGroup getLayerGroup(String name)
name
- The name of the LayerGroup
RESTLayerGroup
public RESTLayerList getLayers()
RESTLayerList
public RESTLayer getLayer(String name)
name
- The name of the Layer
RESTLayer
public RESTNamespace getNamespace(String prefix)
prefix
- namespace prefix.
public RESTNamespaceList getNamespaces()
RESTNamespaceList
public List<String> getNamespaceNames()
getNamespaces
public RESTWorkspaceList getWorkspaces()
RESTWorkspaceList
public List<String> getWorkspaceNames()
getWorkspaces
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |