|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.feature.type.FeatureAttributeType
Represents an ordered list of AttributeTypes. For SFS this will be a FeatureType. For GML this is the same as an element whose complexType contains a Sequence of Attributes.
Field Summary |
Fields inherited from interface org.geotools.feature.AttributeType |
UNBOUNDED |
Constructor Summary | |
FeatureAttributeType(FeatureAttributeType copy)
|
|
FeatureAttributeType(java.lang.String name,
FeatureType featureType,
boolean nillable)
|
|
FeatureAttributeType(java.lang.String name,
FeatureType featureType,
boolean nillable,
int min,
int max)
|
Method Summary | |
java.lang.Object |
createDefaultValue()
Create a default value for this AttributeType. |
java.lang.Object |
duplicate(java.lang.Object src)
Create a duplicate value of the passed Object. |
int |
find(AttributeType type)
Find the position of a given AttributeType. |
int |
find(java.lang.String attName)
Find the position of an AttributeType which matches the given String. |
int |
getAttributeCount()
Returns the number of attributes at the first 'level' of the schema. |
AttributeType |
getAttributeType(int position)
Gets the attributeType at the specified index. |
AttributeType |
getAttributeType(java.lang.String xPath)
Gets the attributeType at this xPath, if the specified attributeType does not exist then null is returned. |
AttributeType[] |
getAttributeTypes()
|
protected FeatureType |
getFeatureType()
|
int |
getMaxOccurs()
Returns the Max number of occurences ... |
int |
getMinOccurs()
Returns the Min number of occurences ... |
java.lang.String |
getName()
Gets the name of this attribute. |
Filter |
getRestriction()
This represents a Facet in XML schema ... for example can be used to represent the max length of 20 for a string. |
java.lang.Class |
getType()
Gets the type of this attribute. |
boolean |
hasAttributeType(java.lang.String xPath)
This is only used twice in the whole geotools code base, and one of those is for a test, so we're removing it from the interface. |
boolean |
isGeometry()
|
boolean |
isNillable()
Returns whether nulls are allowed for this attribute. |
java.lang.Object |
parse(java.lang.Object value)
Allows this AttributeType to convert an argument to its prefered storage type. |
void |
validate(java.lang.Object obj)
Whether the tested object passes the validity constraints of this AttributeType. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FeatureAttributeType(FeatureAttributeType copy)
copy
- public FeatureAttributeType(java.lang.String name, FeatureType featureType, boolean nillable, int min, int max)
public FeatureAttributeType(java.lang.String name, FeatureType featureType, boolean nillable)
Method Detail |
public Filter getRestriction()
AttributeType
getRestriction
in interface AttributeType
protected FeatureType getFeatureType()
public java.lang.String getName()
AttributeType
getName
in interface AttributeType
public java.lang.Class getType()
AttributeType
getType
in interface AttributeType
public boolean isNillable()
AttributeType
isNillable
in interface AttributeType
public int getMinOccurs()
AttributeType
getMinOccurs
in interface AttributeType
public int getMaxOccurs()
AttributeType
getMaxOccurs
in interface AttributeType
public boolean isGeometry()
public java.lang.Object parse(java.lang.Object value) throws java.lang.IllegalArgumentException
AttributeType
parse
in interface AttributeType
value
- the object to attempt parsing of.
value
converted to the preferred storage of this
AttributeType
. If no parsing was possible then
the same object is returned.
java.lang.IllegalArgumentException
- if parsing is attempted and is
unsuccessful.public void validate(java.lang.Object obj) throws java.lang.IllegalArgumentException
AttributeType
AttributeType.getType()
, non-null if isNillable is
false, and a geometry if isGeometry is true. If The
object does not validate then an IllegalArgumentException reporting the
error in validation should be thrown.
validate
in interface AttributeType
obj
- The object to be tested for validity.
java.lang.IllegalArgumentException
- if the object does not validate.public java.lang.Object duplicate(java.lang.Object src) throws IllegalAttributeException
AttributeType
duplicate
in interface AttributeType
src
- The Object to duplicate.
IllegalAttributeException
- If the src Object is not the correct
type.public java.lang.Object createDefaultValue()
AttributeType
createDefaultValue
in interface AttributeType
public boolean hasAttributeType(java.lang.String xPath)
xPath
- XPath pointer to attribute type.
public int getAttributeCount()
public AttributeType getAttributeType(java.lang.String xPath)
xPath
- XPath pointer to attribute type.
public int find(AttributeType type)
type
- The type to search for.
public int find(java.lang.String attName)
attName
- the name to look for
public AttributeType getAttributeType(int position)
position
- the position of the attribute to check.
public AttributeType[] getAttributeTypes()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |