public final class

GeopackageFeature

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

Class Overview

Represents a feature in a geopackage feature table (GeopackageFeatureTable). 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. The feature may or may not have a geometry.

See also:

Summary

Fields
protected final Map<String, Object> mAttributes The attributes.
Public Constructors
GeopackageFeature(Map<String, Object> attributes, GeopackageFeatureTable table)
Creates a geopackage feature for the given GeopackageFeatureTable with the attributes passed in.
GeopackageFeature(Map<String, Object> attributes, Geometry geometry, GeopackageFeatureTable table)
Creates a geopackage feature for the given GeopackageFeatureTable with the attributes and geometry passed in.
Public Methods
Object getAttributeValue(String fieldName)
Gets the feature's attribute value for the specified field name.
Object getAttributeValue(Field field)
Gets the feature's attribute value for the specified Field.
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()
Always returns null.
Symbol getSymbol()
Always returns null.
FeatureTable getTable()
Returns the feature table associated with this feature; this table defines the schema the feature needs to conform to.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.esri.core.map.Feature

Fields

protected final Map<String, Object> mAttributes

The attributes.

Public Constructors

public GeopackageFeature (Map<String, Object> attributes, GeopackageFeatureTable table)

Creates a geopackage feature for the given GeopackageFeatureTable with the attributes passed in.

Parameters
attributes Map: the feature's attributes
table GeopackageFeatureTable: 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 GeopackageFeature (Map<String, Object> attributes, Geometry geometry, GeopackageFeatureTable table)

Creates a geopackage feature for the given GeopackageFeatureTable with the attributes and geometry passed in.

Parameters
attributes Map: the feature's attributes
geometry Geometry: the feature's geometry
table GeopackageFeatureTable: the table the feature belongs to
Throws
TableException any exception on creating the feature, for example if the feature's geometry type does not match that of 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 Object getAttributeValue (Field field)

Gets the feature's attribute value for the specified Field.

Parameters
field Field: the field
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 ()

Always returns null.

Returns
SpatialReference null

public Symbol getSymbol ()

Always returns null.

Returns
Symbol null

public FeatureTable getTable ()

Returns the feature table associated with this feature; this table defines the schema the feature needs to conform to.

Returns
FeatureTable the feature table

public String toString ()

Returns
String