com.esri.core.tasks.ags.geoprocessing
Class GPFeatureRecordSetLayer

java.lang.Object
  extended by com.esri.core.tasks.ags.geoprocessing.GPParameter
      extended by com.esri.core.tasks.ags.geoprocessing.GPFeatureRecordSetLayer
All Implemented Interfaces:
Serializable

public class GPFeatureRecordSetLayer
extends GPParameter

Container class representing a Geo-Processing parameter of the type Graphic record set layer.


This object can have 2 representations:
- if data is the return type selected, the format is as follow:

 {
 "paramName" : "<paramName>",
 "dataType" : "GPFeatureRecordSetLayer",
 "value" : 
  { 
  "geometryType" : "<geometryType>",
  "spatialReference" : {<spatialReference>}, 
  "features" : [
  { 
  "geometry" : {<geometry1>},
  "attributes" : 
  {
  "<field1>" : <value11>, 
  "<field2>" : <value12>
   }
   },
  { 
  "geometry" : {<geometry2>},
  "attributes" : 
  {
  "<field1>" : <value21>, 
  "<field2>" : <value22>
   }
   } 
  ] 
  }
 }
 
- if data is NOT the return type selected, the format is as follow:
 {
 "paramName" : "<paramName>",
 "dataType" : "<GPRasterDataLayer | GPFeatureRecordSetLayer>",
 "value" : 
  { 
  "mapImage" : 
  {
  "href" : "<href>",
  "width" : <width>,
  "height" : <height>,
  "extent" : {<envelope>},
  "scale" : <scale>
   } 
  }
 }
 

See Also:
Serialized Form

Constructor Summary
GPFeatureRecordSetLayer()
          Constructs an empty GPFeatureRecordSetLayer object.
GPFeatureRecordSetLayer(String paramName)
          Constructor taking in the name of the parameter.
 
Method Summary
 void addGraphic(Graphic graphic)
          Convenient method to add a Graphic to a GPFeatureRecordSetLayer.
 boolean equals(Object obj)
           
 void fromJson(org.codehaus.jackson.JsonParser parser)
          Method used to populate a GP Parameter.
 Map<String,String> generateRequestParams()
          Generate request parameters in the form of map which contains three entried: parameter name, date type and value.
 String generateValueParams()
          Method serializing GP parameter's values into a Json format.
 Geometry.Type getGeometryType()
          Gets the Geometry.Type.
 ArrayList<Graphic> getGraphics()
          This method returns the Graphic associated with this GPFeatureRecordSetLayer.
It returns null if the return type of this instance is not data.
 GPMapImage getMapImage()
          This method returns the GPMapImage associated with this GPFeatureRecordSetLayer.
It returns null if the return type of this instance is data.
 SpatialReference getSpatialReference()
          Gets the spatial reference.
 int hashCode()
           
 void setGeometryType(Geometry.Type geometryType)
          Sets the Geometry.Type.
 void setGraphics(ArrayList<Graphic> graphics)
          Sets the graphics to this GPFeatureRecordSetLayer object.
 void setMapImage(GPMapImage mapImage)
           
 void setSpatialReference(SpatialReference spatialReference)
          Sets the spatial reference.
 
Methods inherited from class com.esri.core.tasks.ags.geoprocessing.GPParameter
createFromJson, getDataType, getParamName, setParamName
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPFeatureRecordSetLayer

public GPFeatureRecordSetLayer(String paramName)
Constructor taking in the name of the parameter.

Parameters:
paramName - name of the parameter

GPFeatureRecordSetLayer

public GPFeatureRecordSetLayer()
Constructs an empty GPFeatureRecordSetLayer object.

Method Detail

getMapImage

public GPMapImage getMapImage()
This method returns the GPMapImage associated with this GPFeatureRecordSetLayer.
It returns null if the return type of this instance is data.

Returns:
the mapImage

setMapImage

public void setMapImage(GPMapImage mapImage)
Parameters:
mapImage - the mapImage to set

getGraphics

public ArrayList<Graphic> getGraphics()
This method returns the Graphic associated with this GPFeatureRecordSetLayer.
It returns null if the return type of this instance is not data.

Returns:
the graphics

setGraphics

public void setGraphics(ArrayList<Graphic> graphics)
Sets the graphics to this GPFeatureRecordSetLayer object.

Parameters:
graphics - the graphics to set.

getGeometryType

public Geometry.Type getGeometryType()
Gets the Geometry.Type.

Returns:
the geometry type.

getSpatialReference

public SpatialReference getSpatialReference()
Gets the spatial reference.

Returns:
the spatial reference.

setGeometryType

public void setGeometryType(Geometry.Type geometryType)
Sets the Geometry.Type.

Parameters:
geometryType - the geometry type to set

setSpatialReference

public void setSpatialReference(SpatialReference spatialReference)
Sets the spatial reference.

Parameters:
spatialReference - the spatial reference to set.

addGraphic

public void addGraphic(Graphic graphic)
Convenient method to add a Graphic to a GPFeatureRecordSetLayer.

Parameters:
graphic - the Graphic to add

generateRequestParams

public Map<String,String> generateRequestParams()
Description copied from class: GPParameter
Generate request parameters in the form of map which contains three entried: parameter name, date type and value.

Overrides:
generateRequestParams in class GPParameter
Returns:
map representing the request parameters.

generateValueParams

public String generateValueParams()
                           throws Exception
Description copied from class: GPParameter
Method serializing GP parameter's values into a Json format.

Specified by:
generateValueParams in class GPParameter
Returns:
the Json String containing the GP parameter's values.
Throws:
Exception

fromJson

public void fromJson(org.codehaus.jackson.JsonParser parser)
              throws Exception
Description copied from class: GPParameter
Method used to populate a GP Parameter.

Specified by:
fromJson in class GPParameter
Parameters:
parser - a Json Parser
Throws:
Exception

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2012. All Rights Reserved.