|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectPropertyDescriptorImpl
AttributeDescriptorImpl
ChoiceAttributeType
public class ChoiceAttributeType
This represents a Choice of AttributeTypes. That means, an Attribute of this type may be one of any of this AttributeType's children. This attribute is not valid for Simple Features, and maps to the Choice construct in GML.
Another way to think about the ChoiceAttributeType is as a Union construction from C - it can store a number of different types of value, but it only stores the one value. The parse and validate methods try out each of the choices to see if one of them might work, since all are valid. The order that the child attributeTypes (the choices you can use) are specified is important, because some objects can parse and validate against several types. The first choice that returns true is the one that will
Nested Class Summary | |
---|---|
static class |
ChoiceAttributeType.Geometric
Deprecated. A special class that is made so a Choice can serve as the Default Geometry in a FeatureType, by implementing GeometryAttributeType. |
Field Summary |
---|
Fields inherited from class AttributeDescriptorImpl |
---|
defaultValue |
Fields inherited from class PropertyDescriptorImpl |
---|
isNillable, maxOccurs, minOccurs, name, type |
Fields inherited from interface AttributeType |
---|
UNBOUNDED |
Constructor Summary | |
---|---|
ChoiceAttributeType(ChoiceAttributeType copy)
Deprecated. DOCUMENT ME! |
|
ChoiceAttributeType(String name,
AttributeType[] children)
Deprecated. |
|
ChoiceAttributeType(String name,
int min,
int max,
AttributeType[] children,
Filter restriction)
Deprecated. |
Method Summary | |
---|---|
boolean |
calculateNillable(AttributeType[] children)
Deprecated. |
protected AttributeType[] |
copyChildren(AttributeType[] attributes)
Deprecated. |
Object |
createDefaultValue()
Deprecated. Returns the default value for the first child which does not throw an exception, null otherwise. |
Object |
duplicate(Object src)
Deprecated. Goes through the children, and searches for a duplicator that works. |
boolean |
equals(Object other)
Deprecated. |
int |
find(AttributeType type)
Deprecated. Find the position of a given AttributeType. |
int |
find(String attName)
Deprecated. Find the position of an AttributeType which matches the given String. |
int |
getAttributeCount()
Deprecated. Returns the number of attributes at the first 'level' of the schema. |
AttributeType |
getAttributeType(int position)
Deprecated. Gets the attributeType at the specified index. |
AttributeType |
getAttributeType(String xPath)
Deprecated. Gets the attributeType at this xPath, if the specified attributeType does not exist then null is returned. |
AttributeType[] |
getAttributeTypes()
Deprecated. |
Class |
getBinding()
Deprecated. Gets the class of the object. |
String |
getLocalName()
Deprecated. Returns the unqualified name of this attribute. |
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 |
hasAttributeType(String xPath)
Deprecated. 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. |
int |
hashCode()
Deprecated. Override of hashCode. |
boolean |
isGeometry()
Deprecated. |
Object |
parse(Object value)
Deprecated. Goes through the children, and searches for a parser that works. |
String |
toString()
Deprecated. Gets a representation of this object as a string. |
void |
validate(Object obj)
Deprecated. Goes through the children, and searches for a validator that works. |
Methods inherited from class AttributeDescriptorImpl |
---|
getDefaultValue, getType |
Methods inherited from class PropertyDescriptorImpl |
---|
getMaxOccurs, getMinOccurs, getName, getUserData, isNillable |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface AttributeType |
---|
getMaxOccurs, getMinOccurs, isNillable |
Methods inherited from interface AttributeDescriptor |
---|
getDefaultValue, getType |
Methods inherited from interface PropertyDescriptor |
---|
getName, getUserData |
Constructor Detail |
---|
public ChoiceAttributeType(ChoiceAttributeType copy)
copy
- public ChoiceAttributeType(String name, int min, int max, AttributeType[] children, Filter restriction)
public ChoiceAttributeType(String name, AttributeType[] children)
Method Detail |
---|
public Filter getRestriction()
AttributeType
getRestriction
in interface AttributeType
protected AttributeType[] copyChildren(AttributeType[] attributes)
public 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 AttributeType
getLocalName
in interface AttributeDescriptor
getLocalName
in class AttributeDescriptorImpl
PropertyDescriptor.getName()
public Class getBinding()
getBinding
in interface AttributeType
AttributeType.getBinding()
public boolean calculateNillable(AttributeType[] children)
public boolean isGeometry()
public Object parse(Object value) throws IllegalArgumentException
parse
in interface AttributeType
value
- The object to parse.
IllegalArgumentException
- If the object could not be parsed by
any of the child attribute Types.public void validate(Object obj) throws IllegalArgumentException
validate
in interface AttributeType
obj
- The object to validate.
IllegalArgumentException
- If none of the children can validate.public Object duplicate(Object src) throws IllegalAttributeException
duplicate
in interface AttributeType
src
- The object to be duplicated.
IllegalAttributeException
- For any attribute errors.
IllegalArgumentException
- If the object could not be duplicated.public Object createDefaultValue()
createDefaultValue
in interface AttributeType
public boolean hasAttributeType(String xPath)
xPath
- XPath pointer to attribute type.
public int getAttributeCount()
public AttributeType getAttributeType(String xPath)
xPath
- XPath pointer to attribute type.
public int find(AttributeType type)
type
- The type to search for.
public int find(String attName)
attName
- the name to look for
public AttributeType getAttributeType(int position)
position
- the position of the attribute to check.
public AttributeType[] getAttributeTypes()
public boolean equals(Object other)
equals
in class AttributeDescriptorImpl
public int hashCode()
hashCode
in class AttributeDescriptorImpl
public String toString()
toString
in class AttributeDescriptorImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |