|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.agmodel.physical.StoreImpl
Stores a time series of data collected during the partial interval (start,end]
In the case of data measured over a subinterval
the endpoint of the subinterval must lie in (start,end]
If interval straddles both start and end then it is also included.
Used by domain specific wrappers like net.agmodel.weatherData
interval data
start______________end
v v
----|===== =====|----
|=====| |-----|
|=======================|
==== included data
---- excluded data
point data
start______________end
v v
. . OOOOOO OO...
OOO included data
... excluded data
| Field Summary | |
protected Interval |
dateRange
|
protected SummaryHistory |
history
|
protected String |
name
|
| Constructor Summary | |
StoreImpl(Interval dateRange,
SummaryHistory history,
String name)
Creates a new store covering the period of interest with history details. |
|
| Method Summary | |
Store |
averageStore(Duration newResolution)
Creates a new store with data averaged to a lower temporal resolution. |
Store |
averageStore(Duration newResolution,
String newName)
Creates a new store with data averaged to a lower temporal resolution. |
Object |
clone()
|
Store |
extendStore(Date newEnd)
Creates a new store with a copy of the same data covering a longer period. |
Store |
extendStore(Interval interval)
Creates a new store at the same resolution as this one but covering a different DateRange. |
abstract JigsawQuantity |
getAverage(Interval interval)
Returns the average value of the time series over the interval. |
String |
getColumnHeading()
Returned a localized label for the Sequence |
abstract float[] |
getCoverage()
Creates an array representing the coverage of the data returned by getData(). |
Duration |
getCurrentResolution()
Returns the current resolution of data in the sequence (eg daily); |
abstract double[] |
getData()
Creates an array containing the data from the store. |
Interval |
getDateRange()
Returns the date range for which data can be stored in the sequence |
abstract JigsawQuantity |
getInstant(Date time)
Returns the instantaneous value of the time series at a particular point in time. |
abstract JigsawQuantity |
getMaximum(Interval interval)
Returns the maximum value of the time series over the interval. |
abstract JigsawQuantity |
getMinimum(Interval interval)
Returns the minimum value of the time series over the interval. |
String |
getName()
Returns a language independent name for the Sequence This name is typically used as a resourceBundle key or to identify the Sequence programmatically. |
Duration |
getResolution()
Returns the current resolution of data in the sequence (eg daily); |
SummaryHistory |
getSummaryHistory()
Returns the summary history for the data stored in the sequence |
SummaryKind |
getSummaryKind()
Returns the current summarykind of data in the sequence (eg averaged); |
abstract JigsawQuantity |
getTotal(Interval interval)
Returns the total value of the sequence over the interval. |
protected abstract Store |
makeExtendedStore(Interval interval)
Creates a new store at the same resolution as this one but covering a different DateRange. |
protected abstract Store |
makeSummarizedStore(Duration newResolution,
SummaryKind summaryType,
String newName)
Creates a new, empty store at a lower temporal resolution covering the same dateRange. |
Store |
maximumStore(Duration newResolution)
Creates a new store containing data summarised by finding the maximum of each subrange. |
Store |
maximumStore(Duration newResolution,
String newName)
Creates a new store containing data summarised by finding the maximum of each subrange. |
Store |
minimumStore(Duration newResolution)
Creates a new store containing data summarised by finding the minimum of each subrange. |
Store |
minimumStore(Duration newResolution,
String newName)
Creates a new store containing data summarised by finding the minimum of each subrange. |
abstract void |
putInstantValue(Date time,
double value)
Records the instantaneous value of the time series at a particular time |
abstract void |
putValueOverInterval(Interval interval,
double value)
Records the value of the timeseries over some subinterval. |
abstract void |
putValueOverInterval(Interval interval,
JigsawQuantity value)
Records the value of the timeseries over some subinterval, its coverage, and the extent to which it was interpolated. |
Store |
sampleStore(Duration newResolution)
Creates a new store with data sampled to a lower temporal resolution. |
Store |
sampleStore(Duration newResolution,
String newName)
Creates a new store with data sampled to a lower temporal resolution. |
void |
setColumnHeading(String aHeading)
Set the localized label for the Sequence |
void |
setName(String aName)
Sets the language independent name for the Sequence This name is typically used as a resourceBundle key or to identify the Sequence programmatically. |
Store |
totalStore(Duration newResolution)
Creates a new store with data totalled to a lower temporal resolution. |
Store |
totalStore(Duration newResolution,
String newName)
Creates a new store with data totalled to a lower temporal resolution. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.agmodel.physical.Store |
getNumberOfValues |
| Methods inherited from interface net.agmodel.physical.Sequence |
dumpSequence, getContentsAsString, getNumberOfSubComponents, getSequenceHeading, getSubHeading, getUnitsHeading |
| Field Detail |
protected String name
protected Interval dateRange
protected SummaryHistory history
| Constructor Detail |
public StoreImpl(Interval dateRange,
SummaryHistory history,
String name)
dateRange - the date range over which data can be stored.history - how the data in the store has been summarised.| Method Detail |
public Interval getDateRange()
Sequence
getDateRange in interface Sequencepublic SummaryHistory getSummaryHistory()
Store
getSummaryHistory in interface Storepublic Duration getResolution()
Sequence
getResolution in interface Sequencepublic SummaryKind getSummaryKind()
Sequence
getSummaryKind in interface Sequencepublic Duration getCurrentResolution()
Sequence
getCurrentResolution in interface Sequencepublic String getName()
Sequence
getName in interface Sequencepublic void setName(String aName)
Sequence
setName in interface SequenceaName - the new headingpublic String getColumnHeading()
Sequence
getColumnHeading in interface Sequencepublic void setColumnHeading(String aHeading)
Sequence
setColumnHeading in interface SequenceaHeading - the new heading
public abstract void putInstantValue(Date time,
double value)
Store
putInstantValue in interface Storetime - the point in timevalue - the value of the time series at that time
public abstract void putValueOverInterval(Interval interval,
double value)
Store
putValueOverInterval in interface Storeinterval - the period of time over which the measurement was taken. Interval duration must a postive integer multiple of store resolution, and the interval must align with the store "cells".value - the value of the time series over that interval
public abstract void putValueOverInterval(Interval interval,
JigsawQuantity value)
Store
putValueOverInterval in interface Storeinterval - the period of time over which the measurement was taken. Interval duration must a positive integer multiple of store resolution, and the interval must align with the store "cells".value - the value of the time series over that interval as a JigsawQuantitypublic abstract JigsawQuantity getInstant(Date time)
Store
getInstant in interface Storepublic abstract JigsawQuantity getAverage(Interval interval)
Store
getAverage in interface Storepublic abstract JigsawQuantity getMinimum(Interval interval)
Store
getMinimum in interface Storepublic abstract JigsawQuantity getMaximum(Interval interval)
Store
getMaximum in interface Storepublic abstract JigsawQuantity getTotal(Interval interval)
Store
getTotal in interface Storepublic Store totalStore(Duration newResolution)
Store
totalStore in interface StorenewResolution - the resolution of the resulting sequence
public Store totalStore(Duration newResolution,
String newName)
Store
totalStore in interface StorenewResolution - the resolution of the resulting sequencenewName - the new name for the store
public Store averageStore(Duration newResolution)
StoreStore.totalStore(Duration) for information on how the first data value is handled.
averageStore in interface StorenewResolution - the resolution of the resulting sequence
public Store averageStore(Duration newResolution,
String newName)
StoreStore.totalStore(Duration) for information on how the first data value is handled.
averageStore in interface StorenewResolution - the resolution of the resulting sequencenewName - the new name for the store
public Store minimumStore(Duration newResolution)
StoreStore.totalStore(Duration) for information on how the first data value is handled.
minimumStore in interface StorenewResolution - the resolution of the resulting sequence
public Store minimumStore(Duration newResolution,
String newName)
StoreStore.totalStore(Duration) for information on how the first data value is handled.
minimumStore in interface StorenewResolution - the resolution of the resulting sequencenewName - the new name for the store
public Store maximumStore(Duration newResolution)
StoreStore.totalStore(Duration) for information on how the first data value is handled.
The new store's default name is provided by SummaryKind.MAXIMUM.getName().
maximumStore in interface StorenewResolution - the resolution of the resulting sequence
public Store maximumStore(Duration newResolution,
String newName)
StoreStore.totalStore(Duration) for information on how the first data value is handled.
maximumStore in interface StorenewResolution - the resolution of the resulting sequencenewName - the new name for the store
public Store sampleStore(Duration newResolution)
StoreStore.totalStore(Duration) for information on how the first data value is handled.
sampleStore in interface StorenewResolution - the resolution of the resulting sequence
public Store sampleStore(Duration newResolution,
String newName)
StoreStore.totalStore(Duration) for information on how the first data value is handled.
sampleStore in interface StorenewResolution - the resolution of the resulting sequencenewName - the new name for the store
public Store extendStore(Interval interval)
Store
extendStore in interface Storeinterval - the interval that the new store covers.
public Store extendStore(Date newEnd)
Store
extendStore in interface StorenewEnd - the new end date, later than the current end date;
protected abstract Store makeSummarizedStore(Duration newResolution,
SummaryKind summaryType,
String newName)
newResolution - the resolution of the resulting storesummaryType - the way in which data will be summarised to make the new store.newName - the name for the new store
protected abstract Store makeExtendedStore(Interval interval)
interval - the interval that the new store covers.
public abstract double[] getData()
StoreStore.getCoverage() to test for the coverage.
(Missing values are returned as Double.NaN at present, but this might change.)
getData in interface Storepublic abstract float[] getCoverage()
StoreStore.getData().
getCoverage in interface Storepublic Object clone()
clone in interface Sequenceclone in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||