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
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumVertical datum choicesstatic enumVertical datum choices -
Field Summary
FieldsModifier and TypeFieldDescriptionintcoordinateID = UTM zone #, or FIPS SPCS # ADS SPCS #intcoordinateSystemstatic final Stringstatic final StringintA flag indicating the data type of this data set.longThe last write time of the database or DSS file, in milliseconds since 01Jan1970 (system time) Set to zero (0) if not definedthe name of the DSS Filethe full DSS pathnameinthorizontalDatum can be one of the following: 0 - unset 1 - NAD83 2 - NAD27 3 - WGS84 4 - WGS72 5 - Local (other)intHorizontal Units can be one of the following: 0 - unspecified 1 - feet 2 - meeters 3 - Decimal Degrees 4 - Degrees Minutes SecondslongThe last write time of this data set, in milliseconds since 01Jan1970 (system time) Set to zero (0) if not definedThe B Part of the DSS pathTime zone name at the location NOT the time zone of the data (data may GMT and location PST)booleanbooleanA flag indicating the precision of the data stored on disk Warning - some older DSS programs cannot recognize double precision data The default is truesupplementalInfo is any additional information that describes this location It MUST be in a "Keyword:Item;" format.the F Part of the DSS Pathstatic final Stringstatic final StringintverticalDatum can be one of the following: 0 - unset 1 - NAVD88 2 - NGVD29 3 - Local (other)intVertical Units can be one of the following: 0 - unspecified 1 - feet 2 - metersThe A Part of the DSS pathdoubleLongitude, Easting or decimal degrees (negative for Western Hemisphere)doubleLatitude, Northing or decimal degreesdoubleElevation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclone(DataContainer dc) mil.army.usace.hec.metadata.VerticalDatumContainerExtracts any verticalDatumInfo string in the supplementalInfo to a VerticalDatumContainer and removes the string from the supplementalInfo.booleangetLatLong(doubleContainer latitude, doubleContainer longitude) getName()booleanvoidinsertVerticalDatum(mil.army.usace.hec.metadata.VerticalDatumContainer vdc) Inserts the text representation a VerticalDatumContainer into the supplementalInfo field of a DataContainer object, replacing any existing vertical datum information in the fieldvoidsetFullName(String datasetName) voidsetHorizontalDatum(String datum) voidsetLatLong(double latitude, double longitude) voidvoidsetStoreAsDoubles(boolean storedAsdoubles) voidSets the supplemental info from a key, value mapvoidvoidsetVerticalDatum(String datum) voidvoidsetVerticalUnits(String units) toString()
-
Field Details
-
VERTICAL_DATUM_INFO_KEY
- See Also:
-
VERTICAL_DATUM_INFO_HEADER
- See Also:
-
CURRENT_VERTICAL_DATUM_KEY
- See Also:
-
CURRENT_VERTICAL_DATUM_HEADER
- See Also:
-
fullName
the full DSS pathname -
watershed
The A Part of the DSS path -
location
The B Part of the DSS path -
version
the F Part of the DSS Path -
subVersion
-
fileName
the name of the DSS File -
storedAsdoubles
public boolean storedAsdoublesA 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 dataTypeA flag indicating the data type of this data set. 0 is not defined -
lastWriteTimeMillis
public long lastWriteTimeMillisThe last write time of this data set, in milliseconds since 01Jan1970 (system time) Set to zero (0) if not defined -
fileLastWriteTimeMillis
public long fileLastWriteTimeMillisThe 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 xOrdinateLongitude, Easting or decimal degrees (negative for Western Hemisphere) -
yOrdinate
public double yOrdinateLatitude, Northing or decimal degrees -
zOrdinate
public double zOrdinateElevation -
coordinateSystem
public int coordinateSystemcoordinateSystem- 0 - no coordinates set
- 1 - Lat/long
- 2 - State Plane, FIPS
- 3 - State Plane, ADS
- 4 - UTM
- 5 - Local (other)
-
coordinateID
public int coordinateIDcoordinateID = UTM zone #, or FIPS SPCS # ADS SPCS # -
horizontalUnits
public int horizontalUnitsHorizontal Units can be one of the following:- 0 - unspecified
- 1 - feet
- 2 - meeters
- 3 - Decimal Degrees
- 4 - Degrees Minutes Seconds
-
horizontalDatum
public int horizontalDatumhorizontalDatum can be one of the following:- 0 - unset
- 1 - NAD83
- 2 - NAD27
- 3 - WGS84
- 4 - WGS72
- 5 - Local (other)
-
verticalUnits
public int verticalUnitsVertical Units can be one of the following:- 0 - unspecified
- 1 - feet
- 2 - meters
-
verticalDatum
public int verticalDatumverticalDatum can be one of the following:- 0 - unset
- 1 - NAVD88
- 2 - NGVD29
- 3 - Local (other)
-
locationTimezone
Time zone name at the location NOT the time zone of the data (data may GMT and location PST) -
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
-
modified
public boolean modified
-
-
Constructor Details
-
DataContainer
public DataContainer()
-
-
Method Details
-
setName
-
getName
-
setFullName
-
getFullName
-
setStoreAsDoubles
public void setStoreAsDoubles(boolean storedAsdoubles) -
getStoreAsDoubles
public boolean getStoreAsDoubles() -
clone
-
toString
-
setLatLong
public void setLatLong(double latitude, double longitude) -
getLatLong
-
setHorizontalDatum
-
getHorizontalDatum
-
setVerticalDatum
-
setVerticalDatum
-
getVerticalDatum
-
setVerticalUnits
-
setVerticalUnits
-
getVerticalUnits
-
getSupplementalInfo
- Returns:
- the key, value pairs in the supplementalInfo field as a map
-
setSupplementalInfo
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, IOExceptionExtracts any verticalDatumInfo string in the supplementalInfo to a VerticalDatumContainer and removes the string from the supplementalInfo.- Returns:
- The VerticalDatumContainer
- Throws:
Exceptionmil.army.usace.hec.metadata.VerticalDatumExceptionIOException
-
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:
IOExceptionmil.army.usace.hec.metadata.VerticalDatumException
-