Package hec.data.tx

Class DataSetTx

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DataSetTxVertDatum

@Deprecated public class DataSetTx extends DataSetTxTemplate implements Serializable
Deprecated.
DataSetTx holds a complete description of a time series and its data. It includes the time series description, the data values, the data times, an optional data quality indicator, and the data units. The methods permit the combining of like data sets and deriving of data sets from other data sets. Derived data sets may have different units, be at a different time spacing, be averaged, have alternate time window, etc. The characteristics of the new data set to be derived is specified using a DataSetTxTemplate.

When calculating statistics, interpolating, and deriving alternative data sets, Missing and Reject data values are not processed numerically.

See Also:
  • Field Details

    • COMPARE_NORMAL_TIMES

      public static final int COMPARE_NORMAL_TIMES
      Deprecated.
    • COMPARE_TRUNCATED_TIMES

      public static final int COMPARE_TRUNCATED_TIMES
      Deprecated.
    • COMPARE_ROUNDED_TIMES

      public static final int COMPARE_ROUNDED_TIMES
      Deprecated.
    • COMPARE_NEAR_TIMES

      public static final int COMPARE_NEAR_TIMES
      Deprecated.
    • ORACLE_PRECISION

      public static final double ORACLE_PRECISION
      Deprecated.
      See Also:
  • Constructor Details

  • Method Details

    • getTimeSeries

      public final mil.army.usace.hec.data.timeseries.TimeSeries getTimeSeries()
      Deprecated.
    • setStartTime

      public void setStartTime(long startTime) throws DataSetTxIllegalArgumentException
      Deprecated.
      Overrides:
      setStartTime in class DataSetTxTemplate
      Throws:
      DataSetTxIllegalArgumentException
    • setEndTime

      public void setEndTime(long endTime) throws DataSetTxIllegalArgumentException
      Deprecated.
      Overrides:
      setEndTime in class DataSetTxTemplate
      Throws:
      DataSetTxIllegalArgumentException
    • clearTimeWindow

      public void clearTimeWindow() throws DataSetTxIllegalArgumentException
      Deprecated.
      Overrides:
      clearTimeWindow in class DataSetTxTemplate
      Throws:
      DataSetTxIllegalArgumentException
    • getFirstTime

      public long getFirstTime()
      Deprecated.
      Returns the first time or Const.UNDEFINED_TIME if there are no times.
      Returns:
    • setCountMissing

      public void setCountMissing(boolean bStart, boolean bEnd)
      Deprecated.
    • set

      public void set(long[] times, double[] values, QualityTx quality) throws DataSetTxIllegalArgumentException, UtcIntervalOffsetMismatchException, DataSetIllegalArgumentException
      Deprecated.
      Set times, values and quality for an existing time series. If there is no quality pass null.
      Throws:
      DataSetTxIllegalArgumentException
      UtcIntervalOffsetMismatchException
      DataSetIllegalArgumentException
    • getTimeSeriesContainer

      @Deprecated public TimeSeriesContainer getTimeSeriesContainer()
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class DataSetTxTemplate
    • tabulateValues

      public void tabulateValues(TimeZone timeZone)
      Deprecated.
    • tabulateValues

      public void tabulateValues(TimeZone timeZone, String numberFormatPattern)
      Deprecated.
    • tabulateValues

      public void tabulateValues()
      Deprecated.
    • tabulateStatistics

      public void tabulateStatistics(TimeZone timeZone)
      Deprecated.
    • tabulateStatistics

      public void tabulateStatistics(TimeZone timeZone, String numberFormatPattern)
      Deprecated.
    • tabulateStatistics

      public void tabulateStatistics()
      Deprecated.
    • getDateValueNavigableMap

      public NavigableMap<Date,Double> getDateValueNavigableMap()
      Deprecated.
      Method for transforming underlying values array into an accessible Collections object. This method will perform the entire calculation for the times array from the getTimes() method.
      Returns:
      sorted map that is not thread safe of dates to values.
    • getQualitySymbols

      public NavigableMap<Date,String> getQualitySymbols()
      Deprecated.
      Method for transforming underlying QualityTx into an accessible Collections object. This method will perform the entire calculation for the times array from the getTimes() method and uses the QualityTx methods to transform the symbolic String quality into integers.
      Returns:
      sorted map that is not thread safe of dates to quality. Values will not be null, but the collection will be empty if QualityTx is null.
    • getQualityIntegers

      public NavigableMap<Date,Integer> getQualityIntegers()
      Deprecated.
      Method for transforming underlying QualityTx into an accessible Collections object. This method will perform the entire calculation for the times array from the getTimes() method and uses the QualityTx methods to transform the Integer quality into integers.
      Returns:
      sorted map that is not thread safe of dates to quality. Values will not be null, but the collection will be empty if QualityTx is null.
    • getQualityBytes

      @Deprecated public NavigableMap<Date,byte[]> getQualityBytes()
      Deprecated.
      Method for transforming underlying QualityTx into an accessible Collections object. This method will perform the entire calculation for the times array from the getTimes() method and uses the QualityTx methods to transform the byte[] quality into integers.
      Returns:
      sorted map that is not thread safe of dates to quality. Values will not be null, but the collection will be empty if QualityTx is null.
    • getValues

      public double[] getValues()
      Deprecated.
    • getValuesWithQualityFlagsApplied

      public double[] getValuesWithQualityFlagsApplied()
      Deprecated.
    • getIndexOfLatestValidValue

      public int getIndexOfLatestValidValue()
      Deprecated.
    • getQualityTx

      public QualityTx getQualityTx()
      Deprecated.
    • hasQuality

      public boolean hasQuality()
      Deprecated.
    • addEmptyQualityTx

      public void addEmptyQualityTx()
      Deprecated.
    • getIntTimes

      public int[] getIntTimes()
      Deprecated.
    • getTimes

      public long[] getTimes()
      Deprecated.
    • getTimes

      @Deprecated public static long[] getTimes(long startValuesTime, double[] values, Interval interval)
      Deprecated.
    • getTimes

      @Deprecated public static long[] getTimes(long startValuesTime, double[] values, Interval interval, TimeZone tz)
      Deprecated.
    • equals

      public boolean equals(Object object)
      Deprecated.
      Determine if two data sets are 'equal'. To be 'equal' the description, startTime, endTime, units, and number of data values must all be identical. The data values, quality flags, and times are not checked.
      Overrides:
      equals in class DataSetTxTemplate
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class DataSetTxTemplate
    • equals

      public boolean equals(DataSetTx dataSetTx)
      Deprecated.
    • identicalTimesValuesQuality

      public boolean identicalTimesValuesQuality(DataSetTx dataSetTx, double precision)
      Deprecated.
    • isOkay

      public boolean isOkay(int index)
      Deprecated.
    • isNotOkay

      public boolean isNotOkay(int index)
      Deprecated.
    • isMissing

      public boolean isMissing(int index)
      Deprecated.
    • isNotMissing

      public boolean isNotMissing(int index)
      Deprecated.
    • isProtected

      public boolean isProtected(int index)
      Deprecated.
    • isNotProtected

      public boolean isNotProtected(int index)
      Deprecated.
    • isReject

      public boolean isReject(int index)
      Deprecated.
    • isNotReject

      public boolean isNotReject(int index)
      Deprecated.
    • isQuestion

      public boolean isQuestion(int index)
      Deprecated.
    • isNotQuestion

      public boolean isNotQuestion(int index)
      Deprecated.
    • isScreened

      public boolean isScreened(int index)
      Deprecated.
    • isNotScreened

      public boolean isNotScreened(int index)
      Deprecated.
    • updateStatistics

      public void updateStatistics()
      Deprecated.
      Compute Statistics for this data set. Statistics are based ONLY on those data values that with quality have their "Okay" or "Question" bits set. Without flags set statistics are based on all values that are not numerically set to UNDEFINED. The absMinNonZeroValue statistic is always based on ALL values that are not UNDEFINED.

      Thus, when calculating statistics, interpolating, and deriving alternative data sets, Missing and Reject data values are not processed numerically.

    • getNumberValuesOkay

      public int getNumberValuesOkay()
      Deprecated.
    • getNumberValuesMissing

      public int getNumberValuesMissing()
      Deprecated.
    • getNumberValuesMissing

      @Deprecated public static int getNumberValuesMissing(TimeSeriesContainer tsc)
    • getNumberValuesReject

      public int getNumberValuesReject()
      Deprecated.
    • getNumberValuesReject

      @Deprecated public static int getNumberValuesReject(TimeSeriesContainer tsc)
    • getNumberValuesQuestion

      public int getNumberValuesQuestion()
      Deprecated.
    • getNumberValuesQuestion

      @Deprecated public static int getNumberValuesQuestion(TimeSeriesContainer tsc)
    • getNumberValuesProtected

      public int getNumberValuesProtected()
      Deprecated.
    • getNumberValues

      public int getNumberValues()
      Deprecated.
    • getIntervalOffsetFromUTCBaseSec

      public int getIntervalOffsetFromUTCBaseSec()
      Deprecated.
    • getMaxValue

      public double getMaxValue()
      Deprecated.
    • getMaxValueTime

      public long getMaxValueTime()
      Deprecated.
    • getMinValueTime

      public long getMinValueTime()
      Deprecated.
    • getMinValue

      public double getMinValue()
      Deprecated.
    • getAbsMinNonZeroValue

      public double getAbsMinNonZeroValue()
      Deprecated.
    • getAveValue

      public double getAveValue()
      Deprecated.
    • isSameTimeWindow

      public boolean isSameTimeWindow(DataSetTx dataSetTx)
      Deprecated.
    • combine

      public void combine(DataSetTx dataSetTx, int storeRule, boolean overrideProtection) throws DataSetException
      Deprecated.
      Combine a like time series with this current one. The description and units of both time series must be identical. See derive for changing the characteristics of a time series data set.

      When combining, the value of storeRule controls the operation. Valid values are:

      • hec.lang.Const.DELETE_INSERT
      • hec.lang.Const.REPLACE_ALL
      • hec.lang.Const.DO_NOT_REPLACE
      • hec.lang.Const.REPLACE_MISSING_VALUES_ONLY
      • hec.lang.Const.REPLACE_WITH_NON_MISSING

      The hec.lang.Const.DELETE_INSERT rule removes all unprotected data from the current dataset which falls within the incoming data's earliest and lastest times. Then incoming data are merged between protected current data. Unprotected current data at corresponding times are updated with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.REPLACE_ALL rule merges incoming data between current data and replaces unprotected current data at corresponding times with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.DO_NOT_REPLACE rule merges incoming data between current data and discards incoming data when there are current data at corresponding times.

      The hec.lang.Const.REPLACE_MISSING_VALUES_ONLY rule merges incoming data between current data and replaces unprotected missing current data at corresponding times with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.REPLACE_WITH_NON_MISSING rule merges incoming data between current data and replaces unprotected current data at corresponding times with non-missing incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      Setting overrideProtection to true will cause the the current data's protection bits to be ignored when the rule is applied.

      Parameters:
      dataSetTx - The time series to combine with the current one.
      storeRule - The rule governing how the time series are combined.
      overrideProtection - specifies whether the combining governed by storeRule ignores any specified value protection.
      Throws:
      DataSetException
    • combine

      public void combine(DataSetTx dataSetTx, int storeRule, boolean overrideProtection, long timeComparisonInterval, int timeComparisonMethod) throws DataSetIllegalArgumentException, DataSetException
      Deprecated.
      Combine a like time series with this current one. The description and units of both time series must be identical. See derive for changing the characteristics of a time series data set.

      When combining, the values of storeRule, timeComparisonInterval, and timeComparisonMethod control the operation.

      Valid values for storeRule are:

      • hec.lang.Const.DELETE_INSERT
      • hec.lang.Const.REPLACE_ALL
      • hec.lang.Const.DO_NOT_REPLACE
      • hec.lang.Const.REPLACE_MISSING_VALUES_ONLY
      • hec.lang.Const.REPLACE_WITH_NON_MISSING

      The hec.lang.Const.DELETE_INSERT rule removes all unprotected data from the current dataset which falls within the incoming data's earliest and lastest times. Then incoming data are merged between protected current data. Unprotected current data at corresponding times are updated with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.REPLACE_ALL rule merges incoming data between current data and replaces unprotected current data at corresponding times with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.DO_NOT_REPLACE rule merges incoming data between current data and discards incoming data when there are current data at corresponding times.

      The hec.lang.Const.REPLACE_MISSING_VALUES_ONLY rule merges incoming data between current data and replaces unprotected missing current data at corresponding times with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.REPLACE_WITH_NON_MISSING rule merges incoming data between current data and replaces unprotected current data at corresponding times with non-missing incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      Setting overrideProtection to true will cause the the current data's protection bits to be ignored when the rule is applied.

      Valid values for timeComparisonMethod are:

      • hec.data.tx.COMPARE_NORMAL_TIMES
      • hec.data.tx.COMPARE_TRUNCATED_TIMES
      • hec.data.tx.COMPARE_ROUNDED_TIMES
      • hec.data.tx.COMPARE_NEAR_TIMES

      The hec.data.tx.COMPARE_NORMAL_TIMES method compares times to millisecond precision without alteration.

      The hec.data.tx.COMPARE_TRUNCATED_TIMES method truncates each time to an even multiple of timeComparisonInterval milliseconds before comparing.

      The hec.data.tx.COMPARE_ROUNDED_TIMES method rounds each time to the nearest even multiple of timeComparisonInterval milliseconds before comparing.

      The hec.data.tx.COMPARE_NEAR_TIMES method considers times within timeComparisonInterval milliseconds of each other to be the same time for comparison purposes.

      Parameters:
      dataSetTx - The time series to combine with the current one.
      storeRule - The rule governing how the time series are combined.
      overrideProtection - specifies whether the combining governed by storeRule ignores any specified value protection.
      timeComparisonInterval - The time interval in milliseconds to use when comparing times.
      timeComparisonMethod - The method to use for determining whether two times are to be considered coincident.
      Throws:
      DataSetException
      DataSetIllegalArgumentException
    • combine

      public void combine(long time, double value, byte[] qualityBytes, int storeRule, boolean overrideProtection) throws DataSetException
      Deprecated.
      Combine a single value with this current time series. If no quality pass in a null for qualityBytes. Caller is responsible for assuring that the single value to be combined is consistent with this dataset.

      When combining, the value of storeRule controls the operation. Valid values are:

      • hec.lang.Const.DELETE_INSERT
      • hec.lang.Const.REPLACE_ALL
      • hec.lang.Const.DO_NOT_REPLACE
      • hec.lang.Const.REPLACE_MISSING_VALUES_ONLY
      • hec.lang.Const.REPLACE_WITH_NON_MISSING

      The hec.lang.Const.DELETE_INSERT rule removes all unprotected data from the current dataset which falls within the incoming data's earliest and lastest times. Then incoming data are merged between protected current data. Unprotected current data at corresponding times are updated with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.REPLACE_ALL rule merges incoming data between current data and replaces unprotected current data at corresponding times with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.DO_NOT_REPLACE rule merges incoming data between current data and discards incoming data when there are current data at corresponding times.

      The hec.lang.Const.REPLACE_MISSING_VALUES_ONLY rule merges incoming data between current data and replaces unprotected missing current data at corresponding times with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.REPLACE_WITH_NON_MISSING rule merges incoming data between current data and replaces unprotected current data at corresponding times with non-missing incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      Setting overrideProtection to true will cause the the current data's protection bits to be ignored when the rule is applied.

      Parameters:
      time - The time of the single value to combine with the time series.
      value - The single value to combine with the time series.
      qualityBytes - The quality of the single value to combine with the time series.
      storeRule - The rule governing how the data are combined.
      overrideProtection - specifies whether the combining governed by storeRule ignores any specified value protection.
      Throws:
      DataSetException
    • combine

      public void combine(long time, double value, byte[] qualityBytes, int storeRule, boolean overrideProtection, long timeComparisonInterval, int timeComparisonMethod) throws DataSetException
      Deprecated.
      Combine a single value with this current time series. If no quality pass in a null for qualityBytes. Caller is responsible for assuring that the single value to be combined is consistent with this dataset.

      When combining, the values of storeRule, timeComparisonInterval, and timeComparisonMethod control the operation.

      • hec.lang.Const.DELETE_INSERT
      • hec.lang.Const.REPLACE_ALL
      • hec.lang.Const.DO_NOT_REPLACE
      • hec.lang.Const.REPLACE_MISSING_VALUES_ONLY
      • hec.lang.Const.REPLACE_WITH_NON_MISSING

      The hec.lang.Const.DELETE_INSERT rule removes all unprotected data from the current dataset which falls within the incoming data's earliest and lastest times. Then incoming data are merged between protected current data. Unprotected current data at corresponding times are updated with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.REPLACE_ALL rule merges incoming data between current data and replaces unprotected current data at corresponding times with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.DO_NOT_REPLACE rule merges incoming data between current data and discards incoming data when there are current data at corresponding times.

      The hec.lang.Const.REPLACE_MISSING_VALUES_ONLY rule merges incoming data between current data and replaces unprotected missing current data at corresponding times with incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      The hec.lang.Const.REPLACE_WITH_NON_MISSING rule merges incoming data between current data and replaces unprotected current data at corresponding times with non-missing incoming data. Incoming data are discarded when there are protected current data at corresponding times.

      Setting overrideProtection to true will cause the the current data's protection bits to be ignored when the rule is applied.

      Valid values for timeComparisonMethod are:

      • hec.data.tx.COMPARE_NORMAL_TIMES
      • hec.data.tx.COMPARE_TRUNCATED_TIMES
      • hec.data.tx.COMPARE_ROUNDED_TIMES
      • hec.data.tx.COMPARE_NEAR_TIMES

      The hec.data.tx.COMPARE_NORMAL_TIMES method compares times to millisecond precision without alteration.

      The hec.data.tx.COMPARE_TRUNCATED_TIMES method truncates each time to an even multiple of timeComparisonInterval milliseconds before comparing.

      The hec.data.tx.COMPARE_ROUNDED_TIMES method rounds each time to the nearest even multiple of timeComparisonInterval milliseconds before comparing.

      The hec.data.tx.COMPARE_NEAR_TIMES method considers times within timeComparisonInterval milliseconds of each other to be the same time for comparison purposes.

      Parameters:
      time - The time of the single value to combine with the time series.
      value - The single value to combine with the time series.
      qualityBytes - The quality of the single value to combine with the time series.
      storeRule - The rule governing how the data are combined.
      overrideProtection - specifies whether the combining governed by storeRule ignores any specified value protection.
      timeComparisonInterval - The time interval in milliseconds to use when comparing times.
      timeComparisonMethod - The method to use for determining whether two times are to be considered coincident.
      Throws:
      DataSetException
    • derive

      public void derive(DataSetTxTemplate dataSetTxTemplate) throws DataSetIllegalArgumentException, DataSetException
      Deprecated.
      Derive replacement time series.

      When interpolating, this method will not try to fill in with interploated values if a gap of more than maxTimeGap exists between the original data points. If the gap is exceeded, missing values will be generated.

      Throws:
      DataSetIllegalArgumentException
      DataSetException
    • needToChangeUnits

      public boolean needToChangeUnits(DataSetTxTemplate dataSetTxTemplate) throws DataSetTxDeriveException
      Deprecated.
      Throws:
      DataSetTxDeriveException
    • needToChangeUnits

      public boolean needToChangeUnits(Units toUnits) throws DataSetTxDeriveException
      Deprecated.
      Throws:
      DataSetTxDeriveException
    • changeUnits

      public void changeUnits(DataSetTxTemplate dataSetTxTemplate) throws DataSetTxDeriveException
      Deprecated.
      Throws:
      DataSetTxDeriveException
    • changeUnits

      public void changeUnits(Units toUnits) throws DataSetTxDeriveException
      Deprecated.
      Throws:
      DataSetTxDeriveException
    • changeUnitSystem

      public void changeUnitSystem(String unitSystem) throws DataSetTxException, UnitsConversionException, DataSetIllegalArgumentException
      Deprecated.
      Throws:
      DataSetTxException
      UnitsConversionException
      DataSetIllegalArgumentException
    • changeUnitSystem

      public void changeUnitSystem(int unitSystemId) throws DataSetTxException, UnitsConversionException, DataSetIllegalArgumentException
      Deprecated.
      Throws:
      DataSetTxException
      UnitsConversionException
      DataSetIllegalArgumentException
    • window

      public void window(DataSetTxTemplate dataSetTxTemplate) throws DataSetTxDeriveException
      Deprecated.
      Throws:
      DataSetTxDeriveException
    • fillTails

      public void fillTails(DataSetTxTemplate template) throws DataSetTxException, DataSetIllegalArgumentException
      Deprecated.
      Throws:
      DataSetTxException
      DataSetIllegalArgumentException
    • trimTail

      public void trimTail()
      Deprecated.
      Trim UNDEFINED values from the tail of a time series. If there are UNDEFINED values at the end of a time series, they are removed and the original time series size is reduced to the trimmed size. If the UNDEFINED values have quality, and either the MISSING bit or the PROTECTED bit are set, the values are not removed. If no values remain in the time series after trimming, a zero length time series results.
    • trim

      public void trim() throws DataSetTxIllegalArgumentException
      Deprecated.
      Trim a time series of UNDEFINED values at front and rear. If there are UNDEFINED values at the beginning or end of a time series, they removed and the original time series size is reduced to the trimmed size. If the UNDEFINED values have quality, and either the MISSING bit and the PROTECTED bit are set, the values are not removed. If no values remain in the time series after trimming, a zero length time series results.
      Throws:
      DataSetTxIllegalArgumentException
    • cannotCombine

      public boolean cannotCombine(DataSetTx dataSetTx)
      Deprecated.
    • canCombine

      public boolean canCombine(DataSetTx dataSetTx)
      Deprecated.
    • cannotCombine

      public boolean cannotCombine(DataSetTxTemplate dataSetTxTemplate)
      Deprecated.
    • canCombine

      public boolean canCombine(DataSetTxTemplate dataSetTxTemplate)
      Deprecated.
    • cannotDerive

      public boolean cannotDerive(DataSetTxTemplate dataSetTx)
      Deprecated.
    • canDerive

      public boolean canDerive(DataSetTxTemplate dataSetTx)
      Deprecated.
    • generateDifferences

      public DataSetTx generateDifferences(DataSetTx filterData) throws DataSetException
      Deprecated.
      Creates a new time series from this where the first data point is the first diff between this time series and the argument time series. The last data point is the last difference between the two. Everything between the first and last difference points is included in the resulting data set.
      Parameters:
      filterData -
      Returns:
      Throws:
      DataSetException