com.moximedia.ows.wms
Class WmsLayer

java.lang.Object
  extended bycom.moximedia.ows.wms.WmsLayer
All Implemented Interfaces:
GeometryType, Layer, LayerIdentifyType, LayerSelectType, LayerType, java.io.Serializable, ServiceType

public class WmsLayer
extends java.lang.Object
implements Layer, ServiceType, LayerType, GeometryType, LayerIdentifyType, LayerSelectType, java.io.Serializable

The WmsLayer class contains settings and methods related to a single WMS layer. A WmsLayer is associated to a WmsService. TODO: implement cloning.

Author:
Doug Cates - www.moximedia.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.moximedia.ows.types.ServiceType
SERVICE_TYPE_ACETATE, SERVICE_TYPE_WFS, SERVICE_TYPE_WMS
 
Fields inherited from interface com.moximedia.ows.types.LayerType
LAYER_TYPE_ACETATE, LAYER_TYPE_WFS, LAYER_TYPE_WMS
 
Fields inherited from interface com.moximedia.ows.types.GeometryType
GEOMETRY_TYPE_COLLECTION, GEOMETRY_TYPE_ENVELOPE, GEOMETRY_TYPE_LINE, GEOMETRY_TYPE_MULTILINE, GEOMETRY_TYPE_MULTIPOINT, GEOMETRY_TYPE_MULTIPOLYGON, GEOMETRY_TYPE_POINT, GEOMETRY_TYPE_POLYGON, GEOMETRY_TYPE_UNKNOWN
 
Fields inherited from interface com.moximedia.ows.types.LayerIdentifyType
LAYER_IDENTIFY_TYPE_DEFAULT, LAYER_IDENTIFY_TYPE_NONE, LAYER_IDENTIFY_TYPE_URL_APPEND_FIELD_VALUE, LAYER_IDENTIFY_TYPE_URL_FIELD_VALUES, LAYER_IDENTIFY_TYPE_URL_INSERT_FIELD_VALUE, LAYER_IDENTIFY_TYPE_URL_MULTIPLE_FIELD_VALUES
 
Fields inherited from interface com.moximedia.ows.types.LayerSelectType
LAYER_SELECT_TYPE_DEFAULT, LAYER_SELECT_TYPE_NONE, LAYER_SELECT_TYPE_URL_CUSTOM, LAYER_SELECT_TYPE_URL_MULTIPLE_FIELD_VALUES, LAYER_SELECT_TYPE_URL_TABLE
 
Constructor Summary
WmsLayer()
          Constructor.
WmsLayer(WmsService wmsService, WfsService wfsService)
          Constructor.
 
