org.geotools.feature.type
Class TemporalAttributeType

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

public class TemporalAttributeType
extends DefaultAttributeType
implements PrimativeAttributeType

A Default class that represents a Temporal attribute.


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
TemporalAttributeType(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)
          Create a duplicate value of the passed Object.
 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

TemporalAttributeType

public TemporalAttributeType(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)
                           throws IllegalAttributeException
Description copied from interface: AttributeType
Create a duplicate value of the passed Object. For immutable Objects, it is not neccessary to create a new Object.

Specified by:
duplicate in interface AttributeType
Overrides:
duplicate in class DefaultAttributeType
Returns:
A duplicated Object if the type is mutable or the same Object if it is immutable or null if the passed Object is null.
Throws:
IllegalAttributeException - if the Object cannot be duplicated.

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.