|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SimpleFeatureType
The type of a SimpleFeature.
The definition of a "simple feature" can be summed up as the following:
<complexType name="mySimpleType"/>
<sequence>
<element name="foo" type="xs:string"/>
<element name="bar" type="xs:integer"/>
</sequence>
</complexType>
SimpleFeatureType type = ...; AttributeDescriptor foo = type.getAttribute( 0 ); AttributeDescriptor bar-= type.getAttribute( 1 );
getMinOccurs() == 1 and
getMaxOccurs() == 1. A consequence of this is that attributes
from a simple feature always line up 1 to 1 with the descriptors from the
type:
SimpleFeature feature = ...; SimpleFeatureType type = feature.getType(); type.getAttribute( 0 ).getDescriptor() == type.getAttribute( 0 ); type.getAttribute( 1 ).getDescriptor() == type.getAttribute( 1 );
getDescriptor(String) and getDescriptor(Name).
| Method Summary | |
|---|---|
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)
Returns the attribute descriptor which matches the specified name. |
AttributeDescriptor |
getDescriptor(String name)
Returns the attribute descriptor which matches the specified 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. |
| Methods inherited from interface FeatureType |
|---|
getCoordinateReferenceSystem, getGeometryDescriptor, isIdentified |
| Methods inherited from interface ComplexType |
|---|
getBinding, getDescriptors, isInline |
| Methods inherited from interface AttributeType |
|---|
getSuper |
| Methods inherited from interface PropertyType |
|---|
equals, getDescription, getName, getRestrictions, getUserData, hashCode, isAbstract |
| Method Detail |
|---|
String getTypeName()
getName().getLocalPart().
List<AttributeDescriptor> getAttributeDescriptors()
This method is a convenience for:
return (List<AttributeDescriptor>) getProperties();
AttributeDescriptor getDescriptor(String name)
This method is convenience for:
return (AttributeDescriptor) getProperty(name);
This method returns null if no such attribute exists.
getDescriptor in interface ComplexTypename - The name of the descriptor to return.
null if no such attribute exists.AttributeDescriptor getDescriptor(Name name)
This method is convenience for:
return (AttributeDescriptor) getProperty(name);
This method returns null if no such attribute exists.
getDescriptor in interface ComplexTypename - The name of the descriptor to return.
null if no such attribute exists.
AttributeDescriptor getDescriptor(int index)
throws IndexOutOfBoundsException
This method is convenience for:
return (AttributeDescriptor) ((List) getProperties()).get(index);
name - The name of the descriptor to return.
IndexOutOfBoundsException - When the index is out of bounds.int getAttributeCount()
This method is convenience for getAttributes().size().
List<AttributeType> getTypes()
This method is convenience for:
List types = new ArrayList();
for (Property p : getProperties()) {
types.add(p.getType());
}
return types;
AttributeType getType(String name)
This method is convenience for:
return (AttributeType) getProperty(name).getType();
If there is no such attribute which matches name,
null is returned.
name - The name of the attribute whose type to return.
null.AttributeType getType(Name name)
This method is convenience for:
return (AttributeType) getProperty(name).getType();
If there is no such attribute which matches name,
null is returned.
name - The name of the attribute whose type to return.
null.
AttributeType getType(int index)
throws IndexOutOfBoundsException
This method is convenience for:
return (AttributeType)((List)getProperties()).get(index)).getType();
index - The index of the attribute whose type to return.
IndexOutOfBoundsException - When the index is out of bounds.int indexOf(String name)
-1 is returned in the instance there is no attribute matching the specified name.
name - The name of the attribute whose index to return.
int indexOf(Name name)
-1 is returned in the instance there is no attribute matching the specified name.
name - The name of the attribute whose index to return.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||