net.agmodel.weatherData
Class SoilTemperatureImpl

java.lang.Object
  |
  +--net.agmodel.physical.GeneralSequenceImpl
        |
        +--net.agmodel.weatherData.GeneralMetSequenceImpl
              |
              +--net.agmodel.weatherData.MultiImpl
                    |
                    +--net.agmodel.weatherData.SoilTemperatureImpl
All Implemented Interfaces:
Cloneable, CompoundSequence, MetSequence, MultiQuantity, Sequence, Serializable, SoilTemperature

public class SoilTemperatureImpl
extends MultiImpl
implements SoilTemperature

Manages a set of soil temperature readings at various depths. In future will allow interpolation of temperatures at intermediate depths.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.agmodel.weatherData.GeneralMetSequenceImpl
rb
 
Fields inherited from class net.agmodel.physical.GeneralSequenceImpl
dateRange, maximumTemporalInterpolation, summaryHistory
 
Constructor Summary
SoilTemperatureImpl(Interval dateRange, SummaryHistory composition, int numberOfDepths)
           
 
Method Summary
 SoilTemperatureImpl average(Duration newResolution)
          Creates a new set of soil temperatures, averaging temperatures to a lower resolution.
 Object clone()
           
 Length getDepth(int index)
          Returns the depth of the probe indicated by the index (ordered from shallowest to deepest)
 int getNumberOfDepths()
          Returns the number of depths at which soil temperature has been measured
 String getSubHeading(int index)
          Gets a brief description of the data stored in a Sequence subcomponent in the language of the default locale.
 void putInstantSoilTemp(int index, Date time, float value)
          Deprecated. - use putInstantValue()
 void putSoilTempOverInterval(int index, Interval interval, float value)
          Deprecated. - use putValueOverInterval()
 void setDepth(int index, Length depth)
           
 void setSubHeading(int index, String aHeading)
          Does nothing
 MetSequence summarize(Duration longerResolution)
          Returns the average of the sequence.
 
Methods inherited from class net.agmodel.weatherData.MultiImpl
getAverage, getContentsAsString, getCoverage, getData, getInstant, getMaximum, getMinimum, getNumberOfSubComponents, getStore, putInstantValue, putValueOverInterval, setStore
 
Methods inherited from class net.agmodel.weatherData.GeneralMetSequenceImpl
getColumnHeading, getName, getSequenceElement, getSequenceHeading, getUnitsHeading, setColumnHeading, setName, setSequenceHeading, setUnitsHeading
 
Methods inherited from class net.agmodel.physical.GeneralSequenceImpl
cancelTemporalInterpolation, dumpSequence, getAllCoverage, getAllData, getCurrentResolution, getDateRange, getMaximumTemporalInterpolation, getResolution, getSubHeading, getSummaryHistory, getSummaryKind, getTemporalInterpolation, getUnitsHeading, setTemporalInterpolation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.agmodel.weatherData.MultiQuantity
getAverage, getInstant, getMaximum, getMinimum
 
Methods inherited from interface net.agmodel.weatherData.MetSequence
getSequenceElement
 
Methods inherited from interface net.agmodel.physical.CompoundSequence
cancelTemporalInterpolation, getAllCoverage, getAllData, getCoverage, getData, getMaximumTemporalInterpolation, getTemporalInterpolation, getUnitsHeading, setSequenceHeading, setTemporalInterpolation, setUnitsHeading
 
Methods inherited from interface net.agmodel.physical.Sequence
dumpSequence, getColumnHeading, getContentsAsString, getCurrentResolution, getDateRange, getName, getNumberOfSubComponents, getResolution, getSequenceHeading, getSubHeading, getSummaryKind, getUnitsHeading, setColumnHeading, setName
 

Constructor Detail

SoilTemperatureImpl

public SoilTemperatureImpl(Interval dateRange,
                           SummaryHistory composition,
                           int numberOfDepths)
Method Detail

setDepth

public void setDepth(int index,
                     Length depth)

getSubHeading

public String getSubHeading(int index)
Description copied from interface: CompoundSequence
Gets a brief description of the data stored in a Sequence subcomponent in the language of the default locale. This value can be used as a column sub heading if the sequence is listed. It is assumed to be in the context of an overall column heading.

Specified by:
getSubHeading in interface CompoundSequence
Overrides:
getSubHeading in class MultiImpl
See Also:
Sequence.getNumberOfSubComponents(), Sequence.getSequenceHeading(String)

setSubHeading

public void setSubHeading(int index,
                          String aHeading)
Does nothing

Specified by:
setSubHeading in interface CompoundSequence
Overrides:
setSubHeading in class MultiImpl
Parameters:
aHeading - the new heading
index - the zero-based index of the heading
See Also:
Sequence.getNumberOfSubComponents(), Sequence.getSequenceHeading(String)

getNumberOfDepths

public int getNumberOfDepths()
Description copied from interface: SoilTemperature
Returns the number of depths at which soil temperature has been measured

Specified by:
getNumberOfDepths in interface SoilTemperature
Returns:
the number of depths

getDepth

public Length getDepth(int index)
Description copied from interface: SoilTemperature
Returns the depth of the probe indicated by the index (ordered from shallowest to deepest)

Specified by:
getDepth in interface SoilTemperature
Parameters:
index - the probe number
Returns:
the depth

putInstantSoilTemp

public void putInstantSoilTemp(int index,
                               Date time,
                               float value)
Deprecated. - use putInstantValue()

Records the instantaneous temperature at a particular depth and time

Parameters:
index - the probe number
time - the point in time
value - the temperature at that time
Throws:
IllegalArgumentException - if the time is outside the interval that the period is intended to store

putSoilTempOverInterval

public void putSoilTempOverInterval(int index,
                                    Interval interval,
                                    float value)
Deprecated. - use putValueOverInterval()

Records the average soil temperature at a particular depth over some subinterval.

Parameters:
index - the probe number
interval - the period of time over which the measurement was taken.
value - the average temperature over that interval
Throws:
IllegalArgumentException - if the subinterval is outside the interval that the sequence was constructed to store

summarize

public MetSequence summarize(Duration longerResolution)
Returns the average of the sequence.

Specified by:
summarize in interface MetSequence
Parameters:
longerResolution - the new resolution to summarize to
Returns:
a summarized sequence.

average

public SoilTemperatureImpl average(Duration newResolution)
Creates a new set of soil temperatures, averaging temperatures to a lower resolution.

Parameters:
newResolution - the target resolution required.
Returns:
a new soil temperature sequence

clone

public Object clone()
Specified by:
clone in interface Sequence
Overrides:
clone in class MultiImpl