Package hec.io

Class DataContainer

java.lang.Object
hec.io.DataContainer
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ArrayContainer, DssFileContainer, GridContainer, GridStructContainer, PairedDataContainer, PhotoViewerInfo, RatingContainer, RawContainer, StreamRatingSeriesContainer, TextContainer, TimeSeriesCollectionContainer, TimeSeriesContainer, TinContainer

public class DataContainer extends Object implements Cloneable, Serializable
This is a simple generic container class that holds data, and some related information The purpose of this class is to pass data to plot and tabulate functions. The class does not know where the data came from (or is going). It does not contain any reference or connection to any database. It does not have any functions.
See Also:
  • Field Details

    • VERTICAL_DATUM_INFO_KEY

      public static final String VERTICAL_DATUM_INFO_KEY
      See Also:
    • VERTICAL_DATUM_INFO_HEADER

      public static final String VERTICAL_DATUM_INFO_HEADER
      See Also:
    • CURRENT_VERTICAL_DATUM_KEY

      public static final String CURRENT_VERTICAL_DATUM_KEY
      See Also:
    • CURRENT_VERTICAL_DATUM_HEADER

      public static final String CURRENT_VERTICAL_DATUM_HEADER
      See Also:
    • fullName

      public String fullName
      the full DSS pathname
    • watershed

      public String watershed
      The A Part of the DSS path
    • location

      public String location
      The B Part of the DSS path
    • version

      public String version
      the F Part of the DSS Path
    • subVersion

      public String subVersion
    • fileName

      public String fileName
      the name of the DSS File
    • storedAsdoubles

      public boolean storedAsdoubles
      A flag indicating the precision of the data stored on disk Warning - some older DSS programs cannot recognize double precision data The default is true
    • dataType

      public int dataType
      A flag indicating the data type of this data set. 0 is not defined
    • lastWriteTimeMillis

      public long lastWriteTimeMillis
      The last write time of this data set, in milliseconds since 01Jan1970 (system time) Set to zero (0) if not defined
    • fileLastWriteTimeMillis

      public long fileLastWriteTimeMillis
      The last write time of the database or DSS file, in milliseconds since 01Jan1970 (system time) Set to zero (0) if not defined
    • xOrdinate

      public double xOrdinate
      Longitude, Easting or decimal degrees (negative for Western Hemisphere)
    • yOrdinate

      public double yOrdinate
      Latitude, Northing or decimal degrees
    • zOrdinate

      public double zOrdinate
      Elevation
    • coordinateSystem

      public int coordinateSystem
      coordinateSystem

      • 0 - no coordinates set
      • 1 - Lat/long
      • 2 - State Plane, FIPS
      • 3 - State Plane, ADS
      • 4 - UTM
      • 5 - Local (other)
    • coordinateID

      public int coordinateID
      coordinateID = UTM zone #, or FIPS SPCS # ADS SPCS #
    • horizontalUnits

      public int horizontalUnits
      Horizontal Units can be one of the following:
      • 0 - unspecified
      • 1 - feet
      • 2 - meeters
      • 3 - Decimal Degrees
      • 4 - Degrees Minutes Seconds
    • horizontalDatum

      public int horizontalDatum
      horizontalDatum can be one of the following:
      • 0 - unset
      • 1 - NAD83
      • 2 - NAD27
      • 3 - WGS84
      • 4 - WGS72
      • 5 - Local (other)
    • verticalUnits

      public int verticalUnits
      Vertical Units can be one of the following:
      • 0 - unspecified
      • 1 - feet
      • 2 - meters
    • verticalDatum

      public int verticalDatum
      verticalDatum can be one of the following:
      • 0 - unset
      • 1 - NAVD88
      • 2 - NGVD29
      • 3 - Local (other)
    • locationTimezone

      public String locationTimezone
      Time zone name at the location NOT the time zone of the data (data may GMT and location PST)
    • supplementalInfo

      public String supplementalInfo
      supplementalInfo is any additional information that describes this location It MUST be in a "Keyword:Item;" format. The keyword is separated from the item by a colon (:), and the item is terminated by a simi-colon (;) Items may or may not be a number. Keyword1:Item1;Keyword2:Item2;Keyword3:Item3; Examples: Offset:1.2;Shift:3.4;Datum:5.6;Transform:LogLog;
    • otherInfo

      public Object otherInfo
    • modified

      public boolean modified
  • Constructor Details

    • DataContainer

      public DataContainer()
  • Method Details

    • setName

      public void setName(String datasetName)
    • getName

      public String getName()
    • setFullName

      public void setFullName(String datasetName)
    • getFullName

      public String getFullName()
    • setStoreAsDoubles

      public void setStoreAsDoubles(boolean storedAsdoubles)
    • getStoreAsDoubles

      public boolean getStoreAsDoubles()
    • clone

      public void clone(DataContainer dc)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setLatLong

      public void setLatLong(double latitude, double longitude)
    • getLatLong

      public boolean getLatLong(doubleContainer latitude, doubleContainer longitude)
    • setHorizontalDatum

      public void setHorizontalDatum(String datum)
    • getHorizontalDatum

      public String getHorizontalDatum()
    • setVerticalDatum

      public void setVerticalDatum(DataContainer.VERTICAL_DATUM datum)
    • setVerticalDatum

      public void setVerticalDatum(String datum)
    • getVerticalDatum

      public String getVerticalDatum()
    • setVerticalUnits

      public void setVerticalUnits(DataContainer.VERTICAL_UNITS units)
    • setVerticalUnits

      public void setVerticalUnits(String units)
    • getVerticalUnits

      public String getVerticalUnits()
    • getSupplementalInfo

      public HashMap<String,String> getSupplementalInfo()
      Returns:
      the key, value pairs in the supplementalInfo field as a map
    • setSupplementalInfo

      public void setSupplementalInfo(HashMap<String,String> si)
      Sets the supplemental info from a key, value map
    • extractVerticalDatum

      public mil.army.usace.hec.metadata.VerticalDatumContainer extractVerticalDatum() throws mil.army.usace.hec.metadata.VerticalDatumException, IOException
      Extracts any verticalDatumInfo string in the supplementalInfo to a VerticalDatumContainer and removes the string from the supplementalInfo.
      Returns:
      The VerticalDatumContainer
      Throws:
      Exception
      mil.army.usace.hec.metadata.VerticalDatumException
      IOException
    • insertVerticalDatum

      public void insertVerticalDatum(mil.army.usace.hec.metadata.VerticalDatumContainer vdc) throws IOException, mil.army.usace.hec.metadata.VerticalDatumException
      Inserts the text representation a VerticalDatumContainer into the supplementalInfo field of a DataContainer object, replacing any existing vertical datum information in the field
      Parameters:
      vdc - The VerticalDatumContainer
      Throws:
      IOException
      mil.army.usace.hec.metadata.VerticalDatumException