Class SimpleFeatureTypeImpl
- All Implemented Interfaces:
SimpleFeatureType
,AttributeType
,ComplexType
,FeatureType
,PropertyType
- 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
ConstructorsConstructorDescriptionSimpleFeatureTypeImpl
(Name name, List<AttributeDescriptor> schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of attributes composing the feature typefinal List<AttributeDescriptor>
The list of attribute descriptors which make up the feature type.getDescriptor
(int index) Returns the attribute descriptor at the specified index.getDescriptor
(String name) Describe a single property by unqualified name.getDescriptor
(Name name) Describe a single property by name.getType
(int index) Returns the type of the attribute at the specified index.Returns the type of the attribute which matches the specified name.Returns the type of the attribute which matches the specified name.The local name for this FeatureType.getTypes()
Returns the types of all the attributes which make up the feature.int
Returns the index of the attribute which matches the specified name.int
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 Details
-
SimpleFeatureTypeImpl
public SimpleFeatureTypeImpl(Name name, List<AttributeDescriptor> schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description)
-
-
Method Details
-
getAttributeDescriptors
Description copied from interface:SimpleFeatureType
The list of attribute descriptors which make up the feature type.This method is a convenience for:
return (List<AttributeDescriptor>) getProperties();
- Specified by:
getAttributeDescriptors
in interfaceSimpleFeatureType
- Returns:
- The ordered list of attribute descriptors.
- See Also:
-
getTypes
Description copied from interface:SimpleFeatureType
Returns 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:
getTypes
in interfaceSimpleFeatureType
- Returns:
- The list of attribute types.
-
getType
Description copied from interface:SimpleFeatureType
Returns 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,
null
is returned.- Specified by:
getType
in interfaceSimpleFeatureType
- Parameters:
name
- The name of the attribute whose type to return.- Returns:
- The attribute type matching the specified name, or
null
.
-
getType
Description copied from interface:SimpleFeatureType
Returns 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,
null
is returned.- Specified by:
getType
in interfaceSimpleFeatureType
- Parameters:
name
- The name of the attribute whose type to return.- Returns:
- The attribute type matching the specified name, or
null
.
-
getType
Description copied from interface:SimpleFeatureType
Returns the type of the attribute at the specified index.This method is convenience for:
return (AttributeType)((List)getProperties()).get(index)).getType();
- Specified by:
getType
in interfaceSimpleFeatureType
- Parameters:
index
- The index of the attribute whose type to return.- Returns:
- The attribute type at the specified index.
-
getDescriptor
Description copied from interface:ComplexType
Describe a single property by name.This method returns
null
if no such property is found.- Specified by:
getDescriptor
in interfaceComplexType
- Specified by:
getDescriptor
in interfaceSimpleFeatureType
- Overrides:
getDescriptor
in classComplexTypeImpl
- Parameters:
name
- The name of the property to get.- Returns:
- The property matching the specified name, or
null
.
-
getDescriptor
Description copied from interface:ComplexType
Describe 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
null
if no such property is found.- Specified by:
getDescriptor
in interfaceComplexType
- Specified by:
getDescriptor
in interfaceSimpleFeatureType
- Overrides:
getDescriptor
in classComplexTypeImpl
- Parameters:
name
- The name of the property to get.- Returns:
- The property matching the specified name, or
null
.
-
getDescriptor
Description copied from interface:SimpleFeatureType
Returns the attribute descriptor at the specified index.This method is convenience for:
return (AttributeDescriptor) ((List) getProperties()).get(index);
- Specified by:
getDescriptor
in interfaceSimpleFeatureType
- Parameters:
index
- The index of the descriptor to return.- Returns:
- The attribute descriptor at the specified index.
-
indexOf
Description copied from interface:SimpleFeatureType
Returns 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:
indexOf
in interfaceSimpleFeatureType
- Parameters:
name
- The name of the attribute whose index to return.- Returns:
- index of named attribute, or -1 if not found.
-
indexOf
Description copied from interface:SimpleFeatureType
Returns 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:
indexOf
in 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:SimpleFeatureType
Returns the number of attributes composing the feature typeThis method is convenience for
getAttributes().size()
.- Specified by:
getAttributeCount
in interfaceSimpleFeatureType
- Returns:
- The number of attributes.
-
getTypeName
Description copied from interface:SimpleFeatureType
The local name for this FeatureType.Specifically this method returns
getName().getLocalPart().
- Specified by:
getTypeName
in interfaceSimpleFeatureType
- Returns:
- The local name for this FeatureType.
-