T
- the class of the elements of the underlying time seriespublic interface Series<T> extends DBObject
Chronicle
and has three required Attribute
s: a name, a value
type, and a time domain. These attributes are specified in the Schema
defining a collection of chronicles. There can be additional attributes.
The type of a series is not the same as its ValueType
but corresponds
to the value of the type parameter of its value type.
TimeAddressable
Modifier and Type | Method and Description |
---|---|
UpdatableSeries<T> |
edit()
Return an
UpdatableSeries corresponding to this series. |
Attribute<?> |
getAttribute(String name,
boolean mustExist)
Return the attribute with the given name.
|
Collection<Attribute<?>> |
getAttributes()
Return all the series' attributes.
|
Chronicle |
getChronicle()
Return the chronicle to which this series belongs.
|
SeriesDefinition |
getDefinition()
Return the series' definition.
|
String |
getDescription(boolean full)
Return the description of the series.
|
List<String> |
getDescriptions()
Return the list of all descriptions along the chronicle chain and the
series.
|
ch.agent.t2.timeseries.Observation<T> |
getFirstObservation(ch.agent.t2.time.TimeIndex time)
Return the observation at the given time index or the first following
observation.
|
ch.agent.t2.timeseries.Observation<T> |
getLastObservation(ch.agent.t2.time.TimeIndex time)
Return the observation at the give time index or the last preceding
observation.
|
String |
getName(boolean full)
Return the simple name or the full name of the series.
|
List<String> |
getNames()
Return the list of all names along the chronicle chain and the series.
|
int |
getNumber()
Return the series number within the chronicle.
|
ch.agent.t2.time.Range |
getRange()
Return the range of values.
|
ch.agent.t2.time.TimeDomain |
getTimeDomain()
Return the time domain of the series.
|
T |
getValue(ch.agent.t2.time.TimeIndex time)
Return the value of the time series at the time index specified.
|
ch.agent.t2.timeseries.TimeAddressable<T> |
getValues(ch.agent.t2.time.Range range)
Return the time series of values in the range specified.
|
ch.agent.t2.timeseries.TimeAddressable<T> |
getValues(ch.agent.t2.time.Range range,
boolean forceSparse)
Return the time series of values in the range specified.
|
ValueType<T> |
getValueType()
Return the value type of the series.
|
boolean |
isSparse()
Return true if the series is forced to use sparse time series.
|
<S> Series<S> |
typeCheck(Class<S> type)
Cast the series to the type specified.
|
getDatabase, getId, getSurrogate, inConstruction, isValid
UpdatableSeries<T> edit()
UpdatableSeries
corresponding to this series.
Successfully getting an Updatable
object does not imply
that updates can be successfully applied.Chronicle getChronicle()
int getNumber()
SeriesDefinition getDefinition() throws T2DBException
T2DBException
String getName(boolean full) throws T2DBException
full
- if true return the full name else the simple nameT2DBException
List<String> getNames() throws T2DBException
T2DBException
String getDescription(boolean full) throws T2DBException
full
- if true return the full description, else the simple
descriptionT2DBException
List<String> getDescriptions() throws T2DBException
T2DBException
ValueType<T> getValueType() throws T2DBException
T2DBException
ch.agent.t2.time.TimeDomain getTimeDomain() throws T2DBException
T2DBException
Attribute<?> getAttribute(String name, boolean mustExist) throws T2DBException
name
- the name of the attributeT2DBException
Collection<Attribute<?>> getAttributes() throws T2DBException
T2DBException
ch.agent.t2.timeseries.TimeAddressable<T> getValues(ch.agent.t2.time.Range range) throws ch.agent.t2.T2Exception, T2DBException
range
- the range of values wanted or null for the full rangeT2DBException
ch.agent.t2.T2Exception
ch.agent.t2.timeseries.TimeAddressable<T> getValues(ch.agent.t2.time.Range range, boolean forceSparse) throws ch.agent.t2.T2Exception, T2DBException
forceSparse
parameter is true, a sparse time series will be used. If the code is
false but the sparsity setting of the schema for the series
requires a sparse time series, then one will be used. In all other cases
the software will decide whether to use a standard or a sparse time
series using heuristics.range
- the range of values wanted or null to get the full rangeforceSparse
- if true use a sparse time seriesT2DBException
ch.agent.t2.T2Exception
T getValue(ch.agent.t2.time.TimeIndex time) throws ch.agent.t2.T2Exception, T2DBException
time
- a time indexT2DBException
ch.agent.t2.T2Exception
TimeAddressable.getMissingValue()
ch.agent.t2.timeseries.Observation<T> getLastObservation(ch.agent.t2.time.TimeIndex time) throws ch.agent.t2.T2Exception, T2DBException
time
- a time index or nullT2DBException
ch.agent.t2.T2Exception
ch.agent.t2.timeseries.Observation<T> getFirstObservation(ch.agent.t2.time.TimeIndex time) throws ch.agent.t2.T2Exception, T2DBException
time
- a time index or nullT2DBException
ch.agent.t2.T2Exception
ch.agent.t2.time.Range getRange() throws ch.agent.t2.T2Exception, T2DBException
ch.agent.t2.T2Exception
T2DBException
boolean isSparse() throws T2DBException
getValues(Range)
must return a sparse time series,
else it can return a sparse or a regular time series.T2DBException
<S> Series<S> typeCheck(Class<S> type) throws T2DBException
type
- the underlying type requiredT2DBException
Copyright © 2017. All rights reserved.