com.isti.quakewatch.util
Class CubeCodeTranslator

java.lang.Object
  extended by com.isti.quakewatch.util.CubeCodeTranslator

public class CubeCodeTranslator
extends java.lang.Object

Class CubeCodeTranslator translates message-codes for the CUBE message format.


Field Summary
static java.lang.String ANTELOPE_STR
           
static java.lang.String BINDER_STR
           
static java.lang.String CUBE_LOCMETHQ_STR
          CUBE location-method code 'Q', for "possible quarry explosion".
static java.lang.String CUBE_LOCMETHZ_STR
          CUBE location-method code 'Z', for 'Scope'=="Internal".
static java.util.HashMap fromCubeLocMethodXlatTable
          From-CUBE translation table for location method.
static java.util.HashMap fromCubeMagTypeXlatTable
          From-CUBE translation table for magnitude type.
static java.lang.String GEIGER_STR
           
static java.lang.String HYDRA_STR
           
static java.lang.String HYPO_STR
           
static java.lang.String JOHNSON_STR
           
static java.lang.String[][] locMethodCodeXlatArr
          Location-method code translation array.
static java.lang.String MACRO_STR
           
static java.lang.String[][] magTypeCodeXlatArr
          Magnitude-type code translation array.
static java.lang.String MB_STR
           
static java.lang.String MBLG_STR
           
static java.lang.String MD_STR
           
static java.lang.String ME_STR
           
static java.lang.String MI_STR
           
static java.lang.String ML_STR
           
static java.lang.String MS_STR
           
static java.lang.String MT_STR
           
static java.lang.String MW_STR
           
static java.lang.String NONNEIC_STR
           
static java.lang.String REPORTED_STR
           
static java.util.HashMap toCubeLocMethodXlatTable
          To-CUBE translation table for location method.
static java.util.HashMap toCubeMagTypeXlatTable
          To-CUBE translation table for magnitude type.
static java.lang.String UNKNOWN_STR
           
 
Method Summary
static TwoStringBlock fromCubeLocMethod(java.lang.String locMethCodeStr)
          Translates a CUBE-format location-method code to a location-method string.
static java.lang.String fromCubeMagType(java.lang.String magCodeStr)
          Translates a CUBE-format magnitude-type code to a magnitude-type string.
static java.lang.String toCubeLocMethod(java.lang.String locMethAlgStr)
          Translates a location-method 'Algorithm' string to a CUBE-format location-method code.
static java.lang.String toCubeMagType(java.lang.String magTypeStr)
          Translates a magnitude-type string to a CUBE-format magnitude-type code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MB_STR

public static final java.lang.String MB_STR
See Also:
Constant Field Values

MD_STR

public static final java.lang.String MD_STR
See Also:
Constant Field Values

ME_STR

public static final java.lang.String ME_STR
See Also:
Constant Field Values

ML_STR

public static final java.lang.String ML_STR
See Also:
Constant Field Values

MI_STR

public static final java.lang.String MI_STR
See Also:
Constant Field Values

MBLG_STR

public static final java.lang.String MBLG_STR
See Also:
Constant Field Values

MW_STR

public static final java.lang.String MW_STR
See Also:
Constant Field Values

MS_STR

public static final java.lang.String MS_STR
See Also:
Constant Field Values

MT_STR

public static final java.lang.String MT_STR
See Also:
Constant Field Values

BINDER_STR

public static final java.lang.String BINDER_STR
See Also:
Constant Field Values

ANTELOPE_STR

public static final java.lang.String ANTELOPE_STR
See Also:
Constant Field Values

NONNEIC_STR

public static final java.lang.String NONNEIC_STR
See Also:
Constant Field Values

HYPO_STR

public static final java.lang.String HYPO_STR
See Also:
Constant Field Values

MACRO_STR

public static final java.lang.String MACRO_STR
See Also:
Constant Field Values

HYDRA_STR

public static final java.lang.String HYDRA_STR
See Also:
Constant Field Values

UNKNOWN_STR

public static final java.lang.String UNKNOWN_STR
See Also:
Constant Field Values

JOHNSON_STR

public static final java.lang.String JOHNSON_STR
See Also:
Constant Field Values

GEIGER_STR

public static final java.lang.String GEIGER_STR
See Also:
Constant Field Values

REPORTED_STR

public static final java.lang.String REPORTED_STR
See Also:
Constant Field Values

magTypeCodeXlatArr

public static final java.lang.String[][] magTypeCodeXlatArr
Magnitude-type code translation array.


locMethodCodeXlatArr

public static final java.lang.String[][] locMethodCodeXlatArr
Location-method code translation array.


CUBE_LOCMETHZ_STR

public static final java.lang.String CUBE_LOCMETHZ_STR
CUBE location-method code 'Z', for 'Scope'=="Internal".

See Also:
Constant Field Values

CUBE_LOCMETHQ_STR

public static final java.lang.String CUBE_LOCMETHQ_STR
CUBE location-method code 'Q', for "possible quarry explosion".

See Also:
Constant Field Values

fromCubeMagTypeXlatTable

public static final java.util.HashMap fromCubeMagTypeXlatTable
From-CUBE translation table for magnitude type.


toCubeMagTypeXlatTable

public static final java.util.HashMap toCubeMagTypeXlatTable
To-CUBE translation table for magnitude type.


fromCubeLocMethodXlatTable

public static final java.util.HashMap fromCubeLocMethodXlatTable
From-CUBE translation table for location method.


toCubeLocMethodXlatTable

public static final java.util.HashMap toCubeLocMethodXlatTable
To-CUBE translation table for location method.

Method Detail

fromCubeMagType

public static java.lang.String fromCubeMagType(java.lang.String magCodeStr)
Translates a CUBE-format magnitude-type code to a magnitude-type string.

Parameters:
magCodeStr - CUBE-format magnitude-type code.
Returns:
Translated magnitude-type string, or null if code not matched.

toCubeMagType

public static java.lang.String toCubeMagType(java.lang.String magTypeStr)
Translates a magnitude-type string to a CUBE-format magnitude-type code.

Parameters:
magTypeStr - magnitude-type string.
Returns:
Translated CUBE-format magnitude-type code, or null if type string not matched.

fromCubeLocMethod

public static TwoStringBlock fromCubeLocMethod(java.lang.String locMethCodeStr)
Translates a CUBE-format location-method code to a location-method string.

Parameters:
locMethCodeStr - CUBE-format location-method code.
Returns:
A two-string-block object containing the translated 'Algorithm' and 'Class' strings, or null if code not matched.

toCubeLocMethod

public static java.lang.String toCubeLocMethod(java.lang.String locMethAlgStr)
Translates a location-method 'Algorithm' string to a CUBE-format location-method code.

Parameters:
locMethAlgStr - location-method string.
Returns:
Translated CUBE-format location-method code, or null if given string not matched.