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
          Layer srs.
 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 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

parent

protected WMSLayer parent

styles

public java.util.ArrayList styles

Themes provided by the WMS for the layer


srs

protected java.util.Vector srs

Layer srs.


dimensions

protected java.util.ArrayList dimensions

Dimensions defined for the layer in the capabilities doc

Constructor Detail

WMSLayer

public WMSLayer()
Method Detail

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

addkeyword

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

Parameters:
key -

getKeywords

public java.util.ArrayList getKeywords()

addStyle

public void addStyle(WMSStyle _style)

Adds a style to the styles vector

Parameters:
_style -

getStyles

public java.util.ArrayList getStyles()

Gets the style vector

Returns:

getAllStyles

public java.util.ArrayList getAllStyles(WMSLayer layer)

addBBox

public void addBBox(BoundaryBox bbox)

Adds a bbox to the Bboxes vector

Parameters:
bbox -

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:

getLatLonBox

public BoundaryBox getLatLonBox()

setLatLonBox

public void setLatLonBox(BoundaryBox box)

addSrs

public void addSrs(java.lang.String srs)

adds a new srs to the srs vector


getAllSrs

public java.util.Vector getAllSrs()

getScaleMax

public double getScaleMax()

gets the maximum scale for this layer

Returns:

getScaleMin

public double getScaleMin()

gets the minimum scale for this layer

Returns:

setScaleMin

public void setScaleMin(double scale)

sets the minimum scale for this layer to be visible.

Parameters:
scale -

setScaleMax

public void setScaleMax(double scale)

sets the maximum scale for this layer to be visible

Parameters:
scale -

getDimensions

public abstract java.util.ArrayList getDimensions()

gets the dimension vector defined in this layer

Returns:

getDimension

public WMSDimension getDimension(java.lang.String name)

addDimension

public void addDimension(WMSDimension dimension)

Adds a dimension to the dimension vector

Parameters:
dimension -

getName

public java.lang.String getName()

Gets layer name

Specified by:
getName in interface ILayer
Returns:

setName

public void setName(java.lang.String name)

Sets layer name

Specified by:
setName in interface ILayer
Parameters:
_name -

getTitle

public java.lang.String getTitle()

Gets layer title

Specified by:
getTitle in interface ILayer
Returns:

setTitle

public void setTitle(java.lang.String title)

Sets the layer title

Specified by:
setTitle in interface ILayer
Parameters:
_title -

getAbstract

public java.lang.String getAbstract()

Gets the layer abstract

Specified by:
getAbstract in interface ILayer
Returns:

setAbstract

public void setAbstract(java.lang.String _abstract)

Sets the layer abstract

Specified by:
setAbstract in interface ILayer
Parameters:
m_abstract -

getChildren

public java.util.ArrayList getChildren()

setChildren

public void setChildren(java.util.ArrayList children)

getParent

public WMSLayer getParent()

setParent

public void setParent(WMSLayer parent)

toString

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

isQueryable

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


setQueryable

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

isOpaque

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


setOpaque

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

noSubSets

public boolean noSubSets()
Tells if this layer is subsettable


setNoSubSets

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

setfixedWidth

public void setfixedWidth(int w)

getfixedWidth

public int getfixedWidth()

setfixedHeight

public void setfixedHeight(int h)

getfixedHeight

public int getfixedHeight()

hasTransparency

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

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 -


Copyright © 2004-2013 gvSIG. All Rights Reserved.