|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.wms.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
Field Summary | |
protected Specification[] |
specs
Contains the specifications that are to be used with this WMS |
Constructor Summary | |
WebMapServer(java.net.URL serverURL)
Creates a new WebMapServer instance and attempts to retrieve the Capabilities document specified by serverURL. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Specification[] specs
Constructor Detail |
public WebMapServer(java.net.URL serverURL) throws java.io.IOException, ServiceException, org.xml.sax.SAXException
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 error
org.xml.sax.SAXException
- if there is an error while parsing the capabilities, such as bad XMLMethod Detail |
protected void setupSpecifications()
public WMSCapabilities getCapabilities()
public GetCapabilitiesResponse issueRequest(GetCapabilitiesRequest request) throws java.io.IOException, ServiceException, org.xml.sax.SAXException
java.io.IOException
ServiceException
org.xml.sax.SAXException
public GetMapResponse issueRequest(GetMapRequest request) throws java.io.IOException, ServiceException, org.xml.sax.SAXException
java.io.IOException
ServiceException
org.xml.sax.SAXException
public GetFeatureInfoResponse issueRequest(GetFeatureInfoRequest request) throws java.io.IOException, ServiceException, org.xml.sax.SAXException
java.io.IOException
ServiceException
org.xml.sax.SAXException
public DescribeLayerResponse issueRequest(DescribeLayerRequest request) throws java.io.IOException, ServiceException, org.xml.sax.SAXException
java.io.IOException
ServiceException
org.xml.sax.SAXException
public GetLegendGraphicResponse issueRequest(GetLegendGraphicRequest request) throws java.io.IOException, ServiceException, org.xml.sax.SAXException
java.io.IOException
ServiceException
org.xml.sax.SAXException
public GetStylesResponse issueRequest(GetStylesRequest request) throws java.io.IOException, ServiceException, org.xml.sax.SAXException
java.io.IOException
ServiceException
org.xml.sax.SAXException
public PutStylesResponse issueRequest(PutStylesRequest request) throws java.io.IOException, ServiceException, org.xml.sax.SAXException
java.io.IOException
ServiceException
org.xml.sax.SAXException
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 |