|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
AttributeDescriptor
.
public interface AttributeType
Stores metadata about a single attribute object.
AttributeTypes must also provide the validate(Object obj)
method, which determines whether a given object matches the constraints
imposed by the AttributeType. In a default attribute this will simply be
that it is of the correct class and non-null (or null if isNillable is
true). More complex AttributeTypes can impose any restrictions that they
like. Nested FeatureTypes are an example of this, as they need to check
that the Feature object matches all its constraints, not that it is just
of class Feature.
Additionally, implementors may use the parse method to convert an object to its preferred storage type. If an implementor does not choose to provide any functionality for this method they should simple return the object passed in. If parsing is attempted and not successful, then an exception should be thrown. This method is primarily used by FeatureType to try to convert objects to the correct storage type, such as a string of a double when the AttributeType requires a Double.
Field Summary | |
---|---|
static int |
UNBOUNDED
Deprecated. Represents any number of elements. |
Method Summary | |
---|---|
Object |
createDefaultValue()
Deprecated. Create a default value for this AttributeType. |
Object |
duplicate(Object src)
Deprecated. Create a duplicate value of the passed Object. |
Class |
getBinding()
Deprecated. Gets the class/type/binding for this attribute. |
String |
getLocalName()
Deprecated. Returns the unqualified name of this attribute. |
int |
getMaxOccurs()
Deprecated. Returns the Max number of occurences ... |
int |
getMinOccurs()
Deprecated. Returns the Min number of occurences ... |
Filter |
getRestriction()
Deprecated. This represents a Facet in XML schema ... for example can be used to represent the max length of 20 for a string. |
boolean |
isNillable()
Deprecated. Returns whether nulls are allowed for this attribute. |
Object |
parse(Object value)
Deprecated. Allows this AttributeType to convert an argument to its prefered storage type. |
void |
validate(Object obj)
Deprecated. Whether the tested object passes the validity constraints of this AttributeType. |
Methods inherited from interface AttributeDescriptor |
---|
getDefaultValue, getType |
Methods inherited from interface PropertyDescriptor |
---|
getName, getUserData |
Field Detail |
---|
static final int UNBOUNDED
Method Detail |
---|
String getLocalName()
This method is a replacement for PropertyDescriptor.getName()
in order to resolve
a naming conflict with the geoapi feature model.
getLocalName
in interface AttributeDescriptor
PropertyDescriptor.getName()
Class getBinding()
This method is a replacement for AttributeDescriptor.getType()
in order to resolve
a naming conflict with the geoapi feature model.
AttributeDescriptor.getType()
Filter getRestriction()
boolean isNillable()
isNillable
in interface PropertyDescriptor
int getMinOccurs()
getMinOccurs
in interface PropertyDescriptor
int getMaxOccurs()
getMaxOccurs
in interface PropertyDescriptor
Object parse(Object value) throws IllegalArgumentException
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.
IllegalArgumentException
- if parsing is attempted and is
unsuccessful.void validate(Object obj) throws IllegalArgumentException
getBinding()
, 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.
obj
- The object to be tested for validity.
IllegalArgumentException
- if the object does not validate.Object duplicate(Object src) throws IllegalAttributeException
src
- The Object to duplicate.
IllegalAttributeException
- If the src Object is not the correct
type.Object createDefaultValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |