org.javaseis.properties
Class AxisLabel

java.lang.Object
  extended by org.javaseis.properties.AxisLabel
All Implemented Interfaces:
java.io.Serializable

public class AxisLabel
extends java.lang.Object
implements java.io.Serializable

This class encapsulates an axis label. The primary reason that an axis label is a class, instead of just a String, is to couple a name with a description. A secondary reason is to encourage (but not require) naming convention.

See Also:
Serialized Form

Field Summary
static AxisLabel CHANNEL
          The axis label for receiver channel.
static AxisLabel CMP
          The axis label for common midpoint.
static AxisLabel CROSSLINE
          The axis label for crossline number.
static AxisLabel DEPTH
          The axis label for vertical depth.
static AxisLabel INLINE
          The axis label for inline number.
static AxisLabel OFFSET
          The axis label for source-receiver offset.
static AxisLabel OFFSET_BIN
          The axis label for offset bin.
static AxisLabel RECEIVER
          The axis label for receiver.
static AxisLabel RECEIVER_LINE
          The axis label for receiver line number.
static AxisLabel SAIL_LINE
          The axis label for sail line.
static AxisLabel SOURCE
          The axis label for source.
static AxisLabel TIME
          The axis label for vertical time.
static AxisLabel UNDEFINED
          The axis label for the undefined case.
static AxisLabel VOLUME
          The axis label for volume number.
 
Constructor Summary
AxisLabel(java.lang.String name, java.lang.String description)
          Creates a new AxisLabel.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is equal to this object.
static AxisLabel get(java.lang.String name)
          Returns an exising AxisLabel by name, or null if none exists with the specified name.
static AxisLabel[] getDefault(int ndim)
           
 java.lang.String getDescription()
          Returns the description of the axis label.
 java.lang.String getName()
          Returns the name of the axis label.
 int hashCode()
          Overrides Object.hashCode() because this class overrides Object.equals().
 java.lang.String toString()
          Returns a String representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CHANNEL

public static final AxisLabel CHANNEL
The axis label for receiver channel.


CMP

public static final AxisLabel CMP
The axis label for common midpoint.


CROSSLINE

public static final AxisLabel CROSSLINE
The axis label for crossline number.


DEPTH

public static final AxisLabel DEPTH
The axis label for vertical depth.


INLINE

public static final AxisLabel INLINE
The axis label for inline number.


OFFSET

public static final AxisLabel OFFSET
The axis label for source-receiver offset.


OFFSET_BIN

public static final AxisLabel OFFSET_BIN
The axis label for offset bin.


RECEIVER

public static final AxisLabel RECEIVER
The axis label for receiver.


RECEIVER_LINE

public static final AxisLabel RECEIVER_LINE
The axis label for receiver line number.


SAIL_LINE

public static final AxisLabel SAIL_LINE
The axis label for sail line.


SOURCE

public static final AxisLabel SOURCE
The axis label for source.


TIME

public static final AxisLabel TIME
The axis label for vertical time.


UNDEFINED

public static final AxisLabel UNDEFINED
The axis label for the undefined case.


VOLUME

public static final AxisLabel VOLUME
The axis label for volume number.

Constructor Detail

AxisLabel

public AxisLabel(java.lang.String name,
                 java.lang.String description)
Creates a new AxisLabel. Existing AxisLabels should be preferred to creating new ones.

Parameters:
the - name of the axis label. Names are always promoted to upper case.
the - description of the axis label.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is equal to this object. Two axis labels are considered equal if their name is equal, regardless of the description.

Overrides:
equals in class java.lang.Object
Parameters:
obj - an object.
Returns:
true if the input object equals this object, otherwise false.

get

public static AxisLabel get(java.lang.String name)
Returns an exising AxisLabel by name, or null if none exists with the specified name.

Parameters:
name - the name of an AxisLabel;
Returns:
an exising AxisLabel by name, or null if none exists with the specified name.

getDefault

public static AxisLabel[] getDefault(int ndim)

getDescription

public java.lang.String getDescription()
Returns the description of the axis label.

Returns:
the description of the axis label.

getName

public java.lang.String getName()
Returns the name of the axis label.

Returns:
the name of the axis label.

hashCode

public int hashCode()
Overrides Object.hashCode() because this class overrides Object.equals(). If a.equals(b), then a.hashCode()==b.hashCode(). If a.hashCode()!=b.hashCode(), then !a.equals(b).

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Returns a String representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of the object.