## org.opengis.feature
Interface ComplexAttribute

All Superinterfaces:
  Attribute, Property

All Known Subinterfaces:
  DataFeatureCollection, Feature, FeatureCollection, SimpleFeature, SimpleFeatureCollection

    public interface ComplexAttribute

extends Attribute

A complex Atribtue holds a collection of attribute values in a single group.

Direct Access:

- Collection<Attribute> get() - list of attributes, may be modified
- List<Attribute> get( AttributeName ) - retrieve attributes matching provided name

Note that the AttributeName name used above can be deterimed by examining the information available from getType().

It is recommended practice to formally use an Expression to access the contents of a ComplexAttribute, the Expression implementation will provide a more complete query langage then supported via direct access. Once again please use the information in getType() to assist in constructing useful Expressions.

Method Summary
`Collection<Association>` `associations()` Convenience method for getting at the associations contained in this complex attribute.
`Collection<Attribute>` `attributes()` Convenience method for getting at the attributes contained in this complex attribute.
`List<Property>` `get(Name name)` Returns the subset of the attributes returned by `#get()` which match the specified name.
`AttributeDescriptor` `getDescriptor()` Indicates the AttirbuteDescriptor for this content.
`ComplexType` `getType()` Indicate the AttributeType, if we have a descriptor it will be in agreement.
`Collection<Property>` `getValue()` Returns the value of the attribute, which is a list of other properties, attributes + associations..
`void` `setValue(Collection<Property> values)` Sets the complete contents of this Attribute, that must be valid against the type's schema descriptor.

Methods inherited from interface Attribute
`getID, nillable, operation, setValue`

Methods inherited from interface Property
`descriptor, name`

Method Detail

### getType

    ComplexType getType()

  Description copied from interface: `Attribute`
  Indicate the AttributeType, if we have a descriptor it will be in agreement.

  Specified by:
    `getType` in interface `Attribute`
  Specified by:
    `getType` in interface `Property`
  Returns:
    AttributeType information describing allowable content

### getDescriptor

    AttributeDescriptor getDescriptor()

  Indicates the AttirbuteDescriptor for this content.

  The attribute descriptor formally captures the name and multiplicity and type associated with this attribute.

  Specified by:
    `getDescriptor` in interface `Attribute`
  Specified by:
    `getDescriptor` in interface `Property`
  Returns:
    Descriptor for this attribute, if it is contained by another ComplexAttribute

### setValue

    void setValue(Collection<Property> values)

  Sets the complete contents of this Attribute, that must be valid against the type's schema descriptor.

  Throws:
    `IllegalArgumentException`

### getValue

    Collection<Property> getValue()

  Returns the value of the attribute, which is a list of other properties, attributes + associations..

  Specified by:
    `getValue` in interface `Attribute`
  Returns:
    Value Object of the class indicated by getType().getBinding()

### attributes

    Collection<Attribute> attributes()

  Convenience method for getting at the attributes contained in this complex attribute.

### associations

    Collection<Association> associations()

  Convenience method for getting at the associations contained in this complex attribute.

  Returns:

### get

    List<Property> get(Name name)

  Returns the subset of the attributes returned by `#get()` which match the specified name.

  Parameters:
    `name` - Name of attributes to return.
  Returns:
    List of attributes matching name, empty list if no match.

Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.