public class SimpleFeatureTypeImpl extends FeatureTypeImpl implements SimpleFeatureType
identified
binding, description, isAbstract, name, restrictions, superType, userData
Constructor and Description |
---|
SimpleFeatureTypeImpl(Name name,
List<AttributeDescriptor> schema,
GeometryDescriptor defaultGeometry,
boolean isAbstract,
List<Filter> restrictions,
AttributeType superType,
InternationalString description) |
Modifier and Type | Method and Description |
---|---|
int |
getAttributeCount()
Returns the number of attributes composing the feature type
This method is convenience for
getAttributes().size() . |
List<AttributeDescriptor> |
getAttributeDescriptors()
The list of attribute descriptors which make up the feature type.
|
AttributeDescriptor |
getDescriptor(int index)
Returns the attribute descriptor at the specified index.
|
AttributeDescriptor |
getDescriptor(Name name)
Describe a single property by name.
|
AttributeDescriptor |
getDescriptor(String name)
Describe a single property by unqualified name.
|
AttributeType |
getType(int index)
Returns the type of the attribute at the specified index.
|
AttributeType |
getType(Name name)
Returns the type of the attribute which matches the specified name.
|
AttributeType |
getType(String name)
Returns the type of the attribute which matches the specified name.
|
String |
getTypeName()
The local name for this FeatureType.
|
List<AttributeType> |
getTypes()
Returns the types of all the attributes which make up the feature.
|
int |
indexOf(Name name)
Returns the index of the attribute which matches the specified name.
|
int |
indexOf(String name)
Returns the index of the attribute which matches the specified name.
|
equals, getCoordinateReferenceSystem, getGeometryDescriptor, hashCode
getBinding, getDescriptors, isInline, toString
createDefaultValue, getSuper, isIdentified, parse
getDescription, getName, getRestrictions, getUserData, isAbstract
getCoordinateReferenceSystem, getGeometryDescriptor, isIdentified
getBinding, getDescriptors, isInline
getSuper
equals, getDescription, getName, getRestrictions, getUserData, hashCode, isAbstract
public SimpleFeatureTypeImpl(Name name, List<AttributeDescriptor> schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description)
public final List<AttributeDescriptor> getAttributeDescriptors()
SimpleFeatureType
This method is a convenience for:
return (List<AttributeDescriptor>) getProperties();
getAttributeDescriptors
in interface SimpleFeatureType
SimpleFeatureType.getAttributeDescriptors()
public List<AttributeType> getTypes()
SimpleFeatureType
This method is convenience for:
List types = new ArrayList(); for (Property p : getProperties()) { types.add(p.getType()); } return types;
getTypes
in interface SimpleFeatureType
public AttributeType getType(Name name)
SimpleFeatureType
This method is convenience for:
return (AttributeType) getProperty(name).getType();
If there is no such attribute which matches name, null
is returned.
getType
in interface SimpleFeatureType
name
- The name of the attribute whose type to return.null
.public AttributeType getType(String name)
SimpleFeatureType
This method is convenience for:
return (AttributeType) getProperty(name).getType();
If there is no such attribute which matches name, null
is returned.
getType
in interface SimpleFeatureType
name
- The name of the attribute whose type to return.null
.public AttributeType getType(int index)
SimpleFeatureType
This method is convenience for:
return (AttributeType)((List)getProperties()).get(index)).getType();
getType
in interface SimpleFeatureType
index
- The index of the attribute whose type to return.public AttributeDescriptor getDescriptor(Name name)
ComplexType
This method returns null
if no such property is found.
getDescriptor
in interface SimpleFeatureType
getDescriptor
in interface ComplexType
getDescriptor
in class ComplexTypeImpl
name
- The name of the property to get.null
.public AttributeDescriptor getDescriptor(String name)
ComplexType
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.
getDescriptor
in interface SimpleFeatureType
getDescriptor
in interface ComplexType
getDescriptor
in class ComplexTypeImpl
name
- The name of the property to get.null
.public AttributeDescriptor getDescriptor(int index)
SimpleFeatureType
This method is convenience for:
return (AttributeDescriptor) ((List) getProperties()).get(index);
getDescriptor
in interface SimpleFeatureType
public int indexOf(Name name)
SimpleFeatureType
-1 is returned in the instance there is no attribute matching the specified name.
indexOf
in interface SimpleFeatureType
name
- The name of the attribute whose index to return.public int indexOf(String name)
SimpleFeatureType
-1 is returned in the instance there is no attribute matching the specified name.
indexOf
in interface SimpleFeatureType
name
- The name of the attribute whose index to return.public int getAttributeCount()
SimpleFeatureType
This method is convenience for getAttributes().size()
.
getAttributeCount
in interface SimpleFeatureType
public String getTypeName()
SimpleFeatureType
Specifically this method returns getName().getLocalPart().
getTypeName
in interface SimpleFeatureType
Copyright © 1996–2019 Geotools. All rights reserved.