net.agmodel.weatherData
Class GeneralMetSequenceImpl

java.lang.Object
  |
  +--net.agmodel.physical.GeneralSequenceImpl
        |
        +--net.agmodel.weatherData.GeneralMetSequenceImpl
All Implemented Interfaces:
Cloneable, CompoundSequence, MetSequence, Sequence, Serializable
Direct Known Subclasses:
MultiImpl, RainImpl, RHImpl, ScalarImpl, ScalarMaxMinImpl, SolarRadiationImpl, SunshineImpl, WetDryImpl, WindImpl

public abstract class GeneralMetSequenceImpl
extends GeneralSequenceImpl
implements MetSequence

A general mechanism for implementing MetSequences. Descendent objects implement storage of sequences in various ways.

See Also:
Serialized Form

Field Summary
protected static ResourceBundle rb
           
 
Fields inherited from class net.agmodel.physical.GeneralSequenceImpl
dateRange, maximumTemporalInterpolation, summaryHistory
 
Constructor Summary
GeneralMetSequenceImpl(MetElement element, Interval dateRange, SummaryHistory composition)
          Creates a general sequence implementation.
 
Method Summary
 String getColumnHeading()
          Returned a localized label for the Sequence
 String getName()
          Returns a language independent name for the Sequence This name is typically used as a resourceBundle key or to identify the Sequence programmatically.
abstract  int getNumberOfSubComponents()
          Get the number of sub-components in the sequence.
 MetElement getSequenceElement()
          Returns the meteorological element stored in the sequence.
 String getSequenceHeading(String delimiter)
          Returns a brief description of the kind of data stored in the sequence in the language of the default locale.
abstract  String getSubHeading(int index)
          Gets a brief description of the data stored in a Sequence subcomponent in the language of the default locale.
 String getUnitsHeading(int index)
          This implementation ignores index and return either the element default units or the supplied heading.
 void setColumnHeading(String aHeading)
          Deprecated.  
 void setName(String aHeading)
          Does nothing
 void setSequenceHeading(String aHeading)
          Lets you override the default sequence heading
abstract  void setSubHeading(int index, String aHeading)
          Sets the brief description of the kind of data stored in the sequence in the language of the default locale.
 void setUnitsHeading(int index, String aHeading)
          This implementation ignores the index and just stores the String
 
Methods inherited from class net.agmodel.physical.GeneralSequenceImpl
cancelTemporalInterpolation, clone, dumpSequence, getAllCoverage, getAllData, getContentsAsString, getCoverage, getCurrentResolution, getData, 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
summarize
 
Methods inherited from interface net.agmodel.physical.CompoundSequence
cancelTemporalInterpolation, getAllCoverage, getAllData, getCoverage, getData, getMaximumTemporalInterpolation, getTemporalInterpolation, setTemporalInterpolation
 
Methods inherited from interface net.agmodel.physical.Sequence
clone, dumpSequence, getContentsAsString, getCurrentResolution, getDateRange, getResolution, getSubHeading, getSummaryKind, getUnitsHeading
 

Field Detail

rb

protected static ResourceBundle rb
Constructor Detail

GeneralMetSequenceImpl

public GeneralMetSequenceImpl(MetElement element,
                              Interval dateRange,
                              SummaryHistory composition)
Creates a general sequence implementation.

Parameters:
dateRange - the interval for which readings can be stored
composition - a record of how raw data has been summarised to make the sequence.
Method Detail

getSequenceHeading

public String getSequenceHeading(String delimiter)
Returns a brief description of the kind of data stored in the sequence in the language of the default locale. This value can be used as a column heading if the sequence is listed.

Specified by:
getSequenceHeading in interface Sequence
Specified by:
getSequenceHeading in class GeneralSequenceImpl
Parameters:
delimiter - the delimiter to use if padding is required for multiple columns
Returns:
the column heading, or the element name and units in brackets if no heading has been set

setSequenceHeading

public void setSequenceHeading(String aHeading)
Lets you override the default sequence heading

Specified by:
setSequenceHeading in interface CompoundSequence
Specified by:
setSequenceHeading in class GeneralSequenceImpl
Parameters:
aHeading - the new heading
See Also:
getSequenceHeading(String)

getNumberOfSubComponents

public abstract int getNumberOfSubComponents()
Description copied from interface: Sequence
Get the number of sub-components in the sequence. This indicates how many "columns" the sequence output will occupy.

Specified by:
getNumberOfSubComponents in interface Sequence
Specified by:
getNumberOfSubComponents in class GeneralSequenceImpl
Returns:
the number of sub-components
See Also:
Sequence.getSequenceHeading(String)

getSubHeading

public abstract 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
Specified by:
getSubHeading in class GeneralSequenceImpl
See Also:
Sequence.getNumberOfSubComponents(), Sequence.getSequenceHeading(String)

setSubHeading

public abstract void setSubHeading(int index,
                                   String aHeading)
Description copied from interface: CompoundSequence
Sets the brief description of the kind of data stored in the sequence 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:
setSubHeading in interface CompoundSequence
Specified by:
setSubHeading in class GeneralSequenceImpl
Parameters:
aHeading - the new heading
index - the zero-based index of the heading
See Also:
Sequence.getNumberOfSubComponents(), Sequence.getSequenceHeading(String)

getUnitsHeading

public String getUnitsHeading(int index)
This implementation ignores index and return either the element default units or the supplied heading. If the units of subcomponents differ (eg in the case of Wind) need to override this

Specified by:
getUnitsHeading in interface CompoundSequence
Specified by:
getUnitsHeading in class GeneralSequenceImpl
See Also:
setUnitsHeading(int, String)

setUnitsHeading

public void setUnitsHeading(int index,
                            String aHeading)
This implementation ignores the index and just stores the String

Specified by:
setUnitsHeading in interface CompoundSequence
Specified by:
setUnitsHeading in class GeneralSequenceImpl
Parameters:
index - the zero-based index of the heading
aHeading - the new heading
See Also:
Sequence.getNumberOfSubComponents(), CompoundSequence.setSequenceHeading(String), CompoundSequence.setSubHeading(int,String)

getSequenceElement

public MetElement getSequenceElement()
Returns the meteorological element stored in the sequence.

Specified by:
getSequenceElement in interface MetSequence
Returns:
the meteorological element

getColumnHeading

public String getColumnHeading()
Deprecated.  

Description copied from interface: Sequence
Returned a localized label for the Sequence

Specified by:
getColumnHeading in interface Sequence

setColumnHeading

public void setColumnHeading(String aHeading)
Deprecated.  

Does nothing

Specified by:
setColumnHeading in interface Sequence
Parameters:
aHeading - the new heading

getName

public String getName()
Description copied from interface: Sequence
Returns a language independent name for the Sequence This name is typically used as a resourceBundle key or to identify the Sequence programmatically. It should be localized before presentation to users.

Specified by:
getName in interface Sequence

setName

public void setName(String aHeading)
Does nothing

Specified by:
setName in interface Sequence
Parameters:
aHeading - the new heading