|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.agmodel.physical.GeneralSequenceImpl
A general mechanism for implementing sequences. Descendent objects implement storage of sequences in various ways.
| Field Summary | |
protected Interval |
dateRange
|
protected Duration |
maximumTemporalInterpolation
|
protected SummaryHistory |
summaryHistory
|
| Constructor Summary | |
GeneralSequenceImpl(Interval dateRange,
SummaryHistory composition)
Creates a general sequence implementation. |
|
| Method Summary | |
void |
cancelTemporalInterpolation()
Cancels any temporal interpolation in subsequent calls to getXXXX |
Object |
clone()
|
String |
dumpSequence(DateFormat df,
String delimiter,
String rowTerminator)
Gets a printable version of the sequence contents. |
float[][] |
getAllCoverage()
Indicates which array elements returned by getAllData() are missing.
|
double[][] |
getAllData()
Creates a two-dimensional array containing the data. |
abstract String |
getContentsAsString(Date time,
String delimiter)
Returns the measurement associated with a particular time as a string. |
abstract float[] |
getCoverage(int index)
Indicates which array elements returned by getData(int) are missing.
|
Duration |
getCurrentResolution()
Returns the current resolution of data in the sequence (eg daily); |
abstract double[] |
getData(int index)
Creates a one-dimensional array containing one subcomponent of the data. |
Interval |
getDateRange()
Returns the date range for which data can be stored in the sequence |
Duration |
getMaximumTemporalInterpolation()
Returns the longest data gap over which values can be temporally interpolated |
abstract int |
getNumberOfSubComponents()
Get the number of sub-components in the sequence. |
Duration |
getResolution()
Returns the current resolution of data in the sequence (eg daily); |
abstract String |
getSequenceHeading(String delimiter)
Returns a localized top level description of the kind of data stored in the sequence. |
abstract String |
getSubHeading(int index)
Gets a brief description of the data stored in a Sequence subcomponent in the language of the default locale. |
String |
getSubHeading(String delimiter)
Gets a localized subheading, assumed to be in the context of an overall column heading. |
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); |
boolean |
getTemporalInterpolation()
Indicates whether temporal interpolation is enabled |
abstract String |
getUnitsHeading(int index)
Gets a string representation of the measurement units of the column. |
String |
getUnitsHeading(String delimiter)
Gets a string representation of the measurement units of the column. |
abstract void |
setSequenceHeading(String aHeading)
Sets the brief top level description of the kind of data stored in the sequence in the language of the default locale. |
abstract void |
setSubHeading(int index,
String aHeading)
Sets the brief description of the kind of data stored in the sequence in the language of the default locale. |
void |
setTemporalInterpolation(Duration maximumTemporalInterpolation)
Sets the longest data gap over which values can be temporally interpolated. |
abstract void |
setUnitsHeading(int index,
String aHeading)
Sets a string representation of the measurement units of the column. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.agmodel.physical.Sequence |
getColumnHeading, getName, setColumnHeading, setName |
| Field Detail |
protected SummaryHistory summaryHistory
protected Interval dateRange
protected Duration maximumTemporalInterpolation
| Constructor Detail |
public GeneralSequenceImpl(Interval dateRange,
SummaryHistory composition)
dateRange - the interval for which readings can be storedcomposition - a record of how raw data has been summarised to make the sequence.| Method Detail |
public Interval getDateRange()
getDateRange in interface Sequencepublic Duration getCurrentResolution()
Sequence
getCurrentResolution in interface Sequencepublic Duration getResolution()
Sequence
getResolution in interface Sequencepublic SummaryKind getSummaryKind()
Sequence
getSummaryKind in interface Sequencepublic void setTemporalInterpolation(Duration maximumTemporalInterpolation)
setTemporalInterpolation in interface CompoundSequencepublic void cancelTemporalInterpolation()
cancelTemporalInterpolation in interface CompoundSequencepublic boolean getTemporalInterpolation()
getTemporalInterpolation in interface CompoundSequencegetMaximumTemporalInterpolation()public Duration getMaximumTemporalInterpolation()
getMaximumTemporalInterpolation in interface CompoundSequencegetTemporalInterpolation()public abstract String getSequenceHeading(String delimiter)
Sequence
getSequenceHeading in interface Sequencedelimiter - the delimiter to use if padding is required for multiple columnspublic abstract void setSequenceHeading(String aHeading)
CompoundSequence
setSequenceHeading in interface CompoundSequenceaHeading - the new headingSequence.getNumberOfSubComponents(),
Sequence.getSequenceHeading(String)public abstract int getNumberOfSubComponents()
Sequence
getNumberOfSubComponents in interface SequenceSequence.getSequenceHeading(String)public abstract String getSubHeading(int index)
CompoundSequence
getSubHeading in interface CompoundSequenceSequence.getNumberOfSubComponents(),
Sequence.getSequenceHeading(String)
public abstract void setSubHeading(int index,
String aHeading)
CompoundSequence
setSubHeading in interface CompoundSequenceaHeading - the new headingindex - the zero-based index of the headingSequence.getNumberOfSubComponents(),
Sequence.getSequenceHeading(String)public 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 abstract String getUnitsHeading(int index)
CompoundSequence
getUnitsHeading in interface CompoundSequenceSequence.getNumberOfSubComponents(),
Sequence.getSequenceHeading(String),
CompoundSequence.getSubHeading(int)
public abstract void setUnitsHeading(int index,
String aHeading)
CompoundSequence
setUnitsHeading in interface CompoundSequenceindex - the zero-based index of the headingaHeading - the new headingSequence.getNumberOfSubComponents(),
CompoundSequence.setSequenceHeading(String),
CompoundSequence.setSubHeading(int,String)
public abstract String getContentsAsString(Date time,
String delimiter)
Sequence
getContentsAsString in interface Sequencetime - 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 SummaryHistory getSummaryHistory()
public double[][] getAllData()
CompoundSequenceCompoundSequence.getAllCoverage() to test for missing values
(at present these are returned as Double.NaN but don't rely on this).double[][] theData=getAllData(); int components=getNumberOfSubComponents(); for (int timeIndex=1;timeIndex
- Specified by:
getAllDatain interfaceCompoundSequence
- Returns:
- the data within the sequence, with each row representing one interval of time.
public abstract double[] getData(int index)
CompoundSequenceCompoundSequence.getCoverage(int) to test for missing values
(at present these are returned as Double.NaN but don't rely on this).
getData in interface CompoundSequenceindex - the zero-based index of the subcomponent
Sequence.getNumberOfSubComponents()public float[][] getAllCoverage()
CompoundSequenceCompoundSequence.getAllData() are missing.
Coverage values are in the range JigsawQuantity.DEVOID to JigsawQuantity.COMPLETE.
getAllCoverage in interface CompoundSequencepublic abstract float[] getCoverage(int index)
CompoundSequenceCompoundSequence.getData(int) are missing.
Coverage values are in the range JigsawQuantity.DEVOID to JigsawQuantity.COMPLETE.
getCoverage in interface CompoundSequenceindex - the zero-based index of the subcomponent
public 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 | |||||||||