Method Summary
 void addIdentifyReport(Report report)
          Adds an identify report for this layer.
 void addSelectReport(Report report)
          Adds a select report for this layer.
 boolean getCanDrillIdentify()
          Gets a boolean value indicating whether the layer can be identified using the drill down identify tool.
 boolean getCanEdit()
          Returns an indicator of whether the layer can be edited.
 boolean getCanIdentify()
          Gets a boolean value indicating whether a feature layer can be identified.
 boolean getCanSelect()
          Returns a boolean indicating whether features can be selected.
 boolean getCanSelectByAttribute()
          Returns a boolean indicating whether features can be selected by attribute.
 boolean getCanSetVisibility()
          Gets a boolean value indicating whether the layer can be turned on and off by the user.
 boolean getCanSnapTo()
          Returns an indicator of whether the layer can be snapped to during editing.
 DescribeFeatureType getDescribeFeatureType()
          Returns an object containing the results of a WFS DescribeFeatureType request.
 java.lang.String getEncodedName()
          Gets the UTF-8 encoded name for this WMS layer.
 int getGeometryType()
          Gets the geometry type enumerator, if one is set for this layer.
 java.lang.String getGeometryTypeName()
          Gets the geometry type string, if one is set for this layer.
 java.awt.Color getHighlightColor()
          Gets the color used to highlight selected records.
 java.lang.String getHighlightLayerName()
          Gets the highlight layer name for the acetate layer created to show selected features.
 java.lang.Integer getHighlightWidth()
          Gets the highlighting width of lines and points.
 java.lang.String getId()
          Gets the user defined id for this layer.
 java.lang.String getIdentifyHandler()
          Gets the identify handler script used for this layer.
 Report getIdentifyReport(java.lang.String name)
          Gets the identify report for this layer by name.
 java.util.ArrayList getIdentifyReports()
          Gets the identify reports set for this layer.
 int getIdentifyServiceType()
          Gets the identify service type enumerator, an indicator of whether WMS or WFS should be used for this query.
 java.lang.String getIdentifySuffix()
          Gets the suffix used in the append type of identify handler.
 int getIdentifyTolerancePixels()
          Gets the tolerance used for point identify routines.
 int getIdentifyType()
          Gets the identify type enumerator.
 boolean getIdentifyWindow()
          Returns whether the identify report should open in a popup window.
 boolean getImmediateRefresh()
          Returns an indicator of whether the map should immediately refresh when the layer's visibility is changed.
 java.lang.String getLabelsLayerName()
          Gets the name of the layer associated with this layer that is used for labelling.
 java.lang.String getLabelsStyleName()
          Gets the style of the layer associated with this layer that is used for labelling.
 boolean getLabelsVisible()
          Returns an indicator of whether the label layer is shown
 LayerListLegends getLayerListLegends()
          Gets the layer list legends object for this layer, or null if there are no layer list legends.
 int getLayerType()
          Get the layer type enumerator.
 java.lang.String getLegendUrl()
          Gets the URL to the legend for this layer.
 double getMaxScale()
          Gets the maximum scale at which the feature layer will be displayed.
 java.lang.String getMetadataUrl()
          Gets the URL for metadata associated with this layer.
 double getMinScale()
          Gets the minimum scale at which the feature layer will be displayed.
 java.lang.String getName()
          Gets the name of this layer.
 int getObjectId()
          Returns the IMF internal id for this layer.
 java.lang.Object getObjectTag()
          Gets the object tag.
 java.lang.String getProperty(java.lang.String name)
          Gets the value of a property set in the configuration XML using a <PROPERTY> element.
 boolean getQueryable()
          Retuns an indicator of whether this layer is queryable using either WMS or WFS.
 Recordset getRecordset()
          Gets this layer's recordset containing query results.
 java.lang.String getSelectHandler()
          Gets the select handler script used for this layer.
 Report getSelectReport(java.lang.String name)
          Gets the select report for this layer by name.
 java.util.ArrayList getSelectReports()
          Gets the select reports set for this layer.
 int getSelectType()
          Gets the select type enumerator.
 boolean getSelectWindow()
          Returns whether the select report should open in a popup window.
 Service getService()
          Gets the service supporting WMS requests for this layer,
 java.lang.String getStyleName()
          Returns the name of the style used in making WMS requests for this layer.
 java.lang.String getTitle()
          Gets the user displayed title for this layer.
 int getTransparency()
          Gets the transparency of this layer, as a percentage.
 boolean getTransparent()
          Reports whether the layer should be drawn transparent.
 boolean getVisible()
          Returns an indicator of whether this layer is visible.
 java.lang.String getWfsGeometryFieldName()
          Gets the WFS geometry field name.
 int getWfsIdentifyFilterType()
          Gets the type of filter used for WFS identify routines.
 int getWfsMaximumFeatures()
          Gets the maximum number of WFS features that should be returned when queried.
 java.lang.String getWfsName()
          Gets the name of the WFS layer, if any.
 Projection getWfsProjection()
          Gets the projection of the WFS layer associated with this layer.
 WfsService getWfsService()
          Gets the service supporting WFS queries for this layer, if any.
 java.lang.String getWfsSrs()
          Gets the SRS code used for WFS requests.
 Projection getWmsProjection()
          Gets the projection of this WMS layer.
 WmsService getWmsService()
          Gets the service supporting WMS requests for this layer,
 java.lang.String getWmsSrs()
          Gets the SRS code used for WMS requests.
 double getZoomExtentBuffer()
          Gets the zoom extent buffer distance.
 boolean isNamed(java.lang.String name)
          Checks to see if the name of this layer is that specified.
 boolean isObjectId(int id)
          Checks to see if the object id of this layer is that specified.
 boolean isTitled(java.lang.String title)
          Checks to see if the title of this layer is that specified.
 boolean isWfs()
          Returns a boolean indicating whether the WMS layer has a companion WFS layer to support queries.
 boolean isWithinScaleThreshold(double scale)
          Returns whether this layer is within threshold tolerance.
 void removeProperty(java.lang.String name)
          Removes the specified property.
 void setCanSetVisibility(boolean canSetVisibility)
          Sets whether the layer can be turned on and off by the user.
 void setDescribeFeatureType(DescribeFeatureType dft)
          Sets the feature type definitions for the related WFS layer.
 void setGeometryType(int type)
          Sets the layer's geometry type using an enumerator.
 void setGeometryType(java.lang.String type)
          Sets the layer's geometry type using a String.
 void setHighlightColor(java.awt.Color color)
          Sets the color used to highlight selected records.
 void setHighlightLayerName(java.lang.String name)
          Sets the highlight layer name for the acetate layer created to show selected features.
 void setHighlightWidth(int width)
          Sets the highlighting width of lines and points.
 void setId(java.lang.String id)
          Sets the user defined id for this layer.
 void setIdentifyType(java.lang.String type)
          Sets the identify type using a string.
 void setLabelsVisible(boolean isVisible)
          Sets whether the label layer is shown.
 void setLayerListLegends(LayerListLegends legends)
          Sets the layer list legends object for this layer.
 void setLegendUrl(java.lang.String href)
          Sets the URL of the legend for this layer.
 void setMaxScale(double scale)
          Sets the maximum scale that this layer is visible.
 void setMetadataUrl(java.lang.String href)
          Sets the URL for metadata associated to this layer.
 void setMinScale(double scale)
          Sets the minimum scale that this layer is visible.
 void setName(java.lang.String name)
          Sets the internal name of this layer, not the title displayed to the user.
 void setObjectTag(java.lang.Object tag)
          Sets an object tag for this object.
 void setProjection(Projection projection)
          Sets the projection for this layer.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets the value of a property (programmer defined).
 void setRecordset(Recordset rs)
          Sets this layer's recordset with a recordset object.
 void setSelectType(java.lang.String type)
          Sets the select type using a string.
 void setSrs(java.lang.String srs)
          Sets the spatial reference system SRS of this layer.
 void setStyleName(java.lang.String styleName)
          Sets the style name used to symbolize this layer.
 void setTitle(java.lang.String title)
          Sets the user visible title for this layer.
 void setTransparency(int percentTransparent)
          Sets the transparency of this layer, as a percentage.
 void setTransparent(boolean isTransparent)
          Sets whether the layer should be drawn transparent.
 void setVisible(boolean isVisible)
          Sets whether this layer is visible.
 void setWfsMaximumFeatures(int maximumFeatures)
          Sets the maximum number of WFS features that should be returned when queried.
 void setWfsService(WfsService service)
          Sets the WFS service associated with the WFS layer associated with this layer.
 void setWmsLayerName(java.lang.String name)
          Sets the WMS layer name, an internal value used for communicating with the WMS service associated with this layer.
 void setWmsQueryable(boolean isQueryable)
          Sets whether the layer is queryable using WMS GetFeatureInfo.
 void setWmsService(WmsService service)
          Sets the WMS service associated with this layer.
 void setXmlAttribute(Map map, java.lang.String element, java.lang.String name, java.lang.String value, java.lang.String frameworkPath, java.lang.String mapConfigPath)
          Sets one of the attributes of this object using a string value.
 void setZoomExtentBuffer(double distance)
          Sets the zoom extent buffer distance.
 void wfsQuery(Filter filter)
          Performs a query of the layer using an associated WFS layer.
 void wmsQuery(Map map, int x, int y)
          Performs a query of the layer using the GetFeatureInfo WMS request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WmsLayer

