public class TimeSeriesContainer extends DataContainer implements java.lang.Cloneable, java.io.Serializable, hec.data.IVerticalDatumOperations<TimeSeriesContainer,hec.data.VerticalDatumException>
DataContainer.VERTICAL_DATUM, DataContainer.VERTICAL_UNITS| Modifier and Type | Field and Description |
|---|---|
java.lang.String[] |
cnotes |
HecTime |
endHecTime |
int |
endTime |
int[][] |
inotes |
int |
interval |
int |
julianBaseDate |
int |
numberDepths |
int |
numberValues |
java.lang.String |
parameter
The C Part of the DSS Path
|
int |
precision |
double[] |
profileDepths |
java.lang.String |
profileLabel |
double[][] |
profileValues |
int[] |
quality |
int[][] |
quality7 |
boolean |
retrieveAllTimes |
int |
sizeEachNote |
int |
sizeEachQuality7 |
HecTime |
startHecTime |
int |
startTime |
java.lang.String |
subLocation |
java.lang.String |
subParameter |
int |
timeGranularitySeconds |
int[] |
times |
java.lang.String |
timeZoneID |
int |
timeZoneRawOffset |
java.lang.String |
type |
java.lang.String |
units
the Units i.e.
|
java.lang.String |
unitsProfileDepths |
java.lang.String |
unitsProfileValues |
double[] |
values |
coordinateID, coordinateSystem, dataType, fileLastWriteTimeMillis, fileName, fullName, horizontalDatum, horizontalUnits, lastWriteTimeMillis, location, locationTimezone, modified, otherInfo, storedAsdoubles, subVersion, supplementalInfo, version, VERTICAL_DATUM_INFO_HEADER, VERTICAL_DATUM_INFO_KEY, verticalDatum, verticalUnits, watershed, xOrdinate, yOrdinate, zOrdinate| Constructor and Description |
|---|
TimeSeriesContainer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allMissing() |
java.lang.Object |
clone() |
void |
clone(TimeSeriesContainer tsc) |
TimeSeriesContainer |
collapseVerticalDatum()
Returns a new TimeSeriesContainer object constructed from this object, with the
TimeSeiresContainerVertDatum.vdc field collapsed into vertical datum info in the
supplementalInfo field (overwriting any existing vertical datum info there)
|
boolean |
compressData() |
boolean |
convertTimeZone(java.lang.String toTimezoneID,
boolean observeDST) |
void |
convertTimeZone(java.util.TimeZone toTimezone)
converts the data, start and end time to a new time zone
|
TimeSeriesContainer |
expandVerticalDatum()
Returns a new TimeSeriesContainerVertDatum object constructed from this object and
the vertical datum info in the supplementalInfo field of this object.
|
java.lang.String |
getAsString() |
java.lang.String |
getAsXML() |
java.lang.String[] |
getCharacterNotes() |
boolean |
getDataSetStats(TsDataSetStats dataStats) |
HecTime |
getEndTime()
Returns the end time.
|
HecTime |
getHecTime(int index)
Gets the time for an individual ordiante in the times array.
|
int |
getJulianBaseDate()
Gets the base date for this object
|
static int[] |
getJulianDateAndTimeGranularity(HecTimeArray hecTimes,
int dataValuesLength) |
java.lang.String |
getLocationName()
Returns the String representation of the DSS Location LOCATION - SUB_LOCATION or
"" if the values are null
|
int[] |
getMinutes()
Gets the times in minutes.
|
long[] |
getMinutesLong()
Gets the times in minutes.
|
long |
getMinutesLong(int index)
Gets the time, in minutes, for a specific ordinate.
|
int |
getNumberValues()
Returns the number of values in the dataset.
|
java.lang.String |
getParameterName()
Returns the String representation of the DSS Parameter PARAMETER - SUB_PARAMETER or
"" if the values are null
|
double[] |
getProfileDepths() |
java.lang.String |
getProfileDepthsUnits() |
java.lang.String |
getProfileLabel() |
int |
getProfileNumberDepths() |
double[][] |
getProfileValues() |
java.lang.String |
getProfileValuesUnits() |
int[] |
getQuality()
Return a copy of the quality array
|
int[][] |
getQuality7()
Return a copy of the quality array
|
int |
getQualitySize() |
java.lang.String |
getShortName() |
HecTime |
getStartTime()
Returns the start time.
|
int |
getTimeGranularitySeconds()
Gets the time granularity for the time array.
|
int |
getTimeInterval() |
int |
getTimeIntervalSeconds() |
HecTimeArray |
getTimes()
Return the times array as an HecTimeArray.
|
java.lang.String |
getTimeZoneID() |
java.lang.String |
getType() |
java.lang.String |
getUnits() |
double |
getValue(HecTime time)
Return the time series value at the specified time, do linear interpolation as necessary.
|
double |
getValue(int index)
Returns a single value according to the index.
|
double[] |
getValues()
Return a copy of the data values array
|
java.lang.String |
getVersionName()
Returns the String representation of the DSS Version VERSION - SUB_VERSION or
"" if the values are null
|
void |
makeAscending()
rearrrange time and data arrays so that all times are ascending
Remove any undefinded times and reset array sized to reflect
Primarily for irregular interval data
|
double |
maximumValue()
get the maximum value from the time series values
|
double |
maxmimumValue()
Deprecated.
use maximumValue()
|
double |
mean() |
double |
minimumValue() |
void |
printToConsole()
Prints time series data to System.out
|
void |
printToConsole(int maxNumberToPrint)
Prints time series data to System.out
|
int |
removeAllMissing()
Remove all missing values from the data array, reducing the size of the
time, values, and quality arrays.
|
int |
set(double[] dataValues,
HecTimeArray hecTimes)
Sets the data and time arrays, including start and end times,
and number of values.
|
int |
set(double[] dataValues,
HecTimeArray hecTimes,
int julBaseDate,
int timeGranularityInSeconds)
Generally not a public item.
|
int |
set(double[] dataValues,
long[] minutes)
Sets the data and times array, converting long minutes to
int minutes, and setting the julian base date and time
granularity, if required to keep within int boundary.
|
int |
set(HecTimeArray hecTimes,
int julBaseDate,
int timeGranularityInSeconds) |
void |
setCharacterNotes(java.lang.String[] characterNotes) |
void |
setCompressData(boolean compress) |
void |
setEndTime(HecTime end)
Sets the end time, if differnt than the default end time
(the last value in the times array.) This can be used by
irregular interval data to show that there is no data between
the last time in the times array and this value
This must be called after setting times array, if not using default |
void |
setJulianBaseDate(int julBaseDate)
Set the julain base date (defualt is zero).
|
int |
setProfile(double[] profileDepths,
double[][] profileValues) |
void |
setProfileDepthsUnits(java.lang.String unitsProfileDepths) |
void |
setProfileLabel(java.lang.String profileLabel) |
void |
setProfileValuesUnits(java.lang.String unitsProfileValues) |
int |
setQuality(int[] qualityIn)
Sets the quality array.
|
int |
setQuality7(int[][] qualityIn) |
void |
setStartTime(HecTime start)
Sets the start time, if different than the default start time
(the first value in the times array.) This can be used by
irregular interval data to show that there is no data between
this time and first time in the times array.
|
void |
setTimeGranularitySeconds(int timeGranularityInSeconds)
Sets the time granularity for time time array
This is normally 60 (seconds), but the acceptable values are:
Time Granularity timeGranularityInSecondsMax DaysMax Years One second 1 24,855 69 One minute 60 1,491,308 4,083 One hour 3600 89,478,485 244,978 One day 86400 2,147,483,6475,879,489(current limit for TSC) One year 31536000 (nominal)(not supported at this time) |
int |
setTimes(HecTimeArray hecTimes) |
void |
setTimeZoneID(java.lang.String timeZoneIdentifier)
Set the DATA time zone identifier.
|
void |
setType(java.lang.String dataType) |
void |
setUnits(java.lang.String dataUnits) |
int |
setValues(double[] dataValues)
Sets the data values array.
|
boolean |
trimToTime(HecTime newStartTime,
HecTime newEndTime) |
boolean |
trimToTime(HecTime newStartTime,
HecTime newEndTime,
boolean bShrinkOnly) |
boolean |
usesExtendedDates()
Determines if extended dates are used and times in long (or HecTime)
need to be used.
|
clone, extractVerticalDatum, getFullName, getHorizontalDatum, getLatLong, getName, getStoreAsDoubles, getSupplementalInfo, getVerticalDatum, getVerticalUnits, insertVerticalDatum, setFullName, setHorizontalDatum, setLatLong, setName, setStoreAsDoubles, setSupplementalInfo, setVerticalDatum, setVerticalDatum, setVerticalUnits, setVerticalUnits, toStringpublic double[] values
public int[] times
public int[] quality
public int numberValues
public int interval
public int startTime
public int endTime
public HecTime startHecTime
public HecTime endHecTime
public java.lang.String units
public java.lang.String type
public int precision
public java.lang.String subLocation
public java.lang.String parameter
public java.lang.String subParameter
public java.lang.String timeZoneID
public int timeZoneRawOffset
public int julianBaseDate
public int timeGranularitySeconds
public boolean retrieveAllTimes
public int[][] quality7
public int sizeEachQuality7
public int[][] inotes
public int sizeEachNote
public java.lang.String[] cnotes
public int numberDepths
public double[] profileDepths
public double[][] profileValues
public java.lang.String unitsProfileDepths
public java.lang.String unitsProfileValues
public java.lang.String profileLabel
public void setUnits(java.lang.String dataUnits)
public java.lang.String getUnits()
public void setType(java.lang.String dataType)
public java.lang.String getType()
public int set(double[] dataValues,
HecTimeArray hecTimes)
| Time Granularity | timeGranularityInSeconds | Max Days | Max Years | |
| One second | 1 | 24,855 | 69 | |
| One minute | 60 | 1,491,308 | 4,083 | |
| One hour | 3600 | 89,478,485 | 244,978 | |
| One day | 86400 | 2,147,483,647 | 5,879,489 | (current limit for TSC) |
| One year | 31536000 (nominal) | (not supported at this time) |
dataValues - hecTimes - public int setTimes(HecTimeArray hecTimes)
public static int[] getJulianDateAndTimeGranularity(HecTimeArray hecTimes, int dataValuesLength)
hecTimes - public int set(double[] dataValues,
HecTimeArray hecTimes,
int julBaseDate,
int timeGranularityInSeconds)
dataValues - hecTimes - julBaseDate - timeGranularityInSeconds - public int set(HecTimeArray hecTimes, int julBaseDate, int timeGranularityInSeconds)
public int set(double[] dataValues,
long[] minutes)
dataValues - minutes - public int setValues(double[] dataValues)
dataValues - public void setStartTime(HecTime start)
start - public HecTime getStartTime()
public void setEndTime(HecTime end)
endTime - public HecTime getEndTime()
public HecTimeArray getTimes()
public HecTime getHecTime(int index)
index - public int getTimeInterval()
public int getTimeIntervalSeconds()
public int getNumberValues()
public double[] getValues()
public double getValue(int index)
index - public double getValue(HecTime time)
HecTime - time of datapublic int setQuality(int[] qualityIn)
int - qualityIn[]public int[] getQuality()
public int setQuality7(int[][] qualityIn)
public int getQualitySize()
public int[][] getQuality7()
public void setCharacterNotes(java.lang.String[] characterNotes)
public java.lang.String[] getCharacterNotes()
public int setProfile(double[] profileDepths,
double[][] profileValues)
public int getProfileNumberDepths()
public double[] getProfileDepths()
public double[][] getProfileValues()
public void setProfileDepthsUnits(java.lang.String unitsProfileDepths)
public void setProfileValuesUnits(java.lang.String unitsProfileValues)
public void setProfileLabel(java.lang.String profileLabel)
public java.lang.String getProfileDepthsUnits()
public java.lang.String getProfileValuesUnits()
public java.lang.String getProfileLabel()
public int[] getMinutes()
public long[] getMinutesLong()
public long getMinutesLong(int index)
index - public int getJulianBaseDate()
public void setJulianBaseDate(int julBaseDate)
julBaseDate - public int getTimeGranularitySeconds()
| Time Granularity | timeGranularityInSeconds | Max Days | Max Years | |
| One second | 1 | 24,855 | 69 | |
| One minute | 60 | 1,491,308 | 4,083 | |
| One hour | 3600 | 89,478,485 | 244,978 | |
| One day | 86400 | 2,147,483,647 | 5,879,489 | (current limit for TSC) |
| One year | 31536000 (nominal) | (not supported at this time) |
public void setTimeGranularitySeconds(int timeGranularityInSeconds)
| Time Granularity | timeGranularityInSeconds | Max Days | Max Years | |
| One second | 1 | 24,855 | 69 | |
| One minute | 60 | 1,491,308 | 4,083 | |
| One hour | 3600 | 89,478,485 | 244,978 | |
| One day | 86400 | 2,147,483,647 | 5,879,489 | (current limit for TSC) |
| One year | 31536000 (nominal) | (not supported at this time) |
timeGranularityInSeconds - public boolean usesExtendedDates()
public java.lang.Object clone()
clone in class java.lang.Objectpublic void clone(TimeSeriesContainer tsc)
public void setTimeZoneID(java.lang.String timeZoneIdentifier)
timeZoneIdentifier - public java.lang.String getTimeZoneID()
public void convertTimeZone(java.util.TimeZone toTimezone)
TimeZone - destination time zonepublic boolean convertTimeZone(java.lang.String toTimezoneID,
boolean observeDST)
public boolean getDataSetStats(TsDataSetStats dataStats)
public double minimumValue()
@Deprecated public double maxmimumValue()
public double maximumValue()
public double mean()
public java.lang.String getShortName()
public java.lang.String getVersionName()
public java.lang.String getParameterName()
public java.lang.String getLocationName()
public void setCompressData(boolean compress)
public boolean compressData()
public java.lang.String getAsString()
public java.lang.String getAsXML()
public int removeAllMissing()
public void makeAscending()
public TimeSeriesContainer expandVerticalDatum()
expandVerticalDatum in interface hec.data.IVerticalDatumOperations<TimeSeriesContainer,hec.data.VerticalDatumException>public TimeSeriesContainer collapseVerticalDatum()
collapseVerticalDatum in interface hec.data.IVerticalDatumOperations<TimeSeriesContainer,hec.data.VerticalDatumException>public void printToConsole()
public void printToConsole(int maxNumberToPrint)
maxNumberToPrint - limit on how many points to printpublic boolean allMissing()