ucar.unidata.metdata
Class WMOHeader

java.lang.Object
  extended by ucar.unidata.metdata.WMOHeader
All Implemented Interfaces:
Serializable, Comparable

public class WMOHeader
extends Object
implements Comparable, Serializable

This class enscapsulates an WMO "Abbreviated heading", the string used as an identifer on WMO format messages. Ref: _Manual on the Global Telecommunications System_, Volume 1, Global Aspects. WMO-No. 386, 1986 Paragraph 2.3.2 page A.II-3

Version:
$Revision: 1.8 $
Author:
Glenn Davis
See Also:
Serialized Form

Constructor Summary
WMOHeader(ByteString.Concrete src, ByteString.TrSubString TTAA, byte ii, ByteString.SubString CCCC, Timestamp ts)
          Create a new WMOHeader
 
Method Summary
 int compareTo(Object oo)
          Compare to another object
 int compareTo(WMOHeader hdr)
          Imposes a "natural order" on WMOHeaders.
 ByteString getCallSign()
          Returns the "international four letter location indicator of the station originating or compiling the bulletin" (CCCC).
 ByteString getText()
          Get the header
 Timestamp getTimestamp()
          Get the timestamp
 String toString()
          Return a String representation of this WMOHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WMOHeader

public WMOHeader(ByteString.Concrete src,
                 ByteString.TrSubString TTAA,
                 byte ii,
                 ByteString.SubString CCCC,
                 Timestamp ts)
Create a new WMOHeader

Parameters:
src - source of the Header
TTAA - TTAA portion
ii - II portion
CCCC - CCCC portion
ts - timestamp
Method Detail

getTimestamp

public Timestamp getTimestamp()
Get the timestamp

Returns:
timestamp

getText

public ByteString getText()
Get the header

Returns:
the header text

getCallSign

public ByteString getCallSign()
Returns the "international four letter location indicator of the station originating or compiling the bulletin" (CCCC).

Returns:
the CCCC portion

compareTo

public int compareTo(WMOHeader hdr)
Imposes a "natural order" on WMOHeaders.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Parameters:
hdr - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the specified object's type prevents it from being compared to this Object.
See Also:
Comparable

compareTo

public int compareTo(Object oo)
Compare to another object

Specified by:
compareTo in interface Comparable
Parameters:
oo - Object to compare
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

toString

public String toString()
Return a String representation of this WMOHeader

Overrides:
toString in class Object
Returns:
a String representation of this WMOHeader