org.gvsig.fmap.dal.feature
Interface FeatureAttributeDescriptor

All Superinterfaces:
DynField
All Known Subinterfaces:
EditableFeatureAttributeDescriptor

public interface FeatureAttributeDescriptor
extends DynField

A feature attribute descriptor contains information about one of the attributes in a feature, such as its name, data type or precision.

Version:
$Id$
Author:
gvSIG team

Field Summary
 
Fields inherited from interface org.gvsig.tools.dynobject.DynField
ANY, CHOICE, RANGE
 
Method Summary
 boolean allowNull()
          Indicates whether this attribute accepts null values.
 Object getAdditionalInfo(String infoName)
          Returns additional information of the attribute
 FeatureAttributeDescriptor getCopy()
          Returns a clone of this attribute descriptor
 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.
 Evaluator getEvaluator()
          Returns an evaluator that will be used to calculate the value of this attribute
 FeatureAttributeGetter getFeatureAttributeGetter()
          Gets if the attribute has a FeatureAttributeGetter.
 int getGeometrySubType()
          Deprecated. use getGeomType() instead. To be removed in gvSIG 2.1.
 int getGeometryType()
          Deprecated. use getGeomType() instead. To be removed in gvSIG 2.1.
 org.gvsig.fmap.geom.type.GeometryType getGeomType()
          Returns the GeometryType of the attribute if it is a geometry.
 int getIndex()
          Returns this attribute relative position within the Feature.
 int getMaximumOccurrences()
          Returns the maximum number of occurrences of this attribute on a given feature.
 int getMinimumOccurrences()
          Returns the minimum number of occurrences of this attribute on a given feature.
 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 getPrecision()
          For attributes of type DataTypes.DOUBLE and DataTypes.FLOAT , this returns the maximum number of places after the decimal point.
 int getSize()
          Returns a number that indicates the size of this attribute.
 org.cresques.cts.IProjection getSRS()
          If this attribute is a Geometry, this method returns its Spatial Reference System.
 boolean isAutomatic()
          Returns if value is created automatically by the source
 boolean isPrimaryKey()
          Returns true if this attribute forms all or part of the unique identifying value for the feature it is contained by.
 boolean isTime()
          Gets if the attribute is a temporal attribute.
 void setFeatureAttributeGetter(FeatureAttributeGetter featureAttributeGetter)
          Sets the FeatureAttributeGetter that is used to update the presentation of a field.
 
Methods inherited from interface org.gvsig.tools.dynobject.DynField
coerce, getAvailableValues, getClassOfItems, getClassOfValue, getDataType, getDefaultValue, getDescription, getElementsType, getGroup, getMaxValue, getMinValue, getName, getOder, getSubtype, getTheTypeOfAvailableValues, getType, isContainer, isHidden, isMandatory, isPersistent, isReadOnly, setAvailableValues, setAvailableValues, setClassOfItems, setClassOfValue, setDefaultDynValue, setDefaultFieldValue, setDescription, setElementsType, setElementsType, setGroup, setHidden, setMandatory, setMaxValue, setMinValue, setOrder, setPersistent, setReadOnly, setSubtype, setTheTypeOfAvailableValues, setType, setType, validate
 

Method Detail

getCopy

FeatureAttributeDescriptor getCopy()
Returns a clone of this attribute descriptor

Returns:
FeatureAttributeDescriptor A new copy of this

getDataTypeName

String getDataTypeName()
Returns the name of this attribute's data type.

Returns:
a string containing the name of this attribute's data type.

getSize

int getSize()
Returns a number that indicates the size of this attribute. See the documentation for the various constants of 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.

Returns:
an int indicating the size of the attribute.

getPrecision

int getPrecision()
For attributes of type DataTypes.DOUBLE and DataTypes.FLOAT , this returns the maximum number of places after the decimal point. For other types, this must always return zero.


getObjectClass

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.


getMinimumOccurrences

int getMinimumOccurrences()
Returns the minimum number of occurrences of this attribute on a given feature. The vast majority of data sources and data consumers will only function with this value being zero or one. If the minimum number of occurrences is zero, this is equivalent, in SQL terms, to the attribute being nillable.


getMaximumOccurrences

int getMaximumOccurrences()
Returns the maximum number of occurrences of this attribute on a given feature. The vast majority of data sources and data consumers will only function with this value being one. A value of Integer.MAX_VALUE indicates that the maximum number of occurrences is unbounded.


isPrimaryKey

boolean isPrimaryKey()
Returns 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.


allowNull

boolean allowNull()
Indicates whether this attribute accepts null values.

Returns:
true if this attribute can be null, false if not.

getEvaluator

Evaluator getEvaluator()
Returns an evaluator that will be used to calculate the value of this attribute


getSRS

org.cresques.cts.IProjection getSRS()
If this attribute is a Geometry, this method returns its Spatial Reference System.

Returns:
the SRS if this attribute is a Geometry, otherwise this method returns null.

getGeometryType

int getGeometryType()
Deprecated. use getGeomType() instead. To be removed in gvSIG 2.1.

If this attribute is a Geometry, this method returns the specific geometry type, as defined in Geometry.TYPES.

Returns:
One of Geometry.TYPES

getGeometrySubType

int getGeometrySubType()
Deprecated. use getGeomType() instead. To be removed in gvSIG 2.1.

If this attribute is a Geometry, this method returns the specific geometry subtype, as defined in Geometry.SUBTYPES.

Returns:
One of Geometry.SUBTYPES

getGeomType

org.gvsig.fmap.geom.type.GeometryType getGeomType()
Returns the GeometryType of the attribute if it is a geometry.

Returns:
the geometry type

getDateFormat

DateFormat getDateFormat()
If this attribute is of type Date, then this method returns the date format set by the data store.

Returns:
a date format

getIndex

int getIndex()
Returns this attribute relative position within the Feature.

Returns:
an index

getAdditionalInfo

Object getAdditionalInfo(String infoName)
Returns additional information of the attribute

Returns:
info

isAutomatic

boolean isAutomatic()
Returns if value is created automatically by the source


isTime

boolean isTime()
Gets if the attribute is a temporal attribute.

Returns:
true if is a temporal attribute

getFeatureAttributeGetter

FeatureAttributeGetter getFeatureAttributeGetter()
Gets if the attribute has a FeatureAttributeGetter.

Returns:
a FeatureAttributeGetter or null.

setFeatureAttributeGetter

void setFeatureAttributeGetter(FeatureAttributeGetter featureAttributeGetter)
Sets the FeatureAttributeGetter that is used to update the presentation of a field.

Parameters:
featureAttributeGetter - the FeatureAttributeGetter to set.


Copyright © 2004-2012 gvSIG. All Rights Reserved.