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, boolean graphicsHaveSpatialRef, int maxResultsReturned)
Decodes objects from JSON representation.
static FeatureSet fromJson(JsonParser parser)
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<StringObject> 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.
final static String toJson(FeatureSet featureSet)
Serializes a FeatureSet object into a JSON String.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FeatureSet ()

Public Methods

public boolean equals (Object obj)

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

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.

public static FeatureSet fromJson (JsonParser parser)

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

public static FeatureSet fromJson (JsonParser parser, boolean graphicsHaveSpatialRef)

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.

public static FeatureSet fromJson (JsonParser parser, int maxResults)

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

public String getDisplayFieldName ()

Gets the name of the Display field.

Returns
  • the name of the field.

public Map<StringObject> getFieldAliases ()

Gets the name alias pairs of all fields.

Returns
  • the name alias pairs.

public List<Field> getFields ()

Gets the name of all fields.

Returns
  • the fields

public Geometry.Type getGeometryType ()

Gets the geometry type of the graphics.

Returns
  • the geometry type of the graphics.

public Graphic[] getGraphics ()

Gets the graphics in the set.

Returns
  • the array of graphics.

public String getObjectIdFieldName ()

Gets the name of the ObjectId field.

Returns
  • the name of the field.

public Integer[] getObjectIds ()

Gets the array of the ObjectIds in the FeatureSet.

Returns
  • the array of ids.

public SpatialReference getSpatialReference ()

Gets the spatial reference of the FeatureSet.

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

public int hashCode ()

public void setFields (List<Field> fields)

Sets the name of the fields.

Parameters
fields the fields to set

public void setGraphics (Graphic[] graphics)

Sets the graphics of the FeatureSet.

Parameters
graphics The graphics to set.

public void setSpatialReference (SpatialReference spatialReference)

Sets the spatial reference of the FeatureSet.

Parameters
spatialReference the spatialReference to set

public static final String toJson (FeatureSet featureSet)

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.

public String toString ()