superwaba.ext.xplat.html
Class TagDereferencer

java.lang.Object
  |
  +--superwaba.ext.xplat.html.TagDereferencer

public class TagDereferencer
extends java.lang.Object

NamedEntitiesDereferencer provides an extremely fast way to map the set of known HTML tags to unique integer values.

Note: the Elements described below comes from the HTML 4.01 DTD with IE extensions.  Also, notice that tag names are case insensitive.


Field Summary
static int A_HID
          Code identifying a "A" tag
static int ABBR_HID
          Code identifying a "ABBR" tag
static int ACRONYM_HID
          Code identifying a "ACRONYM" tag
static int ADDRESS_HID
          Code identifying a "ADDRESS" tag
static int APPLET_HID
          Code identifying a "APPLET" tag
static int AREA_HID
          Code identifying a "AREA" tag
static int B_HID
          Code identifying a "B" tag
static int BASE_HID
          Code identifying a "BASE" tag
static int BASEFONT_HID
          Code identifying a "BASEFONT" tag
static int BDO_HID
          Code identifying a "BDO" tag
static int BIG_HID
          Code identifying a "BIG" tag
static int BLOCKQUOTE_HID
          Code identifying a "BLOCKQUOTE" tag
static int BODY_HID
          Code identifying a "BODY" tag
static int BR_HID
          Code identifying a "BR" tag
static int BUTTON_HID
          Code identifying a "BUTTON" tag
static int CAPTION_HID
          Code identifying a "CAPTION" tag
static int CENTER_HID
          Code identifying a "CENTER" tag
static int CITE_HID
          Code identifying a "CITE" tag
static int CODE_HID
          Code identifying a "CODE" tag
static int COL_HID
          Code identifying a "COL" tag
static int COLGROUP_HID
          Code identifying a "COLGROUP" tag
static int COMMENT_HID
          Code identifying a "COMMENT" tag
static int DD_HID
          Code identifying a "DD" tag
static int DEL_HID
          Code identifying a "DEL" tag
static int DFN_HID
          Code identifying a "DFN" tag
static int DIR_HID
          Code identifying a "DIR" tag
static int DIV_HID
          Code identifying a "DIV" tag
static int DL_HID
          Code identifying a "DL" tag
static int DT_HID
          Code identifying a "DT" tag
static int EM_HID
          Code identifying a "EM" tag
static int EMBED_HID
          Code identifying a "EMBED" tag
static int FIELDSET_HID
          Code identifying a "FIELDSET" tag
static int FONT_HID
          Code identifying a "FONT" tag
static int FORM_HID
          Code identifying a "FORM" tag
static int FRAME_HID
          Code identifying a "FRAME" tag
static int FRAMESET_HID
          Code identifying a "FRAMESET" tag
static int H1_HID
          Code identifying a "H1" tag
static int H2_HID
          Code identifying a "H2" tag
static int H3_HID
          Code identifying a "H3" tag
static int H4_HID
          Code identifying a "H4" tag
static int H5_HID
          Code identifying a "H5" tag
static int H6_HID
          Code identifying a "H6" tag
static int HEAD_HID
          Code identifying a "HEAD" tag
static int HR_HID
          Code identifying a "HR" tag
static int HTML_HID
          Code identifying a "HTML" tag
static int I_HID
          Code identifying a "I" tag
static int IFRAME_HID
          Code identifying a "IFRAME" tag
static int IMG_HID
          Code identifying a "IMG" tag
static int INPUT_HID
          Code identifying a "INPUT" tag
static int INS_HID
          Code identifying a "INS" tag
static int ISINDEX_HID
          Code identifying a "ISINDEX" tag
static int KBD_HID
          Code identifying a "KBD" tag
static int LABEL_HID
          Code identifying a "LABEL" tag
static int LEGEND_HID
          Code identifying a "LEGEND" tag
static int LI_HID
          Code identifying a "LI" tag
static int LINK_HID
          Code identifying a "LINK" tag
static int MAP_HID
          Code identifying a "MAP" tag
static int MENU_HID
          Code identifying a "MENU" tag
static int META_HID
          Code identifying a "META" tag
static int NOFRAMES_HID
          Code identifying a "NOFRAMES" tag
static int NOSCRIPT_HID
          Code identifying a "NOSCRIPT" tag
static int OBJECT_HID
          Code identifying a "OBJECT" tag
static int OL_HID
          Code identifying a "OL" tag
static int OPTGROUP_HID
          Code identifying a "OPTGROUP" tag
static int OPTION_HID
          Code identifying a "OPTION" tag
static int P_HID
          Code identifying a "P" tag
static int PARAM_HID
          Code identifying a "PARAM" tag
static int PLAINTEXT_HID
          Code identifying a "PLAINTEXT" tag
static int PRE_HID
          Code identifying a "PRE" tag
static int Q_HID
          Code identifying a "Q" tag
static int S_HID
          Code identifying a "S" tag
static int SAMP_HID
          Code identifying a "SAMP" tag
static int SCRIPT_HID
          Code identifying a "SCRIPT" tag
static int SELECT_HID
          Code identifying a "SELECT" tag
static int SMALL_HID
          Code identifying a "SMALL" tag
static int SPAN_HID
          Code identifying a "SPAN" tag
static int STRIKE_HID
          Code identifying a "STRIKE" tag
static int STRONG_HID
          Code identifying a "STRONG" tag
static int STYLE_HID
          Code identifying a "STYLE" tag
static int SUB_HID
          Code identifying a "SUB" tag
static int SUP_HID
          Code identifying a "SUP" tag
static int TABLE_HID
          Code identifying a "TABLE" tag
static int TBODY_HID
          Code identifying a "TBODY" tag
static int TD_HID
          Code identifying a "TD" tag
static int TEXTAREA_HID
          Code identifying a "TEXTAREA" tag
static int TFOOT_HID
          Code identifying a "TFOOT" tag
static int TH_HID
          Code identifying a "TH" tag
static int THEAD_HID
          Code identifying a "THEAD" tag
static int TITLE_HID
          Code identifying a "TITLE" tag
static int TR_HID
          Code identifying a "TR" tag
static int TT_HID
          Code identifying a "TT" tag
static int U_HID
          Code identifying a "U" tag
static int UL_HID
          Code identifying a "UL" tag
static int UNKNOWN_HID
          Code identifying an unknown, possibly invalid, tag
static int VAR_HID
          Code identifying a "VAR" tag
static int WBR_HID
          Code identifying a "WBR" tag
static int XMP_HID
          Code identifying a "XMP" tag
 
Constructor Summary
TagDereferencer()
           
 
Method Summary
static int hashCode(byte[] b, int offset, int count)
          Returns the hashcode of the given string, automatically converting the chars to lowercase
static char toCode(byte[] b, int offset, int count)
          Get the code associated to a key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_HID

public static final int UNKNOWN_HID
Code identifying an unknown, possibly invalid, tag

A_HID

public static final int A_HID
Code identifying a "A" tag

ABBR_HID

public static final int ABBR_HID
Code identifying a "ABBR" tag

ACRONYM_HID

public static final int ACRONYM_HID
Code identifying a "ACRONYM" tag

ADDRESS_HID

public static final int ADDRESS_HID
Code identifying a "ADDRESS" tag

APPLET_HID

public static final int APPLET_HID
Code identifying a "APPLET" tag

AREA_HID

public static final int AREA_HID
Code identifying a "AREA" tag

B_HID

public static final int B_HID
Code identifying a "B" tag

BASE_HID

public static final int BASE_HID
Code identifying a "BASE" tag

BASEFONT_HID

public static final int BASEFONT_HID
Code identifying a "BASEFONT" tag

BDO_HID

public static final int BDO_HID
Code identifying a "BDO" tag

BIG_HID

public static final int BIG_HID
Code identifying a "BIG" tag

BLOCKQUOTE_HID

public static final int BLOCKQUOTE_HID
Code identifying a "BLOCKQUOTE" tag

BODY_HID

public static final int BODY_HID
Code identifying a "BODY" tag

BR_HID

public static final int BR_HID
Code identifying a "BR" tag

BUTTON_HID

public static final int BUTTON_HID
Code identifying a "BUTTON" tag

CAPTION_HID

public static final int CAPTION_HID
Code identifying a "CAPTION" tag

CENTER_HID

public static final int CENTER_HID
Code identifying a "CENTER" tag

CITE_HID

public static final int CITE_HID
Code identifying a "CITE" tag

CODE_HID

public static final int CODE_HID
Code identifying a "CODE" tag

COL_HID

public static final int COL_HID
Code identifying a "COL" tag

COLGROUP_HID

public static final int COLGROUP_HID
Code identifying a "COLGROUP" tag

COMMENT_HID

public static final int COMMENT_HID
Code identifying a "COMMENT" tag

DD_HID

public static final int DD_HID
Code identifying a "DD" tag

DEL_HID

public static final int DEL_HID
Code identifying a "DEL" tag

DFN_HID

public static final int DFN_HID
Code identifying a "DFN" tag

DIR_HID

public static final int DIR_HID
Code identifying a "DIR" tag

DIV_HID

public static final int DIV_HID
Code identifying a "DIV" tag

DL_HID

public static final int DL_HID
Code identifying a "DL" tag

DT_HID

public static final int DT_HID
Code identifying a "DT" tag

EM_HID

public static final int EM_HID
Code identifying a "EM" tag

EMBED_HID

public static final int EMBED_HID
Code identifying a "EMBED" tag

FIELDSET_HID

public static final int FIELDSET_HID
Code identifying a "FIELDSET" tag

FONT_HID

public static final int FONT_HID
Code identifying a "FONT" tag

FORM_HID

public static final int FORM_HID
Code identifying a "FORM" tag

FRAME_HID

public static final int FRAME_HID
Code identifying a "FRAME" tag

FRAMESET_HID

public static final int FRAMESET_HID
Code identifying a "FRAMESET" tag

H1_HID

public static final int H1_HID
Code identifying a "H1" tag

H2_HID

public static final int H2_HID
Code identifying a "H2" tag

H3_HID

public static final int H3_HID
Code identifying a "H3" tag

H4_HID

public static final int H4_HID
Code identifying a "H4" tag

H5_HID

public static final int H5_HID
Code identifying a "H5" tag

H6_HID

public static final int H6_HID
Code identifying a "H6" tag

HEAD_HID

public static final int HEAD_HID
Code identifying a "HEAD" tag

HR_HID

public static final int HR_HID
Code identifying a "HR" tag

HTML_HID

public static final int HTML_HID
Code identifying a "HTML" tag

I_HID

public static final int I_HID
Code identifying a "I" tag

IFRAME_HID

public static final int IFRAME_HID
Code identifying a "IFRAME" tag

IMG_HID

public static final int IMG_HID
Code identifying a "IMG" tag

INPUT_HID

public static final int INPUT_HID
Code identifying a "INPUT" tag

INS_HID

public static final int INS_HID
Code identifying a "INS" tag

ISINDEX_HID

public static final int ISINDEX_HID
Code identifying a "ISINDEX" tag

KBD_HID

public static final int KBD_HID
Code identifying a "KBD" tag

LABEL_HID

public static final int LABEL_HID
Code identifying a "LABEL" tag

LEGEND_HID

public static final int LEGEND_HID
Code identifying a "LEGEND" tag

LI_HID

public static final int LI_HID
Code identifying a "LI" tag

LINK_HID

public static final int LINK_HID
Code identifying a "LINK" tag

MAP_HID

