Package org.geotools.feature.type
Class AttributeTypeImpl
Object
PropertyTypeImpl
AttributeTypeImpl
- All Implemented Interfaces:
AttributeType
,PropertyType
- Direct Known Subclasses:
ChoiceGeometryTypeImpl
,ComplexTypeImpl
,GeometryTypeImpl
Base class for attribute types.
- Author:
- Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
-
Field Summary
FieldsFields inherited from class PropertyTypeImpl
binding, description, isAbstract, name, restrictions, superType, userData
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeTypeImpl
(Name name, Class<?> binding, boolean identified, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) -
Method Summary
Methods inherited from class PropertyTypeImpl
getBinding, getDescription, getName, getRestrictions, getUserData, isAbstract
Methods inherited from interface PropertyType
getBinding, getDescription, getName, getRestrictions, getUserData, isAbstract
-
Field Details
-
identified
protected final boolean identified
-
-
Constructor Details
-
AttributeTypeImpl
public AttributeTypeImpl(Name name, Class<?> binding, boolean identified, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description)
-
-
Method Details
-
isIdentified
public boolean isIdentified()Description copied from interface:AttributeType
Indicates 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:
isIdentified
in interfaceAttributeType
- Returns:
true
if the attribute is identified, otherwisefalse
.- See Also:
-
parse
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 thisAttributeType
. If no parsing was possible then the same object is returned.- Throws:
IllegalArgumentException
- if parsing is attempted and is unsuccessful.
-
createDefaultValue
-
getSuper
Description copied from interface:PropertyType
The parent type of the property type.This method returns
null
if no super type is defined.The super type may contain additional restrictions to be considered against properties of the the property type.
- Specified by:
getSuper
in interfaceAttributeType
- Specified by:
getSuper
in interfacePropertyType
- Overrides:
getSuper
in classPropertyTypeImpl
- Returns:
- The parent or super type, or
null
. - See Also:
-
hashCode
public int hashCode()Override of hashcode.- Specified by:
hashCode
in interfacePropertyType
- Overrides:
hashCode
in classPropertyTypeImpl
- Returns:
- getName().hashCode()
-
equals
Override of equals.- Specified by:
equals
in interfacePropertyType
- Overrides:
equals
in classPropertyTypeImpl
- Parameters:
other
- the object to be tested for equality.- Returns:
- whether other is equal to this attribute Type.
-
toString
- Overrides:
toString
in classPropertyTypeImpl
-