public WmsLayer()
Constructor.


WmsLayer

public WmsLayer(WmsService wmsService,
                WfsService wfsService)
Constructor.

Parameters:
wmsService - The WMS service that this layer belongs to.
wfsService - The WFS service associated to this layer, or null.
Method Detail

getDescribeFeatureType

public DescribeFeatureType getDescribeFeatureType()
Returns an object containing the results of a WFS DescribeFeatureType request. In order to use this, the layer must have an associated WFS layer and have the DescribeFeatureType parameters set in either the map configuration file or by object methods.

Returns:
The object containing feature type definitions.

setDescribeFeatureType

public void setDescribeFeatureType(DescribeFeatureType dft)
Sets the feature type definitions for the related WFS layer.

Parameters:
dft - The feature type definition object.

getHighlightColor

public java.awt.Color getHighlightColor()
Gets the color used to highlight selected records.

Returns:
The color.

setHighlightColor

public void setHighlightColor(java.awt.Color color)
Sets the color used to highlight selected records.

Parameters:
color - The color.

getHighlightLayerName

public java.lang.String getHighlightLayerName()
Gets the highlight layer name for the acetate layer created to show selected features.

Returns:
The layer name.

setHighlightLayerName

public void setHighlightLayerName(java.lang.String name)
Sets the highlight layer name for the acetate layer created to show selected features. This should not normally be usec by the programmer, as the name is automatically calculated by the routine that creates highlight layers for the layer.

