com.esri.aims.mtier.model.map.layer
Class FeatureLayer

java.lang.Object
  extended by com.esri.aims.mtier.model.map.layer.Layer
      extended by com.esri.aims.mtier.model.map.layer.FeatureLayer
All Implemented Interfaces:
Serializable

public class FeatureLayer
extends Layer
implements Serializable

Represents an ArcIMS feature layer. The FeatureLayer class extends the Layer class.

See Also:
Serialized Form

Constructor Summary
FeatureLayer(String id, String maxScale, String minScale)
          Constructs an instance of a new FeatureLayer Object.
 
Method Summary
 AddressMatchInputs getAddressMatchInputs()
          Returns the AddressMatchInputs object associated with this FeatureLayer.
 CoordSys getCoordSys()
          Returns the FeatureCoordSys associated with this FeatureLayer.
 Dataset getDataset()
          Returns the Dataset associated with this FeatureLayer.
 Densify getDensify()
          Returns the Densify object associated with this FeatureLayer.
 Envelope getEnvelope()
          Returns the Envelope associated with this FeatureLayer.
 String getFeatureClass()
          Returns this FeatureLayer's feature class property.
 int getFeatureCount()
          Returns the Feature count of this FeatureLayer.
 Filter getFilterObject()
          Returns the Filter associated with this FeatureLayer.
 Recordset getRecordset()
          Returns the Recordset associated with this FeatureLayer.
 Renderer getRenderer()
          Returns the Renderer object associated with this FeatureLayer.
 ArrayList getTOCGroups()
          Returns the table of contents.
 String getType()
          Returns the type of Layer, "Feature".
 boolean isExtractable()
          true when method setExtractable() is set to true.
 boolean isRendererAccessed()
          Returns "True", if the Renderer associated with this FeatureLayer has been accessed.
 void setAddressMatchInputs(AddressMatchInputs object)
          Sets the given AddressMatchInputs to this FeatureLayer.
 void setCoordSys(CoordSys object)
          Sets the given FeatureCoordSys for this FeatureLayer.
 void setDataset(Dataset obj)
          Sets the given Dataset object with this FeatureLayer.
 void setDensify(Densify obj)
          Sets the given Densify object with this FeatureLayer.
 void setEnvelope(Envelope envelope)
          Sets the given Envelope for this FeatureLayer.
 void setExtractable(boolean value)
          Sets the FeatureLayer as extractable.
 void setFeatureClass(String featureClass)
          Sets the feature class property for this FeatureLayer.
 void setFeatureCount(int value)
          Sets the feature count property for this FeatureLayer.
 void setFilterObject(Filter object)
          Sets the given Filter object for this FeatureLayer.
 void setRecordset(Recordset recordset)
          Sets the given Recordset for this FeatureLayer.
 void setRenderer(Object renderer)
          Sets the Renderer object for this FeatureLayer.
 void setTOCGroups(ArrayList tocGroups)
          Sets the table of contents associated with this feature layer.
 
Methods inherited from class com.esri.aims.mtier.model.map.layer.Layer
getID, getMaxScale, getMinScale, getName, isVisible, setID, setMaxScale, setMinScale, setName, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureLayer

public FeatureLayer(String id,
                    String maxScale,
                    String minScale)
Constructs an instance of a new FeatureLayer Object. For example,
FeatureLayer featureLayer = new FeatureLayer("2","1:25000","1:35000");

Parameters:
id - the layer identifier value to assign.
maxScale - the layers max- scale value to assign.
minScale - the layers min- scale value to assign.
Method Detail

getType

public String getType()
Returns the type of Layer, "Feature".

Specified by:
getType in class Layer
Returns:
String

setRenderer

public void setRenderer(Object renderer)
Sets the Renderer object for this FeatureLayer. For example,
 SimpleRenderer simpleRenderer = new SimpleRenderer();
 SimplePolygonSymbol simplePolygon = new SimplePolygonSymbol();
 simplePolygon.setFillColor("255,0,0");
 simpleRenderer.setSymbol(simplePolygon);
 featureLayer.setRenderer(simpleRenderer);
 

Parameters:
renderer - passed as Object
See Also:
getRenderer()

getRenderer

public Renderer getRenderer()
Returns the Renderer object associated with this FeatureLayer. For existing service layer defined in the map configuration file of the map service, this method will return the renderer defined under element LAYER, return null if there is no renderer defined in the configuration or the parameter loadRenderer is false while initializing map object with Map.initMap(). For example,
Renderer renderer = featureLayer.getRenderer();

Returns:
Object
See Also:
setRenderer(java.lang.Object)

setFeatureClass

public void setFeatureClass(String featureClass)
Sets the feature class property for this FeatureLayer. Feature class of FeatureLayer can take "point", "line", and "polygon". For example,
featureLayer.setFeatureClass("polygon");

Parameters:
featureClass - the feature class.
See Also:
getFeatureClass()

setFeatureCount

public void setFeatureCount(int value)
Sets the feature count property for this FeatureLayer. Used after FEATURES Response from the ArcIMS Spatial Server.

Parameters:
value - the feature count value.
See Also:
getFeatureCount()

getFeatureCount

public int getFeatureCount()
Returns the Feature count of this FeatureLayer. For example,
int count = featureLayer.getFeatureCount();

Returns:
int
See Also:
setFeatureCount(int)

getEnvelope

public Envelope getEnvelope()
Returns the Envelope associated with this FeatureLayer. For example,
Envelope env = featureLayer.getEnvelope();

Returns:
Envelope
See Also:
setEnvelope(com.esri.aims.mtier.model.envelope.Envelope)

getFeatureClass

public String getFeatureClass()
Returns this FeatureLayer's feature class property. This class gets set by the models initialization.

Returns:
String
See Also:
setFeatureClass(java.lang.String)

getRecordset

public Recordset getRecordset()
Returns the Recordset associated with this FeatureLayer. For example,
Recordset recordset = featureLayer.getRecordset();

Returns:
Recordset
See Also:
setRecordset(com.esri.aims.mtier.model.map.layer.query.Recordset)

setRecordset

public void setRecordset(Recordset recordset)
Sets the given Recordset for this FeatureLayer. It gets created and set after a feature response.

Parameters:
recordset - the Recordset object.
See Also:
getRecordset()

setEnvelope

public void setEnvelope(Envelope envelope)
Sets the given Envelope for this FeatureLayer. It gets created and set after model initialization.

Parameters:
envelope - the Envelope object.
See Also:
getEnvelope()

setFilterObject

public void setFilterObject(Filter object)
Sets the given Filter object for this FeatureLayer. For example,
 Filter filter = new Filter();
 filter.setWhereExpression("NAME='Scofield'");
 featureLayer.setFilterObject(filter);
 
Note:
When the Filter object has a Buffer object, and the Buffer object has a target layer, the response is populated into a layer called "BufferLayer", which is newly created for this buffer query. See following code on how to get this layer:
 FeatureLayer bufferlayer=null;
 for (int i=0;i< map.getLayers().getCount();i++){
   if (map.getLayers().item(i).getName().equals("BufferLayer")){
     bufferlayer=(FeatureLayer)map.getLayers().item(i);
     out.print("There are " + bufferlayer.getRecordset().getCount() + " features falling within the buffer area");
   }
 }
 

Parameters:
object - the filter object.
See Also:
getFilterObject()

getFilterObject

public Filter getFilterObject()
Returns the Filter associated with this FeatureLayer. For example,
 Filter filter = featureLayer.getFilterObject();
 

Returns:
the Filter object.
See Also:
setFilterObject(com.esri.aims.mtier.model.map.layer.query.Filter)

setCoordSys

public void setCoordSys(CoordSys object)
Sets the given FeatureCoordSys for this FeatureLayer. This is used for reprojecting the current feature layer. For example,
 CoordSys coordSys = new CoordSys();
 coordSys.setID(4326);
 featureLayer.setCoordSys(coordSys);
 

Parameters:
object - the FeatureCoordSys object.
See Also:
getCoordSys()

getCoordSys

public CoordSys getCoordSys()
Returns the FeatureCoordSys associated with this FeatureLayer. Example:
CoordSys coordSys = featureLayer.getCoordSys();
 

Returns:
the FeatureCoordSys object.
See Also:
setCoordSys(com.esri.aims.mtier.model.map.projection.CoordSys)

setExtractable

public void setExtractable(boolean value)
Sets the FeatureLayer as extractable. This method works only after Map.setExtract(true) is called. See Map.setExtract() for more information. A FeatureLayer can be extracted when this method is set to true and it is visible. Example:

    map.setExtract(true);
    FeatureLayer hospitalLayer = (FeatureLayer)map.getLayers().item(3); //hospital
    hospitalLayer.setExtractable(true);
    map.refresh();
FeatureLayer "hospitalLayer" can be extracted if it is visible at the current scale.

Parameters:
value - Default is false.
See Also:
isExtractable()

isExtractable

public boolean isExtractable()
true when method setExtractable() is set to true.

Returns:
boolean.
See Also:
setExtractable(boolean)

setAddressMatchInputs

public void setAddressMatchInputs(AddressMatchInputs object)
Sets the given AddressMatchInputs to this FeatureLayer. It gets created and set after model initialization.

Parameters:
object - the AddressMatchInputs object.
See Also:
getAddressMatchInputs()

getAddressMatchInputs

public AddressMatchInputs getAddressMatchInputs()
Returns the AddressMatchInputs object associated with this FeatureLayer. Example:
 AddressMatchInputs addMatchInputs = featureLayer.getAddressMatchInputs();
 

Returns:
a AddressMatchInputs object.
See Also:
setAddressMatchInputs(com.esri.aims.mtier.model.map.layer.geocode.AddressMatchInputs), AddressMatchInputs

isRendererAccessed

public boolean isRendererAccessed()
Returns "True", if the Renderer associated with this FeatureLayer has been accessed. This includes accessed by method Map.initMap() with parameter loadRenderer set to true. For example:
 boolean = featureLayer.isRendererAccessed();
 

Returns:
a boolean value - true or False.
See Also:
getRenderer()

setDensify

public void setDensify(Densify obj)
Sets the given Densify object with this FeatureLayer. Example:
 Densify densify = new Densify();
 densify.setTolerance(1.0);
 featureLayer.setDensify(densify);
 

Parameters:
obj - the Densify object to set.
See Also:
getDensify()

getDensify

public Densify getDensify()
Returns the Densify object associated with this FeatureLayer. Example:
 Densify densify = featureLayer.getDensify();
 

Returns:
the Densify object.
See Also:
setDensify(com.esri.aims.mtier.model.map.projection.Densify)

setDataset

public void setDataset(Dataset obj)
Sets the given Dataset object with this FeatureLayer. Example:
 Dataset dataset = new Dataset();
 dataset.setName("rivers");
 featureLayer.setDataset(dataset);
 

Parameters:
obj - the Dataset object to set.
See Also:
getDataset()

getDataset

public Dataset getDataset()
Returns the Dataset associated with this FeatureLayer. Example:
 Dataset dataset = featureLayer.getDataset();
 
This method only works with newly created dynamic layers.

Returns:
Dataset
See Also:
setDataset(com.esri.aims.mtier.model.workspace.Dataset)

setTOCGroups

public void setTOCGroups(ArrayList tocGroups)
Sets the table of contents associated with this feature layer.

Parameters:
tocGroups - the table of contents details

getTOCGroups

public ArrayList getTOCGroups()
Returns the table of contents.

Returns:
ArrayList- the table of contents