public class

ShapefileFeature

extends Object
implements Feature
java.lang.Object
   ↳ com.esri.core.geodatabase.ShapefileFeature

Class Overview

Represents a feature in a shapefile feature table (ShapefileFeatureTable). The feature's map of attributes (key-value pairs) is constrained by the table such that each field (keys in the attribute map) must be a field in the table's schema.

See also:

Summary

Public Constructors
ShapefileFeature(Map<String, Object> attributes, ShapefileFeatureTable table)
Creates a shapefile feature for the given ShapefileFeatureTable with the attributes passed in.
ShapefileFeature(Map<String, Object> attributes, Geometry geometry, ShapefileFeatureTable table)
Creates a shapefile feature for the given ShapefileFeatureTable with the attributes and geometry passed in.
Public Methods
Object getAttributeValue(String fieldName)
Gets the feature's attribute value for the specified field name.
Map<String, Object> getAttributes()
Returns the attributes of the feature as a map of key-value pairs.
Geometry getGeometry()
Gets the geometry of the feature.
long getId()
Gets the unique ID of the feature.
SpatialReference getSpatialReference()
Gets the spatial reference of the feature.
Symbol getSymbol()
Gets the symbol of the feature.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.esri.core.map.Feature

Public Constructors

public ShapefileFeature (Map<String, Object> attributes, ShapefileFeatureTable table)

Creates a shapefile feature for the given ShapefileFeatureTable with the attributes passed in.

Parameters
attributes Map: the feature's attributes
table ShapefileFeatureTable: the table the feature belongs to
Throws
TableException any exception on creating the feature, for example if any of the feature's attribute fields are not fields in the table

public ShapefileFeature (Map<String, Object> attributes, Geometry geometry, ShapefileFeatureTable table)

Creates a shapefile feature for the given ShapefileFeatureTable with the attributes and geometry passed in.

Parameters
attributes Map: the feature's attributes
geometry Geometry: the feature's geometry
table ShapefileFeatureTable: the table the feature belongs to
Throws
TableException any exception on creating the feature, for example if any of the feature's attribute fields are not fields in the table

Public Methods

public Object getAttributeValue (String fieldName)

Gets the feature's attribute value for the specified field name.

Parameters
fieldName String: the field name
Returns
Object the attribute value

public Map<String, Object> getAttributes ()

Returns the attributes of the feature as a map of key-value pairs.

Returns
Map<String, Object> the attributes

public Geometry getGeometry ()

Gets the geometry of the feature.

Returns
Geometry the feature's geometry

public long getId ()

Gets the unique ID of the feature.

Returns
long the feature's ID

public SpatialReference getSpatialReference ()

Gets the spatial reference of the feature.

Returns
SpatialReference the spatial reference

public Symbol getSymbol ()

Gets the symbol of the feature.

Returns
Symbol the feature's symbol

public String toString ()

Returns
String