org.geotools.feature.type
Class AttributeTypeImpl

Object
  extended by PropertyTypeImpl
      extended by AttributeTypeImpl
All Implemented Interfaces:
AttributeType, PropertyType
Direct Known Subclasses:
ComplexTypeImpl, GeometryTypeImpl

public class AttributeTypeImpl
extends PropertyTypeImpl
implements AttributeType

Base class for attribute types.

Author:
Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
Module:
modules/library/main (gt-main.jar)

Field Summary
protected  boolean identified
           
 
Fields inherited from class PropertyTypeImpl
binding, description, isAbstract, name, restrictions, superType, userData
 
Constructor Summary
AttributeTypeImpl(Name name, Class<?> binding, boolean identified, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description)
           
 
Method Summary
 Object createDefaultValue()
           
 boolean equals(Object other)
          Override of equals.
 AttributeType getSuper()
           
 int hashCode()
          Override of hashcode.
 boolean isIdentified()
           
 Object parse(Object value)
          Allows this AttributeType to convert an argument to its prefered storage type.
 String toString()
           
 
Methods inherited from class PropertyTypeImpl
getBinding, getDescription, getName, getRestrictions, getUserData, isAbstract
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface PropertyType
getBinding, getDescription, getName, getRestrictions, getUserData, isAbstract
 

Field Detail

identified

protected final boolean identified
Constructor Detail

AttributeTypeImpl

public AttributeTypeImpl(Name name,
                         Class<?> binding,
                         boolean identified,
                         boolean isAbstract,
                         List<Filter> restrictions,
                         AttributeType superType,
                         InternationalString description)
Method Detail

isIdentified

public boolean isIdentified()
Specified by:
isIdentified in interface AttributeType

parse

public Object parse(Object value)
             throws IllegalArgumentException
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.

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:
IllegalArgumentException - if parsing is attempted and is unsuccessful.

createDefaultValue

public Object createDefaultValue()

getSuper

public AttributeType getSuper()
Specified by:
getSuper in interface AttributeType
Specified by:
getSuper in interface PropertyType
Overrides:
getSuper in class PropertyTypeImpl

hashCode

public int hashCode()
Override of hashcode.

Specified by:
hashCode in interface PropertyType
Overrides:
hashCode in class PropertyTypeImpl

equals

public boolean equals(Object other)
Override of equals.

Specified by:
equals in interface PropertyType
Overrides:
equals in class PropertyTypeImpl
Parameters:
other - the object to be tested for equality.
Returns:
whether other is equal to this attribute Type.

toString

public String toString()
Overrides:
toString in class PropertyTypeImpl


Copyright © 1996-2010 Geotools. All Rights Reserved.