public class DefaultFeatureAttributeDescriptor extends Object implements FeatureAttributeDescriptor, Persistent, DynField_v2, DynField_LabelAttribute
DynField_v2.AvailableValuesProvider
Modifier and Type | Field and Description |
---|---|
protected Map |
additionalInfo |
protected boolean |
allowIndexDuplicateds |
protected boolean |
allowNull |
protected DynObjectValueItem[] |
availableValues |
protected DataType |
dataType |
protected DateFormat |
dateFormat |
protected Object |
defaultValue |
protected String |
description |
protected Evaluator |
evaluator |
protected FeatureAttributeEmulator |
featureAttributeEmulator |
protected FeatureAttributeGetter |
featureAttributeGetter |
protected int |
geometrySubType |
protected int |
geometryType |
protected GeometryType |
geomType |
protected String |
groupName |
protected boolean |
hidden |
protected int |
index |
protected boolean |
indexed |
protected boolean |
isAutomatic |
protected boolean |
isIndexAscending |
protected boolean |
isTime |
protected String |
label |
protected int |
maximumOccurrences |
protected Object |
maxValue |
protected int |
minimumOccurrences |
protected Object |
minValue |
protected String |
name |
protected Class |
objectClass |
protected int |
order |
protected int |
precision |
protected boolean |
primaryKey |
protected boolean |
readOnly |
protected int |
size |
protected IProjection |
SRS |
protected Tags |
tags |
ANY, CHOICE, RANGE, RELATION_TYPE_AGGREGATE, RELATION_TYPE_COLLABORATION, RELATION_TYPE_COMPOSITION, RELATION_TYPE_IDENTITY, RELATION_TYPE_NONE
Modifier | Constructor and Description |
---|---|
protected |
DefaultFeatureAttributeDescriptor() |
protected |
DefaultFeatureAttributeDescriptor(DefaultFeatureAttributeDescriptor other) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowIndexDuplicateds() |
boolean |
allowNull()
Indicates whether this attribute accepts null values.
|
Object |
clone()
Creates a copy of the object.
|
Object |
coerce(Object value)
Force the type of value to the type of the field.
|
void |
copyFrom(DynField other1) |
boolean |
equals(Object obj) |
Object |
getAdditionalInfo(String infoName)
Returns additional information of the attribute
|
DynObjectValueItem[] |
getAvailableValues()
Return the available values for this field.
|
DynObjectValueItem[] |
getAvailableValues(DynObject self) |
DynMethod |
getAvailableValuesMethod() |
Object |
getCalculatedValue(DynObject self) |
DynMethod |
getCalculateMethod() |
String |
getClassNameOfItems()
When is a Container of objects field returns the name of class of the
elements, otherwise returns null
|
String |
getClassNameOfValue()
When is a Object field returns the name of object's class, otherwise
returns null
|
Class |
getClassOfItems()
If the field is a container (List, Map or Set) return the java class of
its items.
|
Class |
getClassOfValue()
Return the java class of the value of the field.
|
FeatureAttributeDescriptor |
getCopy()
Returns a clone of this attribute descriptor
|
DataType |
getDataType() |
String |
getDataTypeName()
Returns the name of this attribute's data type.
|
DateFormat |
getDateFormat()
If this attribute is of type Date, then this method returns
the date format set by the data store.
|
Object |
getDefaultValue()
Return the default value used in creation of new objects with this field.
|
String |
getDescription()
Return the descripcion associated to this field.
|
DynStruct |
getDynClassOfItems()
When is a Container of DynObjects field returns the DynStruct of the
elements, otherwise returns null
|
DynStruct |
getDynClassOfValue()
When is a DynObject field returns the DynStruct of the DynObject,
otherwise returns null
|
DynField |
getElementsType()
When a field is of type container, this method return a DynClass that
define the type of elements.
|
Evaluator |
getEvaluator()
Returns an evaluator that will be used to calculate
the value of this attribute
|
FeatureAttributeEmulator |
getFeatureAttributeEmulator()
Gets the attribute emulator associatted
FeatureAttributeEmulator to this attribute. |
FeatureAttributeGetter |
getFeatureAttributeGetter()
Gets if the attribute has a
FeatureAttributeGetter . |
int |
getGeometrySubType()
If this attribute is a
Geometry , this method returns the specific
geometry subtype,
as defined in Geometry.SUBTYPES . |
int |
getGeometryType()
If this attribute is a
Geometry , this method returns the specific
geometry type,
as defined in Geometry.TYPES . |
GeometryType |
getGeomType()
Returns the
GeometryType of the attribute if it is a geometry. |
String |
getGroup()
Return a string that identify a group for this field.
|
int |
getIndex()
Returns this attribute relative position within the
Feature . |
String |
getLabel() |
int |
getMaximumOccurrences()
Returns the maximum number of occurrences of this attribute on a given
feature.
|
Object |
getMaxValue() |
int |
getMinimumOccurrences()
Returns the minimum number of occurrences of this attribute on a given
feature.
|
Object |
getMinValue() |
String |
getName()
Return the name of the field.
|
Class |
getObjectClass()
For attributes of type
DataTypes.OBJECT ,
this returns the Java Class object that class or interface that
all values of this attribute can be cast to. |
int |
getOder()
Return the ordinal that identify the order of this field in the
DynObject . |
int |
getPrecision()
For attributes of type
DataTypes.DOUBLE and DataTypes.FLOAT
, this returns the maximum number of places after the decimal point. |
int |
getRelationType() |
int |
getSize()
Returns a number that indicates the size of this attribute.
|
IProjection |
getSRS()
If this attribute is a
Geometry , this method returns its
Spatial Reference System. |
String |
getSubtype()
Return the subtype associated to this field.
|
Tags |
getTags() |
int |
getTheTypeOfAvailableValues() |
int |
getType()
Return the type used in this field.
|
int |
getTypeOfItems()
When is a Container field returns the type of the elements, otherwise
returns INVALID
|
boolean |
getValidateElements() |
boolean |
isAutomatic()
Returns if value is created automatically by the source
|
boolean |
isAvailableValuesCalculated() |
boolean |
isCalculated() |
boolean |
isContainer()
Return true if the value of this field is a container.
|
boolean |
isHidden()
Inform if this field can be visible or not for the user.
|
boolean |
isIndexAscending() |
boolean |
isIndexed()
Return true if the attribute has and index in the table.
|
boolean |
isMandatory()
Return true if this field is mandatory.
|
boolean |
isPersistent()
Returns if the field is persistent or volatile.
|
boolean |
isPrimaryKey()
Returns
true if this attribute forms all or part of the unique identifying
value for the feature it is contained by. |
boolean |
isReadOnly()
Returns if the field is readOnly or not.
|
boolean |
isTime()
Gets if the attribute is a temporal attribute.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
DynField |
setAvailableValues(DynMethod availableValuesMethod) |
DynField |
setAvailableValues(DynObjectValueItem[] values) |
DynField |
setAvailableValues(List values) |
DynField |
setCalculateMethod(DynMethod method) |
DynField |
setClassOfItems(Class theClass)
If field type is List, Set or Map, this class is the class of items.
|
DynField |
setClassOfItems(DynStruct dynStrct) |
DynField |
setClassOfItems(String theClassNameOfValue) |
DynField |
setClassOfValue(Class theClass)
Sets the class used for the values of the field.
|
DynField |
setClassOfValue(DynStruct dynStrct) |
DynField |
setClassOfValue(String theClassNameOfValue) |
void |
setConstantValue(boolean isConstantValue) |
DynField |
setDefaultDynValue(Object defaultValue) |
DynField |
setDefaultFieldValue(Object defaultValue)
Set the default value used for this field when a new object with this
field is created.
|
DynField |
setDescription(String description)
Sets the description asociated to this field.
|
DynField |
setElementsType(DynStruct type)
Set the type of items when the field is a container.
|
DynField |
setElementsType(int type)
Set the type of items when the field is a container.
|
void |
setFeatureAttributeGetter(FeatureAttributeGetter featureAttributeTransform)
Sets the
FeatureAttributeGetter that is used to update the
presentation of a field. |
DynField |
setGroup(String groupName) |
DynField |
setHidden(boolean hidden) |
protected FeatureAttributeDescriptor |
setIndex(int index) |
DynField |
setLabel(String label) |
DynField |
setMandatory(boolean mandatory) |
DynField |
setMaxValue(Object maxValue) |
DynField |
setMinValue(Object minValue) |
DynField |
setOrder(int order) |
DynField |
setPersistent(boolean persistent)
Sets if the field must be persisted or not.
|
DynField |
setReadOnly(boolean arg0)
Sets if the field is readOnly or not.
|
DynField |
setRelationType(int relationType) |
DynField |
setSubtype(String subtype)
Strings used as subtype for this field.
|
DynField |
setTheTypeOfAvailableValues(int type) |
DynField |
setType(DataType type) |
DynField |
setType(int type)
Sets the type of the field.
|
DynField |
setTypeOfItems(int type) |
DynField |
setValidateElements(boolean validate) |
void |
validate(Object value)
Validate that the value match the properties of the field.
|
protected boolean allowNull
protected DataType dataType
protected DateFormat dateFormat
protected Object defaultValue
protected int index
protected int maximumOccurrences
protected int minimumOccurrences
protected int size
protected String name
protected Class objectClass
protected int precision
protected Evaluator evaluator
protected boolean primaryKey
protected boolean readOnly
protected IProjection SRS
protected GeometryType geomType
protected int geometryType
protected int geometrySubType
protected Map additionalInfo
protected boolean isAutomatic
protected boolean isTime
protected FeatureAttributeGetter featureAttributeGetter
protected FeatureAttributeEmulator featureAttributeEmulator
protected boolean indexed
protected boolean isIndexAscending
protected boolean allowIndexDuplicateds
protected DynObjectValueItem[] availableValues
protected String description
protected Object minValue
protected Object maxValue
protected String label
protected int order
protected boolean hidden
protected String groupName
protected Tags tags
protected DefaultFeatureAttributeDescriptor()
protected DefaultFeatureAttributeDescriptor(DefaultFeatureAttributeDescriptor other)
public void copyFrom(DynField other1)
copyFrom
in interface DynField_v2
public String getDataTypeName()
FeatureAttributeDescriptor
getDataTypeName
in interface FeatureAttributeDescriptor
public FeatureAttributeDescriptor getCopy()
FeatureAttributeDescriptor
getCopy
in interface FeatureAttributeDescriptor
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class Object
CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.
public boolean allowNull()
FeatureAttributeDescriptor
allowNull
in interface FeatureAttributeDescriptor
public DataType getDataType()
getDataType
in interface DynField
public DateFormat getDateFormat()
FeatureAttributeDescriptor
getDateFormat
in interface FeatureAttributeDescriptor
public Object getDefaultValue()
DynField
getDefaultValue
in interface DynField
public Evaluator getEvaluator()
FeatureAttributeDescriptor
getEvaluator
in interface FeatureAttributeDescriptor
public int getGeometryType()
FeatureAttributeDescriptor
Geometry
, this method returns the specific
geometry type,
as defined in Geometry.TYPES
.getGeometryType
in interface FeatureAttributeDescriptor
Geometry.TYPES
public int getGeometrySubType()
FeatureAttributeDescriptor
Geometry
, this method returns the specific
geometry subtype,
as defined in Geometry.SUBTYPES
.getGeometrySubType
in interface FeatureAttributeDescriptor
Geometry.SUBTYPES
public GeometryType getGeomType()
FeatureAttributeDescriptor
GeometryType
of the attribute if it is a geometry.getGeomType
in interface FeatureAttributeDescriptor
public int getIndex()
FeatureAttributeDescriptor
Feature
.getIndex
in interface FeatureAttributeDescriptor
protected FeatureAttributeDescriptor setIndex(int index)
public int getMaximumOccurrences()
FeatureAttributeDescriptor
Integer.MAX_VALUE
indicates that the maximum number of occurrences is unbounded.getMaximumOccurrences
in interface FeatureAttributeDescriptor
public int getMinimumOccurrences()
FeatureAttributeDescriptor
getMinimumOccurrences
in interface FeatureAttributeDescriptor
public String getName()
DynField
public Class getObjectClass()
FeatureAttributeDescriptor
DataTypes.OBJECT
,
this returns the Java Class
object that class or interface that
all values of this attribute can be cast to.getObjectClass
in interface FeatureAttributeDescriptor
public int getPrecision()
FeatureAttributeDescriptor
DataTypes.DOUBLE
and DataTypes.FLOAT
, this returns the maximum number of places after the decimal point. For
other types, this must always return zero.getPrecision
in interface FeatureAttributeDescriptor
public IProjection getSRS()
FeatureAttributeDescriptor
Geometry
, this method returns its
Spatial Reference System.getSRS
in interface FeatureAttributeDescriptor
Geometry
, otherwise this method returns null.public int getSize()
FeatureAttributeDescriptor
DataTypes
for how to interpret this value. As an example, when the data type is
DataTypes.STRING
, this value indicates the maximum length of the string.getSize
in interface FeatureAttributeDescriptor
int
indicating the size of the attribute.public boolean isPrimaryKey()
FeatureAttributeDescriptor
true
if this attribute forms all or part of the unique identifying
value for the feature it is contained by. The primary key attributes uniquely
identify this feature from other features of the same type. This is different
from the Feature.getReference(), which must uniquely identify
the Feature
among all feature types.isPrimaryKey
in interface FeatureAttributeDescriptor
public boolean isReadOnly()
DynField
isReadOnly
in interface DynField
public Object getAdditionalInfo(String infoName)
FeatureAttributeDescriptor
getAdditionalInfo
in interface FeatureAttributeDescriptor
public boolean isAutomatic()
FeatureAttributeDescriptor
isAutomatic
in interface FeatureAttributeDescriptor
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public Tags getTags()
getTags
in interface DynField_v2
public DynObjectValueItem[] getAvailableValues()
DynField
getAvailableValues
in interface DynField
public String getDescription()
DynField
getDescription
in interface DynField
public Object getMaxValue()
getMaxValue
in interface DynField
public Object getMinValue()
getMinValue
in interface DynField
public int getTheTypeOfAvailableValues()
getTheTypeOfAvailableValues
in interface DynField
public int getType()
DynField
DataTypes
public boolean isMandatory()
DynField
isMandatory
in interface DynField
public boolean isPersistent()
DynField
isPersistent
in interface DynField
public DynField setAvailableValues(DynObjectValueItem[] values)
setAvailableValues
in interface DynField
public DynField setDescription(String description)
DynField
setDescription
in interface DynField
DynField
objectpublic DynField setMandatory(boolean mandatory)
setMandatory
in interface DynField
public DynField setMaxValue(Object maxValue)
setMaxValue
in interface DynField
public DynField setMinValue(Object minValue)
setMinValue
in interface DynField
public DynField setPersistent(boolean persistent)
DynField
setPersistent
in interface DynField
persistent
- if the field must be persisted or notDynField
objectDynField.isPersistent()
public DynField setTheTypeOfAvailableValues(int type)
setTheTypeOfAvailableValues
in interface DynField
public DynField setType(int type)
DynField
DataTypes
.
This method assign the default values of the type for "ClassOfValue" and
"subType".public DynField setDefaultDynValue(Object defaultValue)
setDefaultDynValue
in interface DynField
public Class getClassOfValue()
DynField
getClassOfValue
in interface DynField
public DynField getElementsType()
DynField
getElementsType
in interface DynField
public DynField setClassOfValue(Class theClass) throws DynFieldIsNotAContainerException
DynField
setClassOfValue
in interface DynField
DynField
objectDynFieldIsNotAContainerException
public DynField setElementsType(DynStruct type) throws DynFieldIsNotAContainerException
DynField
setElementsType
in interface DynField
type
- de los elementosDynField
objectDynFieldIsNotAContainerException
public DynField setElementsType(int type) throws DynFieldIsNotAContainerException
DynField
setElementsType
in interface DynField
type
- de los elementosDynField
objectDynFieldIsNotAContainerException
public DynField setSubtype(String subtype)
DynField
DataTypes.DYNOBJECT
, the subtype is the
fullname of the DynStruct.setSubtype
in interface DynField
DynField
objectpublic void validate(Object value) throws DynFieldValidateException
DynField
validate
in interface DynField
DynFieldValidateException
public String getSubtype()
DynField
DataTypes.DYNOBJECT
, the subtype are
the fullname of the DynClass.getSubtype
in interface DynField
public Object coerce(Object value) throws CoercionException
DynField
coerce
in interface DynField
CoercionException
public DynField setAvailableValues(List values)
setAvailableValues
in interface DynField
public String getGroup()
DynField
public int getOder()
DynField
DynObject
.public String getLabel()
getLabel
in interface DynField_LabelAttribute
public DynField setLabel(String label)
setLabel
in interface DynField_LabelAttribute
public boolean isHidden()
DynField
public DynField setReadOnly(boolean arg0)
DynField
setReadOnly
in interface DynField
arg0
- if the graphic component associated to this field
should be readOnly or notpublic boolean isContainer()
DynField
DataType
isContainer
in interface DynField
public Class getClassOfItems()
DynField
getClassOfItems
in interface DynField
getClassOfItems
in interface DynField_v2
public DynField setDefaultFieldValue(Object defaultValue)
DynField
setDefaultFieldValue
in interface DynField
DynField
objectpublic DynField setClassOfItems(Class theClass)
DynField
setClassOfItems
in interface DynField
setClassOfItems
in interface DynField_v2
DynField
objectpublic boolean isTime()
FeatureAttributeDescriptor
isTime
in interface FeatureAttributeDescriptor
true
if is a temporal attributepublic FeatureAttributeGetter getFeatureAttributeGetter()
FeatureAttributeDescriptor
FeatureAttributeGetter
.getFeatureAttributeGetter
in interface FeatureAttributeDescriptor
public void setFeatureAttributeGetter(FeatureAttributeGetter featureAttributeTransform)
FeatureAttributeDescriptor
FeatureAttributeGetter
that is used to update the
presentation of a field.setFeatureAttributeGetter
in interface FeatureAttributeDescriptor
featureAttributeTransform
- the FeatureAttributeGetter
to set.public FeatureAttributeEmulator getFeatureAttributeEmulator()
FeatureAttributeDescriptor
FeatureAttributeEmulator
to this attribute.getFeatureAttributeEmulator
in interface FeatureAttributeDescriptor
public boolean isIndexed()
FeatureAttributeDescriptor
isIndexed
in interface FeatureAttributeDescriptor
public boolean allowIndexDuplicateds()
allowIndexDuplicateds
in interface FeatureAttributeDescriptor
public boolean isIndexAscending()
isIndexAscending
in interface FeatureAttributeDescriptor
public DynField setClassOfValue(DynStruct dynStrct)
setClassOfValue
in interface DynField_v2
public DynField setClassOfValue(String theClassNameOfValue)
setClassOfValue
in interface DynField_v2
public String getClassNameOfValue()
DynField_v2
getClassNameOfValue
in interface DynField_v2
public DynStruct getDynClassOfValue()
DynField_v2
getDynClassOfValue
in interface DynField_v2
public DynField setTypeOfItems(int type)
setTypeOfItems
in interface DynField_v2
public int getTypeOfItems()
DynField_v2
getTypeOfItems
in interface DynField_v2
public DynField setClassOfItems(DynStruct dynStrct)
setClassOfItems
in interface DynField_v2
public DynField setClassOfItems(String theClassNameOfValue)
setClassOfItems
in interface DynField_v2
public String getClassNameOfItems()
DynField_v2
getClassNameOfItems
in interface DynField_v2
public DynStruct getDynClassOfItems()
DynField_v2
getDynClassOfItems
in interface DynField_v2
public DynField setRelationType(int relationType)
setRelationType
in interface DynField_v2
public int getRelationType()
getRelationType
in interface DynField_v2
public DynField setAvailableValues(DynMethod availableValuesMethod)
setAvailableValues
in interface DynField_v2
public DynObjectValueItem[] getAvailableValues(DynObject self)
getAvailableValues
in interface DynField_v2
public DynMethod getAvailableValuesMethod()
getAvailableValuesMethod
in interface DynField_v2
public boolean isAvailableValuesCalculated()
isAvailableValuesCalculated
in interface DynField_v2
public DynMethod getCalculateMethod()
getCalculateMethod
in interface DynField_v2
public DynField setCalculateMethod(DynMethod method)
setCalculateMethod
in interface DynField_v2
public boolean isCalculated()
isCalculated
in interface DynField_v2
public Object getCalculatedValue(DynObject self)
getCalculatedValue
in interface DynField_v2
public DynField setValidateElements(boolean validate)
setValidateElements
in interface DynField_v2
public boolean getValidateElements()
getValidateElements
in interface DynField_v2
public void setConstantValue(boolean isConstantValue)