|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.ows.AbstractOpenWebService<WMSCapabilities,Layer>
org.geotools.data.wms.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
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 org.geotools.data.ows.AbstractOpenWebService |
---|
capabilities, info, requestTimeout, resourceInfo, serverURL, specification, specs |
Constructor Summary | |
---|---|
WebMapServer(java.net.URL serverURL)
Creates a new WebMapServer instance and attempts to retrieve the Capabilities document specified by serverURL. |
|
WebMapServer(java.net.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 org.geotools.data.ows.AbstractOpenWebService |
---|
getInfo, getInfo, internalIssueRequest, negotiateVersion, setLoggingLevel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebMapServer(WMSCapabilities capabilities) throws java.io.IOException, ServiceException
The implementation assumes that the server is located at: capabilities.getRequest().getGetCapabilities().getGet()
capabilities
-
java.io.IOException
ServiceException
public WebMapServer(java.net.URL serverURL) throws java.io.IOException, ServiceException
serverURL
- a URL that points to the capabilities document of a server
java.io.IOException
- if there is an error communicating with the server
ServiceException
- if the server responds with an errorpublic WebMapServer(java.net.URL serverURL, int timeout) throws java.io.IOException, ServiceException
serverURL
- a URL that points to the capabilities document of a servertimeout
- a time to be wait a server response
java.io.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 java.io.IOException, ServiceException
issueRequest
in class AbstractOpenWebService<WMSCapabilities,Layer>
java.io.IOException
ServiceException
public GetMapResponse issueRequest(GetMapRequest request) throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
public GetFeatureInfoResponse issueRequest(GetFeatureInfoRequest request) throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
public DescribeLayerResponse issueRequest(DescribeLayerRequest request) throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
public GetLegendGraphicResponse issueRequest(GetLegendGraphicRequest request) throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
public GetStylesResponse issueRequest(GetStylesRequest request) throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
public PutStylesResponse issueRequest(PutStylesRequest request) throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
public WMSCapabilities getCapabilities()
public GetMapRequest createGetMapRequest()
public GetFeatureInfoRequest createGetFeatureInfoRequest(GetMapRequest getMapRequest)
getMapRequest
- a previous configured GetMapRequest
java.lang.UnsupportedOperationException
- if the server does not support GetFeatureInfopublic DescribeLayerRequest createDescribeLayerRequest() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public GetLegendGraphicRequest createGetLegendGraphicRequest() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public GetStylesRequest createGetStylesRequest() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public PutStylesRequest createPutStylesRequest() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public GeneralEnvelope getEnvelope(Layer layer, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
layer
- crs
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |