public class

FeatureSet

extends Object
implements Serializable
java.lang.Object
   ↳ com.esri.core.map.FeatureSet

Class Overview

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.

Summary

Public Constructors
FeatureSet()
Public Methods
boolean equals(Object obj)
static FeatureSet fromJson(JsonParser parser)
Decodes objects from JSON representation.
static FeatureSet fromJson(JsonParser parser, boolean graphicsHaveSpatialRef, int maxResultsReturned)
Decodes objects from JSON representation.
static FeatureSet fromJson(JsonParser parser, boolean graphicsHaveSpatialRef)
Decodes objects from JSON representation.
static FeatureSet fromJson(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()
boolean isExceededTransferLimit()
Checks to see if the FeatureSet returned from the query exceeded the transfer limit.
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 final String toJson(FeatureSet featureSet)
Serializes a FeatureSet object into a JSON String.
String toString()
Returns string representation of the class.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FeatureSet ()

Public Methods

public boolean equals (Object obj)

Parameters
obj Object
Returns
boolean

public static FeatureSet fromJson (JsonParser parser)

Decodes objects from JSON representation.

Parameters
parser JsonParser: the Jackson parser holding the JSON data.
Returns
FeatureSet the decoded object from JSON representation.
Throws
Exception the exception

public static FeatureSet fromJson (JsonParser parser, boolean graphicsHaveSpatialRef, int maxResultsReturned)

Decodes objects from JSON representation.

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

public static FeatureSet fromJson (JsonParser parser, boolean graphicsHaveSpatialRef)

Decodes objects from JSON representation.

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

public static FeatureSet fromJson (JsonParser parser, int maxResults)

Decodes objects from JSON representation.

Parameters
parser JsonParser: the Jackson parser holding the JSON data.
maxResults int: the max results
Returns
FeatureSet the decoded object from JSON representation.
Throws
Exception the exception

public String getDisplayFieldName ()

Gets the name of the Display field.

Returns
String the name of the field.

public Map<String, Object> getFieldAliases ()

Gets the name alias pairs of all fields.

Returns
Map<String, Object> the name alias pairs.

public List<Field> getFields ()

Gets the name of all fields.

Returns
List<Field> the fields

public Geometry.Type getGeometryType ()

Gets the geometry type of the graphics.

Returns
Geometry.Type the geometry type of the graphics.

public Graphic[] getGraphics ()

Gets the graphics in the set.

Returns
Graphic[] the array of graphics.

public String getObjectIdFieldName ()

Gets the name of the ObjectId field.

Returns
String the name of the field.

public Integer[] getObjectIds ()

Gets the array of the ObjectIds in the FeatureSet.

Returns
Integer[] the array of ids.

public SpatialReference getSpatialReference ()

Gets the spatial reference of the FeatureSet.

Returns
SpatialReference the spatial reference or null if it is not available.

public int hashCode ()

Returns
int

public boolean isExceededTransferLimit ()

Checks to see if the FeatureSet returned from the query exceeded the transfer limit.

Returns
boolean true if the transfer limit was exceeded

public void setFields (List<Field> fields)

Sets the name of the fields.

Parameters
fields List: the fields to set

public void setGraphics (Graphic[] graphics)

Sets the graphics of the FeatureSet.

Parameters
graphics Graphic: The graphics to set.

public void setSpatialReference (SpatialReference spatialReference)

Sets the spatial reference of the FeatureSet.

Parameters
spatialReference SpatialReference: the spatialReference to set

public static final String toJson (FeatureSet featureSet)

Serializes a FeatureSet object into a JSON String.

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

public String toString ()

Returns string representation of the class. The format and content of the returned string is not part of the contract of the method and is subject to change in any future release or patch without further notice.

Returns
String