Interface FeatureAttributeDescriptor

All Superinterfaces:
Cloneable, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.dynobject.DynField, org.gvsig.tools.dynobject.DynField_LabelAttribute, org.gvsig.tools.dynobject.DynField_v2, org.gvsig.tools.util.LabeledValue<FeatureAttributeDescriptor>, org.gvsig.tools.persistence.Persistent, org.gvsig.json.SupportToJson, org.gvsig.tools.dynobject.Tagged
All Known Subinterfaces:
EditableFeatureAttributeDescriptor

public interface FeatureAttributeDescriptor extends org.gvsig.tools.dynobject.DynField_v2, org.gvsig.tools.util.LabeledValue<FeatureAttributeDescriptor>, org.gvsig.tools.persistence.Persistent, org.gvsig.json.SupportToJson
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
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gvsig.tools.dynobject.DynField_v2

    org.gvsig.tools.dynobject.DynField_v2.AvailableValuesProvider
  • Field Summary

    Fields inherited from interface org.gvsig.tools.dynobject.DynField

    ANY, CHOICE, RANGE, RELATION_TYPE_AGGREGATE, RELATION_TYPE_AGGREGATE_WITH_COMPOSITION, RELATION_TYPE_COLLABORATION, RELATION_TYPE_COLLABORATION_WITH_COMPOSITION, RELATION_TYPE_COMPOSITION, RELATION_TYPE_IDENTITY, RELATION_TYPE_NONE
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
    Indicates whether this attribute accepts null values.
    format(Object value)
     
    get(String name)
    Retrieve the value of the attribute "name".
    Returns additional information of the attribute
    org.gvsig.expressionevaluator.Expression
     
    org.gvsig.expressionevaluator.Expression
     
    org.gvsig.tools.dataTypes.Coercion
    Return a Coercion to convert a value to the type of this attribute.
    org.gvsig.tools.dataTypes.CoercionContext
    Return a CoercionContext for this attribute.
    Returns a clone of this attribute descriptor
     
     
    Returns the name of this attribute's data type.
    If this attribute is of type Date, then this method returns the date format set by the data store.
     
    Return the default value coerced to the data type of attribute.
    int
    Return the designated column normal maximum width in characters.
    org.gvsig.tools.evaluator.Evaluator
    Returns an evaluator that will be used to calculate the value of this attribute
    Gets the attribute emulator associatted FeatureAttributeEmulator to this attribute.
    Gets if the attribute has a FeatureAttributeGetter.
     
     
     
    int
    If this attribute is a Geometry, this method returns the specific geometry subtype, as defined in Geometry.SUBTYPES.
    int
    If this attribute is a Geometry, this method returns the specific geometry type, as defined in Geometry.TYPES.
    org.gvsig.fmap.geom.type.GeometryType
    Returns the GeometryType of the attribute if it is a geometry.
    int
    Returns this attribute relative position within the Feature.
    org.gvsig.timesupport.Interval
     
     
    Returns the Locale associated with this attribute.
     
     
    For attributes of type DataTypes.DECIMAL, this returns the MathContext associated to this.
    int
    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.
    int
    Returns the minimum number of occurrences of this attribute on a given feature.
    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
    For attributes of type DataTypes.DECIMAL, this returns the maximum number of digits.
     
    int
    Returns the rounding mode to use when a value is converted to the attribute's data type.
    int
    For attributes of type DataTypes.DECIMAL, this returns the maximum number of digits after the decimal point.
    int
    Returns a number that indicates the size of this attribute.
    org.gvsig.crs.projection.lib.Projection
    If this attribute is a Geometry, this method returns its Spatial Reference System.
    Return the store associated to this attribute descriptor.
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
    Returns if value is created automatically by the source
    boolean
     
    boolean
    Return true if the attribute has an evaluator o an emulator.
    boolean
     
    boolean
     
    boolean
     
    boolean
    Return true if the attribute has and index in the table.
    boolean
    Returns true if this attribute forms all or part of the unique identifying value for the feature it is contained by.
    boolean
    Gets if the attribute is a temporal attribute.
    void
     
     
    setAvailableValuesExpression(org.gvsig.expressionevaluator.Expression expression)
     
    void
    Sets the FeatureAttributeGetter that is used to update the presentation of a field.

    Methods inherited from interface org.gvsig.tools.lang.Cloneable

    clone

    Methods inherited from interface org.gvsig.tools.dynobject.DynField

    coerce, getAvailableValues, getClassOfValue, getDataType, getDefaultValue, getDescription, getElementsType, getGroup, getMaxValue, getMinValue, getName, getOder, getSubtype, getTheTypeOfAvailableValues, getType, isContainer, isHidden, isMandatory, isPersistent, isReadOnly, setAvailableValues, setAvailableValues, setClassOfValue, setDefaultDynValue, setDefaultFieldValue, setDescription, setElementsType, setElementsType, setGroup, setHidden, setMandatory, setMaxValue, setMinValue, setOrder, setPersistent, setReadOnly, setSubtype, setTheTypeOfAvailableValues, setType, setType, validate

    Methods inherited from interface org.gvsig.tools.dynobject.DynField_LabelAttribute

    getLabel, getShortLabel, setLabel, setShortLabel

    Methods inherited from interface org.gvsig.tools.dynobject.DynField_v2

    copyFrom, getAvailableValues, getAvailableValuesMethod, getCalculatedValue, getCalculateMethod, getClassNameOfItems, getClassNameOfValue, getClassOfItems, getCoercedDefaultValue, getDefaultValueSupplier, getDynClassOfItems, getDynClassOfValue, getRelationType, getTags, getTypeOfItems, getValidateElements, isAvailableValuesCalculated, isCalculated, setAvailableValues, setCalculateMethod, setClassOfItems, setClassOfItems, setClassOfItems, setClassOfValue, setClassOfValue, setDefaultValueSupplier, setRelationType, setTypeOfItems, setValidateElements

    Methods inherited from interface org.gvsig.tools.util.LabeledValue

    getLabel, getValue, toString

    Methods inherited from interface org.gvsig.tools.persistence.Persistent

    loadFromState, saveToState

    Methods inherited from interface org.gvsig.json.SupportToJson

    toJson, toJson, toJsonBuilder, toJsonBuilder
  • Method Details

    • 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.
    • getFullDataTypeName

      String getFullDataTypeName()
    • hasDataProfile

      boolean hasDataProfile()
    • getDataProfileName

      String getDataProfileName()
    • getDataProfile

      DataProfile getDataProfile()
    • 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.
    • getDisplaySize

      int getDisplaySize()
      Return the designated column normal maximum width in characters.
      Returns:
    • getPrecision

      int getPrecision()
      For attributes of type DataTypes.DECIMAL, this returns the maximum number of digits. For other types, this must always return zero.
      Returns:
    • getScale

      int getScale()
      For attributes of type DataTypes.DECIMAL, this returns the maximum number of digits after the decimal point. For other types, this must always return zero.
      Returns:
    • getMathContext

      MathContext getMathContext()
      For attributes of type DataTypes.DECIMAL, this returns the MathContext associated to this. For other types return MathContext.UNLIMITED.
      Returns:
    • getCoercionContext

      org.gvsig.tools.dataTypes.CoercionContext getCoercionContext()
      Return a CoercionContext for this attribute.
      Returns:
      the CoercionContext
    • getCoercion

      org.gvsig.tools.dataTypes.Coercion getCoercion()
      Return a Coercion to convert a value to the type of this attribute.
      Returns:
      the Coercion.
    • getRoundMode

      int getRoundMode()
      Returns the rounding mode to use when a value is converted to the attribute's data type. It will only be used for Float, Double and Decimal data types.
      Returns:
    • getLocale

      Locale getLocale()
      Returns the Locale associated with this attribute. It is usually used to format and recognize dates and decimal numbers. The default Locale will be Locale. ENGLISH
      Returns:
    • 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.
      Returns:
    • 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.
      Returns:
    • 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.
      Returns:
    • 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.
      Returns:
    • allowNull

      boolean allowNull()
      Indicates whether this attribute accepts null values.
      Returns:
      true if this attribute can be null, false if not.
    • getEvaluator

      org.gvsig.tools.evaluator.Evaluator getEvaluator()
      Returns an evaluator that will be used to calculate the value of this attribute
      Returns:
    • getSRS

      org.gvsig.crs.projection.lib.Projection 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()
      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()
      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
    • getDefaultValueCoerced

      Object getDefaultValueCoerced()
      Return the default value coerced to the data type of attribute. Return null if can't coerce.
      Returns:
      default value or null.
    • getIndex

      int getIndex()
      Returns this attribute relative position within the Feature.
      Returns:
      an index
    • getAdditionalInfo

      String getAdditionalInfo(String infoName)
      Returns additional information of the attribute
      Parameters:
      infoName -
      Returns:
      info
    • isAutomatic

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

      boolean isTime()
      Gets if the attribute is a temporal attribute.
      Returns:
      true if is a temporal attribute
    • getInterval

      org.gvsig.timesupport.Interval getInterval()
    • isIndexed

      boolean isIndexed()
      Return true if the attribute has and index in the table.
      Returns:
      true if indexed.
    • allowIndexDuplicateds

      boolean allowIndexDuplicateds()
    • isIndexAscending

      boolean isIndexAscending()
    • isForeingKey

      boolean isForeingKey()
    • getForeingKey

      ForeingKey getForeingKey()
    • 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.
    • getFeatureAttributeEmulator

      FeatureAttributeEmulator getFeatureAttributeEmulator()
      Gets the attribute emulator associatted FeatureAttributeEmulator to this attribute.
      Returns:
      a FeatureAttributeEmulator or null.
    • isComputed

      boolean isComputed()
      Return true if the attribute has an evaluator o an emulator.
      Returns:
    • getStore

      FeatureStore getStore()
      Return the store associated to this attribute descriptor.
      Returns:
      the FeatureStore of the attribute descriptor.
    • getFeatureType

      FeatureType getFeatureType()
    • getRequiredFieldNames

      String[] getRequiredFieldNames()
    • recentUsed

      void recentUsed()
    • getLocalizedShortLabel

      String getLocalizedShortLabel()
      Specified by:
      getLocalizedShortLabel in interface org.gvsig.tools.dynobject.DynField_LabelAttribute
    • getLocalizedLabel

      String getLocalizedLabel()
      Specified by:
      getLocalizedLabel in interface org.gvsig.tools.dynobject.DynField_LabelAttribute
    • getLabelOfValue

      String getLabelOfValue(Object value)
    • hasOnlyMetadataChanges

      boolean hasOnlyMetadataChanges(FeatureAttributeDescriptor other)
    • hasLabel

      boolean hasLabel()
    • hasShortLabel

      boolean hasShortLabel()
    • hasDescription

      boolean hasDescription()
    • get

      Object get(String name)
      Retrieve the value of the attribute "name".
      Parameters:
      name -
      Returns:
    • hasConstantAvailableValues

      boolean hasConstantAvailableValues()
    • isAvoidCachingAvailableValues

      boolean isAvoidCachingAvailableValues()
    • getAvailableValuesExpression

      org.gvsig.expressionevaluator.Expression getAvailableValuesExpression()
    • setAvailableValuesExpression

      FeatureAttributeDescriptor setAvailableValuesExpression(String expression)
    • setAvailableValuesExpression

      FeatureAttributeDescriptor setAvailableValuesExpression(org.gvsig.expressionevaluator.Expression expression)
    • isInAvailableValues

      boolean isInAvailableValues(Object valueToCheck)
    • hasAvailableValues

      boolean hasAvailableValues()
    • getAvailableValuesFilter

      org.gvsig.expressionevaluator.Expression getAvailableValuesFilter()
    • getDefaultFormat

      String getDefaultFormat()
    • format

      String format(Object value)