public interface FeatureType extends DynClass, DynStruct_v2, UnmodifiableBasicList<FeatureAttributeDescriptor>, SupportToJson
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 | Interface and Description |
|---|---|
static interface |
FeatureType.FeatureTypeChanged |
| Modifier and Type | Field and Description |
|---|---|
static java.util.function.Predicate<FeatureAttributeDescriptor> |
ALL_FILTER |
static java.util.function.Predicate<FeatureAttributeDescriptor> |
BASIC_TYPES_FILTER |
EMPTY_UNMODIFIABLEBASICLISTEMPTY_GETITEMWITHSIZEANDITERATOR| Modifier and Type | Method and Description |
|---|---|
boolean |
allowAutomaticValues()
Incicates if attibutes with automatic values are allowed in the source
|
void |
copyFrom(FeatureType other) |
FeatureAttributeDescriptor |
get(int index)
Returns an attribute descriptor given its index
|
java.lang.Object |
get(java.lang.String name)
Returns an attribute descriptor given its name.
|
java.lang.Iterable<FeatureAttributeDescriptor> |
getAllAttributeDescriptors() |
FeatureStore |
getAsFeatureStore() |
FeatureAttributeDescriptor |
getAttributeDescriptor(int index)
Returns a
FeatureAttributeDescriptor given the attribute index. |
FeatureAttributeDescriptor |
getAttributeDescriptor(java.lang.String name)
Returns a
FeatureAttributeDescriptor given the attribute name, or
null if an attribute with the given name does not exist. |
FeatureAttributeDescriptor |
getAttributeDescriptorFromAll(java.lang.String name) |
FeatureAttributeDescriptor[] |
getAttributeDescriptors()
Returns an Array of the FeatureAttributeDescriptor
|
java.lang.String |
getAttributeName(int index)
Returns the name of the given the attribute index.
|
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.
|
java.lang.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.
|
int |
getDefaultTimeAttributeIndex()
Returns the index of the attribute that will be used as default geometry
attribute.
|
java.lang.String |
getDefaultTimeAttributeName()
Returns the name of the attribute that will be used as default geometry
attribute for those processes that require a geometry (for instance
rendering).
|
EditableFeatureType |
getEditable()
Returns an editable instance of this FeatureType.
|
FeatureExtraColumns |
getExtraColumns() |
java.util.List<FeatureAttributeDescriptor> |
getFilteredAttributes(java.util.function.Predicate<FeatureAttributeDescriptor> filter,
int max) |
java.lang.String |
getId()
Returns this FeatureType identifier.
|
int |
getIndex(java.lang.String name)
Given the name of an attribute, this method returns its position in this
FeatureType.
|
java.lang.String |
getNewFieldName() |
FeatureType |
getOriginalFeatureType()
Return the original feature type of this type.
|
FeatureAttributeDescriptor[] |
getPrimaryKey()
Returns an Array of the FeatureAttributeDescriptor that compounds the
primary key.
|
java.util.List<FeatureAttributeDescriptor> |
getRecentUseds() |
FeatureRules |
getRules()
Returns a
FeatureRules containing all rules applicable to
features of this type. |
java.util.List |
getSRSs()
Returns a list with the SRSs in which this FeatureType geometries are
expressed.
|
FeatureStore |
getStore()
Return the store associated to this type.
|
boolean |
hasEvaluators()
Indicates whether this FeatureType has any assigned
Evaluator(s). |
boolean |
hasOID()
Indicates whether
Feature(s) of this FeatureType have an OID
defined. |
boolean |
hasOnlyMetadataChanges(FeatureType other) |
boolean |
hasPrimaryKey() |
boolean |
isCheckFeaturesAtFinishEditing() |
boolean |
isCheckFeaturesAtInsert() |
boolean |
isEmpty() |
java.util.Iterator |
iterator()
Returns an iterator over this FeatureType's attributes.
|
int |
size()
Returns this FeatureType size.
|
boolean |
supportReferences() |
void |
writeAsDALFile(java.io.File file) |
void |
writeAsDALFile(java.io.File file,
java.lang.String format) |
addDynMethod, getDeclaredDynMethod, getDeclaredDynMethods, getDynMethod, getDynMethod, getDynMethods, getSuperDynClasses, removeDynMethodaddDynField, getLabel, getTags, setLabeladdDynField, 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, validatetoListisEmpty, isEmpty, isEmptyQuietlytoJson, toJson, toJsonBuilder, toJsonBuilderstatic final java.util.function.Predicate<FeatureAttributeDescriptor> BASIC_TYPES_FILTER
static final java.util.function.Predicate<FeatureAttributeDescriptor> ALL_FILTER
FeatureType getCopy()
void copyFrom(FeatureType other)
FeatureRules getRules()
FeatureRules containing all rules applicable to
features of this type.FeatureRules containing all rules applicable to
features of this type.EditableFeatureType getEditable()
EditableFeatureTypeint getIndex(java.lang.String name)
name - of the attributejava.lang.Object get(java.lang.String name)
name - of the attributeFeatureAttributeDescriptor.FeatureAttributeDescriptor get(int index)
get in interface GetItem<FeatureAttributeDescriptor>index - of the attributeFeatureAttributeDescriptorFeatureAttributeDescriptor getAttributeDescriptor(java.lang.String name)
FeatureAttributeDescriptor given the attribute name, or
null if an attribute with the given name does not exist.name - of the attributeFeatureAttributeDescriptorFeatureAttributeDescriptor getAttributeDescriptorFromAll(java.lang.String name)
FeatureAttributeDescriptor getAttributeDescriptor(int index)
FeatureAttributeDescriptor given the attribute index.index - of the attributeFeatureAttributeDescriptorjava.lang.String getAttributeName(int index)
index - of the attributejava.util.Iterator iterator()
FeatureAttributeDescriptor.iterator in interface java.lang.Iterable<FeatureAttributeDescriptor>FeatureAttributeDescriptors.int size()
java.lang.String getId()
java.lang.String getDefaultGeometryAttributeName()
int getDefaultGeometryAttributeIndex()
java.util.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()
boolean hasPrimaryKey()
boolean supportReferences()
FeatureAttributeDescriptor getDefaultGeometryAttribute()
FeatureAttributeDescriptor getDefaultTimeAttribute()
java.lang.String getDefaultTimeAttributeName()
int getDefaultTimeAttributeIndex()
FeatureStore getStore()
java.util.List<FeatureAttributeDescriptor> getFilteredAttributes(java.util.function.Predicate<FeatureAttributeDescriptor> filter, int max)
java.util.List<FeatureAttributeDescriptor> getRecentUseds()
FeatureStore getAsFeatureStore()
java.lang.String getNewFieldName()
FeatureType getOriginalFeatureType()
boolean hasOnlyMetadataChanges(FeatureType other)
void writeAsDALFile(java.io.File file)
void writeAsDALFile(java.io.File file,
java.lang.String format)
FeatureExtraColumns getExtraColumns()
java.lang.Iterable<FeatureAttributeDescriptor> getAllAttributeDescriptors()
boolean isCheckFeaturesAtFinishEditing()
boolean isCheckFeaturesAtInsert()