Package hec.clientapp.model
Class TSDataSet
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.clientapp.model.Manager
hec.clientapp.model.TSDataSet
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,LockableObject,ITSDataSet,MessagePrinter,TsRecordContainer,TSRecordCreator,Serializable,Cloneable,Comparable,Observer,mil.army.usace.hec.rmi.csinterface.CallBackInterface,rma.lang.Modifiable
Manager class containing a list of time series records that map time series
locations to DSS pathnames.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDescription of the Fieldstatic final intDescription of the Fieldstatic final intDescription of the Fieldstatic final StringDescription of the FieldFields inherited from class hec.clientapp.model.Manager
_callBack, _dssFileManagerWrapper, _identifier, _lastModifiedTime, _modifiableListeners, _proxyList, _readOnly, _reloadFailed, _reloadOk, _uiWrapper, _userInterface, _wkspPath, _Workspace, LASTMODIFIED_STRINGFields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanappendTSRecords(ITSDataSet tsdataset) appends all unique records from the given TSDataSet into this TSDataSet Uniqueness is defined by having a unique NAME/PARAMETER/DSS PATHNAMEbooleancheckFilteredTSRecords(Vector tsproxyFilterList) load only the records from a filter setbooleancheckTSRecords(Vector tsrecVec) read in the data for the record and check completeness of the datavoidDescription of the MethodvoidcompressData(boolean comp) Creates a new TSRecord that is not added to this data set.createTSRecord(String name, int varid, String param) Description of the MethodcreateTSRecord(String name, String param) Description of the MethodgetFilteredTSRecords(Vector list) Gets the filteredTSRecords attribute of the TSDataSet objectGets the parentClassName attribute of the TSDataSet objectGets the parentPath attribute of the TSDataSet objectgetTSRecord(String name, int varid) Gets the tSRecord attribute of the TSDataSet objectgetTSRecord(String name, String param) Gets the tSRecord attribute of the TSDataSet objectgetTSRecordByPathParts(String bPart, String cPart) Gets the tSRecordByPathParts attribute of the TSDataSet objectintGets the tSRecordCount attribute of the TSDataSet objectGets the tSRecords attribute of the TSDataSet objectgetTSRecordSummaryTable(String typestr) returns a table of ts record summary arrays keyed by "typestr:name:paramName"intgetType()Gets the type attribute of the TSDataSet objectvoidinit()Description of the Methodbooleaninitialize(int beginDate, int beginTime, int timeStepMin, int numSteps, String timeWindow) Description of the Methodbooleaninitialize(RunTimeWindow rtw) set up time series records forbooleanloadFilteredTSRecords(Vector tsproxyFilterList) Deprecated.loadTSRecord(String name, int varId, String timewinstr) Description of the MethodloadTSRecord(String name, String param, String timewinstr) Description of the Methodbooleanload all time series records in this setbooleanloadTSRecords(Vector tsrecVec) Description of the MethodbooleanreadData(BufferedReader input) Reads time series records from an existing opened BufferedReaderbooleanreadDataFromRas(BufferedReader input) Reads time series records from an existing opened BufferedReader according to RAS v.2.2 flow file formatbooleanreadFile(Identifier id) Description of the MethodbooleanDescription of the Methodbooleanreset time series records for new time windowbooleanDescription of the MethodbooleanreLoadFile(Identifier id) Gets called when the mangers file is modified.voidsetAltName(String name) voidsetCompressData(boolean comp) voidSet the NamedType's description to the argument String.voidsetDSSFileManagerWrapper(mil.army.usace.hec.rmi.server.RemoteWrapper dssFileManagerWrapper) Sets the dSSFileManagerWrapper attribute of the TSDataSet objectvoidSet the NamedTypes's name to the argument String.voidsetParentPath(String path, String classname) Sets the parentPath attribute of the TSDataSet objectbooleansetType(int t) Sets the type attribute of the TSDataSet objectvoidshiftDataSet(HecTime newStartTime) Shifts all data in a data set by a given amount.voidShifts all data in a data set by a given amount.voidDescription of the MethodvoidupdateTSRecordVector(TSManager manager) Ensures that there are records for each required proxy in the manager.booleanwriteData(BufferedWriter out) Writes time series records to an existing opened BufferedWriterbooleanWrites time series records to an existing opened BufferedWriter according to RAS v.2.2 flow file formatbooleanwriteFile(Identifier id) Writes time series records to ascii file given in identifier.booleanDescription of the MethodMethods inherited from class hec.clientapp.model.Manager
addModifiableListener, backupFile, computeComplete, copyFile, deleteFile, deleting, finalize, getCallback, getCommonDataList, getDirectory, getDSSFileManager, getDSSFileManagerWrapper, getFieldObject, getFileManager, getFilename, getGmtOffset, getIdentifier, getInputITSDataSet, getInputTSDataSet, getLastModifiedTime, getLastModifiedTimeString, getModTime, getModTime, getOutputITSDataSet, getOutputTSDataSet, getPath, getProxyList, getReadOnly, getRelativePath, getReloadOk, getSaveAsId, getSaveAsId, getUnitSystem, getUserInterface, getWorkspace, getWorkspacePath, hasLock, isCanceled, isForecastManager, loadComplete, loadSaveAsFile, makeAbsolutePath, makeAbsolutePath, makeAbsolutePathFromWatershed, makeRelativePath, makeRelativePathFromWatershed, modifiyForSaveAs, newFile, newTSRecordProxy, newTSRecordProxy, notify, notifyModifiableListeners, openFile, printErrorMessage, printLogMessage, printMessage, printSeparator, printStatus, printTableRow, printWarningMessage, refreshData, reLoadChildManagers, removeCallBack, removeModifiableListener, renamed, saveChildManagers, saveManager, saveManagerAs, saveManagerAs, setFieldObject, setIdentifier, setLastModifiedTime, setLastModifiedTime, setLineAttributes, setLocked, setManagersModifiedTime, setModified, setModifiedFalse, setPath, setProgress, setProxyList, setReadOnly, setReloadOk, setUserInterface, setUserInterface, setWorkspace, toString, unloading, writeLastModTimeMethods inherited from class hec.lang.NamedType
clone, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, rename, set, setIgnoreModifiedEvents, setIndex, setValid, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hec.model.ITSDataSet
getName, isModified, saveManager, setModifiedMethods inherited from interface rma.lang.Modifiable
isModified
-
Field Details
-
INST
public static final int INSTDescription of the Field- See Also:
-
PER_AVG
public static final int PER_AVGDescription of the Field- See Also:
-
PER_CUM
public static final int PER_CUMDescription of the Field- See Also:
-
SUMMARY_DELIM
Description of the Field- See Also:
-
-
Constructor Details
-
TSDataSet
public TSDataSet()Constructor for the TSDataSet object
-
-
Method Details
-
createTSRecord
Creates a new TSRecord that is not added to this data set. It simply creates a record of the type that this class uses. All other people should reference by the TSRecord Interface.- Specified by:
createTSRecordin interfaceITSDataSet- Specified by:
createTSRecordin interfaceTSRecordCreator- Returns:
- TSRecord
-
setAltName
-
getAltName
- Specified by:
getAltNamein interfaceITSDataSet
-
getTSRecordCount
public int getTSRecordCount()Gets the tSRecordCount attribute of the TSDataSet object- Specified by:
getTSRecordCountin interfaceITSDataSet- Returns:
- The tSRecordCount value
-
setCompressData
public void setCompressData(boolean comp) -
getTSRecordSummaryTable
returns a table of ts record summary arrays keyed by "typestr:name:paramName"- Specified by:
getTSRecordSummaryTablein interfaceITSDataSet- Parameters:
typestr- Description of the Parameter- Returns:
- The tSRecordSummaryTable value
-
setParentPath
Sets the parentPath attribute of the TSDataSet object- Specified by:
setParentPathin interfaceITSDataSet- Parameters:
path- The new parentPath valueclassname- The new parentPath value
-
getParentPath
Gets the parentPath attribute of the TSDataSet object- Specified by:
getParentPathin interfaceITSDataSet- Returns:
- The parentPath value
-
getParentClassName
Gets the parentClassName attribute of the TSDataSet object- Specified by:
getParentClassNamein interfaceITSDataSet- Returns:
- The parentClassName value
-
shiftDataSet
Shifts all data in a data set by a given amount. The newStartTime passed in becomes the new start time of the data. The end time and the lookback time still differ by the same amount. It is just simple shift. If newStartTime occurs as a time in between to time steps the the greatest time value the is not more than newStartTime is shifted to the first position- Specified by:
shiftDataSetin interfaceITSDataSet- Parameters:
newStartTime-
-
shiftDataSet
Shifts all data in a data set by a given amount. The newStartTime passed in becomes the new start time of the data. The end time and the lookback time still differ by the same amount. It is just simple shift. If newStartTime occurs as a time in between to time steps the the greatest time value the is not more than newStartTime is shifted to the first position- Specified by:
shiftDataSetin interfaceITSDataSet- Parameters:
rtw- Description of the Parameter
-
getType
public int getType()Gets the type attribute of the TSDataSet object- Specified by:
getTypein interfaceITSDataSet- Returns:
- The type value
-
setType
public boolean setType(int t) Sets the type attribute of the TSDataSet object- Specified by:
setTypein interfaceITSDataSet- Parameters:
t- The new type value- Returns:
- Description of the Return Value
-
appendTSRecords
appends all unique records from the given TSDataSet into this TSDataSet Uniqueness is defined by having a unique NAME/PARAMETER/DSS PATHNAME- Specified by:
appendTSRecordsin interfaceITSDataSet- Parameters:
tsdataset- Description of the Parameter- Returns:
- Description of the Return Value
-
compressData
public void compressData(boolean comp) -
init
public void init()Description of the Method- Specified by:
initin interfaceITSDataSet- Specified by:
initin classManager
-
getTSRecords
Gets the tSRecords attribute of the TSDataSet object- Specified by:
getTSRecordsin interfaceITSDataSet- Returns:
- The tSRecords value
-
getFilteredTSRecords
Gets the filteredTSRecords attribute of the TSDataSet object- Specified by:
getFilteredTSRecordsin interfaceITSDataSet- Parameters:
list- Description of the Parameter- Returns:
- The filteredTSRecords value
-
updateTSRecordVector
Ensures that there are records for each required proxy in the manager. If a record is missing, a new one is created. No records are removed.- Specified by:
updateTSRecordVectorin interfaceITSDataSet- Parameters:
manager- Description of the Parameter
-
writeTSRecords
public boolean writeTSRecords()Description of the Method- Specified by:
writeTSRecordsin interfaceITSDataSet- Returns:
- Description of the Return Value
-
loadFilteredTSRecords
Deprecated.load only the records from a filter set- Specified by:
loadFilteredTSRecordsin interfaceITSDataSet- Parameters:
tsproxyFilterList- Description of the Parameter- Returns:
- Description of the Return Value
-
loadTSRecords
public boolean loadTSRecords()load all time series records in this set- Specified by:
loadTSRecordsin interfaceITSDataSet- Returns:
- Description of the Return Value
-
loadTSRecords
Description of the Method- Specified by:
loadTSRecordsin interfaceITSDataSet- Parameters:
tsrecVec- Description of the Parameter- Returns:
- Description of the Return Value
-
loadTSRecord
Description of the Method- Specified by:
loadTSRecordin interfaceITSDataSet- Parameters:
name- Description of the ParametervarId- Description of the Parametertimewinstr- Description of the Parameter- Returns:
- Description of the Return Value
-
loadTSRecord
Description of the Method- Specified by:
loadTSRecordin interfaceITSDataSet- Parameters:
name- Description of the Parameterparam- Description of the Parametertimewinstr- Description of the Parameter- Returns:
- Description of the Return Value
-
unloadTSRecord
public void unloadTSRecord()Description of the Method -
checkFilteredTSRecords
load only the records from a filter set- Specified by:
checkFilteredTSRecordsin interfaceITSDataSet- Parameters:
tsproxyFilterList- Description of the Parameter- Returns:
- Description of the Return Value
-
checkTSRecords
read in the data for the record and check completeness of the data- Specified by:
checkTSRecordsin interfaceITSDataSet- Parameters:
tsrecVec- Description of the Parameter- Returns:
- Description of the Return Value
-
initialize
public boolean initialize(int beginDate, int beginTime, int timeStepMin, int numSteps, String timeWindow) Description of the Method- Specified by:
initializein interfaceITSDataSet- Parameters:
beginDate- Description of the ParameterbeginTime- Description of the ParametertimeStepMin- Description of the ParameternumSteps- Description of the ParametertimeWindow- Description of the Parameter- Returns:
- Description of the Return Value
-
initialize
set up time series records for- Specified by:
initializein interfaceITSDataSet- Parameters:
rtw- Description of the Parameter- Returns:
- Description of the Return Value
-
reinitialize
reset time series records for new time window- Specified by:
reinitializein interfaceITSDataSet- Parameters:
rtw- Description of the Parameter- Returns:
- Description of the Return Value
-
getTSRecord
Gets the tSRecord attribute of the TSDataSet object- Specified by:
getTSRecordin interfaceITSDataSet- Parameters:
name- Description of the Parametervarid- Description of the Parameter- Returns:
- The tSRecord value
-
getTSRecord
Gets the tSRecord attribute of the TSDataSet object- Specified by:
getTSRecordin interfaceITSDataSet- Parameters:
name- Description of the Parameterparam- Description of the Parameter- Returns:
- The tSRecord value
-
getTSRecordByPathParts
Gets the tSRecordByPathParts attribute of the TSDataSet object- Specified by:
getTSRecordByPathPartsin interfaceITSDataSet- Parameters:
bPart- Description of the ParametercPart- Description of the Parameter- Returns:
- The tSRecordByPathParts value
-
createTSRecord
Description of the Method- Specified by:
createTSRecordin interfaceITSDataSet- Parameters:
name- Description of the Parametervarid- Description of the Parameterparam- Description of the Parameter- Returns:
- Description of the Return Value
-
createTSRecord
Description of the Method- Specified by:
createTSRecordin interfaceITSDataSet- Parameters:
name- Description of the Parameterparam- Description of the Parameter- Returns:
- Description of the Return Value
-
clearTSRecordList
public void clearTSRecordList()Description of the Method- Specified by:
clearTSRecordListin interfaceITSDataSet
-
setDSSFileManagerWrapper
public void setDSSFileManagerWrapper(mil.army.usace.hec.rmi.server.RemoteWrapper dssFileManagerWrapper) Sets the dSSFileManagerWrapper attribute of the TSDataSet object- Parameters:
dssFileManagerWrapper- The new dSSFileManagerWrapper value
-
reLoadFile
Gets called when the mangers file is modified. This allows the manger to keep up with current data.- Overrides:
reLoadFilein classManager- Parameters:
id- Description of the Parameter- Returns:
- Description of the Return Value
-
reLoadFile
public boolean reLoadFile()Description of the Method- Overrides:
reLoadFilein classManager- Returns:
- Description of the Return Value
-
readFile
Description of the Method- Parameters:
path- Description of the Parameter- Returns:
- Description of the Return Value
-
readFile
Description of the Method -
writeFile
Writes time series records to ascii file given in identifier. -
writeData
Writes time series records to an existing opened BufferedWriter- Specified by:
writeDatain interfaceITSDataSet- Parameters:
out- Description of the Parameter- Returns:
- Description of the Return Value
-
readData
Reads time series records from an existing opened BufferedReader- Specified by:
readDatain interfaceITSDataSet- Parameters:
input- Description of the Parameter- Returns:
- Description of the Return Value
-
readDataFromRas
Reads time series records from an existing opened BufferedReader according to RAS v.2.2 flow file format- Parameters:
input- Description of the Parameter- Returns:
- Description of the Return Value
-
writeDataToRas
Writes time series records to an existing opened BufferedWriter according to RAS v.2.2 flow file format- Parameters:
out- Description of the Parameter- Returns:
- Description of the Return Value
-
setDescription
Set the NamedType's description to the argument String.- Specified by:
setDescriptionin interfaceITSDataSet- Overrides:
setDescriptionin classNamedType- Parameters:
s- String
-
setName
Set the NamedTypes's name to the argument String.- Specified by:
setNamein interfaceITSDataSet- Overrides:
setNamein classNamedType- Parameters:
s- String
-