public static final int MAP_HID
Code identifying a "MAP" tag

MENU_HID

public static final int MENU_HID
Code identifying a "MENU" tag

META_HID

public static final int META_HID
Code identifying a "META" tag

NOFRAMES_HID

public static final int NOFRAMES_HID
Code identifying a "NOFRAMES" tag

NOSCRIPT_HID

public static final int NOSCRIPT_HID
Code identifying a "NOSCRIPT" tag

OBJECT_HID

public static final int OBJECT_HID
Code identifying a "OBJECT" tag

OL_HID

public static final int OL_HID
Code identifying a "OL" tag

OPTGROUP_HID

public static final int OPTGROUP_HID
Code identifying a "OPTGROUP" tag

OPTION_HID

public static final int OPTION_HID
Code identifying a "OPTION" tag

P_HID

public static final int P_HID
Code identifying a "P" tag

PARAM_HID

public static final int PARAM_HID
Code identifying a "PARAM" tag

PLAINTEXT_HID

public static final int PLAINTEXT_HID
Code identifying a "PLAINTEXT" tag

PRE_HID

public static final int PRE_HID
Code identifying a "PRE" tag

Q_HID

public static final int Q_HID
Code identifying a "Q" tag

S_HID

public static final int S_HID
Code identifying a "S" tag

SAMP_HID

public static final int SAMP_HID
Code identifying a "SAMP" tag

SCRIPT_HID

public static final int SCRIPT_HID
Code identifying a "SCRIPT" tag

SELECT_HID

public static final int SELECT_HID
Code identifying a "SELECT" tag

SMALL_HID

public static final int SMALL_HID
Code identifying a "SMALL" tag

SPAN_HID

public static final int SPAN_HID
Code identifying a "SPAN" tag

STRIKE_HID

public static final int STRIKE_HID
Code identifying a "STRIKE" tag

STRONG_HID

public static final int STRONG_HID
Code identifying a "STRONG" tag

STYLE_HID

public static final int STYLE_HID
Code identifying a "STYLE" tag

SUB_HID

public static final int SUB_HID
Code identifying a "SUB" tag

SUP_HID

public static final int SUP_HID
Code identifying a "SUP" tag

TABLE_HID

public static final int TABLE_HID
Code identifying a "TABLE" tag

TBODY_HID

public static final int TBODY_HID
Code identifying a "TBODY" tag

TD_HID

public static final int TD_HID
Code identifying a "TD" tag

TEXTAREA_HID

public static final int TEXTAREA_HID
Code identifying a "TEXTAREA" tag

TFOOT_HID

public static final int TFOOT_HID
Code identifying a "TFOOT" tag

TH_HID

public static final int TH_HID
Code identifying a "TH" tag

THEAD_HID

public static final int THEAD_HID
Code identifying a "THEAD" tag

TITLE_HID

public static final int TITLE_HID
Code identifying a "TITLE" tag

TR_HID

public static final int TR_HID
Code identifying a "TR" tag

TT_HID

public static final int TT_HID
Code identifying a "TT" tag

U_HID

public static final int U_HID
Code identifying a "U" tag

UL_HID

public static final int UL_HID
Code identifying a "UL" tag

VAR_HID

public static final int VAR_HID
Code identifying a "VAR" tag

WBR_HID

public static final int WBR_HID
Code identifying a "WBR" tag

XMP_HID

public static final int XMP_HID
Code identifying a "XMP" tag
Constructor Detail

TagDereferencer

public TagDereferencer()
Method Detail

hashCode

public static int hashCode(byte[] b,
                           int offset,
                           int count)
Returns the hashcode of the given string, automatically converting the chars to lowercase

toCode

public static char toCode(byte[] b,
                          int offset,
                          int count)
Get the code associated to a key.
Parameters:
b - byte array containing the key
offset - position of the first byte of the key in the array
count - number of bytes composing the key
Returns:
the corresponding character value, or 0 if invalid