| java.lang.Object org.geotools.feature.iso.Descriptors
Descriptors | public class Descriptors (Code) | | 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.
author: Jody Garnett author: Justin Deoliveira |
Method Summary | |
public static boolean | isSimple(Collection schema) Determines if a collection of attribute descriptors is "simple".
Parameters: schema - Collection of attribute descriptors. | public static List | list(AttributeType type) Returns the list of descriptors defined in the provided schema,
preserving declaration order when relevant. | public static int | maxOccurs(ComplexType schema, AttributeType type) | public static boolean | multiple(ComplexType schema, AttributeType type) True if there may be more then one AttributeType in the schema. | public static AttributeDescriptor | node(ComplexType schema, String name) | public static AttributeDescriptor | node(ComplexType schema, Name name) Finds the node associated with the provided name. | public static AttributeDescriptor | node(Collection schema, Name name) Finds the node associated with the provided name. | public static AttributeDescriptor | node(ComplexType schema, AttributeType type) Finds the node associated with the provided type. | public static List | nodes(ComplexType schema, AttributeType type) List of nodes matching AttributeType. | AttributeDescriptor | restrict(AttributeDescriptor node, AttributeDescriptor restrict) We can only restrict node if the restricftion is a subtype that used by
node. | Collection | restriction(Collection schema, Collection restrict, Collection restriction) | public static AttributeType | type(Collection schema, Name name) Locate type associated with provided name, or null if not found. | public static AttributeType | type(ComplexType schema, String name) Locate type associated with provided name, or null if not found. | public static AttributeType | type(ComplexType schema, Name name) Locate type associated with provided name, or null if not found. | public static List | types(AttributeType type) List of types described by this schema. |
isSimple | public static boolean isSimple(Collection schema)(Code) | | Determines if a collection of attribute descriptors is "simple".
Parameters: schema - Collection of attribute descriptors. True if schema is simple, otherwise false. |
list | public static List list(AttributeType type)(Code) | | Returns the list of descriptors defined in the provided schema,
preserving declaration order when relevant.
Parameters: schema - |
maxOccurs | public static int maxOccurs(ComplexType schema, AttributeType type)(Code) | | |
multiple | public static boolean multiple(ComplexType schema, AttributeType type)(Code) | | 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
Parameters: schema - Parameters: type - |
node | public static AttributeDescriptor node(ComplexType schema, String name)(Code) | | Finds the first node associated with the provided name disregarding
namespaces
Parameters: schema - Parameters: name - |
node | public static AttributeDescriptor node(ComplexType schema, Name name)(Code) | | Finds the node associated with the provided name.
Parameters: schema - Parameters: name - AttributeDescriptor assoicated with provided name, or null if notfound. |
node | public static AttributeDescriptor node(Collection schema, Name name)(Code) | | Finds the node associated with the provided name.
Parameters: schema - Parameters: name - AttributeDescriptor assoicated with provided name, or null if notfound. |
node | public static AttributeDescriptor node(ComplexType schema, AttributeType type)(Code) | | 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.
Parameters: schema - Parameters: type - AttributeDescriptor assoicated with provided name, or null if notfound. |
nodes | public static List nodes(ComplexType schema, AttributeType type)(Code) | | List of nodes matching AttributeType.
Parameters: schema - Parameters: type - List of nodes for the provided type, or empty. |
restrict | AttributeDescriptor restrict(AttributeDescriptor node, AttributeDescriptor restrict)(Code) | | We can only restrict node if the restricftion is a subtype that used by
node.
Parameters: node - Parameters: restrict - restrict, iff restrict.getType() ISA node.getType() |
type | public static AttributeType type(Collection schema, Name name)(Code) | | 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.
Parameters: schema - Parameters: name - |
type | public static AttributeType type(ComplexType schema, String name)(Code) | | 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.
Parameters: schema - Parameters: name - |
type | public static AttributeType type(ComplexType schema, Name name)(Code) | | Locate type associated with provided name, or null if not found.
Parameters: schema - Parameters: name - |
types | public static List types(AttributeType type)(Code) | | List of types described by this schema.
On the cases where order matters, the returned list preserves the order
of descriptors declared in schema
Parameters: type - List of nodes for the provided type, or empty. |
|
|