Lvg Java
2006p Version

gov.nih.nlm.nls.lvg.Lib
Class Tag

java.lang.Object
  extended by gov.nih.nlm.nls.lvg.Lib.BitMaskBase
      extended by gov.nih.nlm.nls.lvg.Lib.Tag

public class Tag
extends BitMaskBase

This Tag class extends BitMaskBase class and performs as a tagger in LexItem.

History:

Version:
V-2006p
Author:
NLM NLS Development Team

Field Summary
static long ALL_BIT_VALUE
          all bits for tag
static int DERV_NOUN_ADJ_BIT
          bit for pure noun/adj operationin recursive derivation
static long NO_BIT_VALUE
           
static int UNIQUE_ACR_EXP_BIT
          bit for unique acronyms and expansions
 
Fields inherited from class gov.nih.nlm.nls.lvg.Lib.BitMaskBase
mask_, MAX_BIT
 
Constructor Summary
Tag()
          Creates a default tag object
Tag(long value)
          Creates a default tag object, using a long value
 
Method Summary
static long Enumerate(java.lang.String valueStr)
          Get the long value for one single name (no combine names of bits).
static java.lang.String GetBitName(int bitValue)
          Get the name (first in the name list) of a specified bit (single).
static java.lang.String GetBitName(int bitValue, int index)
          Get the name at index order of a specified bit (single).
static void main(java.lang.String[] args)
          Test driver for this class
static java.lang.String ToName(long value)
          Convert a long tag value to a combined string (abbreviation).
static long ToValue(java.lang.String valueStr)
          Convert a combined value string to a long tag value.
 
Methods inherited from class gov.nih.nlm.nls.lvg.Lib.BitMaskBase
Contains, Contains, Enumerate, GetBitFlag, GetBitIndex, GetBitName, GetBitValue, GetName, GetValue, SetBitFlag, SetValue, ToName, ToValue, ToValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DERV_NOUN_ADJ_BIT

public static final int DERV_NOUN_ADJ_BIT
bit for pure noun/adj operationin recursive derivation

See Also:
Constant Field Values

UNIQUE_ACR_EXP_BIT

public static final int UNIQUE_ACR_EXP_BIT
bit for unique acronyms and expansions

See Also:
Constant Field Values

NO_BIT_VALUE

public static final long NO_BIT_VALUE
See Also:
Constant Field Values

ALL_BIT_VALUE

public static final long ALL_BIT_VALUE
all bits for tag

See Also:
Constant Field Values
Constructor Detail

Tag

public Tag()
Creates a default tag object


Tag

public Tag(long value)
Creates a default tag object, using a long value

Method Detail

ToValue

public static long ToValue(java.lang.String valueStr)
Convert a combined value string to a long tag value.

Parameters:
valueStr - combined name in String format
Returns:
a long value of the specified name

ToName

public static java.lang.String ToName(long value)
Convert a long tag value to a combined string (abbreviation).

Parameters:
value - number for finding it's combined name
Returns:
name in a String format

GetBitName

public static java.lang.String GetBitName(int bitValue)
Get the name (first in the name list) of a specified bit (single). The first one in LVG is the abbreviation name.

Parameters:
bitValue - bit nubmer for finding it's name
Returns:
name of the bit specified

GetBitName

public static java.lang.String GetBitName(int bitValue,
                                          int index)
Get the name at index order of a specified bit (single).

Parameters:
bitValue - bit nubmer for finding it's name
index - the order index of the name in bitStr_[]
Returns:
name at index order of the bit specified

Enumerate

public static long Enumerate(java.lang.String valueStr)
Get the long value for one single name (no combine names of bits).

Parameters:
valueStr - name of a bit for finding it's long value
Returns:
a long value of the specified name

main

public static void main(java.lang.String[] args)
Test driver for this class


Lvg Java
2006p Version

Submit a bug or feature

Copyright © 2006p National Library of Medicine