public abstract class AbstractTSRecord extends NamedType implements TSRecord, hec.data.IVerticalDatum
Title:
Description:
Copyright: Copyright (c) 2004
Company: Resource Management Associates.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
INPUT |
static boolean |
OUTPUT |
_description, _index, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENTDEFAULT_INPUT, OBS_INPUT, SUMMARY_AVG, SUMMARY_CNT, SUMMARY_MAX, SUMMARY_MIN, SUMMARY_NUMID| Constructor and Description |
|---|
AbstractTSRecord(int idx) |
AbstractTSRecord(TSRecord rec)
copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
double |
average(int step,
int period)
Calculates the period average for the values in the data starting at
step and
going back period, if the value is negative or
forward period, if the value is positive. |
java.lang.Object |
clone()
Creates a new object of the same class as this object.
|
boolean |
copyInto(TSRecordImpl newTsRec)
Copy data from this RssTSRecordImpl into the given RssTSRecordImpl.
|
boolean |
forceVerticalDatum(java.lang.String datum)
Sets the objects current vertical datum to the specified vertical datum without changing any elevations.
|
int |
getBeginDate()
Rerturns the date in HEC Julian Day
|
int |
getBeginTime() |
double |
getCumulativeTotal(int step,
int period)
get the cumulative total starting at
step and going back period steps. |
double |
getCumulativeTotal(RunTimeStep rts,
int period)
Get the cumulative total starting at
rts and going back period steps. |
double |
getCurrentOffset()
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in the current datum in the current unit
|
double |
getCurrentOffset(java.lang.String unit)
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in the current datum
|
double |
getCurrentValue(RunTimeStep rts)
return the value for the current runtime step
|
java.lang.String |
getCurrentVerticalDatum()
Retrieves the current vertical datum of the object's elevation(s)
|
double[] |
getDataArrayFor(int step,
int period)
Returns the values for the data starting at
step and
either going back period steps if the value is negative or
forward if the value is positive. |
java.lang.String |
getDSSFilename() |
java.lang.String |
getDSSPathname() |
java.lang.Object |
getFieldObject(java.lang.reflect.Field fld)
This method allows access to java.lang.reflect.Field objects within the implementing
class.
|
int |
getInputDataPos() |
double[] |
getInterpolatedTSArray(HecTime startTime,
HecTime endTime,
int intervalTime)
Interpolate time series data for a regular size time interval "intervalTime" in minutes
|
java.lang.String |
getInterpUnitsType() |
double |
getLaggedValue(RunTimeStep rts,
int lagAmount)
get the value at current runtime step minus the lag amount
|
java.lang.String |
getNativeVerticalDatum()
Retrieves the native vertical datum of the object's elevation(s)
|
double |
getNAVD88Offset()
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in NAVD88 in the current unit
|
double |
getNAVD88Offset(java.lang.String unit)
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in NAVD88
|
double |
getNGVD29Offset()
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in NGVD29 in the current unit
|
double |
getNGVD29Offset(java.lang.String unit)
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in NGVD29
|
int |
getNumSteps() |
java.lang.String |
getParamName() |
double |
getPeriodAverage(int step,
int period)
Get the Period Average starting at
RunTimeStep and going back period steps. |
double |
getPeriodAverage(int step,
int period,
int lag)
Get the Period Average starting at
RunTimeStep and going back period steps. |
double |
getPeriodAverage(RunTimeStep rts,
int period)
Get the Period Average starting at
RunTimeStep and going back period steps. |
double |
getPeriodAverage(RunTimeStep rts,
int period,
int lag)
Get the Period Average starting at
RunTimeStep and going back period steps. |
double |
getPreviousValue(RunTimeStep rts)
get the value previous to the current runtime step
|
abstract java.lang.String |
getRelativePath(java.lang.String pathName) |
double[] |
getSummaryArray()
returns an array containing the average, min, max, and count of valid data in time series
|
int[] |
getTimeArray() |
TimeSeriesContainer |
getTimeSeriesContainer()
Get the TimeSeriesContainer for the TSRecord.
|
TimeSeriesContainer |
getTimeSeriesContainerFor(int step,
int period)
Creates a TimeSeriesContainer filled with data from the TSRecord starting
at "step" and going forward, if period is positive,
or backwards, if period is negative.
|
int |
getTimeStepMinutes()
Returns the time step in minutes;
|
java.lang.String |
getTimeWindowString() |
double[] |
getTSArray()
Get the data array for the time series record.
|
doubleArrayContainer |
getTSContainer() |
double |
getTSValueAt(HecTime time)
Deprecated.
|
java.lang.String |
getUnits() |
java.lang.String |
getUnitsType() |
double |
getValue(HecTime time)
Return the time series value at the specified time, do linear interpolation as necessary.
|
double |
getValue(int step)
get the value at step
|
int |
getVariableId() |
java.lang.String |
getVerticalDatumInfo()
Retrieves a text representation of the vertical datum information
|
boolean |
hasVerticalDatum()
Return whether this object includes vertical datum information
|
boolean |
initialize(int beginDate,
int beginTime,
int timeStepMin,
int numSteps,
java.lang.String timeWindow) |
boolean |
initialize(RunTimeWindow rtw) |
boolean |
isCurrentVerticalDatumEstimated()
Retrieves whether the elevation(s) in the current vertical datum were generated by an estimated offset
|
boolean |
isDefaultData() |
boolean |
isNAVD88OffsetEstimated()
Retrieves whether the offset added to the an elevation in the native vertical datum to generate an elevation in NAVD88 is an estimate
|
boolean |
isNGVD29OffsetEstimated()
Retrieves whether the offset added to the an elevation in the native vertical datum to generate an elevation in NGVD29 is an estimate
|
boolean |
isObservedData() |
double |
max(int step,
int period)
Finds the maximum value in the data starting at
step and
going back period, if the value is negative or
forward period, if the value is positive. |
double |
min(int step,
int period)
Finds the minimum value in the data set starting at
step and
going back period, if the value is negative or
forward period, if the value is positive. |
static java.lang.String[] |
parseDssPath(java.lang.String dsspath) |
boolean |
readData(java.io.BufferedReader input)
Read write methods for storing TSRecords to an ASCII file
|
boolean |
readDataFromRas(java.io.BufferedReader input)
Reads time series record parameters from an existing opened BufferedReader
according to RAS v.2.2 flow file format
|
boolean |
reinitialize(RunTimeWindow rtw)
TODO complete this method - currently it does just what initialize does
|
void |
setCompressData(boolean comp) |
void |
setCurrentValue(int step,
double value)
get the value at step
|
void |
setCurrentValue(RunTimeStep rts,
double value)
set the value at the current run time step
|
void |
setDSSFilename(java.lang.String name) |
void |
setDSSPathname(java.lang.String name) |
void |
setDSSPathname(java.lang.String[] parts) |
boolean |
setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
This allows access to fields withing the implementing object to set there data.
|
void |
setInputDataPos(int inputPos) |
void |
setInterpUnitsType(java.lang.String type) |
void |
setParamName(java.lang.String name) |
void |
setTimeWindow(HecTime start,
HecTime end) |
void |
setTimeWindowString(java.lang.String timestr) |
void |
setUnits(java.lang.String units) |
void |
setUnitsType(java.lang.String units) |
void |
setVariableId(int varid) |
void |
setVerticalDatumInfo(java.lang.String xmlStr)
Initializes the object from a string initializer
|
void |
shiftLeft(HecTime startTime) |
void |
shiftLeft(RunTimeWindow rtw) |
double |
standardDeviation(int step,
int period)
Calculate the standard deviation of the time series values starting at
step and
either going back period steps if the value is negative or
forward if the value is positive. |
double |
sum(int step,
int period)
Calculates the sum for the values in the data starting at
step and
going back period, if the value is negative or
forward period, if the value is positive. |
boolean |
toNativeVerticalDatum()
Changes the object's elevation(s) (if necessary) to its native vertical datum
|
boolean |
toNAVD88()
Changes the object's elevation(s) (if necessary) to NAVD88
|
boolean |
toNGVD29()
Changes the object's elevation(s) (if necessary) to NGVD29
|
boolean |
toVerticalDatum(java.lang.String datum)
Changes the object's elevation(s) (if necessary) to the specified vertical datum
|
boolean |
writeData(java.io.BufferedWriter out) |
boolean |
writeDataToRas(java.io.BufferedWriter out) |
addModifiableListener, compareTo, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, removeModifiableListener, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setModified, setName, setValid, toString, update, useRecursiveModifiedTestaddObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObserversequals, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckTSData, getIndex, getName, isValidValue, loadRawTSData, loadTSData, loadTSData, setIndex, setName, writeTSData, writeTSDataAspublic static final boolean INPUT
public static final boolean OUTPUT
public AbstractTSRecord(int idx)
public AbstractTSRecord(TSRecord rec)
public boolean copyInto(TSRecordImpl newTsRec)
newTsRec - the object that will receive the copied datapublic void setInterpUnitsType(java.lang.String type)
setInterpUnitsType in interface TSRecordpublic java.lang.String getInterpUnitsType()
getInterpUnitsType in interface TSRecordpublic void shiftLeft(RunTimeWindow rtw)
public void setVariableId(int varid)
setVariableId in interface TSRecordpublic int getVariableId()
getVariableId in interface TSRecordpublic java.lang.Object clone()
NamedTypepublic double[] getSummaryArray()
getSummaryArray in interface TSRecordpublic int getNumSteps()
getNumSteps in interface TSRecordpublic void setTimeWindowString(java.lang.String timestr)
setTimeWindowString in interface TSRecordpublic java.lang.String getTimeWindowString()
getTimeWindowString in interface TSRecordpublic void setTimeWindow(HecTime start, HecTime end)
setTimeWindow in interface TSRecordpublic void setUnitsType(java.lang.String units)
setUnitsType in interface TSRecordpublic int getBeginDate()
getBeginDate in interface TSRecordpublic int getBeginTime()
getBeginTime in interface TSRecordpublic int getTimeStepMinutes()
getTimeStepMinutes in interface TSRecordpublic java.lang.String getUnitsType()
getUnitsType in interface TSRecordpublic int[] getTimeArray()
getTimeArray in interface TSRecordpublic double[] getDataArrayFor(int step,
int period)
step and
either going back period steps if the value is negative or
forward if the value is positive.getDataArrayFor in interface TSRecordstep - the starting stepperiod - the number of steps to go back if a negative number
or forward is a positive numberpublic double[] getTSArray()
getTSArray in interface TSRecordpublic doubleArrayContainer getTSContainer()
getTSContainer in interface TSRecordpublic boolean initialize(RunTimeWindow rtw)
initialize in interface TSRecordpublic boolean reinitialize(RunTimeWindow rtw)
reinitialize in interface TSRecordpublic boolean initialize(int beginDate,
int beginTime,
int timeStepMin,
int numSteps,
java.lang.String timeWindow)
initialize in interface TSRecordpublic java.lang.String getParamName()
getParamName in interface TSRecordpublic void setParamName(java.lang.String name)
setParamName in interface TSRecordpublic java.lang.String getDSSPathname()
getDSSPathname in interface TSRecordpublic void setDSSPathname(java.lang.String name)
setDSSPathname in interface TSRecordpublic void setDSSPathname(java.lang.String[] parts)
setDSSPathname in interface TSRecordpublic java.lang.String getDSSFilename()
getDSSFilename in interface TSRecordpublic void setDSSFilename(java.lang.String name)
setDSSFilename in interface TSRecordpublic void setInputDataPos(int inputPos)
setInputDataPos in interface TSRecordpublic int getInputDataPos()
getInputDataPos in interface TSRecordpublic boolean isObservedData()
isObservedData in interface TSRecordpublic boolean isDefaultData()
isDefaultData in interface TSRecordpublic boolean readData(java.io.BufferedReader input)
TSRecordpublic abstract java.lang.String getRelativePath(java.lang.String pathName)
public boolean writeData(java.io.BufferedWriter out)
public boolean readDataFromRas(java.io.BufferedReader input)
readDataFromRas in interface TSRecordpublic boolean writeDataToRas(java.io.BufferedWriter out)
writeDataToRas in interface TSRecordpublic double getValue(HecTime time)
@Deprecated public double getTSValueAt(HecTime time)
getTSValueAt in interface TSRecordHecTime - time of datapublic double[] getInterpolatedTSArray(HecTime startTime, HecTime endTime, int intervalTime)
getInterpolatedTSArray in interface TSRecordpublic static java.lang.String[] parseDssPath(java.lang.String dsspath)
public double getCurrentValue(RunTimeStep rts)
getCurrentValue in interface TSRecordrts - the RunTimeSteppublic double getValue(int step)
public void setCurrentValue(RunTimeStep rts, double value)
setCurrentValue in interface TSRecordstep - the index into the data arrayvalue - the value to setpublic void setCurrentValue(int step,
double value)
setCurrentValue in interface TSRecordstep - the index into the data arrayvalue - the value to setpublic double getLaggedValue(RunTimeStep rts, int lagAmount)
getLaggedValue in interface TSRecordrts - the RunTimeWindowlagAmount - the lag amountpublic double getPreviousValue(RunTimeStep rts)
getPreviousValue in interface TSRecordrts - the RunTimeSteppublic double getPeriodAverage(RunTimeStep rts, int period, int lag)
RunTimeStep and going back period steps.
Assumes that data is constant prior to and following the time series array limits.rts - the RunTimeStepperiod - the period to go backlag - the number of steps back to start the average periodpublic double getPeriodAverage(int step,
int period,
int lag)
RunTimeStep and going back period steps.
Assumes that data is constant prior to and following the time series array limits.step - the starting stepperiod - the period to go backlag - the number of steps back to start the average periodpublic double getPeriodAverage(RunTimeStep rts, int period)
RunTimeStep and going back period steps.
Assumes that data is constant prior to and following the time series array limits.getPeriodAverage in interface TSRecordrts - the RunTimeStepperiod - the period to go backpublic double getPeriodAverage(int step,
int period)
RunTimeStep and going back period steps.
Assumes that data is constant prior to and following the time series array limits.getPeriodAverage in interface TSRecordstep - the starting stepperiod - the number of steps to go back.public double getCumulativeTotal(RunTimeStep rts, int period)
rts and going back period steps.
Assumes that data is constant prior to and following the time series array limits.getCumulativeTotal in interface TSRecordrts - the RunTimeStepperiod - the number of steps to go backpublic double getCumulativeTotal(int step,
int period)
step and going back period steps.getCumulativeTotal in interface TSRecordint - step the starting stepint - period the number of steps to go backpublic TimeSeriesContainer getTimeSeriesContainer()
getTimeSeriesContainer in interface TSRecordpublic double max(int step,
int period)
step and
going back period, if the value is negative or
forward period, if the value is positive.public double min(int step,
int period)
step and
going back period, if the value is negative or
forward period, if the value is positive.public double average(int step,
int period)
step and
going back period, if the value is negative or
forward period, if the value is positive. Does not include undefined or missing values.public double sum(int step,
int period)
step and
going back period, if the value is negative or
forward period, if the value is positive. Does not include undefined or missing values.public double standardDeviation(int step,
int period)
step and
either going back period steps if the value is negative or
forward if the value is positive.standardDeviation in interface TSRecordint - step, the starting stepint - period, the number of steps to go back if a negative number
or forward is a positive numberpublic TimeSeriesContainer getTimeSeriesContainerFor(int step, int period)
getTimeSeriesContainerFor in interface TSRecordint - step, the starting stepint - period, the number of steps to go back when a negative number
or forward if a positive numberpublic boolean hasVerticalDatum()
public java.lang.String getNativeVerticalDatum()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetNativeVerticalDatum in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the native vertical datum is not setpublic java.lang.String getCurrentVerticalDatum()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetCurrentVerticalDatum in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the current vertical datum is not setpublic boolean isCurrentVerticalDatumEstimated()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumisCurrentVerticalDatumEstimated in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the current vertical datum is not setpublic boolean toNativeVerticalDatum()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumtoNativeVerticalDatum in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the native vertical datum is not setpublic boolean toNGVD29()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumtoNGVD29 in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain enough information to perform the operationpublic boolean toNAVD88()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumtoNAVD88 in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain enough information to perform the operationpublic boolean toVerticalDatum(java.lang.String datum)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumtoVerticalDatum in interface hec.data.IVerticalDatumdatum - the vertical datum to change to: hec.data.VerticalDatumException - if the object doesn't contain enough information to perform the operationpublic boolean forceVerticalDatum(java.lang.String datum)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumforceVerticalDatum in interface hec.data.IVerticalDatumdatum - the vertical datum to change to: hec.data.VerticalDatumException - if the object doesn't contain enough information to perform the operationpublic double getCurrentOffset()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetCurrentOffset in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic double getCurrentOffset(java.lang.String unit)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetCurrentOffset in interface hec.data.IVerticalDatumunit - the unit to retrieve the offset inhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic double getNGVD29Offset()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetNGVD29Offset in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic double getNGVD29Offset(java.lang.String unit)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetNGVD29Offset in interface hec.data.IVerticalDatumunit - the unit to retrieve the offset inhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic double getNAVD88Offset()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetNAVD88Offset in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic double getNAVD88Offset(java.lang.String unit)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetNAVD88Offset in interface hec.data.IVerticalDatumunit - the unit to retrieve the offset inhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic boolean isNGVD29OffsetEstimated()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumisNGVD29OffsetEstimated in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic boolean isNAVD88OffsetEstimated()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumisNAVD88OffsetEstimated in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic java.lang.String getVerticalDatumInfo()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetVerticalDatumInfo in interface hec.data.IVerticalDatumhec.data.VerticalDatumExceptionpublic void setVerticalDatumInfo(java.lang.String xmlStr)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumsetVerticalDatumInfo in interface hec.data.IVerticalDatumxmlStr - String initializer. May be either an XML fragment of the following format or
simply the name of the native vertical datum (in which case no datum conversion
is supported).
<vertical-datum-info "unit"="ft">
<native-datum>OTHER</native-datum>
<local-datum-name>Pensacola</local-datum-name>
<elevation>1407.22</elevation>
<offset "estimate"="true">
<to-datum>NAVD-88</to-datum>
<value>1.457</value>
</offset>
<offset "estimate"="false">
<to-datum>NGVD-29</to-datum>
<value>1.07</value>
</offset>
</vertical-datum-info>
The <native-datum> element must be one of:
All <offset> elements specify the value to add to an
elevation in the native datum to get an elevation in the datum specified <to-datum>
datum (in the unit specified in the <vertical-datum-info> element.
The <to-datum> values are limited to NGVD-29 and NAVD-88. No offset
is required to be specified for the native datum.
hec.data.VerticalDatumExceptionpublic java.lang.Object getFieldObject(java.lang.reflect.Field fld)
FieldAccessorgetFieldObject in interface FieldAccessorgetFieldObject in class NamedTypefld - The field to get.public boolean setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
FieldAccessorsetFieldObject in interface FieldAccessorsetFieldObject in class NamedTypefld - The java field object representing the member field to be setfobj - The data to set in that fieldpublic void setCompressData(boolean comp)
setCompressData in interface TSRecord