net.agmodel.weatherData
Class LeafWetnessMultiImpl

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

public class LeafWetnessMultiImpl
extends MultiImpl
implements LeafWetness, MultiQuantity

Manages a sequence of leaf wetness measurements from a single sensor.

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
protected LeafWetnessMultiImpl(Interval dateRange, SummaryHistory composition, int nSubComponents)
          Creates a LeafWetnessMultiImpl with space for n subcomponents, but doesn't create the stores themselves.
  LeafWetnessMultiImpl(Interval dateRange, SummaryHistory composition, String[] newlabels)
          Creates a leaf wetness sequence containing multiple measurements at each time (eg canopy and standard).
 
Method Summary
 LeafWetnessMultiImpl average(Duration newResolution)
          Creates a new leaf wetness sequence, averaging to a lower resolution.
 JigsawQuantity getAverage(Interval interval)
          Returns the 0th subcomponent's average value
 JigsawQuantity getInstant(Date time)
          Returns the 0th subcomponent's instant value
 JigsawQuantity getMaximum(Interval interval)
          Returns the 0th subcomponent's maximum
 JigsawQuantity getMinimum(Interval interval)
          Returns the 0th subcomponent's minimum
 MetSequence summarize(Duration longerResolution)
          Creates a lower resolution sequence which summarizes this sequence
 
Methods inherited from class net.agmodel.weatherData.MultiImpl
clone, getAverage, getContentsAsString, getCoverage, getData, getInstant, getMaximum, getMinimum, getNumberOfSubComponents, getStore, getSubHeading, putInstantValue, putValueOverInterval, setStore, setSubHeading
 
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.MetSequence
getSequenceElement
 
Methods inherited from interface net.agmodel.physical.CompoundSequence
cancelTemporalInterpolation, getAllCoverage, getAllData, getCoverage, getData, getMaximumTemporalInterpolation, getSubHeading, getTemporalInterpolation, getUnitsHeading, setSequenceHeading, setSubHeading, setTemporalInterpolation, setUnitsHeading
 
Methods inherited from interface net.agmodel.physical.Sequence
clone, dumpSequence, getColumnHeading, getContentsAsString, getCurrentResolution, getDateRange, getName, getNumberOfSubComponents, getResolution, getSequenceHeading, getSubHeading, getSummaryKind, getUnitsHeading, setColumnHeading, setName
 
Methods inherited from interface net.agmodel.weatherData.MultiQuantity
getAverage, getInstant, getMaximum, getMinimum
 

Constructor Detail

LeafWetnessMultiImpl

public LeafWetnessMultiImpl(Interval dateRange,
                            SummaryHistory composition,
                            String[] newlabels)
Creates a leaf wetness sequence containing multiple measurements at each time (eg canopy and standard). Uses an array of Strings to indicate the number and name of the subcomponents. The Strings should be keys in net.agmodel.resources.WeatherDataResources, however if they are not found there the string itself will be used as the label. However, please advise that you would like the key added to WeatherDataResources.

Parameters:
dateRange - the interval for which temperatures are stored
composition - a record of how raw data has been summarised to make the sequence.
newlabels - labels for the subcomponents

LeafWetnessMultiImpl

protected LeafWetnessMultiImpl(Interval dateRange,
                               SummaryHistory composition,
                               int nSubComponents)
Creates a LeafWetnessMultiImpl with space for n subcomponents, but doesn't create the stores themselves. Relies on subsequent calls to setStore to complete initialisation.

Method Detail

average

public LeafWetnessMultiImpl average(Duration newResolution)
Creates a new leaf wetness sequence, averaging to a lower resolution.

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

summarize

public MetSequence summarize(Duration longerResolution)
Description copied from interface: MetSequence
Creates a lower resolution sequence which summarizes this sequence

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

getMinimum

public JigsawQuantity getMinimum(Interval interval)
Returns the 0th subcomponent's minimum

Specified by:
getMinimum in interface ScalarQuantity
Parameters:
interval - the interval of interest
Returns:
the minimum temperature
See Also:
ScalarQuantity.getMinimum(Interval)

getMaximum

public JigsawQuantity getMaximum(Interval interval)
Returns the 0th subcomponent's maximum

Specified by:
getMaximum in interface ScalarQuantity
Parameters:
interval - the interval of interest
Returns:
the maximum value
See Also:
ScalarQuantity.getMaximum(Interval)

getInstant

public JigsawQuantity getInstant(Date time)
Returns the 0th subcomponent's instant value

Specified by:
getInstant in interface ScalarQuantity
Parameters:
time - the time of interest
Returns:
the instantaneous value
See Also:
ScalarQuantity.getInstant(Date)

getAverage

public JigsawQuantity getAverage(Interval interval)
Returns the 0th subcomponent's average value

Specified by:
getAverage in interface ScalarQuantity
Parameters:
interval - the interval of interest
Returns:
the average value
See Also:
ScalarQuantity.getAverage(Interval)