Package org.geotools.feature.type
Class AttributeTypeImpl
- Object
- 
- PropertyTypeImpl
- 
- AttributeTypeImpl
 
 
- 
- All Implemented Interfaces:
- AttributeType,- PropertyType
 - Direct Known Subclasses:
- ChoiceGeometryTypeImpl,- ComplexTypeImpl,- GeometryTypeImpl
 
 public class AttributeTypeImpl extends PropertyTypeImpl implements AttributeType Base class for attribute types.- Author:
- Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleanidentified- 
Fields inherited from class PropertyTypeImplbinding, description, isAbstract, name, restrictions, superType, userData
 
- 
 - 
Constructor SummaryConstructors Constructor Description AttributeTypeImpl(Name name, Class<?> binding, boolean identified, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectcreateDefaultValue()booleanequals(Object other)Override of equals.AttributeTypegetSuper()The parent type of the property type.inthashCode()Override of hashcode.booleanisIdentified()Indicates if the type is identified or not.Objectparse(Object value)Allows this AttributeType to convert an argument to its prefered storage type.StringtoString()- 
Methods inherited from class PropertyTypeImplgetBinding, getDescription, getName, getRestrictions, getUserData, isAbstract
 - 
Methods inherited from interface PropertyTypegetBinding, getDescription, getName, getRestrictions, getUserData, isAbstract
 
- 
 
- 
- 
- 
Constructor Detail- 
AttributeTypeImplpublic AttributeTypeImpl(Name name, Class<?> binding, boolean identified, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) 
 
- 
 - 
Method Detail- 
isIdentifiedpublic boolean isIdentified() Description copied from interface:AttributeTypeIndicates if the type is identified or not.If this method returns true, then the corresponding attribute must have a unique identifier, ie,Attribute.getIdentifier()must return a value, and cannot benull.- Specified by:
- isIdentifiedin interface- AttributeType
- Returns:
- trueif the attribute is identified, otherwise- false.
- See Also:
- Attribute.getIdentifier()
 
 - 
parsepublic 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:
- valueconverted 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.
 
 - 
createDefaultValuepublic Object createDefaultValue() 
 - 
getSuperpublic AttributeType getSuper() Description copied from interface:PropertyTypeThe parent type of the property type.This method returns nullif no super type is defined.The super type may contain additional restrictions to be considered against properties of the the property type. - Specified by:
- getSuperin interface- AttributeType
- Specified by:
- getSuperin interface- PropertyType
- Overrides:
- getSuperin class- PropertyTypeImpl
- Returns:
- The parent or super type, or null.
- See Also:
- PropertyType.getSuper()
 
 - 
hashCodepublic int hashCode() Override of hashcode.- Specified by:
- hashCodein interface- PropertyType
- Overrides:
- hashCodein class- PropertyTypeImpl
- Returns:
- getName().hashCode()
 
 - 
equalspublic boolean equals(Object other) Override of equals.- Specified by:
- equalsin interface- PropertyType
- Overrides:
- equalsin class- PropertyTypeImpl
- Parameters:
- other- the object to be tested for equality.
- Returns:
- whether other is equal to this attribute Type.
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- PropertyTypeImpl
 
 
- 
 
-