Package hec.data

Class TsTranslator

java.lang.Object
hec.data.TsTranslator

public class TsTranslator extends Object
Translates from hec.data.tx.DescriptionTx Objects to DSS Paths and viceversa.
  • Field Details

    • setDssMessageLevel

      public static boolean setDssMessageLevel
      Indicated that the DSS message level needs to be set.
    • _app

      public static TsTranslator _app
  • Constructor Details

    • TsTranslator

      public TsTranslator()
  • Method Details

    • dssPathToTsDescription

      public static DescriptionTx dssPathToTsDescription(HecDataManager dataManager, String dssPath)
      Returns a TsDescription for the DSS Path. WCDS Id equals a concatination of the A part and B part. Parameter equals a match or translation of the C part. Parameter Type equals a match or translation of the Type defined in the DSS Header. Interval equals a match of the E part. Duration is determined by examining the Interval and Parameter Type. Version equals a match of the F part.
    • dssPathToTsDescription

      public static DescriptionTx dssPathToTsDescription(String dssPath, String dssType)
    • dssPathUnitsAndType

      public static void dssPathUnitsAndType(stringContainer unitsCont, stringContainer typeCont, HecDataManager dataManager, String dssPath)
    • getDssStartAndEndTime

      public static long[] getDssStartAndEndTime(HecDataManager dataManager, String dssPath)
    • tsDescriptionToDssPath

      public static String tsDescriptionToDssPath(DescriptionTx tsdesc)
    • tsDescriptionToDssPath

      public static String tsDescriptionToDssPath(String strTsdesc)
    • matchDssTypeTsParameterType

      public static String matchDssTypeTsParameterType(String dssType)
    • matchTsParameterTypeDssType

      public static String matchTsParameterTypeDssType(ParameterType tsType)
    • parseDssPath

      public static String[] parseDssPath(String path)
    • dssToTs

      public static DataSetTx dssToTs(String translationTableFilePath, String dssFilePath, String dssPath) throws Exception
      Throws:
      Exception
    • dssToTs

      public static DataSetTx dssToTs(String translationTableFilePath, String dssFilePath, String dssPath, long startTime, long endTime) throws Exception
      Throws:
      Exception
    • dssToTs

      public static DataSetTx dssToTs(String translationTableFilePath, String dssFilePath, String dssPath, String fpart, String version, long startTime, long endTime) throws Exception
      Throws:
      Exception
    • dssToTs

      public static DataSetTx dssToTs(String translationTableFilePath, String dssFilePath, String dssPath, String fpart, String version, long[] timewindow) throws Exception
      Throws:
      Exception
    • dssToTs

      public static DataSetTx dssToTs(Properties dssToTsProp, String dssFilePath, String dssPath, String fpart, String version, long[] timewindow) throws Exception
      Throws:
      Exception
    • dssToTs

      public static DataSetTx dssToTs(Properties dssToTsProp, HecDataManager dataManager, String dssPath, String fpart, String version, long[] timewindow) throws Exception
      Throws:
      Exception
    • tsToDss

      public static int tsToDss(String translationTableFilePath, String dssFilePath, DataSetTx tsds)
      -1 = no match to the tsdesc
      -2 = no records found in time series
    • tsToDss

      public static int tsToDss(Properties lookupTable, String dssFilePath, DataSetTx tsds)
    • tsToDss

      public static int tsToDss(Properties lookupTable, String dssFilePath, String timeStep, long startTime, long endTime, DataSetTx tsds)
      Writes a hec.data.tx.DataSetTx to DSS. Return values. 0 = hec.data.tx.DataSetTx had no values. -1 = DSS Path error. -2 = Interpolate error.
    • tsToDss

      public static int tsToDss(Properties lookupTable, HecDataManager dataManager, String timeStep, long startTime, long endTime, DataSetTx tsds)
    • getTimeSeries

      public static HecTimeSeries getTimeSeries(HecDataManager dataManager, String dssPath)
      Returns a HecTimeSeries from the HecDataManager described by the DSS path. The HecDataManager uses the DSS path to create the new HecTimeSeries.
    • getListProperties

      public static Properties getListProperties(String filepath)