|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SimpleFeature
Feature interface customised for Simple content.
This class has a different target audience then that of the rest of the Feature Model - the target user is a casual user of Shapefiles, if they can switch over to database tables without noticing so much the better.
Note this is extension of Feature, and thus it is complete with respect to the needs of XPath and GML generation. This represents a restriction as indicated by SimpleFeatureType, and this restriction has allowed us to unambiguously create helpful methods based in name and index.
We considered providing a helper method based on GenericName to this class or directly to Feature. There is no significant advantage over direct use of AttribtueType.
Method Summary | |
---|---|
List<Association> |
associations()
Associations are not supported by SimpleFeature. |
List<Attribute> |
attributes()
List of attributes in prescribed order. |
List<Attribute> |
getAttributes()
List of attributes is in the same order as that defined by SimpleFeatureType. |
Object |
getDefaultGeometryValue()
Returns the default geometry for the simple feature. |
int |
getNumberOfAttributes()
Number of attributes in SimpleFeatureType. |
SimpleFeatureType |
getType()
Restricted to SimpleFeatureType This restriction enabled client code to confidently assume that each attribute occurs in the perscribed order and that no super types are used. |
List<AttributeType> |
getTypes()
AttributeTypes in the order defined by SimpleFeatureType. |
List<Property> |
getValue()
List |
Object |
getValue(int index)
Access attribute by "index" indicated by SimpleFeatureType. |
Object |
getValue(String name)
Retrieve value by attribute name. |
List<Object> |
getValues()
Value view of attributes, in a manner similar Map.values(). |
void |
setDefaultGeometryValue(Object geometry)
Sets the default geometry for the simple feature. |
void |
setValue(int index,
Object value)
Modify attribute at the "index" indicated by SimpleFeatureType. |
void |
setValue(List<Property> values)
Update the feature with these attributes. |
void |
setValue(String name,
Object value)
Modify attribute with "name" indicated by SimpleFeatureType. |
void |
setValues(List<Attribute> values)
Sets the values of the feautre. |
void |
setValues(Object[] values)
Sets the values of the feautre. |
Methods inherited from interface Feature |
---|
getBounds, getCRS, getDefaultGeometry, getID, getUserData, putUserData, setCRS, setDefaultGeometry |
Methods inherited from interface ComplexAttribute |
---|
get, getDescriptor, setValue |
Methods inherited from interface Attribute |
---|
nillable, operation, setValue |
Methods inherited from interface Property |
---|
descriptor, name |
Method Detail |
---|
List<Association> associations()
associations
in interface ComplexAttribute
List<Attribute> attributes()
attributes
in interface ComplexAttribute
List<Attribute> getAttributes()
List<AttributeType> getTypes()
This method is not part of the data model and does not follow Java Bean naming conventions.
List<Property> getValue()
You may wish to use getValues() instead, in order to access feature contents directly.
getValue
in interface Attribute
getValue
in interface ComplexAttribute
void setValue(List<Property> values)
You may wish to use setValues() instead, in order to access feature contents directly.
List<Object> getValues()
The content available through getTypes() and getvalues() are considered a view of getAttribtues(). Order is maintained, and removing content will result in a modification to all three lists.
SimpleFeatureType getType()
This restriction enabled client code to confidently assume that each attribute occurs in the perscribed order and that no super types are used.
getType
in interface Attribute
getType
in interface ComplexAttribute
getType
in interface Feature
getType
in interface Property
Object getValue(String name)
name
-
Object getValue(int index)
index
- void setValue(String name, Object value)
name
- value
- void setValue(int index, Object value)
index
- value
- void setValues(List<Attribute> values)
void setValues(Object[] values)
int getNumberOfAttributes()
This is identical to types().size()
Object getDefaultGeometryValue()
This method is convenience for getDefaultGeometry().get();
void setDefaultGeometryValue(Object geometry)
This method is convenience for getDefaultGeometry().set(geometry);
geometry
- The new defautl geometry.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |