org.geotools.feature.type
Class NumericAttributeType

Object
  extended by PropertyDescriptorImpl
      extended by AttributeDescriptorImpl
          extended by DefaultAttributeType
              extended by NumericAttributeType
All Implemented Interfaces:
AttributeType, PrimativeAttributeType, AttributeDescriptor, PropertyDescriptor

public class NumericAttributeType
extends DefaultAttributeType
implements PrimativeAttributeType

Class that represents a Numeric.

Author:
Ian Schneider, Chris Holmes, TOPP
Module:
modules/library/legacy (gt-legacy.jar)

Field Summary
 
Fields inherited from class AttributeDescriptorImpl
defaultValue
 
Fields inherited from class PropertyDescriptorImpl
isNillable, maxOccurs, minOccurs, name, type
 
Fields inherited from interface AttributeType
UNBOUNDED
 
Constructor Summary
NumericAttributeType(String name, Class type, boolean nillable, int min, int max, Object defaultValue, Filter filter)
          Constructor with name, type and nillable.
NumericAttributeType(String name, Class type, boolean nillable, Object defaultValue, Filter filter)
           
 
Method Summary
 Object duplicate(Object o)
          Duplicate the given Object.
 Filter getRestriction()
          This represents a Facet in XML schema ... for example can be used to represent the max length of 20 for a string.
 
Methods inherited from class DefaultAttributeType
createAttributeType, createDefaultValue, equals, getBinding, getBinding, getLocalName, getLocalName, getRestriction, hashCode, isGeometry, parse, toString, validate
 
Methods inherited from class AttributeDescriptorImpl
getDefaultValue, getType
 
Methods inherited from class PropertyDescriptorImpl
getMaxOccurs, getMinOccurs, getName, getUserData, isNillable
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface AttributeType
createDefaultValue, getBinding, getLocalName, getMaxOccurs, getMinOccurs, isNillable, parse, validate
 
Methods inherited from interface AttributeDescriptor
getDefaultValue, getType
 
Methods inherited from interface PropertyDescriptor
getName, getUserData
 

Constructor Detail

NumericAttributeType

public NumericAttributeType(String name,
                            Class type,
                            boolean nillable,
                            int min,
                            int max,
                            Object defaultValue,
                            Filter filter)
                     throws IllegalArgumentException
Constructor with name, type and nillable. Type should always be a Number class.

Parameters:
name - Name of this attribute.
type - Class type of this attribute.
nillable - If nulls are allowed for the attribute of this type.
min -
max -
defaultValue - default value when none is suppled
filter -
Throws:
IllegalArgumentException - is type is not a Number.
TODO:
REVISIT: protected?

NumericAttributeType

public NumericAttributeType(String name,
                            Class type,
                            boolean nillable,
                            Object defaultValue,
                            Filter filter)
                     throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

duplicate

public Object duplicate(Object o)
Duplicate the given Object. In this case, since Number classes are immutable, lets return the Object.

Specified by:
duplicate in interface AttributeType
Overrides:
duplicate in class DefaultAttributeType
Parameters:
o - DOCUMENT ME!
Returns:
DOCUMENT ME!

getRestriction

public Filter getRestriction()
Description copied from interface: AttributeType
This represents a Facet in XML schema ... for example can be used to represent the max length of 20 for a string.

Specified by:
getRestriction in interface AttributeType
Specified by:
getRestriction in interface PrimativeAttributeType
Overrides:
getRestriction in class DefaultAttributeType
Returns:
Filter, or Filter.INCLUDE if no restriction is needed.
See Also:
Filter, Filter#ALL


Copyright © 1996-2009 Geotools. All Rights Reserved.