Parameters:
name - The name of the hignlight layer.

getHighlightWidth

public java.lang.Integer getHighlightWidth()
Gets the highlighting width of lines and points.

Returns:
The width.

setHighlightWidth

public void setHighlightWidth(int width)
Sets the highlighting width of lines and points.

Parameters:
width - The width.

getId

public java.lang.String getId()
Gets the user defined id for this layer.

Specified by:
getId in interface Layer
Returns:
The user defined id.

setId

public void setId(java.lang.String id)
Sets the user defined id for this layer.

Specified by:
setId in interface Layer
Parameters:
id - The user defined id.

getLayerListLegends

public LayerListLegends getLayerListLegends()
Gets the layer list legends object for this layer, or null if there are no layer list legends.

Specified by:
getLayerListLegends in interface Layer
Returns:
The layer list legends object for this layer.

setLayerListLegends

public void setLayerListLegends(LayerListLegends legends)
Sets the layer list legends object for this layer.

Specified by:
setLayerListLegends in interface Layer
Parameters:
legends - The layer list legends object to set for this layer.

setObjectTag

public void setObjectTag(java.lang.Object tag)
Sets an object tag for this object.

Specified by:
setObjectTag in interface Layer
Parameters:
tag - A programmer defined element to associate with this object.

getObjectTag

public java.lang.Object getObjectTag()
Gets the object tag.

Specified by:
getObjectTag in interface Layer
Returns:
The object tag, or null if there isn't one set.

getProperty

public java.lang.String getProperty(java.lang.String name)
Gets the value of a property set in the configuration XML using a <PROPERTY> element.

Specified by:
getProperty in interface Layer
Parameters:
name - The property name
Returns:
The property value, or null.

removeProperty

public void removeProperty(java.lang.String name)
Removes the specified property.

Specified by:
removeProperty in interface Layer
Parameters:
name - The name of the property.

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Sets the value of a property (programmer defined).

Specified by:
setProperty in interface Layer
Parameters:
name - The property name
value - The property value.

wfsQuery

public void wfsQuery(Filter filter)
Performs a query of the layer using an associated WFS layer.

Parameters:
filter - The filter to select features.

wmsQuery

public void wmsQuery(Map map,
                     int x,
                     int y)
Performs a query of the layer using the GetFeatureInfo WMS request.

Parameters:
map - The map containing the layers.
x - The X coordinate value in pixels.
y - The Y coordinate value in pixels.

getCanDrillIdentify

public boolean getCanDrillIdentify()
Gets a boolean value indicating whether the layer can be identified using the drill down identify tool.

Specified by:
getCanDrillIdentify in interface Layer
Returns:
True if the layer can be identified using the drill down identify tool, otherwise false.

getCanEdit

public boolean getCanEdit()
Returns an indicator of whether the layer can be edited.

Returns:
True if it can be edited, otherwise false.

getCanIdentify

public boolean getCanIdentify()
Gets a boolean value indicating whether a feature layer can be identified.

Specified by:
getCanIdentify in interface Layer
Returns:
True if the layer can be identified, otherwise false.

getCanSelect

public boolean getCanSelect()
Returns a boolean indicating whether features can be selected.

Returns:
True if features can be selected, otherwise false.

getCanSelectByAttribute

public boolean getCanSelectByAttribute()
Returns a boolean indicating whether features can be selected by attribute.

Returns:
True if features can be selected by attribute, otherwise false.

getCanSetVisibility

public boolean getCanSetVisibility()
Gets a boolean value indicating whether the layer can be turned on and off by the user.

Specified by:
getCanSetVisibility in interface Layer
Returns:
True if the layer can be controlled, otherwise false.

setCanSetVisibility

public void setCanSetVisibility(boolean canSetVisibility)
Sets whether the layer can be turned on and off by the user.

Parameters:
canSetVisibility - True if the user can set visiblility, otherwise false.

getCanSnapTo

public boolean getCanSnapTo()
Returns an indicator of whether the layer can be snapped to during editing.

Returns:
True if it can be snapped to, otherwise false.

getGeometryType

public int getGeometryType()
Gets the geometry type enumerator, if one is set for this layer.

Specified by:
getGeometryType in interface Layer
Returns:
The geometry type enumerator.

getGeometryTypeName

public java.lang.String getGeometryTypeName()
Gets the geometry type string, if one is set for this layer.

Returns:
The geometry type string.

getIdentifyServiceType

public int getIdentifyServiceType()
Gets the identify service type enumerator, an indicator of whether WMS or WFS should be used for this query.

Returns:
The identify service type enumerator.

getIdentifyTolerancePixels

public int getIdentifyTolerancePixels()
Gets the tolerance used for point identify routines.

Returns:
The search tolerance, in pixels.

addIdentifyReport

public void addIdentifyReport(Report report)
Adds an identify report for this layer.

Parameters:
report - An identify report.

getIdentifyReport

public Report getIdentifyReport(java.lang.String name)
Gets the identify report for this layer by name.

Parameters:
name - The name of the report.
Returns:
The identify report with the specified name, or null.

getIdentifyReports

public java.util.ArrayList getIdentifyReports()
Gets the identify reports set for this layer.

Returns:
An array list of identify reports.

getLabelsLayerName

public java.lang.String getLabelsLayerName()
Gets the name of the layer associated with this layer that is used for labelling. Set in XML configuration file.

Returns:
The name of the label layer.

getLabelsStyleName

public java.lang.String getLabelsStyleName()
Gets the style of the layer associated with this layer that is used for labelling. Set in XML configuration file.

Returns:
The name of the style of the label layer.

getLabelsVisible

public boolean getLabelsVisible()
Returns an indicator of whether the label layer is shown

Returns:
True if the label layer should be shown, false if not or if there is no label layer.

setLabelsVisible

public void setLabelsVisible(boolean isVisible)
Sets whether the label layer is shown.

Parameters:
isVisible - True if it should be shown, otherwise false.

addSelectReport

public void addSelectReport(Report report)
Adds a select report for this layer.

Parameters:
report - A select report.

getSelectReport

public Report getSelectReport(java.lang.String name)
Gets the select report for this layer by name.

Parameters:
name - The name of the report to find.
Returns:
The select report with the specified name, or null.

getSelectReports

public java.util.ArrayList getSelectReports()
Gets the select reports set for this layer.

Returns:
An array list of select reports.

isWfs

public boolean isWfs()
Returns a boolean indicating whether the WMS layer has a companion WFS layer to support queries.

Returns:
True if there is an associated WFS layer, otherwise false.

