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 Details

    • id

      protected int id
      The id of the layer.
    • name

      protected String name
      The name of the layer.
    • description

      protected String description
      The description of the layer.
    • elementType

      protected int elementType
      The type of elements this layer contains.
    • lastUpdateTime

      protected long lastUpdateTime
    • maximumVisibleScale

      protected double maximumVisibleScale
    • minimumVisibleScale

      protected double minimumVisibleScale
    • styleManager

      protected StyleManager styleManager
    • extent

      protected Rectangle extent
    • readOnlyMask

      protected long readOnlyMask
    • dynamicRefresh

      protected int dynamicRefresh
    • layerProperties

      protected long layerProperties
      Layer properties are stored as bitwise values in this property.
    • infoReportConfig

      protected JMapClientInfoReportConfig infoReportConfig
    • elementFactory

      protected K2DElementFactory elementFactory
    • metadataUrl

      protected String metadataUrl
  • Constructor Details

    • LayerInfo

      public LayerInfo()
  • Method Details

    • getDescription

      public String getDescription(Locale locale)
      Returns the description of this layer for a specific locale.
      Specified by:
      getDescription in interface ILayer
      Parameters:
      locale -
      Returns:
      description.
    • setDescription

      public void setDescription(String description, Locale locale)
      Sets the description of this layer for the specified Locale.
      Specified by:
      setDescription in interface ILayer
      Parameters:
      description - the new given description.
      locale - the locale for this description
    • getName

      public String getName(Locale locale)
      Returns the name of this layer for a specific locale.
      Specified by:
      getName in interface ILayer
      Parameters:
      locale -
      Returns:
      name.
    • setName

      public void setName(String name, Locale locale)
      Sets the name of this layer for the specified Locale.
      Specified by:
      setName in interface ILayer
      Parameters:
      name - the new given name.
      locale - the locale for this name
    • setElementType

      public void setElementType(int elementType)
      Specified by:
      setElementType in interface ILayer
      Parameters:
      elementType - The elementType to set.
    • isIndex

      public boolean isIndex()
      Returns whether this layer should be drawn in the client overview.
      Specified by:
      isIndex in interface ILayer
      Returns:
      whether this layer should be drawn in the client overview.
      See Also:
    • setIndex

      public void setIndex(boolean flag)
      Sets whether this layer should be drawn in the client overview.
      Specified by:
      setIndex in interface ILayer
      Parameters:
      flag - the new state of the property.
      See Also:
    • 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:
      setSelectable in interface ILayer
      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:
      isSelectable in interface ILayer
      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.
      Specified by:
      setListed in interface ILayer
      Parameters:
      listed - if true, the layer will be a listed layer otherwise a normal layer
    • isListed

      public boolean isListed()
      Returns the current listed state of the layer.
      Specified by:
      isListed in interface ILayer
      Returns:
      true if the layer is a listed layer, false otherwise
    • 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:
      setVisible in interface ILayer
      Parameters:
      flag - if true, the layer will be visible otherwise invisible
    • isVisible

      public boolean isVisible()
      Returns the current visibility state of the layer
      Specified by:
      isVisible in interface ILayer
      Returns:
      true if the layer is visible, false otherwise
    • 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.
      Specified by:
      setLocal in interface ILayer
      Parameters:
      flag - if true, the layer will be a local layer otherwise a normal layer
    • isLocal

      public boolean isLocal()
      Returns the current local state of the layer.
      Specified by:
      isLocal in interface ILayer
      Returns:
      true if the layer is local, false otherwise
    • getLayerClassName

      public abstract String getLayerClassName()
      Returns:
      the layer class name
    • clone

      public abstract Object clone()
      Returns a deep clone of the current LayerInfo instance.
      Specified by:
      clone in interface ILayer
      Overrides:
      clone in class Object
      Returns:
      a clone of the current instance.
    • clone

      protected void clone(LayerInfo layerInfo)
      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:
      setReadOnlyProperty in interface ILayer
      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:
      setProperty in interface ILayer
      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:
      getReadOnlyProperties in interface ILayer
      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:
      setReadOnlyProperties in interface ILayer
      Parameters:
      value - a bitwise value that contains all read-only layer properties.
    • isDynamic

      public boolean isDynamic()
      Specified by:
      isDynamic in interface ILayer
      Returns:
      true if the layer is dynamic and is automatically refreshed periodically.