ucar.unidata.data.gis
Class WmsSelection

java.lang.Object
  extended by ucar.unidata.data.gis.WmsSelection
Direct Known Subclasses:
WMSInfo

public class WmsSelection
extends Object

Class for controlling the display of color images.

Version:
$Revision: 1.12 $
Author:
Jeff McWhirter

Field Summary
static String ATTR_BBOX
          xml attribute name
static String ATTR_FORMAT
          xml attribute name
static String ATTR_LAYER
          xml attribute name
static String ATTR_LEGENDURL
          xml tag name
static String ATTR_OPAQUE
          xml attribute name
static String ATTR_SERVER
          xml tag name
static String ATTR_SRS
          xml attribute name
static String ATTR_TITLE
          xml attribute name
static String ATTR_VERSION
          xml attribute name
static String TAG_BACKGROUNDWMS
          xml tag name
static String TAG_WMS
          xml tag name
 
Constructor Summary
WmsSelection()
          Default constructor.
WmsSelection(String server, String layer, String title, String srs, String format, String version, GeoLocationInfo bounds)
          Constructor.
 
Method Summary
 void appendLayer(String layerName, GeoLocationInfo thatBounds)
          Append the given layer to our layer name.
 String assembleRequest(GeoLocationInfo boundsToUse, int imageWidth, int imageHeight)
          Create the wms request
 boolean equals(Object o)
          Overwrite
 boolean getAllowSubsets()
          Get the AllowSubsets property.
 GeoLocationInfo getBounds()
          Get the Bounds property.
 String getDescription()
          Get the Description property.
 int getFixedHeight()
          Get the FixedHeight property.
 int getFixedWidth()
          Get the FixedWidth property.
 String getFormat()
          Get the Format property.
 String getLayer()
          Get the Layer property.
 String getLegendIcon()
          Get the LegendIcon property.
 String getServer()
          Get the Server property.
 String getSRS()
          Get the srs property.
 List getTimeList()
          Get the TimeList property.
 String getTitle()
          Get the Title property.
 String getVersion()
          Get the Version property.
 int hashCode()
          Overwrite
static List parseWmsResources(XmlResourceCollection xrc)
          Process the xms xml resources
 void setAllowSubsets(boolean value)
          Set the AllowSubsets property.
 void setBounds(GeoLocationInfo value)
          Set the Bounds property.
 void setDescription(String value)
          Set the Description property.
 void setFixedHeight(int value)
          Set the FixedHeight property.
 void setFixedWidth(int value)
          Set the FixedWidth property.
 void setFormat(String value)
          Set the Format property.
 void setLayer(String value)
          Set the Layer property.
 void setLegendIcon(String value)
          Set the LegendIcon property.
 void setServer(String value)
          Set the Server property.
 void setSRS(String value)
          Set the srs property.
 void setTimeList(List value)
          Set the TimeList property.
 void setTitle(String value)
          Set the Title property.
 void setVersion(String value)
          Set the Version property.
 String toString()
          to string
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG_BACKGROUNDWMS

public static final String TAG_BACKGROUNDWMS
xml tag name

See Also:
Constant Field Values

TAG_WMS

public static final String TAG_WMS
xml tag name

See Also:
Constant Field Values

ATTR_SERVER

public static final String ATTR_SERVER
xml tag name

See Also:
Constant Field Values

ATTR_LEGENDURL

public static final String ATTR_LEGENDURL
xml tag name

See Also:
Constant Field Values

ATTR_LAYER

public static final String ATTR_LAYER
xml attribute name

See Also:
Constant Field Values

ATTR_TITLE

public static final String ATTR_TITLE
xml attribute name

See Also:
Constant Field Values

ATTR_SRS

public static final String ATTR_SRS
xml attribute name

See Also:
Constant Field Values

ATTR_FORMAT

public static final String ATTR_FORMAT
xml attribute name

See Also:
Constant Field Values

ATTR_VERSION

public static final String ATTR_VERSION
xml attribute name

See Also:
Constant Field Values

ATTR_BBOX

public static final String ATTR_BBOX
xml attribute name

See Also:
Constant Field Values

ATTR_OPAQUE