getWfsIdentifyFilterType

public int getWfsIdentifyFilterType()
Gets the type of filter used for WFS identify routines.

Returns:
The filter type, see com.moximedia.ows.types.FilterType. Valid values are FILTER_TYPE_INTERSECTS or FILTER_TYPE_BBOX.

getWfsMaximumFeatures

public int getWfsMaximumFeatures()
Gets the maximum number of WFS features that should be returned when queried.

Returns:
The maximum number of records returned.

setWfsMaximumFeatures

public void setWfsMaximumFeatures(int maximumFeatures)
Sets the maximum number of WFS features that should be returned when queried.

Parameters:
maximumFeatures - The maximum number of records returned.

getEncodedName

public java.lang.String getEncodedName()
Gets the UTF-8 encoded name for this WMS layer.

Returns:
The encoded name.

getIdentifyHandler

public java.lang.String getIdentifyHandler()
Gets the identify handler script used for this layer.

Specified by:
getIdentifyHandler in interface Layer
Returns:
The URL of the handler script.

getIdentifySuffix

public java.lang.String getIdentifySuffix()
Gets the suffix used in the append type of identify handler. The suffix is added to the URL created.

Specified by:
getIdentifySuffix in interface Layer
Returns:
The suffix, if any.

getIdentifyType

public int getIdentifyType()
Gets the identify type enumerator. See com.moximedia.ows.types.LayerIdentifyType.

Specified by:
getIdentifyType in interface Layer
Returns:
The identify type enumerator.

getIdentifyWindow

public boolean getIdentifyWindow()
Returns whether the identify report should open in a popup window.

Specified by:
getIdentifyWindow in interface Layer
Returns:
True if it should open in a popup, otherwise false.

getSelectHandler

public java.lang.String getSelectHandler()
Gets the select handler script used for this layer.

Returns:
The URL of the handler script.

getSelectType

public int getSelectType()
Gets the select type enumerator. See com.moximedia.ows.types.LayerSelectType.

Returns:
The select type enumerator.

getSelectWindow

public boolean getSelectWindow()
Returns whether the select report should open in a popup window.

Returns:
True if it should open in a popup, otherwise false.

getImmediateRefresh

public boolean getImmediateRefresh()
Returns an indicator of whether the map should immediately refresh when the layer's visibility is changed.

Specified by:
getImmediateRefresh in interface Layer
Returns:
True if it should refresh immediately, otherwise false.

getLayerType

public int getLayerType()
Get the layer type enumerator.

Specified by:
getLayerType in interface Layer
Returns:
Always returns com.moximedia.ows.types.LayerType.LAYER_TYPE_WMS.

getLegendUrl

public java.lang.String getLegendUrl()
Gets the URL to the legend for this layer.

Specified by:
getLegendUrl in interface Layer
Returns:
The URL of the legend, if any.

getMaxScale

public double getMaxScale()
Gets the maximum scale at which the feature layer will be displayed.

Specified by:
getMaxScale in interface Layer
Returns:
The maximum scale at which the feature layer will be displayed.

getMinScale

public double getMinScale()
Gets the minimum scale at which the feature layer will be displayed.

Specified by:
getMinScale in interface Layer
Returns:
The minimum scale at which the feature layer will be displayed.

getMetadataUrl

public java.lang.String getMetadataUrl()
Gets the URL for metadata associated with this layer.

Specified by:
getMetadataUrl in interface Layer
Returns:
The URL of the metadata, or null.

getName

public java.lang.String getName()
Gets the name of this layer. The name is used for communicating to the WMS server. Use the title for referencing the layer in documents that end-users see.

Specified by:
getName in interface Layer
Returns:
The name of the layer (not the title).

getObjectId

public int getObjectId()
Returns the IMF internal id for this layer.

Specified by:
getObjectId in interface Layer
Returns:
The internal id for the layer.

getQueryable

public boolean getQueryable()
Retuns an indicator of whether this layer is queryable using either WMS or WFS.

Returns:
True if the layer is querable, otherwise false.

