|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A FeatureType aware Feature AttributeType.
While we could use a plain AttributeType to capture a Feature instance we would miss out one one important aspect: the schema.
By definition the schema of a Feature is not defined by java interface alone, this interface allows access the the assocaited FeatureType.
Suggestion: we can look at having this class extend ListFeatureType and exactly specifying how delegation to the getSchema() should occur. (the alternative is to make FeatureType extend ListAttributeType). Something should be done as they have 90% the same API.
Field Summary |
Fields inherited from interface org.geotools.feature.AttributeType |
UNBOUNDED |
Method Summary | |
java.lang.Object |
createDefaultValue()
Method should delegate responsibility to a FeatureFactory. |
java.lang.Object |
duplicate(java.lang.Object src)
Method should return getSchema().duplicate( feature ) Exampe implementation:
return getSchema().duplicate( (Feature) getValue() );
It is understood that FeatureType.duplicate
|
Filter |
getRestriction()
Filter must indicate value is required to be a member of getSchema(). |
FeatureType |
getSchema()
Retrieve the schema for this FeatureType |
java.lang.Class |
getType()
Method must return type Feature.class. |
boolean |
isGeometry()
Deprecated. repalce with: type instanceof
GeometryAttributeType |
Methods inherited from interface org.geotools.feature.AttributeType |
getMaxOccurs, getMinOccurs, getName, isNillable, parse, validate |
Method Detail |
public java.lang.Object createDefaultValue()
createDefaultValue
in interface AttributeType
AttributeType.createDefaultValue()
public java.lang.Object duplicate(java.lang.Object src) throws IllegalAttributeException
Exampe implementation:
return getSchema().duplicate( (Feature) getValue() );
It is understood that FeatureType.duplicate
duplicate
in interface AttributeType
src
- The Object to duplicate.
IllegalAttributeException
- If the src Object is not the correct
type.AttributeType.duplicate(java.lang.Object)
public java.lang.Class getType()
Exampe implementation:
return Feature.class;
getType
in interface AttributeType
AttributeType.getType()
public FeatureType getSchema()
public boolean isGeometry()
type instanceof
GeometryAttributeType
false
.
org.geotools.feature.AttributeType#isGeometry()
public Filter getRestriction()
TODO: We need a Filter code snipit describing how to enforce the indicated relationship.
getRestriction
in interface AttributeType
AttributeType.getRestriction()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |