| java.lang.Object org.geotools.feature.type.SetAttributeType
SetAttributeType | public class SetAttributeType implements AttributeType(Code) | | Represents an un-ordered Set of AttributeTypes. For SFS this should not be used.
For GML this is the same as an element whose complexType contains a
All of Attributes.
NOTE: Some of the methods in this class has nasty order-dependant assumptions, please fix.
author: dzwiers |
SetAttributeType | public SetAttributeType(String name, boolean nillable, int min, int max, AttributeType[] children, Filter restriction)(Code) | | |
createDefaultValue | public Object createDefaultValue()(Code) | | This method is unstable ... and does not yet check validity well.
TODO make this method robust
This method assumes the Objects are in the order of the attributes.
In the future, this should be implemented with a bubble sort type
algorithm for testing each object vs each child. Bubble sort is
recommended as the sample size is typically less than 25 elements,
and the operation takes O(n*n) time.
|
duplicate | public Object duplicate(Object src) throws IllegalAttributeException(Code) | | This method is unstable ... and does not yet check validity well.
TODO make this method robust
This method assumes the Objects are in the order of the attributes.
In the future, this should be implemented with a bubble sort type
algorithm for testing each object vs each child. Bubble sort is
recommended as the sample size is typically less than 25 elements,
and the operation takes O(n*n) time.
|
find | public int find(AttributeType type)(Code) | | Find the position of a given AttributeType.
Parameters: type - The type to search for. -1 if not found, a zero-based index if found. |
find | public int find(String attName)(Code) | | Find the position of an AttributeType which matches the given String.
Parameters: attName - the name to look for -1 if not found, zero-based index otherwise |
getAttributeCount | public int getAttributeCount()(Code) | | Returns the number of attributes at the first 'level' of the schema.
equivalent value to getAttributeTypes().length |
getAttributeType | public AttributeType getAttributeType(String xPath)(Code) | | Gets the attributeType at this xPath, if the specified attributeType
does not exist then null is returned.
Parameters: xPath - XPath pointer to attribute type. True if attribute exists. |
getAttributeType | public AttributeType getAttributeType(int position)(Code) | | Gets the attributeType at the specified index.
Parameters: position - the position of the attribute to check. The attribute type at the specified position. |
getMaxOccurs | public int getMaxOccurs()(Code) | | |
getMinOccurs | public int getMinOccurs()(Code) | | |
getRestriction | public Filter getRestriction()(Code) | | |
hasAttributeType | public boolean hasAttributeType(String xPath)(Code) | | 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. If
getAttributeType does not have the AttributeType it will just return
null. Gets the number of occurrences of this attribute.
Parameters: xPath - XPath pointer to attribute type. Number of occurrences. |
isGeometry | public boolean isGeometry()(Code) | | |
isNillable | public boolean isNillable()(Code) | | |
parse | public Object parse(Object value) throws IllegalArgumentException(Code) | | This method is unstable ... and does not yet check validity well.
TODO make this method robust
This method assumes the Objects are in the order of the attributes.
In the future, this should be implemented with a bubble sort type
algorithm for testing each object vs each child. Bubble sort is
recommended as the sample size is typically less than 25 elements,
and the operation takes O(n*n) time.
|
validate | public void validate(Object obj) throws IllegalArgumentException(Code) | | This method is unstable ... and does not yet check validity well.
TODO make this method robust
This method assumes the Objects are in the order of the attributes.
In the future, this should be implemented with a bubble sort type
algorithm for testing each object vs each child. Bubble sort is
recommended as the sample size is typically less than 25 elements,
and the operation takes O(n*n) time.
Note that on the Attribute side of the fence ... this is acutally
an unordered List (a Set of elements, where each element has multiplicity ...)
|
|
|