getRecordset

public Recordset getRecordset()
Gets this layer's recordset containing query results.

Specified by:
getRecordset in interface Layer
Returns:
The recordset object.

setRecordset

public void setRecordset(Recordset rs)
Sets this layer's recordset with a recordset object.

Parameters:
rs - The recordset object.

getWmsProjection

public Projection getWmsProjection()
Gets the projection of this WMS layer.

Returns:
The projection object.

getWfsProjection

public Projection getWfsProjection()
Gets the projection of the WFS layer associated with this layer.

Returns:
The projection, if any. Null if WFS is not supported.

getWfsGeometryFieldName

public java.lang.String getWfsGeometryFieldName()
Gets the WFS geometry field name. This method returns the defined value, doesn't use DescribeFeatureType to do it.

Returns:
The field name.

getWfsService

public WfsService getWfsService()
Gets the service supporting WFS queries for this layer, if any.

Returns:
The service, or null if there is no related WFS layer.

getService

public Service getService()
Gets the service supporting WMS requests for this layer,

Specified by:
getService in interface Layer
Returns:
The service.

getWmsService

public WmsService getWmsService()
Gets the service supporting WMS requests for this layer,

Returns:
The service.

setWmsService

public void setWmsService(WmsService service)
Sets the WMS service associated with this layer.

Parameters:
service - The service.

getWmsSrs

public java.lang.String getWmsSrs()
Gets the SRS code used for WMS requests.

Returns:
The SRS code.

getWfsSrs

public java.lang.String getWfsSrs()
Gets the SRS code used for WFS requests.

Returns:
The SRS code, or null if there isn't a WFS link.

getStyleName

public java.lang.String getStyleName()
Returns the name of the style used in making WMS requests for this layer.

Returns:
The style name, or an empty String if there isn't one.

getTitle

public java.lang.String getTitle()
Gets the user displayed title for this layer. Use getName() for the internal name used in the service requests.

Specified by:
getTitle in interface Layer
Returns:
The title.

getVisible

public boolean getVisible()
Returns an indicator of whether this layer is visible.

Specified by:
getVisible in interface Layer
Returns:
True if it is visible, otherwise false.

getWfsName

public java.lang.String getWfsName()
Gets the name of the WFS layer, if any. The name is the internal name used for making requests from the WFS service.

Returns:
The name of the WFS layer, or null if there isn't one.

isObjectId

public boolean isObjectId(int id)
Checks to see if the object id of this layer is that specified.

Specified by:
isObjectId in interface Layer
Parameters:
id - The id to check.
Returns:
True if the object id matches, otherwise false.

isNamed

public boolean isNamed(java.lang.String name)
Checks to see if the name of this layer is that specified.

Specified by:
isNamed in interface Layer
Parameters:
name - The name to check.
Returns:
True if the name matches, otherwise false.

isTitled

public boolean isTitled(java.lang.String title)
Checks to see if the title of this layer is that specified.

Specified by:
isTitled in interface Layer
Parameters:
title - The title to check.
Returns:
True if the title matches, otherwise false.

isWithinScaleThreshold

public boolean isWithinScaleThreshold(double scale)
Returns whether this layer is within threshold tolerance.

Specified by:
isWithinScaleThreshold in interface Layer
Parameters:
scale - The scale to test.
Returns:
True if the layer is shown at the present scale, otherwise false.

setGeometryType

public void setGeometryType(java.lang.String type)
Sets the layer's geometry type using a String.

Parameters:
type - The geometry type name.

setGeometryType

public void setGeometryType(int type)
Sets the layer's geometry type using an enumerator.

Parameters:
type - The geometry type enumerator. See com.moximedia.ows.types.GeometryType.

setIdentifyType

public void setIdentifyType(java.lang.String type)
Sets the identify type using a string.

Parameters:
type - The identify type.

setSelectType

public void setSelectType(java.lang.String type)
Sets the select type using a string.

Parameters:
type - The select type.

setLegendUrl

public void setLegendUrl(java.lang.String href)
Sets the URL of the legend for this layer.

