com.esri.core.map
Class FeatureSet

java.lang.Object
  extended by com.esri.core.map.FeatureSet
All Implemented Interfaces:
Serializable

public class FeatureSet
extends Object
implements Serializable

A collection of features returned from ArcGIS Server or used as input to tasks. Each feature in the FeatureSet may contain geometry, attributes, symbology, and an InfoTemplate. If the FeatureSet does not contain geometry, and only contains attributes, the FeatureSet can be treated as a table where each feature is a row object. Tasks that return FeatureSet include QueryTask and GeoProcessor. In addition, GeoProcessor may require FeatureSet as input.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
FeatureSet()
           
 
Method Summary
 boolean equals(Object obj)
           
static FeatureSet fromJson(org.codehaus.jackson.JsonParser parser)
          Decodes objects from JSON representation.
static FeatureSet fromJson(org.codehaus.jackson.JsonParser parser, boolean graphicsHaveSpatialRef)
          Decodes objects from JSON representation.
static FeatureSet fromJson(org.codehaus.jackson.JsonParser parser, boolean graphicsHaveSpatialRef, int maxResultsReturned)
          Decodes objects from JSON representation.
static FeatureSet fromJson(org.codehaus.jackson.JsonParser parser, int maxResults)
          Decodes objects from JSON representation.
 String getDisplayFieldName()
          Gets the name of the Display field.
 Map<String,Object> getFieldAliases()
          Gets the name alias pairs of all fields.
 List<Field> getFields()
          Gets the name of all fields.
 Geometry.Type getGeometryType()
          Gets the geometry type of the graphics.
 Graphic[] getGraphics()
          Gets the graphics in the set.
 String getObjectIdFieldName()
          Gets the name of the ObjectId field.
 Integer[] getObjectIds()
          Gets the array of the ObjectIds in the FeatureSet.
 SpatialReference getSpatialReference()
          Gets the spatial reference of the FeatureSet.
 int hashCode()
           
 void setFields(List<Field> fields)
          Sets the name of the fields.
 void setGraphics(Graphic[] graphics)
          Sets the graphics of the FeatureSet.
 void setSpatialReference(SpatialReference spatialReference)
          Sets the spatial reference of the FeatureSet.
static String toJson(FeatureSet featureSet)
          Serializes a FeatureSet object into a JSON String.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FeatureSet

public FeatureSet()
Method Detail

getObjectIds

public Integer[] getObjectIds()
Gets the array of the ObjectIds in the FeatureSet.

Returns:
the array of ids.
Since:
1.0

getObjectIdFieldName

public String getObjectIdFieldName()
Gets the name of the ObjectId field.

Returns:
the name of the field.
Since:
1.0

getGraphics

public Graphic[] getGraphics()
Gets the graphics in the set.

Returns:
the array of graphics.
Since:
1.0

setGraphics

public void setGraphics(Graphic[] graphics)
Sets the graphics of the FeatureSet.

Parameters:
graphics - The graphics to set.
Since:
1.0

getSpatialReference

public SpatialReference getSpatialReference()
Gets the spatial reference of the FeatureSet.

Returns:
the spatial reference or null if it is not available.
Since:
1.0

setSpatialReference

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

Parameters:
spatialReference - the spatialReference to set
Since:
1.0

getGeometryType

public Geometry.Type getGeometryType()
Gets the geometry type of the graphics.

Returns:
the geometry type of the graphics.
Since:
1.0

getDisplayFieldName

public String getDisplayFieldName()
Gets the name of the Display field.

Returns:
the name of the field.
Since:
1.0

getFieldAliases

public Map<String,Object> getFieldAliases()
Gets the name alias pairs of all fields.

Returns:
the name alias pairs.
Since:
1.0

getFields

public List<Field> getFields()
Gets the name of all fields.

Returns:
the fields
Since:
1.0

setFields

public void setFields(List<Field> fields)
Sets the name of the fields.

Parameters:
fields - the fields to set
Since:
1.0

fromJson

public static FeatureSet fromJson(org.codehaus.jackson.JsonParser parser,
                                  int maxResults)
                           throws Exception
Decodes objects from JSON representation.

Parameters:
parser - the Jackson parser holding the JSON data.
maxResults - the max results
Returns:
the decoded object from JSON representation.
Throws:
Exception - the exception
Since:
1.0

fromJson

public static FeatureSet fromJson(org.codehaus.jackson.JsonParser parser)
                           throws Exception
Decodes objects from JSON representation.

Parameters:
parser - the Jackson parser holding the JSON data.
Returns:
the decoded object from JSON representation.
Throws:
Exception - the exception
Since:
1.0

fromJson

public static FeatureSet fromJson(org.codehaus.jackson.JsonParser parser,
                                  boolean graphicsHaveSpatialRef)
                           throws Exception
Decodes objects from JSON representation.

Parameters:
parser - the Jackson parser holding the JSON data.
graphicsHaveSpatialRef - Whether or not the graphics contained in the FeatureSet have a
Returns:
the decoded object from JSON representation.
Throws:
Exception - the exception SpatialReference.
Since:
1.0

fromJson

public static FeatureSet fromJson(org.codehaus.jackson.JsonParser parser,
                                  boolean graphicsHaveSpatialRef,
                                  int maxResultsReturned)
                           throws Exception
Decodes objects from JSON representation.

Parameters:
parser - the Jackson parser holding the JSON data.
graphicsHaveSpatialRef - Whether or not the graphics contained in the FeatureSet have a
maxResultsReturned - the max results returned
Returns:
the decoded object from JSON representation.
Throws:
Exception - the exception SpatialReference.
Since:
1.0

toString

public String toString()
Overrides:
toString in class Object
Since:
1.0

toJson

public static final String toJson(FeatureSet featureSet)
                           throws Exception
Serializes a FeatureSet object into a JSON String.

Parameters:
featureSet - a FeatureSet Object
Returns:
a JSON String representing the FeatureSet.
Throws:
Exception - An exception thrown the object cannot be serialized into JSON string.
Since:
1.0

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Since:
1.0

equals

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


Copyright © 2012. All Rights Reserved.