org.gvsig.remoteclient.wms
Class WMSLayer

java.lang.Object
  extended by org.gvsig.remoteclient.wms.WMSLayer
All Implemented Interfaces:
ILayer
Direct Known Subclasses:
WMSLayer1_1_0, WMSLayer1_1_1, WMSLayer1_3_0

public abstract class WMSLayer
extends java.lang.Object
implements ILayer

Abstract class that defines an WMSLayer.


Nested Class Summary
protected  class WMSLayer.DataURL
          Inner class describing the DataURL tag in OGC specifications in WMS
protected  class WMSLayer.MetadataURL
          Inner class describing the MetadataURL tag in OGC specifications in WMS
 
Field Summary
protected  java.util.ArrayList children
           
protected  java.util.ArrayList dimensions
          Dimensions defined for the layer in the capabilities doc
protected  WMSLayer parent
           
protected  java.util.Vector srs
          CRS list of this layer (Tag CRS)
 java.util.ArrayList styles
          Themes provided by the WMS for the layer
 
Constructor Summary
WMSLayer()
           
 
Method Summary
 void addBBox(BoundaryBox bbox)
          Adds a bbox to the Bboxes vector
 void addDimension(WMSDimension dimension)
          Adds a dimension to the dimension vector
protected  void addkeyword(java.lang.String key)
          add a new keyword to the keywordList.
 void addSrs(java.lang.String srs)
          adds a new srs to the srs vector
 void addStyle(WMSStyle _style)
          Adds a style to the styles vector
 java.lang.String getAbstract()
          Gets the layer abstract
 java.util.Vector getAllSrs()
           
 java.util.ArrayList getAllStyles(WMSLayer layer)
           
 BoundaryBox getBbox(java.lang.String id)
          returns the bbox with that id in the Bboxes vector
 java.util.Hashtable getBboxes()
          Gets the bBoxes vector
 java.util.ArrayList getChildren()
           
 WMSDimension getDimension(java.lang.String name)
           
abstract  java.util.ArrayList getDimensions()
           gets the dimension vector defined in this layer
 int getfixedHeight()
           
 int getfixedWidth()
           
 java.util.ArrayList getKeywords()
           
 BoundaryBox getLatLonBox()
           
 java.lang.String getName()
          Gets layer name
 WMSLayer getParent()
           
 double getScaleMax()
          gets the maximum scale for this layer
 double getScaleMin()
          gets the minimum scale for this layer
 java.util.ArrayList getStyles()
          Gets the style vector
 java.lang.String getTitle()
          Gets layer title
 boolean hasTransparency()
           
 boolean isOpaque()
          Tells if this layer is opaque.
 boolean isQueryable()
          Tells if this layer accepts getFeatureInfo requests.
 boolean noSubSets()
          Tells if this layer is subsettable
abstract  void parse(org.kxml2.io.KXmlParser parser, java.util.TreeMap layerTreeMap)
          Parses the LAYER tag in the WMS capabilities, filling the WMSLayer object loading the data in memory to be easily accesed
protected  void parseKeywordList(org.kxml2.io.KXmlParser parser)
          Parses the keywordlist from the capabilities and fills this list in the WMSLayer.
protected  void readLayerAttributes(org.kxml2.io.KXmlParser parser)
          Reads and parses the layer attributes Maybe this method should be moved to the WMSLayer.
 void removeSrs(java.lang.String srs)
           
 void setAbstract(java.lang.String _abstract)
          Sets the layer abstract
 void setChildren(java.util.ArrayList children)
           
 void setfixedHeight(int h)
           
 void setfixedWidth(int w)
           
 void setLatLonBox(BoundaryBox box)
           
 void setName(java.lang.String name)
          Sets layer name
 void setNoSubSets(boolean _noSubSets)
           
 void setOpaque(boolean opaque)
           
 void setParent(WMSLayer parent)
           
 void setQueryable(boolean queryable)
           
 void setScaleMax(double scale)
          sets the maximum scale for this layer to be visible
 void setScaleMin(double scale)
          sets the minimum scale for this layer to be visible.
 void setTitle(java.lang.String title)
          Sets the layer title
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

children

protected java.util.ArrayList children

dimensions

protected java.util.ArrayList dimensions

Dimensions defined for the layer in the capabilities doc


parent

protected WMSLayer parent

srs

protected java.util.Vector srs

CRS list of this layer (Tag CRS)


styles

public java.util.ArrayList styles

Themes provided by the WMS for the layer

Constructor Detail

WMSLayer

public WMSLayer()
Method Detail

addBBox

public void addBBox(BoundaryBox bbox)

Adds a bbox to the Bboxes vector

Parameters:
bbox -

addDimension

