Class SimpleFeatureTypeImpl
- Object
-
- PropertyTypeImpl
-
- AttributeTypeImpl
-
- ComplexTypeImpl
-
- FeatureTypeImpl
-
- SimpleFeatureTypeImpl
-
- All Implemented Interfaces:
SimpleFeatureType,AttributeType,ComplexType,FeatureType,PropertyType
public class SimpleFeatureTypeImpl extends FeatureTypeImpl implements SimpleFeatureType
Implementation fo SimpleFeatureType, subtypes must be atomic and are stored in a list.- Author:
- Justin, Ben Caradoc-Davies, CSIRO Exploration and Mining
-
-
Field Summary
-
Fields inherited from class AttributeTypeImpl
identified
-
Fields inherited from class PropertyTypeImpl
binding, description, isAbstract, name, restrictions, superType, userData
-
-
Constructor Summary
Constructors Constructor Description SimpleFeatureTypeImpl(Name name, List<AttributeDescriptor> schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAttributeCount()Returns the number of attributes composing the feature typeList<AttributeDescriptor>getAttributeDescriptors()The list of attribute descriptors which make up the feature type.AttributeDescriptorgetDescriptor(int index)Returns the attribute descriptor at the specified index.AttributeDescriptorgetDescriptor(String name)Describe a single property by unqualified name.AttributeDescriptorgetDescriptor(Name name)Describe a single property by name.AttributeTypegetType(int index)Returns the type of the attribute at the specified index.AttributeTypegetType(String name)Returns the type of the attribute which matches the specified name.AttributeTypegetType(Name name)Returns the type of the attribute which matches the specified name.StringgetTypeName()The local name for this FeatureType.List<AttributeType>getTypes()Returns the types of all the attributes which make up the feature.intindexOf(String name)Returns the index of the attribute which matches the specified name.intindexOf(Name name)Returns the index of the attribute which matches the specified name.-
Methods inherited from class FeatureTypeImpl
equals, getCoordinateReferenceSystem, getGeometryDescriptor, hashCode
-
Methods inherited from class ComplexTypeImpl
getBinding, getDescriptors, isInline, toString
-
Methods inherited from class AttributeTypeImpl
createDefaultValue, getSuper, isIdentified, parse
-
Methods inherited from class PropertyTypeImpl
getDescription, getName, getRestrictions, getUserData, isAbstract
-
Methods inherited from interface AttributeType
getSuper
-
Methods inherited from interface ComplexType
getBinding, getDescriptors, isInline
-
Methods inherited from interface FeatureType
getCoordinateReferenceSystem, getGeometryDescriptor, isIdentified
-
Methods inherited from interface PropertyType
equals, getDescription, getName, getRestrictions, getUserData, hashCode, isAbstract
-
-
-
-
Constructor Detail
-
SimpleFeatureTypeImpl
public SimpleFeatureTypeImpl(Name name, List<AttributeDescriptor> schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description)
-
-
Method Detail
-
getAttributeDescriptors
public final List<AttributeDescriptor> getAttributeDescriptors()
Description copied from interface:SimpleFeatureTypeThe list of attribute descriptors which make up the feature type.This method is a convenience for:
return (List<AttributeDescriptor>) getProperties();
- Specified by:
getAttributeDescriptorsin interfaceSimpleFeatureType- Returns:
- The ordered list of attribute descriptors.
- See Also:
SimpleFeatureType.getAttributeDescriptors()
-
getTypes
public List<AttributeType> getTypes()
Description copied from interface:SimpleFeatureTypeReturns the types of all the attributes which make up the feature.This method is convenience for:
List types = new ArrayList(); for (Property p : getProperties()) { types.add(p.getType()); } return types;- Specified by:
getTypesin interfaceSimpleFeatureType- Returns:
- The list of attribute types.
-
getType
public AttributeType getType(Name name)
Description copied from interface:SimpleFeatureTypeReturns the type of the attribute which matches the specified name.This method is convenience for:
return (AttributeType) getProperty(name).getType();
If there is no such attribute which matches name,
nullis returned.- Specified by:
getTypein interfaceSimpleFeatureType- Parameters:
name- The name of the attribute whose type to return.- Returns:
- The attribute type matching the specified name, or
null.
-
getType
public AttributeType getType(String name)
Description copied from interface:SimpleFeatureTypeReturns the type of the attribute which matches the specified name.This method is convenience for:
return (AttributeType) getProperty(name).getType();
If there is no such attribute which matches name,
nullis returned.- Specified by:
getTypein interfaceSimpleFeatureType- Parameters:
name- The name of the attribute whose type to return.- Returns:
- The attribute type matching the specified name, or
null.
-
getType
public AttributeType getType(int index)
Description copied from interface:SimpleFeatureTypeReturns the type of the attribute at the specified index.This method is convenience for:
return (AttributeType)((List)getProperties()).get(index)).getType();
- Specified by:
getTypein interfaceSimpleFeatureType- Parameters:
index- The index of the attribute whose type to return.- Returns:
- The attribute type at the specified index.
-
getDescriptor
public AttributeDescriptor getDescriptor(Name name)
Description copied from interface:ComplexTypeDescribe a single property by name.This method returns
nullif no such property is found.- Specified by:
getDescriptorin interfaceComplexType- Specified by:
getDescriptorin interfaceSimpleFeatureType- Overrides:
getDescriptorin classComplexTypeImpl- Parameters:
name- The name of the property to get.- Returns:
- The property matching the specified name, or
null.
-
getDescriptor
public AttributeDescriptor getDescriptor(String name)
Description copied from interface:ComplexTypeDescribe a single property by unqualified name.Note: Special care should be taken when using this method in the case that two properties with the same local name but different namespace uri exist. For this reason using
ComplexType.getDescriptor(Name)is safer.This method returns
nullif no such property is found.- Specified by:
getDescriptorin interfaceComplexType- Specified by:
getDescriptorin interfaceSimpleFeatureType- Overrides:
getDescriptorin classComplexTypeImpl- Parameters:
name- The name of the property to get.- Returns:
- The property matching the specified name, or
null.
-
getDescriptor
public AttributeDescriptor getDescriptor(int index)
Description copied from interface:SimpleFeatureTypeReturns the attribute descriptor at the specified index.This method is convenience for:
return (AttributeDescriptor) ((List) getProperties()).get(index);
- Specified by:
getDescriptorin interfaceSimpleFeatureType- Parameters:
index- The index of the descriptor to return.- Returns:
- The attribute descriptor at the specified index.
-
indexOf
public int indexOf(Name name)
Description copied from interface:SimpleFeatureTypeReturns the index of the attribute which matches the specified name.-1 is returned in the instance there is no attribute matching the specified name.
- Specified by:
indexOfin interfaceSimpleFeatureType- Parameters:
name- The name of the attribute whose index to return.- Returns:
- index of named attribute, or -1 if not found.
-
indexOf
public int indexOf(String name)
Description copied from interface:SimpleFeatureTypeReturns the index of the attribute which matches the specified name.-1 is returned in the instance there is no attribute matching the specified name.
- Specified by:
indexOfin interfaceSimpleFeatureType- Parameters:
name- The name of the attribute whose index to return.- Returns:
- index of named attribute, or -1 if not found.
-
getAttributeCount
public int getAttributeCount()
Description copied from interface:SimpleFeatureTypeReturns the number of attributes composing the feature typeThis method is convenience for
getAttributes().size().- Specified by:
getAttributeCountin interfaceSimpleFeatureType- Returns:
- The number of attributes.
-
getTypeName
public String getTypeName()
Description copied from interface:SimpleFeatureTypeThe local name for this FeatureType.Specifically this method returns
getName().getLocalPart().- Specified by:
getTypeNamein interfaceSimpleFeatureType- Returns:
- The local name for this FeatureType.
-
-