Package hec.model

Class BaseTSDataSet

java.lang.Object
hec.model.BaseTSDataSet

public class BaseTSDataSet extends Object
  • Field Details

  • Constructor Details

    • BaseTSDataSet

      public BaseTSDataSet()
  • Method Details

    • setAltName

      public void setAltName(String name)
    • getAltName

      public String getAltName()
    • setTSRecordCreator

      public void setTSRecordCreator(TSRecordCreator cls)
    • getTSRecordList

      public List<TSRecord> getTSRecordList()
    • getLastModifiedTime

      public long getLastModifiedTime()
    • setName

      public void setName(String name)
    • getName

      public String getName()
    • setDescription

      public void setDescription(String description)
    • getDescription

      public String getDescription()
    • setMessagePrinter

      public void setMessagePrinter(MessagePrinter printer)
    • getTSRecordCount

      public int getTSRecordCount()
    • getTSRecordSummaryTable

      public Hashtable getTSRecordSummaryTable(String typestr)
    • setParentPath

      public void setParentPath(String path, String classname)
    • getParentPath

      public String getParentPath()
    • getParentClassName

      public String getParentClassName()
    • getType

      public int getType()
    • setType

      public boolean setType(int t)
    • appendTSRecords

      public boolean appendTSRecords(BaseTSDataSet tsdataset)
      appends all unique records from the given TSDataSet into this TSDataSet Uniqueness is defined by having a unique NAME/PARAMETER/DSS PATHNAME
    • init

      public void init()
    • getTSRecords

      public Vector<TSRecord> getTSRecords()
    • getTSRecord

      public TSRecord getTSRecord(String name, int varid)
    • getTSRecord

      public TSRecord getTSRecord(String name, String param)
    • getTSRecordByPathParts

      public TSRecord getTSRecordByPathParts(String bPart, String cPart)
    • reset

      public void reset()
    • initialize

      public boolean initialize(int beginDate, int beginTime, int timeStepMin, int numSteps, String timeWindow)
    • initialize

      public boolean initialize(RunTimeWindow rtw)
      set up time series records for
    • reinitialize

      public boolean reinitialize(RunTimeWindow rtw)
      reset time series records for new time window
    • reLoadFile

      public boolean reLoadFile(BufferedReader reader)
    • readFile

      public boolean readFile(BufferedReader input)
    • writeDataToRas

      public boolean writeDataToRas(BufferedWriter out)
      Writes time series records to an existing opened BufferedWriter according to RAS v.2.2 flow file format
    • readDataFromRas

      public boolean readDataFromRas(BufferedReader input)
      Reads time series records from an existing opened BufferedReader according to RAS v.2.2 flow file format
    • readData

      public boolean readData(BufferedReader input)
      Reads time series records from an existing opened BufferedReader
    • writeData

      public boolean writeData(BufferedWriter out)
      Writes time series records to an existing opened BufferedWriter
    • writeFile

      public boolean writeFile(BufferedWriter out)
      Writes time series records to ascii file given in identifier.
    • setCompressData

      public void setCompressData(boolean comp)
    • writeTSRecords

      public boolean writeTSRecords()
    • isValidToWrite

      public boolean isValidToWrite(TSRecord rec)
      Parameters:
      rec -
      Returns:
      true if the record has a dss path and file
    • loadTSRecords

      public boolean loadTSRecords()
    • loadTSRecords

      public boolean loadTSRecords(Vector tsrecVec)
    • loadTSRecord

      public TSRecord loadTSRecord(String name, int varId, String timewinstr)
    • loadTSRecord

      public TSRecord loadTSRecord(String name, String param, String timewinstr)
    • checkTSRecords

      public boolean checkTSRecords(Vector tsrecVec)
      read in the data for the record and check completeness of the data
    • clearTSRecordList

      public void clearTSRecordList()
    • createTSRecord

      public TSRecord createTSRecord(String name, String param)
    • createTSRecord

      public TSRecord createTSRecord(String name, int varid, String param)
    • unloadTSRecord

      public void unloadTSRecord()
    • 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
      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