public void addDimension(WMSDimension dimension)

Adds a dimension to the dimension vector

Parameters:
dimension -

addkeyword

protected void addkeyword(java.lang.String key)
add a new keyword to the keywordList.

Parameters:
key -

addSrs

public void addSrs(java.lang.String srs)

adds a new srs to the srs vector


addStyle

public void addStyle(WMSStyle _style)

Adds a style to the styles vector

Parameters:
_style -

getAbstract

public java.lang.String getAbstract()

Gets the layer abstract

Specified by:
getAbstract in interface ILayer
Returns:

getAllSrs

public java.util.Vector getAllSrs()

getAllStyles

public java.util.ArrayList getAllStyles(WMSLayer layer)

getBbox

public BoundaryBox getBbox(java.lang.String id)

returns the bbox with that id in the Bboxes vector

Parameters:
id -

getBboxes

public java.util.Hashtable getBboxes()

Gets the bBoxes vector

Returns:

getChildren

public java.util.ArrayList getChildren()

getDimension

public WMSDimension getDimension(java.lang.String name)

getDimensions

public abstract java.util.ArrayList getDimensions()

gets the dimension vector defined in this layer

Returns:

getfixedHeight

public int getfixedHeight()

getfixedWidth

public int getfixedWidth()

getKeywords

public java.util.ArrayList getKeywords()

getLatLonBox

public BoundaryBox getLatLonBox()

getName

public java.lang.String getName()

Gets layer name

Specified by:
getName in interface ILayer
Returns:

getParent

public WMSLayer getParent()

getScaleMax

public double getScaleMax()

gets the maximum scale for this layer

Returns:

getScaleMin

public double getScaleMin()

gets the minimum scale for this layer

Returns:

getStyles

public java.util.ArrayList getStyles()

Gets the style vector

Returns:

getTitle

public java.lang.String getTitle()

Gets layer title

Specified by:
getTitle in interface ILayer
Returns:

hasTransparency

public boolean hasTransparency()
Returns:
true if this layer can be served with transparency, otherwise false

isOpaque

public boolean isOpaque()
Tells if this layer is opaque.


isQueryable

public boolean isQueryable()
Tells if this layer accepts getFeatureInfo requests.


noSubSets

public boolean noSubSets()
Tells if this layer is subsettable


parse

public abstract void parse(org.kxml2.io.KXmlParser parser,
                           java.util.TreeMap layerTreeMap)
                    throws java.io.IOException,
                           org.xmlpull.v1.XmlPullParserException

Parses the LAYER tag in the WMS capabilities, filling the WMSLayer object loading the data in memory to be easily accesed

Throws:
java.io.IOException
org.xmlpull.v1.XmlPullParserException

parseKeywordList

protected void parseKeywordList(org.kxml2.io.KXmlParser parser)
                         throws java.io.IOException,
                                org.xmlpull.v1.XmlPullParserException
Parses the keywordlist from the capabilities and fills this list in the WMSLayer.

Parameters:
parser -
Throws:
java.io.IOException
org.xmlpull.v1.XmlPullParserException

readLayerAttributes

protected void readLayerAttributes(org.kxml2.io.KXmlParser parser)
Reads and parses the layer attributes Maybe this method should be moved to the WMSLayer. Until now the attributes are teh same for all versions.

Parameters:
parser -

removeSrs

public void removeSrs(java.lang.String srs)

setAbstract

public void setAbstract(java.lang.String _abstract)

Sets the layer abstract

Specified by:
setAbstract in interface ILayer
Parameters:
m_abstract -

setChildren

public void setChildren(java.util.ArrayList children)

setfixedHeight

public void setfixedHeight(int h)

setfixedWidth

public void setfixedWidth(int w)

setLatLonBox

public void setLatLonBox(BoundaryBox box)

setName

public void setName(java.lang.String name)

Sets layer name

Specified by:
setName in interface ILayer
Parameters:
_name -

setNoSubSets

public void setNoSubSets(boolean _noSubSets)
Parameters:
set - layer nosubsets attribute.

setOpaque

public void setOpaque(boolean opaque)
Parameters:
opaque. -

setParent

public void setParent(WMSLayer parent)

setQueryable

public void setQueryable(boolean queryable)
Parameters:
queryable - The queryable to set.

setScaleMax

public void setScaleMax(double scale)

sets the maximum scale for this layer to be visible

Parameters:
scale -

setScaleMin

public void setScaleMin(double scale)

sets the minimum scale for this layer to be visible.

Parameters:
scale -

setTitle

public void setTitle(java.lang.String title)

Sets the layer title

Specified by:
setTitle in interface ILayer
Parameters:
_title -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2014 gvSIG Association. All Rights Reserved.