com.vividsolutions.wms
Class WMService

java.lang.Object
  extended by com.vividsolutions.wms.WMService

public class WMService
extends java.lang.Object

Represents a remote WMS Service.

Author:
Chris Hodgson chodgson@refractions.net

Field Summary
static java.lang.String WMS_1_0_0
           
static java.lang.String WMS_1_1_0
           
static java.lang.String WMS_1_1_1
           
 
Constructor Summary
WMService(java.lang.String serverUrl)
          Constructs a WMService object from a server URL.
WMService(java.lang.String serverUrl, java.lang.String wmsVersion)
          Constructs a WMService object from a server URL.
 
Method Summary
 MapRequest createMapRequest()
          Creates a new MapRequest object which can be used to retrieve a Map from this service.
 Capabilities getCapabilities()
          Gets the Capabilities for this service.
 java.lang.String getServerUrl()
          Gets the url of the map service.
 java.lang.String getTitle()
          Gets the title of the map service.
 java.lang.String getVersion()
           
 void initialize()
           
 void initialize(boolean alertDifferingURL)
          Connect to the service and get the capabilities.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WMS_1_0_0

public static final java.lang.String WMS_1_0_0
See Also:
Constant Field Values

WMS_1_1_0

public static final java.lang.String WMS_1_1_0
See Also:
Constant Field Values

WMS_1_1_1

public static final java.lang.String WMS_1_1_1
See Also:
Constant Field Values
Constructor Detail

WMService

public WMService(java.lang.String serverUrl,
                 java.lang.String wmsVersion)
Constructs a WMService object from a server URL.

Parameters:
serverUrl - the URL of the WMS server
wmsVersion -

WMService

public WMService(java.lang.String serverUrl)
Constructs a WMService object from a server URL.

Parameters:
serverUrl - the URL of the WMS server
Method Detail

initialize

public void initialize()
                throws java.io.IOException
Throws:
java.io.IOException

initialize

public void initialize(boolean alertDifferingURL)
                throws java.io.IOException
Connect to the service and get the capabilities. This must be called before anything else is done with this service.

Parameters:
alertDifferingURL - alert the user if a different GetMap URL is available
Throws:
java.io.IOException

getServerUrl

public java.lang.String getServerUrl()
Gets the url of the map service.

Returns:
the url of the WMService

getTitle

public java.lang.String getTitle()
Gets the title of the map service. The service must have previously been initialized, otherwise null is returned.

Returns:
the title of the WMService

getCapabilities

public Capabilities getCapabilities()
Gets the Capabilities for this service. The service must have previously been initialized, otherwise null is returned.

Returns:
a copy of the MapDescriptor for this service

createMapRequest

public MapRequest createMapRequest()
Creates a new MapRequest object which can be used to retrieve a Map from this service.

Returns:
a MapRequest object which can be used to retrieve a map image from this service

getVersion

public java.lang.String getVersion()