public static final String ATTR_OPAQUE
xml attribute name

See Also:
Constant Field Values
Constructor Detail

WmsSelection

public WmsSelection()
Default constructor.


WmsSelection

public WmsSelection(String server,
                    String layer,
                    String title,
                    String srs,
                    String format,
                    String version,
                    GeoLocationInfo bounds)
Constructor.

Parameters:
server - The server
layer - The layer
title - The title
srs - The srs
format - The format
version - The version
bounds - The bounds
Method Detail

appendLayer

public void appendLayer(String layerName,
                        GeoLocationInfo thatBounds)
Append the given layer to our layer name. Union the bounds

Parameters:
layerName - layer name to append
thatBounds - its bounds

assembleRequest

public String assembleRequest(GeoLocationInfo boundsToUse,
                              int imageWidth,
                              int imageHeight)
Create the wms request

Parameters:
boundsToUse - The bounds to use
imageWidth - The width
imageHeight - The height
Returns:
The request url

setServer

public void setServer(String value)
Set the Server property.

Parameters:
value - The new value for Server

getServer

public String getServer()
Get the Server property.

Returns:
The Server

setSRS

public void setSRS(String value)
Set the srs property.

Parameters:
value - The new value for srs

getSRS

public String getSRS()
Get the srs property.

Returns:
The srs

setLayer

public void setLayer(String value)
Set the Layer property.

Parameters:
value - The new value for Layer

getLayer

public String getLayer()
Get the Layer property.

Returns:
The Layer

setBounds

public void setBounds(GeoLocationInfo value)
Set the Bounds property.

Parameters:
value - The new value for Bounds

getBounds

public GeoLocationInfo getBounds()
Get the Bounds property.

Returns:
The Bounds

setFormat

public void setFormat(String value)
Set the Format property.

Parameters:
value - The new value for Format

getFormat

public String getFormat()
Get the Format property.

Returns:
The Format

setTitle

public void setTitle(String value)
Set the Title property.

Parameters:
value - The new value for Title

getTitle

public String getTitle()
Get the Title property.

Returns:
The Title

setVersion

public void setVersion(String value)
Set the Version property.

Parameters:
value - The new value for Version

getVersion

public String getVersion()
Get the Version property.

Returns:
The Version

toString

public String toString()
to string

Overrides:
toString in class Object
Returns:
the title

parseWmsResources

public static List parseWmsResources(XmlResourceCollection xrc)
Process the xms xml resources

Parameters:
xrc - The resources
Returns:
List of WmsSelection objects defined by the xml resources

setFixedWidth

public void setFixedWidth(int value)
Set the FixedWidth property.

Parameters:
value - The new value for FixedWidth

getFixedWidth

public int getFixedWidth()
Get the FixedWidth property.

Returns:
The FixedWidth

setFixedHeight

public void setFixedHeight(int value)
Set the FixedHeight property.

Parameters:
value - The new value for FixedHeight

getFixedHeight

public int getFixedHeight()
Get the FixedHeight property.

Returns:
The FixedHeight

setAllowSubsets

public void setAllowSubsets(boolean value)
Set the AllowSubsets property.

Parameters:
value - The new value for AllowSubsets

getAllowSubsets

public boolean getAllowSubsets()
Get the AllowSubsets property.

Returns:
The AllowSubsets

setDescription

public void setDescription(String value)
Set the Description property.

Parameters:
value - The new value for Description

getDescription

public String getDescription()
Get the Description property.

Returns:
The Description

setLegendIcon

public void setLegendIcon(String value)
Set the LegendIcon property.

Parameters:
value - The new value for LegendIcon

getLegendIcon

public String getLegendIcon()
Get the LegendIcon property.

Returns:
The LegendIcon

setTimeList

public void setTimeList(List value)
Set the TimeList property.

Parameters:
value - The new value for TimeList

getTimeList

public List getTimeList()
Get the TimeList property.

Returns:
The TimeList

hashCode

public int hashCode()
Overwrite

Overrides:
hashCode in class Object
Returns:
hashcode

equals

public boolean equals(Object o)
Overwrite

Overrides:
equals in class Object
Parameters:
o - the object
Returns:
is equals