The type of a SimpleFeature.
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 Indexing
The attributes which compose a simple feature type are ordered. For this reason attributes are available via a simple index. Given the following type definition:
<complexType name="mySimpleType"/> <sequence> <element name="foo" type="xs:string"/> <element name="bar" type="xs:integer"/> </sequence> </complexType>
The attribute descriptor are addressable via index:
SimpleFeatureType type = ...; AttributeDescriptor foo = type.getAttribute( 0 ); AttributeDescriptor bar-= type.getAttribute( 1 );
Attribute Multiplicity
With simple feature types, the multiplicity of attributes is always assumed to be 1, ie,
getMinOccurs() == 1
and
getMaxOccurs() == 1
. A consequence of this is that attributes from a simple feature always line up 1 to 1 with the descriptors from the type:
SimpleFeature feature = ...; SimpleFeatureType type = feature.getType(); type.getAttribute( 0 ).getDescriptor() == type.getAttribute( 0 ); type.getAttribute( 1 ).getDescriptor() == type.getAttribute( 1 );
Attribute Naming
The names of attributes in a simple feature type are never namespace qualified. For this reason there is no difference between accessing an attribute with {@link #getDescriptor(String)} and {@link #getDescriptor(Name)}.
@author Jody Garnett, Refractions Research
@author Justin Deoliveira, The Open Planning Project
@source $URL$