public final class TagTable
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Anchor |
anchorList
anchor/node hash.
|
private Configuration |
configuration
configuration.
|
protected Dict |
tagA
a tag.
|
protected Dict |
tagApplet
applet tag.
|
protected Dict |
tagArea
area tag.
|
protected Dict |
tagB
b tag.
|
protected Dict |
tagBase
base tag.
|
protected Dict |
tagBig
big tag.
|
protected Dict |
tagBlink
a proprietary tag added by Tidy, along with tag_nobr, tag_wbr.
|
protected Dict |
tagBlockquote
blockquote tag.
|
protected Dict |
tagBody
body tag.
|
protected Dict |
tagBr
br tag.
|
protected Dict |
tagCaption
caption tag.
|
protected Dict |
tagCenter
center tag.
|
protected Dict |
tagCol
col tag.
|
protected Dict |
tagColgroup
colgroup tag.
|
protected Dict |
tagDd
dd tag.
|
protected Dict |
tagDir
dir tag.
|
protected Dict |
tagDiv
div tag.
|
protected Dict |
tagDl
dl tag.
|
protected Dict |
tagDt
dt tag.
|
protected Dict |
tagEm
em tag.
|
protected Dict |
tagFont
font tag.
|
protected Dict |
tagForm
form tag.
|
protected Dict |
tagFrame
frame tag.
|
protected Dict |
tagFrameset
frameset tag.
|
protected Dict |
tagH1
h1 tag.
|
protected Dict |
tagH2
h2 tag.
|
private java.util.Map |
tagHashtable
hashTable containing tags.
|
protected Dict |
tagHead
head tag.
|
protected Dict |
tagHr
hr tag.
|
protected Dict |
tagHtml
html tag.
|
protected Dict |
tagI
i tag.
|
protected Dict |
tagIframe
iframe tag.
|
protected Dict |
tagImg
img tag.
|
protected Dict |
tagInput
input tag.
|
protected Dict |
tagLayer
layer tag.
|
protected Dict |
tagLi
li tag.
|
protected Dict |
tagLink
link tag.
|
protected Dict |
tagListing
listing tag.
|
protected Dict |
tagMap
map tag.
|
protected Dict |
tagMeta
meta tag.
|
protected Dict |
tagNobr
nobr tag.
|
protected Dict |
tagNoframes
noframes tag.
|
protected Dict |
tagNoscript
noscript tag.
|
protected Dict |
tagObject
object tag.
|
protected Dict |
tagOl
ol tag.
|
protected Dict |
tagOptgroup
optgroup tag.
|
protected Dict |
tagOption
option tag.
|
protected Dict |
tagP
p tag.
|
protected Dict |
tagParam
param tag.
|
protected Dict |
tagPre
pre tag.
|
protected Dict |
tagQ
tag.
|
private static Dict[] |
TAGS
all the known tags.
|
protected Dict |
tagScript
script tag.
|
protected Dict |
tagSmall
small tag.
|
protected Dict |
tagSpacer
spacer tag.
|
protected Dict |
tagSpan
span tag.
|
protected Dict |
tagStrong
strong tag.
|
protected Dict |
tagStyle
style tag.
|
protected Dict |
tagTable
table tag.
|
protected Dict |
tagTd
td tag.
|
protected Dict |
tagTextarea
textarea tag.
|
protected Dict |
tagTh
th tag.
|
protected Dict |
tagTitle
title tag.
|
protected Dict |
tagTr
tr tag.
|
protected Dict |
tagUl
ul tag.
|
protected Dict |
tagWbr
wbr tag.
|
static Dict |
XML_TAGS
dummy entry for all xml tags.
|
Modifier | Constructor and Description |
---|---|
protected |
TagTable()
Instantiates a new tag table with known tags.
|
Modifier and Type | Method and Description |
---|---|
(package private) Anchor |
addAnchor(java.lang.String name,
Node node)
Adds a new anchor to namespace.
|
void |
defineTag(short tagType,
java.lang.String name)
Defines a new tag.
|
(package private) java.util.List |
findAllDefinedTag(short tagType)
return a List containing all the user-defined tag names.
|
Parser |
findParser(Node node)
Finds a parser fo the given node.
|
boolean |
findTag(Node node)
Finds a tag by name.
|
(package private) void |
freeAnchors()
free all anchors.
|
void |
freeAttrs(Node node)
Free node's attributes.
|
(package private) Node |
getNodeByAnchor(java.lang.String name)
Return node associated with anchor.
|
Dict |
install(Dict dict)
Installs a new tag in the tag table, or modify an existing one.
|
(package private) boolean |
isAnchorElement(Node node)
May id or name serve as anchor?
|
Dict |
lookup(java.lang.String name)
Lookup a tag definition by its name.
|
(package private) Anchor |
newAnchor()
Initialize a new anchor.
|
(package private) void |
removeAnchorByNode(Node node)
Removes anchor for specific node.
|
void |
setConfiguration(Configuration configuration)
Setter for the current configuration instance.
|
public static final Dict XML_TAGS
private static final Dict[] TAGS
protected Dict tagHtml
protected Dict tagHead
protected Dict tagBody
protected Dict tagFrameset
protected Dict tagFrame
protected Dict tagIframe
protected Dict tagNoframes
protected Dict tagMeta
protected Dict tagTitle
protected Dict tagBase
protected Dict tagHr
protected Dict tagPre
protected Dict tagListing
protected Dict tagH1
protected Dict tagH2
protected Dict tagP
protected Dict tagUl
protected Dict tagOl
protected Dict tagDir
protected Dict tagLi
protected Dict tagDt
protected Dict tagDd
protected Dict tagDl
protected Dict tagTd
protected Dict tagTh
protected Dict tagTr
protected Dict tagCol
protected Dict tagColgroup
protected Dict tagBr
protected Dict tagA
protected Dict tagLink
protected Dict tagB
protected Dict tagI
protected Dict tagStrong
protected Dict tagEm
protected Dict tagBig
protected Dict tagSmall
protected Dict tagParam
protected Dict tagOption
protected Dict tagOptgroup
protected Dict tagImg
protected Dict tagMap
protected Dict tagArea
protected Dict tagNobr
protected Dict tagWbr
protected Dict tagFont
protected Dict tagSpacer
protected Dict tagLayer
protected Dict tagCenter
protected Dict tagStyle
protected Dict tagScript
protected Dict tagNoscript
protected Dict tagTable
protected Dict tagCaption
protected Dict tagForm
protected Dict tagTextarea
protected Dict tagBlockquote
protected Dict tagApplet
protected Dict tagObject
protected Dict tagDiv
protected Dict tagSpan
protected Dict tagInput
protected Dict tagQ
protected Dict tagBlink
protected Anchor anchorList
private Configuration configuration
private java.util.Map tagHashtable
public void setConfiguration(Configuration configuration)
configuration
- configuration instancepublic Dict lookup(java.lang.String name)
name
- tag namepublic Dict install(Dict dict)
dict
- tag definitionpublic boolean findTag(Node node)
node
- Node to find. If the element is found the tag property of node will be set.public Parser findParser(Node node)
node
- Nodeboolean isAnchorElement(Node node)
node
- Nodetrue
if tag can serve as an anchorpublic void defineTag(short tagType, java.lang.String name)
tagType
- tag type. Can be TAGTYPE_BLOCK | TAGTYPE_EMPTY | TAGTYPE_PRE | TAGTYPE_INLINEname
- tag namejava.util.List findAllDefinedTag(short tagType)
tagType
- one of Dict.TAGTYPE_EMPTY | Dict.TAGTYPE_INLINE | Dict.TAGTYPE_BLOCK | Dict.TAGTYPE_PREpublic void freeAttrs(Node node)
node
- Nodevoid removeAnchorByNode(Node node)
node
- NodeAnchor newAnchor()
Anchor addAnchor(java.lang.String name, Node node)
name
- anchor namenode
- destination for this anchorNode getNodeByAnchor(java.lang.String name)
name
- anchor namevoid freeAnchors()