org.geotools.feature.type
Class TextualAttributeType

java.lang.Object
  extended byorg.geotools.feature.DefaultAttributeType
      extended byorg.geotools.feature.type.TextualAttributeType
All Implemented Interfaces:
AttributeType, PrimativeAttributeType

public class TextualAttributeType
extends DefaultAttributeType
implements PrimativeAttributeType


Field Summary
 
Fields inherited from class org.geotools.feature.DefaultAttributeType
defaultValue, max, min, name, nillable, type
 
Fields inherited from interface org.geotools.feature.AttributeType
UNBOUNDED
 
Constructor Summary
TextualAttributeType(java.lang.String name, boolean nillable, int min, int max, java.lang.Object defaultValue, Filter filter)
           
 
Method Summary
 java.lang.Object duplicate(java.lang.Object o)
          Duplicate as a String
 Filter getRestriction()
          This provides access to the immutable restriction for this attribute type.
 java.lang.Object parse(java.lang.Object value)
          Allows this AttributeType to convert an argument to its prefered storage type.
 
Methods inherited from class org.geotools.feature.DefaultAttributeType
createDefaultValue, equals, getMaxOccurs, getMinOccurs, getName, getType, hashCode, isGeometry, isNillable, toString, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geotools.feature.AttributeType
createDefaultValue, getMaxOccurs, getMinOccurs, getName, getType, isNillable, validate
 

Constructor Detail

TextualAttributeType

public TextualAttributeType(java.lang.String name,
                            boolean nillable,
                            int min,
                            int max,
                            java.lang.Object defaultValue,
                            Filter filter)
Method Detail

parse

public java.lang.Object parse(java.lang.Object value)
                       throws java.lang.IllegalArgumentException
Description copied from interface: AttributeType
Allows this AttributeType to convert an argument to its prefered storage type. If no parsing is possible, returns the original value. If a parse is attempted, yet fails (i.e. a poor decimal format) throw the Exception. This is mostly for use internally in Features, but implementors should simply follow the rules to be safe.

Specified by:
parse in interface AttributeType
Overrides:
parse in class DefaultAttributeType
Parameters:
value - the object to attempt parsing of.
Returns:
value converted to the preferred storage of this AttributeType. If no parsing was possible then the same object is returned.
Throws:
java.lang.IllegalArgumentException - if parsing is attempted and is unsuccessful.

duplicate

public java.lang.Object duplicate(java.lang.Object o)
Duplicate as a String

Specified by:
duplicate in interface AttributeType
Overrides:
duplicate in class DefaultAttributeType
Parameters:
o - DOCUMENT ME!
Returns:
a String obtained by calling toString or null.

getRestriction

public Filter getRestriction()
Description copied from interface: PrimativeAttributeType
This provides access to the immutable restriction for this attribute type. This restriction should be applied when real data hits instances of this class. This mapps to the idea of a Facet in xml schema, or restrictions in a database. Examples may include Length <= 20 (VARCHAR 20) The Default value is Filter.ALL

Specified by:
getRestriction in interface PrimativeAttributeType
Overrides:
getRestriction in class DefaultAttributeType


Copyright © GeoTools. All Rights Reserved.