public interface FeatureType extends DynClass, Iterable<FeatureAttributeDescriptor>
This interface provides all the information that describes the structure of a type of feature, methods for managing it and also offers a variety of utility methods for simplicity's sake.
The relevant information that compounds a FeatureType includes:
FeatureAttributeDescriptor
(s)
FeatureRule
(s)
Methods for management include:
Utility methods include:
Modifier and Type | Method and Description |
---|---|
boolean |
allowAutomaticValues()
Incicates if attibutes with automatic values are allowed in the source
|
Object |
get(int index)
Returns an attribute descriptor given its index
|
Object |
get(String name)
Returns an attribute descriptor given its name.
|
FeatureAttributeDescriptor |
getAttributeDescriptor(int index)
Returns a
FeatureAttributeDescriptor given the attribute index. |
FeatureAttributeDescriptor |
getAttributeDescriptor(String name)
Returns a
FeatureAttributeDescriptor given the attribute name,
or null if an attribute with the given name does not exist. |
FeatureAttributeDescriptor[] |
getAttributeDescriptors()
Returns an Array of the FeatureAttributeDescriptor
|
FeatureType |
getCopy()
Returns a new copy of this FeatureType
|
FeatureAttributeDescriptor |
getDefaultGeometryAttribute()
Returns the default geometry FeatureAttributeDescriptor.
|
int |
getDefaultGeometryAttributeIndex()
Returns the index of the attribute that will be used as default
geometry attribute.
|
String |
getDefaultGeometryAttributeName()
Returns the name of the attribute that will be used as default
geometry attribute for those processes that require a geometry (for
instance rendering).
|
IProjection |
getDefaultSRS()
Returns the SRS in which the default geometry attribute is expressed.
|
FeatureAttributeDescriptor |
getDefaultTimeAttribute()
Returns the default time FeatureAttributeDescriptor.
|
EditableFeatureType |
getEditable()
Returns an editable instance of this FeatureType.
|
String |
getId()
Returns this FeatureType identifier.
|
int |
getIndex(String name)
Given the name of an attribute, this method returns
its position in this FeatureType.
|
FeatureAttributeDescriptor[] |
getPrimaryKey()
Returns an Array of the FeatureAttributeDescriptor that compounds the
primary key.
|
FeatureRules |
getRules()
Returns a
FeatureRules containing
all rules applicable to features of this type. |
List |
getSRSs()
Returns a list with the SRSs in which this FeatureType geometries are
expressed.
|
boolean |
hasEvaluators()
Indicates whether this FeatureType has any assigned
Evaluator (s). |
boolean |
hasOID()
Indicates whether
Feature (s) of this FeatureType have an OID defined. |
Iterator |
iterator()
Returns an iterator over this FeatureType's attributes.
|
int |
size()
Returns this FeatureType size.
|
addDynMethod, getDeclaredDynMethod, getDeclaredDynMethods, getDynMethod, getDynMethod, getDynMethods, getSuperDynClasses, removeDynMethod
addDynField, addDynFieldArray, addDynFieldBoolean, addDynFieldChoice, addDynFieldChoice, addDynFieldDate, addDynFieldDouble, addDynFieldFile, addDynFieldFloat, addDynFieldFolder, addDynFieldInt, addDynFieldList, addDynFieldLong, addDynFieldMap, addDynFieldObject, addDynFieldRange, addDynFieldRange, addDynFieldSet, addDynFieldSingle, addDynFieldSingle, addDynFieldString, addDynFieldURI, addDynFieldURL, extend, extend, extend, getDeclaredDynField, getDeclaredDynFields, getDescription, getDynField, getDynFields, getFullName, getName, getNamespace, getSuperDynStructs, isExtendable, isInstance, newInstance, remove, removeDynField, setDescription, setNamespace, validate
forEach, spliterator
FeatureType getCopy()
FeatureRules getRules()
FeatureRules
containing
all rules applicable to features of this type.FeatureRules
containing all rules
applicable to features of this type.EditableFeatureType getEditable()
EditableFeatureType
int getIndex(String name)
name
- of the attributeObject get(String name)
name
- of the attributeFeatureAttributeDescriptor
.Object get(int index)
index
- of the attributeFeatureAttributeDescriptor
FeatureAttributeDescriptor getAttributeDescriptor(String name)
FeatureAttributeDescriptor
given the attribute name,
or null if an attribute with the given name does not exist.name
- of the attributeFeatureAttributeDescriptor
FeatureAttributeDescriptor getAttributeDescriptor(int index)
FeatureAttributeDescriptor
given the attribute index.index
- of the attributeFeatureAttributeDescriptor
Iterator iterator()
FeatureAttributeDescriptor
.iterator
in interface Iterable<FeatureAttributeDescriptor>
FeatureAttributeDescriptor
s.int size()
String getId()
String getDefaultGeometryAttributeName()
int getDefaultGeometryAttributeIndex()
List getSRSs()
Geometry
.IProjection getDefaultSRS()
boolean hasEvaluators()
Evaluator
(s).
Evaluators are used to obtain the values for calculated
attributes.Evaluator
(s).boolean hasOID()
Feature
(s) of this FeatureType have an OID defined.
An OID is the Feature unique identifier.
Some stores provide their own OIDs which are always unique
(such as Postgre) while others don't support this concept and
then it is the library who creates runtime ad-hoc OIDs as
it see fits, but then integrity of this OIDs among different
work sessions cannot be guaranteed (this is the case for shape
files).boolean allowAutomaticValues()
FeatureAttributeDescriptor[] getAttributeDescriptors()
FeatureAttributeDescriptor[] getPrimaryKey()
FeatureAttributeDescriptor getDefaultGeometryAttribute()
FeatureAttributeDescriptor getDefaultTimeAttribute()