Parameters:
href - The URL of the legend for this layer.

setMaxScale

public void setMaxScale(double scale)
Sets the maximum scale that this layer is visible.

Specified by:
setMaxScale in interface Layer
Parameters:
scale - The maximum scale.

setMinScale

public void setMinScale(double scale)
Sets the minimum scale that this layer is visible.

Specified by:
setMinScale in interface Layer
Parameters:
scale - The minimum scale.

setMetadataUrl

public void setMetadataUrl(java.lang.String href)
Sets the URL for metadata associated to this layer.

Parameters:
href - The URL for metadata associated to this layer.

setName

public void setName(java.lang.String name)
Sets the internal name of this layer, not the title displayed to the user. The internal name is used for communication with the service.

Parameters:
name - The name of this layer.

setStyleName

public void setStyleName(java.lang.String styleName)
Sets the style name used to symbolize this layer.

Parameters:
styleName - The style name.

setVisible

public void setVisible(boolean isVisible)
Sets whether this layer is visible.

Specified by:
setVisible in interface Layer
Parameters:
isVisible - True if the layer should be shown, otherwise false.

setTitle

public void setTitle(java.lang.String title)
Sets the user visible title for this layer.

Parameters:
title - The title for the layer.

setWfsService

public void setWfsService(WfsService service)
Sets the WFS service associated with the WFS layer associated with this layer.

Parameters:
service - The service.

setProjection

public void setProjection(Projection projection)
Sets the projection for this layer. Does not set the SRS.

Specified by:
setProjection in interface Layer
Parameters:
projection - The projection.

setXmlAttribute

public void setXmlAttribute(Map map,
                            java.lang.String element,
                            java.lang.String name,
                            java.lang.String value,
                            java.lang.String frameworkPath,
                            java.lang.String mapConfigPath)
Sets one of the attributes of this object using a string value. This method should only be called from the SAX event handler.

Specified by:
setXmlAttribute in interface Layer
Parameters:
map - The map that contains this layer.
element - The XML element tag containing this attribute.
name - The XML attribute name.
value - The XML attribute value.
frameworkPath - The URL path to the IMF.
mapConfigPath - The URL path to the location of the map configuration file.

setSrs

public void setSrs(java.lang.String srs)
Sets the spatial reference system SRS of this layer. Does not set the projection.

Specified by:
setSrs in interface Layer
Parameters:
srs - The SRS code.

setWmsQueryable

public void setWmsQueryable(boolean isQueryable)
Sets whether the layer is queryable using WMS GetFeatureInfo.

Parameters:
isQueryable - True if the layer is queryable, otherwise false.

setWmsLayerName

public void setWmsLayerName(java.lang.String name)
Sets the WMS layer name, an internal value used for communicating with the WMS service associated with this layer.

Parameters:
name - The name of the layer.

setTransparent

public void setTransparent(boolean isTransparent)
Sets whether the layer should be drawn transparent.

Parameters:
isTransparent - True if the layer should be drawn transparent, otherwise false.

getTransparent

public boolean getTransparent()
Reports whether the layer should be drawn transparent.

Specified by:
getTransparent in interface Layer
Returns:
True if the layer is drawn transparent, otherwise false.

getZoomExtentBuffer

public double getZoomExtentBuffer()
Gets the zoom extent buffer distance.

Returns:
The zoom extent buffer distance.

setZoomExtentBuffer

public void setZoomExtentBuffer(double distance)
Sets the zoom extent buffer distance.

Parameters:
distance - The buffer distance, in map units.

setTransparency

public void setTransparency(int percentTransparent)
Sets the transparency of this layer, as a percentage. Zero is fully opaque, one hundred is fully transparent.

Specified by:
setTransparency in interface Layer

getTransparency

public int getTransparency()
Gets the transparency of this layer, as a percentage. Zero is fully opaque, one hundred is fully transparent.

Specified by:
getTransparency in interface Layer
Returns:
The transparency percent.


Internet Mapping Framework for OpenGIS Java Object Model API (v1.3.007)
Copyright © 2005 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.