|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractOpenWebService<WMSCapabilities,Layer>
WebMapServer
public class WebMapServer
WebMapServer is a class representing a WMS. It is used to access the
Capabilities document and perform requests. It supports multiple versions
and will perform version negotiation automatically and use the highest
known version that the server can communicate.
If restriction of versions to be used is desired, this class should be
subclassed and it's setupSpecifications() method over-ridden. It should
add which version/specifications are to be used to the specs array. See
the current implementation for an example.
Example usage:
WebMapServer wms = new WebMapServer("http://some.example.com/wms");
WMSCapabilities capabilities = wms.getCapabilities();
GetMapRequest request = wms.getMapRequest();
... //configure request
GetMapResponse response = (GetMapResponse) wms.issueRequest(request);
... //extract image from the response
modules/extension/wms (gt-wms.jar)
Nested Class Summary | |
---|---|
class |
WebMapServer.LayerInfo
Quickly describe a layer. |
protected class |
WebMapServer.WMSInfo
Class quickly describing Web Map Service. |
Field Summary |
---|
Fields inherited from class AbstractOpenWebService |
---|
capabilities, info, requestTimeout, resourceInfo, serverURL, specification, specs |
Constructor Summary | |
---|---|
WebMapServer(URL serverURL)
Creates a new WebMapServer instance and attempts to retrieve the Capabilities document specified by serverURL. |
|
WebMapServer(URL serverURL,
int timeout)
Creates a new WebMapServer instance and attempts to retrieve the Capabilities document specified by serverURL. |
|
WebMapServer(WMSCapabilities capabilities)
Creates a new WebMapServer from a WMSCapablitiles document. |
Methods inherited from class AbstractOpenWebService |
---|
getInfo, getInfo, internalIssueRequest, negotiateVersion, setLoggingLevel |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebMapServer(WMSCapabilities capabilities) throws IOException, ServiceException
The implementation assumes that the server is located at: capabilities.getRequest().getGetCapabilities().getGet()
capabilities
-
IOException
ServiceException
public WebMapServer(URL serverURL) throws IOException, ServiceException
serverURL
- a URL that points to the capabilities document of a server
IOException
- if there is an error communicating with the server
ServiceException
- if the server responds with an errorpublic WebMapServer(URL serverURL, int timeout) throws IOException, ServiceException
serverURL
- a URL that points to the capabilities document of a servertimeout
- a time to be wait a server response
IOException
- if there is an error communicating with the server
ServiceException
- if the server responds with an errorMethod Detail |
---|
protected void setupSpecifications()
setupSpecifications
in class AbstractOpenWebService<WMSCapabilities,Layer>
protected ServiceInfo createInfo()
AbstractOpenWebService
createInfo
in class AbstractOpenWebService<WMSCapabilities,Layer>
protected ResourceInfo createInfo(Layer layer)
createInfo
in class AbstractOpenWebService<WMSCapabilities,Layer>
public GetCapabilitiesResponse issueRequest(GetCapabilitiesRequest request) throws IOException, ServiceException
issueRequest
in class AbstractOpenWebService<WMSCapabilities,Layer>
IOException
ServiceException
public GetMapResponse issueRequest(GetMapRequest request) throws IOException, ServiceException
IOException
ServiceException
public GetFeatureInfoResponse issueRequest(GetFeatureInfoRequest request) throws IOException, ServiceException
IOException
ServiceException
public DescribeLayerResponse issueRequest(DescribeLayerRequest request) throws IOException, ServiceException
IOException
ServiceException
public GetLegendGraphicResponse issueRequest(GetLegendGraphicRequest request) throws IOException, ServiceException
IOException
ServiceException
public GetStylesResponse issueRequest(GetStylesRequest request) throws IOException, ServiceException
IOException
ServiceException
public PutStylesResponse issueRequest(PutStylesRequest request) throws IOException, ServiceException
IOException
ServiceException
public WMSCapabilities getCapabilities()
public GetMapRequest createGetMapRequest()
public GetFeatureInfoRequest createGetFeatureInfoRequest(GetMapRequest getMapRequest)
getMapRequest
- a previous configured GetMapRequest
UnsupportedOperationException
- if the server does not support GetFeatureInfopublic DescribeLayerRequest createDescribeLayerRequest() throws UnsupportedOperationException
UnsupportedOperationException
public GetLegendGraphicRequest createGetLegendGraphicRequest() throws UnsupportedOperationException
UnsupportedOperationException
public GetStylesRequest createGetStylesRequest() throws UnsupportedOperationException
UnsupportedOperationException
public PutStylesRequest createPutStylesRequest() throws UnsupportedOperationException
UnsupportedOperationException
public GeneralEnvelope getEnvelope(Layer layer, CoordinateReferenceSystem crs)
layer
- crs
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |