Package com.kheops.jmap.client.layers
Class LayerInfo
java.lang.Object
com.kheops.jmap.metadata.LocalizedObject
com.kheops.jmap.client.layers.LayerInfo
- All Implemented Interfaces:
ILayer,LayerConstants,Serializable,Cloneable
- Direct Known Subclasses:
RasterLayerInfo,VectorLayerInfo
public abstract class LayerInfo
extends LocalizedObject
implements ILayer, Serializable, Cloneable, LayerConstants
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe description of the layer.protected intprotected K2DElementFactoryprotected intThe type of elements this layer contains.protected Rectangleprotected intThe id of the layer.protected JMapClientInfoReportConfigprotected longprotected longLayer properties are stored as bitwise values in this property.protected doubleprotected Stringprotected doubleprotected StringThe name of the layer.protected longprotected StyleManagerFields inherited from interface com.kheops.jmap.client.layers.LayerConstants
DEFAULT_MAXIMUM_SCALE, DEFAULT_MINIMUM_SCALE, PERSONAL_LAYER_BASE_ID, PERSONAL_LAYER_MAX_ID, PROJECT_LAYER_BASE_ID, PROJECT_LAYER_MAX_ID, PROPERTY_ALL_SETTINGS, PROPERTY_ALWAYS_DRAW_SELECTION, PROPERTY_DRAW_GRID, PROPERTY_EDITABLE, PROPERTY_EDITING, PROPERTY_INCLUDE_IN_CONTEXT, PROPERTY_INDEX, PROPERTY_LISTED, PROPERTY_LOCAL, PROPERTY_MAX_SCALE, PROPERTY_MIN_SCALE, PROPERTY_PUBLISHED, PROPERTY_QUERIABLE, PROPERTY_SELECTABLE, PROPERTY_USE_CLIENT_CACHE, PROPERTY_VISIBLE, REQUEST_MODE_BY_REGION, REQUEST_MODE_BY_TILE, RESERVED_LAYER_BASE_ID, RESERVED_LAYER_MAX_ID, SYSTEM_LAYER_BASE_AUTO_ID, SYSTEM_LAYER_BASE_ID, SYSTEM_LAYER_MAX_ID, TILING_MODE_AUTO, TILING_MODE_MANUAL, USER_LAYER_BASE_AUTO_ID, USER_LAYER_BASE_ID, USER_LAYER_MAX_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Objectclone()Returns a deep clone of the current LayerInfo instance.protected voidClones all properties from this LayerInfo into the specified LayerInfo instance.getDescription(Locale locale) Returns the description of this layer for a specific locale.abstract StringReturns the name of this layer for a specific locale.longReturns the a mask which contains all read-only properties for this layer.booleanbooleanisIndex()Returns whether this layer should be drawn in the client overview.booleanisListed()Returns the current listed state of the layer.booleanisLocal()Returns the current local state of the layer.booleanReturns the current selectable state of the layer.booleanReturns the current visibility state of the layervoidsetDescription(String description, Locale locale) Sets the description of this layer for the specified Locale.voidsetElementType(int elementType) voidsetIndex(boolean flag) Sets whether this layer should be drawn in the client overview.voidsetListed(boolean listed) Sets the listed state of the layer.voidsetLocal(boolean flag) Sets the local state of the layer.voidSets the name of this layer for the specified Locale.final voidsetProperty(long property, boolean enabled) Sets the state for the specified property.voidsetReadOnlyProperties(long value) Sets all read-only properties for the layer.final voidsetReadOnlyProperty(long property, boolean isReadOnly) Sets the read-only state for the specified property.voidsetSelectable(boolean flag) Sets the selectable state of the layer.voidsetVisible(boolean flag) Sets the visibility state of the layer.Methods inherited from class com.kheops.jmap.metadata.LocalizedObject
getAvailableLocales, getTranslation, isTranslationExists, removeTranslationsOtherThan, setTranslation, updateTranslationsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kheops.jmap.client.layers.ILayer
getDescription, getDynamicRefresh, getElementFactory, getElementType, getExtent, getId, getInfoReportConfig, getLastUpdateTime, getLayerProperties, getMaximumVisibleScale, getMetadataUrl, getMinimumVisibleScale, getName, getStyleManager, setDescription, setDynamicRefresh, setElementFactory, setId, setInfoReportConfig, setLastUpdateTime, setLayerProperties, setMaximumVisibleScale, setMetadataUrl, setMinimumVisibleScale, setName, setStyleManager
-
Field Details
-
id
protected int idThe id of the layer. -
name
The name of the layer. -
description
The description of the layer. -
elementType
protected int elementTypeThe type of elements this layer contains. -
lastUpdateTime
protected long lastUpdateTime -
maximumVisibleScale
protected double maximumVisibleScale -
minimumVisibleScale
protected double minimumVisibleScale -
styleManager
-
extent
-
readOnlyMask
protected long readOnlyMask -
dynamicRefresh
protected int dynamicRefresh -
layerProperties
protected long layerPropertiesLayer properties are stored as bitwise values in this property. -
infoReportConfig
-
elementFactory
-
metadataUrl
-
-
Constructor Details
-
LayerInfo
public LayerInfo()
-
-
Method Details
-
getDescription
Returns the description of this layer for a specific locale.- Specified by:
getDescriptionin interfaceILayer- Parameters:
locale-- Returns:
- description.
-
setDescription
Sets the description of this layer for the specified Locale.- Specified by:
setDescriptionin interfaceILayer- Parameters:
description- the new given description.locale- the locale for this description
-
getName
Returns the name of this layer for a specific locale. -
setName
Sets the name of this layer for the specified Locale. -
setElementType
public void setElementType(int elementType) - Specified by:
setElementTypein interfaceILayer- Parameters:
elementType- The elementType to set.
-
isIndex
public boolean isIndex()Returns whether this layer should be drawn in the client overview. -
setIndex
public void setIndex(boolean flag) Sets whether this layer should be drawn in the client overview. -
setSelectable
public void setSelectable(boolean flag) Sets the selectable state of the layer. Selection tools can check this state using the method getSelectable to determine if this layer should be processed.- Specified by:
setSelectablein interfaceILayer- Parameters:
flag- if true, the layer will be selectable otherwise not selectable
-
isSelectable
public boolean isSelectable()Returns the current selectable state of the layer.- Specified by:
isSelectablein interfaceILayer- Returns:
- true if the layer is selectable, false otherwise
-
setListed
public void setListed(boolean listed) Sets the listed state of the layer. This flag can be used to determine if the layer should be hidden to the user in a list of layers. -
isListed
public boolean isListed()Returns the current listed state of the layer. -
setVisible
public void setVisible(boolean flag) Sets the visibility state of the layer. If a layer is invisible, it is not drawn in a view.- Specified by:
setVisiblein interfaceILayer- Parameters:
flag- if true, the layer will be visible otherwise invisible
-
isVisible
public boolean isVisible()Returns the current visibility state of the layer -
setLocal
public void setLocal(boolean flag) Sets the local state of the layer. A local layer is generated on the client side and therefore should not generate data requests to the server. -
isLocal
public boolean isLocal()Returns the current local state of the layer. -
getLayerClassName
- Returns:
- the layer class name
-
clone
Returns a deep clone of the current LayerInfo instance. -
clone
Clones all properties from this LayerInfo into the specified LayerInfo instance.- Parameters:
layerInfo- the instance that will receive cloned properties.
-
setReadOnlyProperty
public final void setReadOnlyProperty(long property, boolean isReadOnly) Sets the read-only state for the specified property.- Specified by:
setReadOnlyPropertyin interfaceILayer- Parameters:
property- the property to set.isReadOnly- the read-only state.
-
setProperty
public final void setProperty(long property, boolean enabled) Sets the state for the specified property.- Specified by:
setPropertyin interfaceILayer- Parameters:
property- the property to set.enabled- the property state.
-
getReadOnlyProperties
public long getReadOnlyProperties()Returns the a mask which contains all read-only properties for this layer.- Specified by:
getReadOnlyPropertiesin interfaceILayer- Returns:
- the mask which defines read-only properties of the layer.
-
setReadOnlyProperties
public void setReadOnlyProperties(long value) Sets all read-only properties for the layer.- Specified by:
setReadOnlyPropertiesin interfaceILayer- Parameters:
value- a bitwise value that contains all read-only layer properties.
-
isDynamic
public boolean isDynamic()
-