|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.agmodel.physical.StoreImpl
net.agmodel.physical.SynchronousStoreImpl
An implementation of Store which uses an array to store data and their derivation Most suitable for regularly spaced data which continually fluctuate, such as hourly temperatures
| Constructor Summary | |
SynchronousStoreImpl(Interval dateRange,
SummaryHistory history,
String name)
|
|
| Method Summary | |
Object |
clone()
|
String |
dumpSequence(DateFormat df,
String delimiter,
String rowTerminator)
Gets a printable version of the sequence contents. Data is formatted with a line for each time interval. The first field in the line is the date and time, formatted using the DateFormat passed as a parameter. The data for that time interval follows, separated by the default delimiter, with a new line character at the end of the row. |
JigsawQuantity |
getAverage(Interval interval)
Returns the average value of the time series over the interval. |
int |
getCapacity()
Returns the number of possible data values in the store. |
String |
getContentsAsString(Date date,
String delimiter)
Returns the measurement associated with a particular time as a string. |
float[] |
getCoverage()
Creates an array representing the coverage of the data returned by getData(). |
double[] |
getData()
Creates an array containing the data from the store. |
JigsawQuantity |
getInstant(Date time)
Returns the instantaneous value of the time series at a particular point in time. |
JigsawQuantity |
getMaximum(Interval interval)
Returns the maximum value of the time series over the interval. |
JigsawQuantity |
getMinimum(Interval interval)
Returns the minimum value of the time series over the interval. |
int |
getNumberOfSubComponents()
Get the number of sub-components in the sequence. |
double |
getNumberOfValues()
Returns the number of data values in the store |
String |
getSequenceHeading(String delimiter)
Returns a localized top level description of the kind of data stored in the sequence. |
String |
getSubHeading(String delimiter)
Gets a localized subheading, assumed to be in the context of an overall column heading. |
JigsawQuantity |
getTotal(Interval interval)
Returns the total value of the sequence over the interval. |
String |
getUnitsHeading(String delimiter)
Gets a string representation of the measurement units of the column. |
void |
putInstantValue(Date time,
double value)
Records the instantaneous value of the time series at a particular time |
void |
putValueOverInterval(Interval interval,
double value)
Records the value of the timeseries over some subinterval. |
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. |
String |
toString()
|
| Methods inherited from class net.agmodel.physical.StoreImpl |
averageStore, averageStore, extendStore, extendStore, getColumnHeading, getCurrentResolution, getDateRange, getName, getResolution, getSummaryHistory, getSummaryKind, maximumStore, maximumStore, minimumStore, minimumStore, sampleStore, sampleStore, setColumnHeading, setName, totalStore, totalStore |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SynchronousStoreImpl(Interval dateRange,
SummaryHistory history,
String name)
| Method Detail |
public double getNumberOfValues()
Store
getNumberOfValues in interface Storepublic int getCapacity()
public JigsawQuantity getInstant(Date time)
Store
getInstant in interface StoregetInstant in class StoreImplpublic JigsawQuantity getTotal(Interval interval)
Store
getTotal in interface StoregetTotal in class StoreImplpublic JigsawQuantity getAverage(Interval interval)
Store
getAverage in interface StoregetAverage in class StoreImplpublic JigsawQuantity getMaximum(Interval interval)
Store
getMaximum in interface StoregetMaximum in class StoreImplpublic JigsawQuantity getMinimum(Interval interval)
Store
getMinimum in interface StoregetMinimum in class StoreImpl
public void putInstantValue(Date time,
double value)
Store
putInstantValue in interface StoreputInstantValue in class StoreImpl
public void putValueOverInterval(Interval interval,
double value)
Store
putValueOverInterval in interface StoreputValueOverInterval in class StoreImpl
public void putValueOverInterval(Interval interval,
JigsawQuantity value)
Store
putValueOverInterval in interface StoreputValueOverInterval in class StoreImplpublic String getSequenceHeading(String delimiter)
Sequence
getSequenceHeading in interface Sequencedelimiter - the delimiter to use if padding is required for multiple columnspublic String getSubHeading(String delimiter)
Sequence
getSubHeading in interface Sequencedelimiter - the delimiter to use between columns if there are multiple columnsSequence.getNumberOfSubComponents(),
Sequence.getSequenceHeading(String)public String getUnitsHeading(String delimiter)
Sequence
getUnitsHeading in interface Sequencedelimiter - the delimiter to use between columns if there are multiple columnsSequence.getNumberOfSubComponents(),
Sequence.getSequenceHeading(String),
Sequence.getSubHeading(String)public int getNumberOfSubComponents()
Sequence
getNumberOfSubComponents in interface SequenceSequence.getSequenceHeading(String)
public String getContentsAsString(Date date,
String delimiter)
Sequence
getContentsAsString in interface Sequencedate - the time of interest.delimiter - a string to use between values if required.
public String dumpSequence(DateFormat df,
String delimiter,
String rowTerminator)
Sequence
dumpSequence in interface Sequencedf - the format to use for the date and timedelimiter - the separator to use between the date and the datarowTerminator - the String used at the end of each row
public 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 StoregetData in class StoreImplpublic float[] getCoverage()
StoreStore.getData().
getCoverage in interface StoregetCoverage in class StoreImplpublic Object clone()
clone in interface Sequenceclone in class StoreImplpublic String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||