Class HecTimeSeriesBase

All Implemented Interfaces:
HecDssListener, AutoCloseable, Cloneable, EventListener
Direct Known Subclasses:
HecTimeSeries

public class HecTimeSeriesBase extends HecDataManager
  • Field Details

    • _defaultInterval

      protected static int _defaultInterval
    • _retrieveAllTimes

      protected boolean _retrieveAllTimes
    • _interval

      protected int _interval
  • Constructor Details

    • HecTimeSeriesBase

      public HecTimeSeriesBase()
    • HecTimeSeriesBase

      public HecTimeSeriesBase(String DssFileName)
  • Method Details

    • precision

      public int precision()
    • setPrecision

      public void setPrecision(int precision)
    • getIntervalFromEPart

      public static int getIntervalFromEPart(String ePart)
    • zgintlFromEPart

      public static int zgintlFromEPart(String ePart)
    • getEPartFromInterval

      public static String getEPartFromInterval(int interval)
    • getListOfEParts

      public static Vector<String> getListOfEParts()
      Returns standard list of E-Parts excluding pseudo-regular prefix:~ and less than 1 minute
    • getAppropriateIrregularBlock

      public static String getAppropriateIrregularBlock(int[] times)
    • getAppropriateRegularEPart

      public static String getAppropriateRegularEPart(int[] times)
    • getAppropriateEPart

      public static String getAppropriateEPart(int[] times)
    • isRegular

      public static boolean isRegular(int[] times)
    • getMostCommonInterval

      public static int getMostCommonInterval(int[] times)
    • getDpartFromTime

      public static String getDpartFromTime(HecTime startTime, String ePart)
      Returns the correct D (date) part of a DSS pathname, given the E part (interval) and a time in the block For example, if your data starts on 22Mar2008 and the E part is "1Year", then this will return 01JAN2008
      Parameters:
      startTime - HecTime
      ePart - String
      Returns:
      dPart String
    • setInterval

      public int setInterval(int interval)
    • interval

      public int interval()
    • setEPart

      public int setEPart(String ePart)
      Overrides:
      setEPart in class HecDSSDataAttributes
    • setPathname

      public int setPathname(String pathname)
      Overrides:
      setPathname in class HecDSSDataAttributes
    • getTimeWindowFromPath

      public static boolean getTimeWindowFromPath(HecDataManager dataManager, DSSPathname path, HecTime startTime, HecTime endTime)
    • getNumberValuesForArraySize

      protected int getNumberValuesForArraySize()
    • setPathnameParts

      public int setPathnameParts(String pathnameParts)
      Takes a string containing pathname parts in the form "B=MY LOC, C=FLOW, E = 1HOUR", and sets the parts
      Overrides:
      setPathnameParts in class HecDSSDataAttributes
      Parameters:
      pathnameParts - input string with part definition
      Returns:
      zero on success
    • setUnits

      public void setUnits(String units)
    • setType

      public void setType(String type)
    • units

      public String units()
    • type

      public String type()
    • status

      public void status()
      print basic info to console
      Overrides:
      status in class HecDataManager
    • getDefaultUnitsType

      public int getDefaultUnitsType(stringContainer units, stringContainer type)
      For storing data, if the units and the type are not given, generate some default ones based on the "C" part of the pathname
      Parameters:
      units - output units such as 'CFS '
      type - output type such as 'PER-CUM'
      Returns:
    • numberValues

      public int numberValues()
    • setStartTime

      public void setStartTime(HecTime startTime)
      Overrides:
      setStartTime in class HecDSSDataAttributes