Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## util
Class HamNameMap

    java.lang.Object
      util.HamNameMap

    public class HamNameMap

extends java.lang.Object

Provides mapping in both directions between HamNoSys token names and the corresponding octet values (classic HNS 3 character values), based on data from a Properties file. Alternative spellings are allowed for a couple of tokens, as specified by an auxiliary Properties file. This caters for discrepancies between UH and UEA spellings, especially when doing HNS-Sign SiGML input. There is a singleton static factory method, which gives the standard instance of this class.

Field Summary
`protected java.util.HashMap<java.lang.String,java.lang.Integer>` | `h2o`
`protected static java.lang.String` | `HAM_SPACE`
`protected static java.lang.String` | `HAM_VERSION40`
`protected static HamNameMap` | `hamNames`
`protected static java.lang.String` | `HNS_ALT_SPELL_FILE`
`protected static java.lang.String` | `HNS_TAG_FILE`
`protected int` | `O_HAMSPACE`
`protected int` | `O_HAMVERSION`
`protected static int` | `O_MAX`
`protected static int` | `O_NULL`
`protected java.lang.String[]` | `o2h`

Constructor Summary
`protected` | `HamNameMap(java.util.Properties hnmain, java.util.Properties hnextra)`
`protected` | `HamNameMap(java.util.Properties hnmain, java.util.Properties hnextra, java.util.Properties hnaltspell)`

Method Summary
`protected void` | `addAltSpellingsToH2OMap(java.util.Properties hnaltspell)`
`protected static void` | `badOperand(java.lang.String tag)`
`java.lang.String[]` | `cleanHamNameVec(java.lang.String[] hamnv, int ix)` Returns a clean version of the given string, eliminating any invalid HNS-UCS characters, and outputs a message mentioning the given index for each invalid character.
`int` | `cleanOctet(java.lang.String hamname)`
`protected static java.lang.String` | `getFirstPropsToken(java.util.Properties props, java.lang.String istr)`
`static HamNameMap` | `getStdHamNameMap()`
`java.lang.String` | `hamName(int o)`
`java.lang.String[]` | `hamNameSet()`
`java.lang.String[]` | `hamNameSetAscending()`
`protected void` | `makeH2OMap()`
`int` | `octet(java.lang.String hamname)`
`protected static int` | `s2i(java.lang.String s)`
`protected void` | `updateO2HMap(java.util.Properties hnprops)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### HNS_TAG_FILE

    protected static final java.lang.String HNS_TAG_FILE

See Also:
  Constant Field Values

### HNS_ALT_SPELL_FILE

    protected static final java.lang.String HNS_ALT_SPELL_FILE

See Also:
  Constant Field Values

### HAM_VERSION40

    protected static final java.lang.String HAM_VERSION40

See Also:
  Constant Field Values

### HAM_SPACE

    protected static final java.lang.String HAM_SPACE

See Also:
  Constant Field Values

### hamNames

    protected static HamNameMap hamNames

### O_NULL

    protected static final int O_NULL

See Also:
  Constant Field Values

### O_MAX

    protected static final int O_MAX

See Also:
  Constant Field Values

### o2h

    protected java.lang.String[] o2h

### h2o

    protected java.util.HashMap<java.lang.String,java.lang.Integer> h2o

### O_HAMVERSION

    protected final int O_HAMVERSION

### O_HAMSPACE

    protected final int O_HAMSPACE

Constructor Detail

### HamNameMap

    protected HamNameMap(java.util.Properties hnmain,
                         java.util.Properties hnextra)

### HamNameMap

    protected HamNameMap(java.util.Properties hnmain,
                         java.util.Properties hnextra,
                         java.util.Properties hnaltspell)

Method Detail

### getStdHamNameMap

    public static HamNameMap getStdHamNameMap()

### hamName

    public java.lang.String hamName(int o)

### octet

    public int octet(java.lang.String hamname)

### cleanOctet

    public int cleanOctet(java.lang.String hamname)

### hamNameSet

    public java.lang.String[] hamNameSet()

### hamNameSetAscending

    public java.lang.String[] hamNameSetAscending()

### updateO2HMap

    protected void updateO2HMap(java.util.Properties hnprops)

### makeH2OMap

    protected void makeH2OMap()

### addAltSpellingsToH2OMap

    protected void addAltSpellingsToH2OMap(java.util.Properties hnaltspell)

### getFirstPropsToken

    protected static java.lang.String getFirstPropsToken(java.util.Properties props,
                                                         java.lang.String istr)

### s2i

    protected static int s2i(java.lang.String s)

### cleanHamNameVec

    public java.lang.String[] cleanHamNameVec(java.lang.String[] hamnv,
                                              int ix)

  Returns a clean version of the given string, eliminating any invalid HNS-UCS characters, and outputs a message mentioning the given index for each invalid character.

### badOperand

    protected static final void badOperand(java.lang.String tag)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD