Package org.opengis.feature
Interface DynamicAttribute<V>
-
- Type Parameters:
V
- the type of dynamic attribute values.
@UML(identifier="AttributeType", specification=OGC_14083) public interface DynamicAttribute<V> extends Attribute<V>
An instance of aDynamicAttributeType
containing time-dependent values of an attribute. A dynamic attribute represents the result of ascertaining the value of an attribute of a moving feature that changes over time and/or location. Dynamic attributes contain non-spatial values; time-varying geometric values should be represented by trajectories instead.DynamicAttribute
holds four main information:- A reference to a dynamic attribute type which defines the base Java type and domain of valid values.
- One or more values at given times, which may be singletons ([0 … 1] multiplicity) or multi-valued ([0 … ∞] multiplicity).
- One or more values at no particular time (optional),
inherited from the parent
Attribute
interface. - Optional characteristics about the attribute.
TemporalPosition
s, which may be calendar dates or Julian days for instances. Even though the value of dynamic attribute depends on the spatiotemporal location, this interface only considers the temporal dependencies of their changes of value. Evaluating at the given temporal position may require interpolation. Interpolation algorithm, if any, is implementation-dependent.DynamicAttribute
can be instantiated by calls toDynamicAttributeType.newInstance()
.- Since:
- 3.1
- See Also:
DynamicAttributeType
,Attribute
-
-
Method Summary
Modifier and Type Method Description DynamicAttributeType<V>
getType()
Returns information about the dynamic attribute (base Java class, domain of values, etc.).V
valueAt(TemporalPosition time)
Returns the attribute value at the given time, ornull
if none.Collection<V>
valuesAt(TemporalPosition time)
Returns all attribute values at the given time, or an empty collection if none.
-
-
-
Method Detail
-
getType
DynamicAttributeType<V> getType()
Returns information about the dynamic attribute (base Java class, domain of values, etc.).
-
valueAt
V valueAt(TemporalPosition time) throws OutOfTemporalDomainException, MultiValuedPropertyException
Returns the attribute value at the given time, ornull
if none. This convenience method can be invoked in the common case where the maximum number of dynamic attribute values is restricted to 1 or 0.- Parameters:
time
- the date, Julian day or other means to represent a position in time.- Returns:
- the attribute value at the given time (may be
null
). - Throws:
OutOfTemporalDomainException
- if the given temporal time is outside the period of validity.MultiValuedPropertyException
- if this attribute contains more than one value at the given time.
-
valuesAt
@UML(identifier="valueAt", specification=OGC_14083) Collection<V> valuesAt(TemporalPosition time) throws OutOfTemporalDomainException
Returns all attribute values at the given time, or an empty collection if none. Evaluating at the given temporal position may require interpolation. Interpolation algorithm, if any, is implementation-dependent.Implementation note
there is different approaches in the way that collection elements are related to those property values:- The collection may be a snapshot of property values at the method invocation time.
- The collection may be an unmodifiable view of properties values.
- The collection may be live (changes in the collection are reflected in this attribute, and vis-versa).
- Parameters:
time
- the date, Julian day or other means to represent a position in time.- Returns:
- the attribute values.
- Throws:
OutOfTemporalDomainException
- if the given temporal time is outside the period of validity.
-
-