Class 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

public class TSDataSet extends Manager implements TSRecordCreator, ITSDataSet
Manager class containing a list of time series records that map time series locations to DSS pathnames.
See Also:
  • Field Details

  • Constructor Details

    • TSDataSet

      public TSDataSet()
      Constructor for the TSDataSet object
  • Method Details

    • createTSRecord

      public TSRecord 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:
      createTSRecord in interface ITSDataSet
      Specified by:
      createTSRecord in interface TSRecordCreator
      Returns:
      TSRecord
    • setAltName

      public void setAltName(String name)
    • getAltName

      public String getAltName()
      Specified by:
      getAltName in interface ITSDataSet
    • getTSRecordCount

      public int getTSRecordCount()
      Gets the tSRecordCount attribute of the TSDataSet object
      Specified by:
      getTSRecordCount in interface ITSDataSet
      Returns:
      The tSRecordCount value
    • setCompressData

      public void setCompressData(boolean comp)
    • getTSRecordSummaryTable

      public Hashtable getTSRecordSummaryTable(String typestr)
      returns a table of ts record summary arrays keyed by "typestr:name:paramName"
      Specified by:
      getTSRecordSummaryTable in interface ITSDataSet
      Parameters:
      typestr - Description of the Parameter
      Returns:
      The tSRecordSummaryTable value
    • setParentPath

      public void setParentPath(String path, String classname)
      Sets the parentPath attribute of the TSDataSet object
      Specified by:
      setParentPath in interface ITSDataSet
      Parameters:
      path - The new parentPath value
      classname - The new parentPath value
    • getParentPath

      public String getParentPath()
      Gets the parentPath attribute of the TSDataSet object
      Specified by:
      getParentPath in interface ITSDataSet
      Returns:
      The parentPath value
    • getParentClassName

      public String getParentClassName()
      Gets the parentClassName attribute of the TSDataSet object
      Specified by:
      getParentClassName in interface ITSDataSet
      Returns:
      The parentClassName value
    • shiftDataSet

      public void shiftDataSet(HecTime newStartTime)
      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:
      shiftDataSet in interface ITSDataSet
      Parameters:
      newStartTime -
    • shiftDataSet

      public void shiftDataSet(RunTimeWindow rtw)
      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:
      shiftDataSet in interface ITSDataSet
      Parameters:
      rtw - Description of the Parameter
    • getType

      public int getType()
      Gets the type attribute of the TSDataSet object
      Specified by:
      getType in interface ITSDataSet
      Returns:
      The type value
    • setType

      public boolean setType(int t)
      Sets the type attribute of the TSDataSet object
      Specified by:
      setType in interface ITSDataSet
      Parameters:
      t - The new type value
      Returns:
      Description of the Return Value
    • appendTSRecords

      public boolean appendTSRecords(ITSDataSet tsdataset)
      appends all unique records from the given TSDataSet into this TSDataSet Uniqueness is defined by having a unique NAME/PARAMETER/DSS PATHNAME
      Specified by:
      appendTSRecords in interface ITSDataSet
      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:
      init in interface ITSDataSet
      Specified by:
      init in class Manager
    • getTSRecords

      public Vector getTSRecords()
      Gets the tSRecords attribute of the TSDataSet object
      Specified by:
      getTSRecords in interface ITSDataSet
      Returns:
      The tSRecords value
    • getFilteredTSRecords

      public Vector getFilteredTSRecords(Vector list)
      Gets the filteredTSRecords attribute of the TSDataSet object
      Specified by:
      getFilteredTSRecords in interface ITSDataSet
      Parameters:
      list - Description of the Parameter
      Returns:
      The filteredTSRecords value
    • updateTSRecordVector

      public void updateTSRecordVector(TSManager manager)
      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:
      updateTSRecordVector in interface ITSDataSet
      Parameters:
      manager - Description of the Parameter
    • writeTSRecords

      public boolean writeTSRecords()
      Description of the Method
      Specified by:
      writeTSRecords in interface ITSDataSet
      Returns:
      Description of the Return Value
    • loadFilteredTSRecords

      public boolean loadFilteredTSRecords(Vector tsproxyFilterList)
      Deprecated.
      load only the records from a filter set
      Specified by:
      loadFilteredTSRecords in interface ITSDataSet
      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:
      loadTSRecords in interface ITSDataSet
      Returns:
      Description of the Return Value
    • loadTSRecords

      public boolean loadTSRecords(Vector tsrecVec)
      Description of the Method
      Specified by:
      loadTSRecords in interface ITSDataSet
      Parameters:
      tsrecVec - Description of the Parameter
      Returns:
      Description of the Return Value
    • loadTSRecord

      public TSRecord loadTSRecord(String name, int varId, String timewinstr)
      Description of the Method
      Specified by:
      loadTSRecord in interface ITSDataSet
      Parameters:
      name - Description of the Parameter
      varId - Description of the Parameter
      timewinstr - Description of the Parameter
      Returns:
      Description of the Return Value
    • loadTSRecord

      public TSRecord loadTSRecord(String name, String param, String timewinstr)
      Description of the Method
      Specified by:
      loadTSRecord in interface ITSDataSet
      Parameters:
      name - Description of the Parameter
      param - Description of the Parameter
      timewinstr - Description of the Parameter
      Returns:
      Description of the Return Value
    • unloadTSRecord

      public void unloadTSRecord()
      Description of the Method
    • checkFilteredTSRecords

      public boolean checkFilteredTSRecords(Vector tsproxyFilterList)
      load only the records from a filter set
      Specified by:
      checkFilteredTSRecords in interface ITSDataSet
      Parameters:
      tsproxyFilterList - Description of the Parameter
      Returns:
      Description of the Return Value
    • checkTSRecords

      public boolean checkTSRecords(Vector tsrecVec)
      read in the data for the record and check completeness of the data
      Specified by:
      checkTSRecords in interface ITSDataSet
      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:
      initialize in interface ITSDataSet
      Parameters:
      beginDate - Description of the Parameter
      beginTime - Description of the Parameter
      timeStepMin - Description of the Parameter
      numSteps - Description of the Parameter
      timeWindow - Description of the Parameter
      Returns:
      Description of the Return Value
    • initialize

      public boolean initialize(RunTimeWindow rtw)
      set up time series records for
      Specified by:
      initialize in interface ITSDataSet
      Parameters:
      rtw - Description of the Parameter
      Returns:
      Description of the Return Value
    • reinitialize

      public boolean reinitialize(RunTimeWindow rtw)
      reset time series records for new time window
      Specified by:
      reinitialize in interface ITSDataSet
      Parameters:
      rtw - Description of the Parameter
      Returns:
      Description of the Return Value
    • getTSRecord

      public TSRecord getTSRecord(String name, int varid)
      Gets the tSRecord attribute of the TSDataSet object
      Specified by:
      getTSRecord in interface ITSDataSet
      Parameters:
      name - Description of the Parameter
      varid - Description of the Parameter
      Returns:
      The tSRecord value
    • getTSRecord

      public TSRecord getTSRecord(String name, String param)
      Gets the tSRecord attribute of the TSDataSet object
      Specified by:
      getTSRecord in interface ITSDataSet
      Parameters:
      name - Description of the Parameter
      param - Description of the Parameter
      Returns:
      The tSRecord value
    • getTSRecordByPathParts

      public TSRecord getTSRecordByPathParts(String bPart, String cPart)
      Gets the tSRecordByPathParts attribute of the TSDataSet object
      Specified by:
      getTSRecordByPathParts in interface ITSDataSet
      Parameters:
      bPart - Description of the Parameter
      cPart - Description of the Parameter
      Returns:
      The tSRecordByPathParts value
    • createTSRecord

      public TSRecord createTSRecord(String name, int varid, String param)
      Description of the Method
      Specified by:
      createTSRecord in interface ITSDataSet
      Parameters:
      name - Description of the Parameter
      varid - Description of the Parameter
      param - Description of the Parameter
      Returns:
      Description of the Return Value
    • createTSRecord

      public TSRecord createTSRecord(String name, String param)
      Description of the Method
      Specified by:
      createTSRecord in interface ITSDataSet
      Parameters:
      name - Description of the Parameter
      param - Description of the Parameter
      Returns:
      Description of the Return Value
    • clearTSRecordList

      public void clearTSRecordList()
      Description of the Method
      Specified by:
      clearTSRecordList in interface ITSDataSet
    • 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

      public boolean reLoadFile(Identifier id)
      Gets called when the mangers file is modified. This allows the manger to keep up with current data.
      Overrides:
      reLoadFile in class Manager
      Parameters:
      id - Description of the Parameter
      Returns:
      Description of the Return Value
    • reLoadFile

      public boolean reLoadFile()
      Description of the Method
      Overrides:
      reLoadFile in class Manager
      Returns:
      Description of the Return Value
    • readFile

      public boolean readFile(String path)
      Description of the Method
      Parameters:
      path - Description of the Parameter
      Returns:
      Description of the Return Value
    • readFile

      public boolean readFile(Identifier id)
      Description of the Method
      Overrides:
      readFile in class Manager
      Parameters:
      id - Description of the Parameter
      Returns:
      Description of the Return Value
    • writeFile

      public boolean writeFile(Identifier id)
      Writes time series records to ascii file given in identifier.
      Overrides:
      writeFile in class Manager
      Parameters:
      id - Description of the Parameter
      Returns:
      Description of the Return Value
    • writeData

      public boolean writeData(BufferedWriter out)
      Writes time series records to an existing opened BufferedWriter
      Specified by:
      writeData in interface ITSDataSet
      Parameters:
      out - Description of the Parameter
      Returns:
      Description of the Return Value
    • readData

      public boolean readData(BufferedReader input)
      Reads time series records from an existing opened BufferedReader
      Specified by:
      readData in interface ITSDataSet
      Parameters:
      input - Description of the Parameter
      Returns:
      Description of the Return Value
    • readDataFromRas

      public boolean readDataFromRas(BufferedReader input)
      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

      public boolean writeDataToRas(BufferedWriter out)
      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

      public void setDescription(String s)
      Set the NamedType's description to the argument String.
      Specified by:
      setDescription in interface ITSDataSet
      Overrides:
      setDescription in class NamedType
      Parameters:
      s - String
    • setName

      public void setName(String s)
      Set the NamedTypes's name to the argument String.
      Specified by:
      setName in interface ITSDataSet
      Overrides:
      setName in class NamedType
      Parameters:
      s - String