Class HecDSSDataAttributes

All Implemented Interfaces:
HecDssListener, Cloneable, EventListener
Direct Known Subclasses:
HecDataManager

public class HecDSSDataAttributes extends HecDssCatalog
HecDSSDataAttributes contains various data utility methods and constants. includes: data type and other constants, path utilities, factory methods for IO objects, and time window methods.
  • Field Details

    • ERROR

      public static final int ERROR
      See Also:
    • UNKNOWN

      public static final int UNKNOWN
      See Also:
    • INT_ARRAY

      public static final int INT_ARRAY
      See Also:
    • FLOAT_ARRAY

      public static final int FLOAT_ARRAY
      See Also:
    • DOUBLE_ARRAY

      public static final int DOUBLE_ARRAY
      See Also:
    • LOCATION_LEVEL

      public static final int LOCATION_LEVEL
      See Also:
    • REGULAR_TIME_SERIES

      public static final int REGULAR_TIME_SERIES
      See Also:
    • REGULAR_TIME_PATTERN

      public static final int REGULAR_TIME_PATTERN
      See Also:
    • REGULAR_TIME_SERIES_DOUBLES

      public static final int REGULAR_TIME_SERIES_DOUBLES
      See Also:
    • IRREGULAR_TIME_SERIES

      public static final int IRREGULAR_TIME_SERIES
      See Also:
    • IRREGULAR_TIME_PATTERN

      public static final int IRREGULAR_TIME_PATTERN
      See Also:
    • IRREGULAR_TIME_SERIES_DOUBLES

      public static final int IRREGULAR_TIME_SERIES_DOUBLES
      See Also:
    • PAIRED

      public static final int PAIRED
      See Also:
    • PAIRED_DOUBLES

      public static final int PAIRED_DOUBLES
      See Also:
    • TEXT

      public static final int TEXT
      See Also:
    • SINGLE_VALUE

      public static final int SINGLE_VALUE
      See Also:
    • UNDEFINED_GRID_WITH_TIME

      public static final int UNDEFINED_GRID_WITH_TIME
      See Also:
    • UNDEFINED_GRID

      public static final int UNDEFINED_GRID
      See Also:
    • UNDEFINED_GRID_TYPE

      public static final int UNDEFINED_GRID_TYPE
      See Also:
    • HRAP_GRID_WITH_TIME

      public static final int HRAP_GRID_WITH_TIME
      See Also:
    • HRAP_GRID

      public static final int HRAP_GRID
      See Also:
    • HRAP

      public static final int HRAP
      See Also:
    • ALBERS_GRID_WITH_TIME

      public static final int ALBERS_GRID_WITH_TIME
      See Also:
    • ALBERS_GRID

      public static final int ALBERS_GRID
      See Also:
    • ALBERS

      public static final int ALBERS
      See Also:
    • SPECIFIED_GRID_WITH_TIME

      public static final int SPECIFIED_GRID_WITH_TIME
      See Also:
    • SPECIFIED_GRID

      public static final int SPECIFIED_GRID
      See Also:
    • SPECIFIED_GRID_TYPE

      public static final int SPECIFIED_GRID_TYPE
      See Also:
    • FILE

      public static final int FILE
      See Also:
    • IMAGE

      public static final int IMAGE
      See Also:
    • UNDEFINED_UNITS

      public static final int UNDEFINED_UNITS
      See Also:
    • ENGLISH_UNITS

      public static final int ENGLISH_UNITS
      See Also:
    • SI_UNITS

      public static final int SI_UNITS
      See Also:
    • _defaultStartTime

      protected static HecTime _defaultStartTime
    • _defaultEndTime

      protected static HecTime _defaultEndTime
    • _dssPathname

      protected DSSPathname _dssPathname
    • _dirty

      protected boolean _dirty
    • _slashPosition

      protected int[] _slashPosition
    • _startTime

      protected HecTime _startTime
    • _endTime

      protected HecTime _endTime
    • _arrayStartTime

      protected HecTime _arrayStartTime
    • _arrayEndTime

      protected HecTime _arrayEndTime
    • _timeWindowSet

      protected boolean _timeWindowSet
    • _arraySize

      protected int _arraySize
    • _desiredArraySize

      protected int _desiredArraySize
    • _recordType

      protected int _recordType
    • _checkedNumber

      protected int _checkedNumber
    • _dataLengthInts

      protected int _dataLengthInts
    • _dataType

      protected int _dataType
    • _localUnitSystem

      protected int _localUnitSystem
    • _recordExists

      protected boolean _recordExists
    • _timeSeries

      protected boolean _timeSeries
    • _unitsX

      protected String _unitsX
    • _typeX

      protected String _typeX
  • Constructor Details

    • HecDSSDataAttributes

      public HecDSSDataAttributes()
  • Method Details

    • createObject

      public HecDataManager createObject(String pathname)
    • createTimeSeriesObject

      public HecTimeSeries createTimeSeriesObject(String pathname)
    • createPairedDataObject

      public HecPairedData createPairedDataObject(String pathname)
    • createTextObject

      public HecDssText createTextObject(String pathname)
    • createArrayObject

      public HecDssArray createArrayObject(String pathname)
    • setDSSFileName

      public int setDSSFileName(String dssFileName, boolean fileMustExist)
      Overrides:
      setDSSFileName in class HecDSSFileAccess
    • setDefaultAPart

      public static void setDefaultAPart(String partName)
    • setDefaultBPart

      public static void setDefaultBPart(String partName)
    • setDefaultCPart

      public static void setDefaultCPart(String partName)
    • setDefaultDPart

      public static void setDefaultDPart(String partName)
    • setDefaultEPart

      public static int setDefaultEPart(String partName)
    • setDefaultFPart

      public static void setDefaultFPart(String partName)
    • clearDefaultParts

      public static void clearDefaultParts()
    • defaultAPart

      public static String defaultAPart()
    • defaultBPart

      public static String defaultBPart()
    • defaultCPart

      public static String defaultCPart()
    • defaultDPart

      public static String defaultDPart()
    • defaultEPart

      public static String defaultEPart()
    • defaultFPart

      public static String defaultFPart()
    • aPart

      public String aPart()
    • bPart

      public String bPart()
    • cPart

      public String cPart()
    • dPart

      public String dPart()
    • ePart

      public String ePart()
    • fPart

      public String fPart()
    • pathname

      public String pathname()
      Overrides:
      pathname in class HecDssCatalog
    • setAPart

      public void setAPart(String partName)
    • setBPart

      public void setBPart(String partName)
    • setCPart

      public void setCPart(String partName)
    • setDPart

      public void setDPart(String partName)
    • setEPart

      public int setEPart(String partName)
    • setFPart

      public void setFPart(String partName)
    • setPathname

      public int setPathname(String path)
    • setPathnameParts

      public int setPathnameParts(String pathnameParts)
    • setDefaultPathnameParts

      public int setDefaultPathnameParts(String pathnameParts)
    • dirty

      public boolean dirty()
    • pathnameDataType

      public static int pathnameDataType(String pathname)
      Tries to determine data type quickly from pathname only, without accessing the DSS file. This is meant to be quick For a more comprehensive and accurate value, use recordType.
      Parameters:
      pathname - String
      Returns:
      int
    • recordsUpdated

      public int recordsUpdated(long startTime, List<String> pathnames, List<Long> updateTimes, List<Integer> recordTypes)
      Retrieves infomation about record updated since the specified time.

      Any of the vector parameters may be null if that information is not required. Any of the vectors that are not null are cleared before being populated.

      Parameters:
      startTime - Time after which to report updated records - in Java milliseconds
      pathnames - The list of pathnames of the records that have been updated - may be null.
      updateTimes - The list of update times of the records that have been updated - may be null.
      recordTypes - The list of types of the records that have been updated - may be null.
      Returns:
      Zero if successful.
    • recordTypes

      public Map<String,Integer> recordTypes(String[] pathnames)
    • recordType

      public int recordType(String pathname)
    • recordType

      public int recordType()
    • isGridRecord

      public boolean isGridRecord(String pathname)
      Determines if record for the given pathname is represents a grid.
      Parameters:
      pathname -
      Returns:
    • recordExists

      public boolean recordExists(String pathname)
    • getLastWriteTimeMillis

      public long getLastWriteTimeMillis()
    • getLastWriteTimeMillis

      public long getLastWriteTimeMillis(String pathname)
    • getLastWriteTime

      public HecTime getLastWriteTime()
    • getLastWriteTime

      public HecTime getLastWriteTime(String pathname)
    • getRecordBasics

      public HecDSSRecordBasics getRecordBasics()
    • setStartTime

      public void setStartTime(HecTime startTime)
    • setEndTime

      public void setEndTime(HecTime endTime)
    • setTimeWindow

      public void setTimeWindow(HecTime startTime, HecTime endTime)
    • setTimeWindow

      public int setTimeWindow(String userLine)
    • setDefaultTimeWindow

      public void setDefaultTimeWindow(HecTime startTime, HecTime endTime)
    • setDefaultTimeWindow

      public int setDefaultTimeWindow(String userLine)
    • startTime

      public HecTime startTime()
    • arrayStartTime

      public HecTime arrayStartTime()
    • endTime

      public HecTime endTime()
    • arrayEndTime

      public HecTime arrayEndTime()
    • isTimeWindowSet

      public boolean isTimeWindowSet()
    • setLocalUnitSystem

      public void setLocalUnitSystem(int localUnitSystem)
    • localUnitSystem

      public int localUnitSystem()
    • convertUnits

      public static int convertUnits(double[] data, int number, int fromUnitSyst, int toUnitSyst, stringContainer units)
    • convertDoubleUnits

      public static int convertDoubleUnits(double[] data, int number, int fromUnits, int toUnits)
    • status

      public void status()
    • readRawBytes

      public byte[] readRawBytes()
    • readRawBytes

      public byte[] readRawBytes(int[] internalHeader, int limitInternalHeader, int[] numberInternalHeader, int[] compressionHeader, int limitCompressionHeader, int[] numberCompressionHeader, int[] userHeader, int limitUserHeader, int[] numberUserHeader, int[] stat)
    • readRawRecord

      public int readRawRecord(RawContainer rawContainer, boolean getLengthsOnly)
    • writeRawRecord

      public int writeRawRecord(RawContainer rawContainer)
    • readRawShorts

      public short[] readRawShorts()
    • readRawShorts

      public short[] readRawShorts(int[] internalHeader, int limitInternalHeader, int[] numberInternalHeader, int[] compressionHeader, int limitCompressionHeader, int[] numberCompressionHeader, int[] userHeader, int limitUserHeader, int[] numberUserHeader, int[] stat)