org.opengis.feature
Interface Attribute

All Superinterfaces:
Property
All Known Subinterfaces:
BooleanAttribute, BoundingBoxAttribute, ComplexAttribute, DataFeatureCollection, Feature, FeatureCollection, GeometryAttribute, NumericAttribute, SimpleFeature, SimpleFeatureCollection, TemporalAttribute, TextAttribute

public interface Attribute
extends Property

Contains information defining an attribute.

An Attribute is used to hold a value (ie aggregation), similar to the way a Map.Entry holds values in a java.util.Map. Attribute is responsible for holding onto the following three things:

If this Attribute is contained in another data structure you may use the provided Descriptor. This descriptor will provided any additional information (such as name and multiplicity) needed.

The use of Attribute in our feature model is similar to the use of a "field" in a Java Object. A field also brings together a field name, value and type.

Differences from ISO 19107: We do not use TypeName directly, the functionality is served by our AttributeType class which provides additional functionality. AttributeType provides a Name, the java class for our value, and any additional restrictions.

Validation is provided by way of constraints implemented using Filter.


Method Summary
 AttributeDescriptor getDescriptor()
          Indicates the AttirbuteDescriptor for this content.
 String getID()
          Unique, immutable identification for domain object being modeled.
 AttributeType getType()
          Indicate the AttributeType, if we have a descriptor it will be in agreement.
 Object getValue()
          Access to the content of this Attribute.
 boolean nillable()
          Determines if the attribute is allowed to have a null value.
 Object operation(Name name, List<Object> parameters)
          Call operation on this Attribute.
 void setValue(Object newValue)
          Set content to newValue
 
Methods inherited from interface Property
descriptor, name
 

Method Detail

getDescriptor

AttributeDescriptor getDescriptor()
Indicates the AttirbuteDescriptor for this content.

The attribute descriptor formally captures the name and multiplicity information for this attribute. If this attribute is not contained in a container, then the descriptor will be null.

Specified by:
getDescriptor in interface Property
Returns:
Descriptor for this attribute, may be null.

nillable

boolean nillable()
Determines if the attribute is allowed to have a null value.

For those attributes which are contained within a complex type (ie. getDescriptor() != null), this method defers to the descriptor

See Also:
AttributeDescriptor.isNillable()

getType

AttributeType getType()
Indicate the AttributeType, if we have a descriptor it will be in agreement.

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

getID

String getID()
Unique, immutable identification for domain object being modeled.

Returns:
Unique ID, may not be null if getType().isIdentifiable() is true

getValue

Object getValue()
Access to the content of this Attribute.

A subclass may define a more specific method to access this value, in order to improve readability or make allowances for Java 1.4 use.

Returns:
Value Object of the class indicated by getType().getBinding()

operation

Object operation(Name name,
                 List<Object> parameters)
Call operation on this Attribute.

Parameters:
name - Name of operation to be called
parameters - Parameters for the operation
Returns:
Result of operation, may be null

setValue

void setValue(Object newValue)
Set content to newValue

Parameters:
newValue - Object of the class indicated by getType().getBinding()
Throws:
IllegalArgumentException - If newValue does not match getType().getBinding()


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