An instance of {@link SimpleFeatureType} composed of fixed list values in a known order.
The definition of a "simple feature" can be summed up as the following:
- made up of only non-complex attributes, no associations
- attributes are of multiplicity 1
- attributes are ordered
- attribute names are unqualified (namespaceURI == null)
Attribute Access
The order and multiplicity restrictions on simple feature make attribute values accessible via an index. For example consider the following shapefile entry:
| GEOMETRY | INT | STRING | | POINT(0 0) | 0 | "zero" |
Accessing attributes via index would look like:
SimpleFeature feature = ...; Geometry g = (Geometry) feature.getAttribute( 0 ); Integer i = (Integer) feature.getAttribute( 1 ); String s = (String) feature.getAttribute( 2 );
One could also access by name:
SimpleFeature feature = ...; Geometry g = (Geometry) feature.getAttribute( "GEOMETRY" ); Integer i = (Integer) feature.getAttribute( "INT" ); String s = (String) feature.getAttribute( "STRING" );
Note: Attribute access via getAttribute() methods returns attribute values, and not the attributes themselves. For access to the actual attributes {@link ComplexAttribute#getProperty(String)} can be used.
@see SimpleFeatureType
@author Jody Garnett (LISAsoft)
@author Justin Deoliveira (The Open Planning Project)
@since 2.5
@version 8.0
@source $URL$