Package org.geotools.xml.gml
Class ChoiceGeometryTypeImpl
- Object
-
- PropertyTypeImpl
-
- AttributeTypeImpl
-
- ChoiceGeometryTypeImpl
-
- All Implemented Interfaces:
AttributeDescriptor
,AttributeType
,GeometryDescriptor
,GeometryType
,PropertyDescriptor
,PropertyType
,ChoiceGeometryType
public class ChoiceGeometryTypeImpl extends AttributeTypeImpl implements ChoiceGeometryType, GeometryType
Created for GML generated FeatureTypes. Represents a Choice type.This is temporary and only for use by the parser. It should never be public or in common use.
- Author:
- Jesse
-
-
Field Summary
Fields Modifier and Type Field Description protected Class[]
types
-
Fields inherited from class AttributeTypeImpl
identified
-
Fields inherited from class PropertyTypeImpl
binding, description, isAbstract, name, restrictions, superType, userData
-
-
Constructor Summary
Constructors Constructor Description ChoiceGeometryTypeImpl(Name name, Class[] types, Class defaultType, boolean nillable, int min, int max, Object defaultValue, CoordinateReferenceSystem crs, List<Filter> filter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Object
convert(Object obj)
Class<?>[]
getChoices()
Gets the choicesClass[]
getChoices()
CoordinateReferenceSystem
getCoordinateReferenceSystem()
The coordinate reference system in which geometries are defined.Object
getDefaultValue()
The default value for the attribute.String
getLocalName()
The local name for this AttributeDescriptor.int
getMaxOccurs()
The maximum number of occurrences of the property within its containing entity.int
getMinOccurs()
The minimum number of occurrences of the property within its containing entity.GeometryType
getType()
Override ofPropertyDescriptor.getType()
which type narrows toAttributeType
.boolean
isNillable()
Flag indicating ifnull
is an allowable value for the property.-
Methods inherited from class AttributeTypeImpl
createDefaultValue, equals, getSuper, hashCode, isIdentified, parse, toString
-
Methods inherited from class PropertyTypeImpl
getBinding, getDescription, getName, getRestrictions, getUserData, isAbstract
-
Methods inherited from interface AttributeDescriptor
getDefaultValue, getLocalName
-
Methods inherited from interface AttributeType
getSuper, isIdentified
-
Methods inherited from interface PropertyDescriptor
getMaxOccurs, getMinOccurs, getName, getUserData, isNillable
-
Methods inherited from interface PropertyType
equals, getBinding, getDescription, getName, getRestrictions, getUserData, hashCode, isAbstract
-
-
-
-
Field Detail
-
types
protected Class[] types
-
-
Method Detail
-
getType
public GeometryType getType()
Description copied from interface:AttributeDescriptor
Override ofPropertyDescriptor.getType()
which type narrows toAttributeType
.- Specified by:
getType
in interfaceAttributeDescriptor
- Specified by:
getType
in interfaceGeometryDescriptor
- Specified by:
getType
in interfacePropertyDescriptor
- See Also:
PropertyDescriptor.getType()
-
getCoordinateReferenceSystem
public CoordinateReferenceSystem getCoordinateReferenceSystem()
Description copied from interface:GeometryType
The coordinate reference system in which geometries are defined.This method may return
null
, but this should only occur in cases where the actual crs is not known. A common case is when a shapefile does not have an accompanied .prj file.- Specified by:
getCoordinateReferenceSystem
in interfaceGeometryDescriptor
- Specified by:
getCoordinateReferenceSystem
in interfaceGeometryType
-
getChoices
public abstract Class<?>[] getChoices()
Gets the choices- Returns:
- the potential types
-
getChoices
public Class[] getChoices()
-
getDefaultValue
public Object getDefaultValue()
Description copied from interface:AttributeDescriptor
The default value for the attribute.This value is used when an attribute is created and no value for it is specified.
This value may be
null
. If it is non-null it should be an instance of of the class specified bygetType().getBinding()
.- Specified by:
getDefaultValue
in interfaceAttributeDescriptor
-
getLocalName
public String getLocalName()
Description copied from interface:AttributeDescriptor
The local name for this AttributeDescriptor. Specifically this returnsgetName().getLocalPart
().- Specified by:
getLocalName
in interfaceAttributeDescriptor
- Returns:
- The local name for this attribute descriptor.
-
getMaxOccurs
public int getMaxOccurs()
Description copied from interface:PropertyDescriptor
The maximum number of occurrences of the property within its containing entity.This value is a positive integer. A value of
-1
means that the max number of occurrences is unbounded.- Specified by:
getMaxOccurs
in interfacePropertyDescriptor
- Returns:
- An integer >= 0, or -1.
-
getMinOccurs
public int getMinOccurs()
Description copied from interface:PropertyDescriptor
The minimum number of occurrences of the property within its containing entity.This value is always an integer greater than or equal to zero.
- Specified by:
getMinOccurs
in interfacePropertyDescriptor
- Returns:
- An integer >= 0
-
isNillable
public boolean isNillable()
Description copied from interface:PropertyDescriptor
Flag indicating ifnull
is an allowable value for the property.- Specified by:
isNillable
in interfacePropertyDescriptor
- Returns:
true
if the property is allowed to benull
, otherwisefalse
.
-
-