Package org.geotools.feature.type
Class Descriptors
Object
Descriptors
Helper methods for dealing with Descriptor.
This methods opperate directly on the interfaces provided by geoapi, no actual classes were harmed in the making of these utility methods.
- Since:
- 2.5
- Author:
- Jody Garnett, Justin Deoliveira
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final AttributeDescriptorReturns the attribute descriptor from a list which matches the specified name, ornullif no such descriptor is found.static booleanisSimple(Collection<AttributeDescriptor> schema) Determines if a collection of attribute descriptors is "simple".static Listlist(AttributeType type) Returns the list of descriptors defined in the provided schema, preserving declaration order when relevant.static intmaxOccurs(ComplexType schema, AttributeType type) static booleanmultiple(ComplexType schema, AttributeType type) True if there may be more then one AttributeType in the schema.static AttributeDescriptornode(Collection schema, Name name) Finds the node associated with the provided name.static AttributeDescriptornode(ComplexType schema, String name) Finds the first node associated with the provided name disregarding namespacesstatic AttributeDescriptornode(ComplexType schema, AttributeType type) Finds the node associated with the provided type.static AttributeDescriptornode(ComplexType schema, Name name) Finds the node associated with the provided name.static List<AttributeDescriptor>nodes(ComplexType schema, AttributeType type) List of nodes matching AttributeType.static AttributeTypetype(Collection schema, Name name) Locate type associated with provided name, or null if not found.static AttributeTypetype(ComplexType schema, String name) Locate type associated with provided name, or null if not found.static AttributeTypetype(ComplexType schema, Name name) Locate type associated with provided name, or null if not found.static List<AttributeType>types(AttributeType type) List of types described by this schema.static final AttributeDescriptorWraps aAttributeTypeinAttributeDescriptor.static final ListwrapAttributeTypes(List<AttributeType> typeList) Wraps a list ofAttributeTypeinAttributeDescriptor.
-
Constructor Details
-
Descriptors
public Descriptors()
-
-
Method Details
-
wrapAttributeTypes
Wraps a list ofAttributeTypeinAttributeDescriptor.- Parameters:
typeList- The list of attribute types.- Returns:
- The list of attribute descriptors.
- See Also:
-
wrapAttributeType
Wraps aAttributeTypeinAttributeDescriptor.- Parameters:
type- The attribute type.- Returns:
- The attribute descriptor.
-
find
Returns the attribute descriptor from a list which matches the specified name, ornullif no such descriptor is found.- Parameters:
descriptors- The list ofAttributeDescriptor.name- The name to match.- Returns:
- The matching attribute descriptor, or
null.
-
type
Locate type associated with provided name, or null if not found.Namespaces are not taken in count, so if two properties share the same local name, the first one that matches will be returned.
-
type
Locate type associated with provided name, or null if not found.Namespaces are not taken in count, so if two properties share the same local name, the first one that matches will be returned.
-
type
Locate type associated with provided name, or null if not found. -
node
Finds the first node associated with the provided name disregarding namespaces -
node
Finds the node associated with the provided name.- Returns:
- AttributeDescriptor assoicated with provided name, or null if not found.
-
node
Finds the node associated with the provided name.- Returns:
- AttributeDescriptor assoicated with provided name, or null if not found.
-
node
Finds the node associated with the provided type.Note a type may be included in more then one node, in which case this will only find the first one.
- Returns:
- AttributeDescriptor assoicated with provided name, or null if not found.
-
nodes
List of nodes matching AttributeType.- Returns:
- List of nodes for the provided type, or empty.
-
types
List of types described by this schema.On the cases where order matters, the returned list preserves the order of descriptors declared in
schema- Returns:
- List of nodes for the provided type, or empty.
-
multiple
True if there may be more then one AttributeType in the schema.This may happen if:
- The AttributeType is referenced by more then one node.
- The node referencing the type has multiplicy greater then 1
-
maxOccurs
-
list
Returns the list of descriptors defined in the provided schema, preserving declaration order when relevant. -
isSimple
Determines if a collection of attribute descriptors is "simple".- Parameters:
schema- Collection of attribute descriptors.- Returns:
- True if schema is simple, otherwise false.
-