Class JMapServerProject

All Implemented Interfaces:
ObjectInputValidation, Serializable, Cloneable, Comparable<JMapServerProject>

public class JMapServerProject extends JMapObject implements Serializable, Comparable<JMapServerProject>, ObjectInputValidation, Cloneable
See Also:
  • Constructor Details

    • JMapServerProject

      public JMapServerProject(Project project, User owner)
  • Method Details

    • addListener

      public void addListener(JMapServerProjectListener listener)
    • removeListener

      public void removeListener(JMapServerProjectListener listener)
    • compareTo

      public int compareTo(JMapServerProject serverProject)
      Implementation of the interface Comparable
      Specified by:
      compareTo in interface Comparable<JMapServerProject>
      Parameters:
      serverProject - the project to compare with.
      Returns:
      An integer. See Comparable for more details.
    • contains

      public boolean contains(SpatialDataSourceInfo dataSourceInfo)
      Tests if the current project contains a layer which was created with the specified data source info.
      Parameters:
      dataSourceInfo - the data source info to search.
      Returns:
      true if the current project contains a layer which was created with the specified data source info.
    • containsLayer

      public boolean containsLayer(int layerId)
      Tests if the current project contains a layer which has the specified id.
      Parameters:
      layerId - the layer id to search.
      Returns:
      true if the current project contains a layer which has the specified id.
    • setLayers

      public void setLayers(List<JMapServerLayer> layers)
      Since:
      JMap 5.0
    • getLayers

      public List<JMapServerLayer> getLayers()
      Since:
      JMap 5.0
    • getId

      public int getId()
    • setId

      public void setId(int id)
    • addLayer

      public void addLayer(JMapServerLayer serverLayer)
      Adds a layer at the top position of the list.
      Parameters:
      serverLayer - the new layer to add.
      Since:
      JMap 5.0
    • addLayer

      public void addLayer(JMapServerLayer serverLayer, int pos)
      Adds a layer at the specified position in the list.
      Parameters:
      serverLayer - the new layer to add.
      pos - the target position.
      Since:
      JMap 5.0
    • replaceLayer

      public boolean replaceLayer(JMapServerLayer oldServerLayer, JMapServerLayer newServerLayer)
      Updates a layer in the project by another layer instance. If the new layer is null, then the old layer is removed from the project.
      Parameters:
      oldServerLayer - the layer to be replaced.
      newServerLayer - the new layer to add.
      Returns:
      true if the layer could be replaced.
      Since:
      7.0
    • removeLayer

      public boolean removeLayer(JMapServerLayer serverLayer)
      Removes the specified layer from the project.
      Parameters:
      serverLayer - the layer to remove.
      Since:
      JMap 5.0
    • removeLayer

      public boolean removeLayer(SpatialDataSourceInfo dataSourceInfo)
      Removes all layers which were created from the specified data source info.
      Since:
      JMap 5.0
    • removeLayer

      public boolean removeLayer(int layerId)
      Removes the layer corresponding to the specified id from the project.
      Parameters:
      layerId - the layer id of the layer to remove.
      Since:
      JMap 5.0
    • getLayerPosition

      public int getLayerPosition(int layerId)
    • getLayer

      public JMapServerLayer getLayer(int layerId)
      Since:
      JMap 5.0
    • getLayer

      public JMapServerLayer getLayer(String name)
      Since:
      JMap 5.0
    • swapLayer

      public void swapLayer(int posSelect, int posDestination)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getImageProducerSettings

      public ImageProducerSettings getImageProducerSettings()
    • setImageProducerSettings

      public void setImageProducerSettings(ImageProducerSettings imageProducerSettings)
    • getExtent

      public Rectangle getExtent()
    • getLayerTreeGroup

      public LayerTreeGroup getLayerTreeGroup()
      Returns the layer tree root group.
      Returns:
      the root of the layer tree.
    • setLayerTreeGroup

      public void setLayerTreeGroup(LayerTreeGroup layerTreeGroup)
    • addAttributeQueryGroup

      public void addAttributeQueryGroup(AttributeQueryGroupInfo attributeQueryCategory)
    • deleteAttributeQueryGroup

      public boolean deleteAttributeQueryGroup(AttributeQueryCategory attributeQueryGroup)
    • deleteAttributeQueryGroup

      public boolean deleteAttributeQueryGroup(int attributeQueryCategoryId)
    • getAttributeQueryGroup

      public AttributeQueryGroupInfo getAttributeQueryGroup(String name)
    • getAttributeQueryGroup

      public AttributeQueryGroupInfo getAttributeQueryGroup(int id)
    • getAttributeQueryGroups

      public List<AttributeQueryGroupInfo> getAttributeQueryGroups()
    • setAttributeQueryGroups

      public void setAttributeQueryGroups(List<AttributeQueryGroupInfo> attributeQueryGroups)
    • validateObject

      public void validateObject()
      Specified by:
      validateObject in interface ObjectInputValidation
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class JMapObject
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class JMapObject