|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--websphinx.Region | +--websphinx.Tag
Tag in an HTML page.
Field Summary | |
static java.lang.String |
A
Commonly useful tag names. |
static java.lang.String |
ABBREV
|
static java.lang.String |
ACRONYM
|
static java.lang.String |
ADDRESS
|
static java.lang.String |
APPLET
|
static java.lang.String |
AREA
|
static java.lang.String |
B
|
static java.lang.String |
BASE
|
static java.lang.String |
BASEFONT
|
static java.lang.String |
BDO
|
static java.lang.String |
BGSOUND
|
static java.lang.String |
BIG
|
static java.lang.String |
BLINK
|
static java.lang.String |
BLOCKQUOTE
|
static java.lang.String |
BODY
|
static java.lang.String |
BR
|
static java.lang.String |
CAPTION
|
static java.lang.String |
CENTER
|
static java.lang.String |
CITE
|
static java.lang.String |
CODE
|
static java.lang.String |
COL
|
static java.lang.String |
COLGROUP
|
static java.lang.String |
COMMENT
|
static java.lang.String |
DD
|
static java.lang.String |
DEL
|
static java.lang.String |
DFN
|
static java.lang.String |
DIR
|
static java.lang.String |
DIV
|
static java.lang.String |
DL
|
static java.lang.String |
DT
|
(package private) Element |
element
|
static java.lang.String |
EM
|
static java.lang.String |
EMBED
|
static java.lang.String |
FONT
|
static java.lang.String |
FORM
|
static java.lang.String |
FRAME
|
static java.lang.String |
FRAMESET
|
static java.lang.String |
H1
|
static java.lang.String |
H2
|
static java.lang.String |
H3
|
static java.lang.String |
H4
|
static java.lang.String |
H5
|
static java.lang.String |
H6
|
static java.lang.String |
HEAD
|
static java.lang.String |
HR
|
static java.lang.String |
HTML
|
(package private) java.lang.String[] |
htmlAttributes
|
static java.lang.String |
I
|
static java.lang.String |
IMG
|
static java.lang.String |
INPUT
|
static java.lang.String |
ISINDEX
|
static java.lang.String |
KBD
|
static java.lang.String |
LI
|
static java.lang.String |
LINK
|
static java.lang.String |
LISTING
|
static java.lang.String |
MAP
|
static java.lang.String |
MARQUEE
|
static int |
MAX_LENGTH
Length of longest tag name. |
static java.lang.String |
MENU
|
static java.lang.String |
META
|
static java.lang.String |
NEXTID
|
static java.lang.String |
NOBR
|
static java.lang.String |
NOEMBED
|
static java.lang.String |
NOFRAMES
|
static java.lang.String |
OBJECT
|
static java.lang.String |
OL
|
static java.lang.String |
OPTION
|
static java.lang.String |
P
|
static java.lang.String |
PARAM
|
static java.lang.String |
PLAINTEXT
|
static java.lang.String |
PRE
|
static java.lang.String |
SAMP
|
static java.lang.String |
SCRIPT
|
static java.lang.String |
SELECT
|
static java.lang.String |
SMALL
|
static java.lang.String |
SPACER
|
(package private) boolean |
startTag
|
static java.lang.String |
STRIKE
|
static java.lang.String |
STRONG
|
static java.lang.String |
STYLE
|
static java.lang.String |
SUB
|
static java.lang.String |
SUP
|
static java.lang.String |
TABLE
|
(package private) java.lang.String |
tagName
|
static java.lang.String |
TD
|
static java.lang.String |
TEXTAREA
|
static java.lang.String |
TH
|
static java.lang.String |
TITLE
|
static java.lang.String |
TR
|
static java.lang.String |
TT
|
static java.lang.String |
U
|
static java.lang.String |
UL
|
static java.lang.String |
VAR
|
static java.lang.String |
WBR
|
static java.lang.String |
XMP
|
Fields inherited from class websphinx.Region |
end, INITIAL_SIZE, names, source, start, TRUE |
Constructor Summary | |
Tag(Page page,
int start,
int end,
java.lang.String tagName,
boolean startTag)
Make a Tag. |
Method Summary | |
int |
countHTMLAttributes()
Get number of HTML attributes on this tag. |
java.util.Enumeration |
enumerateHTMLAttributes()
Enumerate the HTML attributes found on this tag. |
Element |
getElement()
Get element to which this tag is the start or end tag. |
java.lang.String |
getHTMLAttribute(java.lang.String name)
Get an HTML attribute's value. |
java.lang.String |
getHTMLAttribute(java.lang.String name,
java.lang.String defaultValue)
Get an HTML attribute's value, with a default value if it doesn't exist. |
java.lang.String[] |
getHTMLAttributes()
Get all the HTML attributes found on this tag. |
java.lang.String |
getTagName()
Get tag name. |
boolean |
hasHTMLAttribute(java.lang.String name)
Test if tag has an HTML attribute. |
boolean |
isBlockTag()
Test if tag is a block-level tag. |
boolean |
isBodyTag()
Test if tag belongs in the element. |
boolean |
isEndTag()
Test if tag is an end tag. |
boolean |
isFlowTag()
Test if tag is a flow-level tag. |
boolean |
isHeadTag()
Test if tag belongs in the element. |
boolean |
isStartTag()
Test if tag is a start tag. |
Tag |
removeHTMLAttribute(java.lang.String name)
Copy this tag, removing an HTML attribute. |
Tag |
replaceHTMLAttribute(java.lang.String name)
Copy this tag, setting an HTML attribute's value to TRUE. |
Tag |
replaceHTMLAttribute(java.lang.String name,
java.lang.String value)
Copy this tag, setting an HTML attribute's value. |
static java.lang.String |
toHTMLAttributeName(java.lang.String name)
Convert a String to an HTML attribute name. |
static java.lang.String |
toTagName(java.lang.String name)
Convert a String to a tag name. |
Methods inherited from class websphinx.Region |
enumerateObjectLabels, findEnd, findStart, getEnd, getField, getFields, getLabel, getLabel, getLength, getNumericLabel, getObjectLabel, getObjectLabels, getRootElement, getSource, getStart, hasAllLabels, hasAllLabels, hasAnyLabels, hasAnyLabels, hasLabel, removeLabel, setField, setFields, setLabel, setLabel, setObjectLabel, span, toHTML, toString, toTags, toText |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.lang.String tagName
boolean startTag
java.lang.String[] htmlAttributes
Element element
public static final java.lang.String A
public static final java.lang.String ABBREV
public static final java.lang.String ACRONYM
public static final java.lang.String ADDRESS
public static final java.lang.String APPLET
public static final java.lang.String AREA
public static final java.lang.String B
public static final java.lang.String BASE
public static final java.lang.String BASEFONT
public static final java.lang.String BDO
public static final java.lang.String BGSOUND
public static final java.lang.String BIG
public static final java.lang.String BLINK
public static final java.lang.String BLOCKQUOTE
public static final java.lang.String BODY
public static final java.lang.String BR
public static final java.lang.String CAPTION
public static final java.lang.String CENTER
public static final java.lang.String CITE
public static final java.lang.String CODE
public static final java.lang.String COL
public static final java.lang.String COLGROUP
public static final java.lang.String COMMENT
public static final java.lang.String DD
public static final java.lang.String DEL
public static final java.lang.String DFN
public static final java.lang.String DIR
public static final java.lang.String DIV
public static final java.lang.String DL
public static final java.lang.String DT
public static final java.lang.String EM
public static final java.lang.String EMBED
public static final java.lang.String FONT
public static final java.lang.String FRAME
public static final java.lang.String FRAMESET
public static final java.lang.String FORM
public static final java.lang.String H1
public static final java.lang.String H2
public static final java.lang.String H3
public static final java.lang.String H4
public static final java.lang.String H5
public static final java.lang.String H6
public static final java.lang.String HEAD
public static final java.lang.String HR
public static final java.lang.String HTML
public static final java.lang.String I
public static final java.lang.String IMG
public static final java.lang.String INPUT
public static final java.lang.String ISINDEX
public static final java.lang.String KBD
public static final java.lang.String LI
public static final java.lang.String LINK
public static final java.lang.String LISTING
public static final java.lang.String MAP
public static final java.lang.String MARQUEE
public static final java.lang.String MENU
public static final java.lang.String META
public static final java.lang.String NEXTID
public static final java.lang.String NOBR
public static final java.lang.String NOEMBED
public static final java.lang.String NOFRAMES
public static final java.lang.String OBJECT
public static final java.lang.String OL
public static final java.lang.String OPTION
public static final java.lang.String P
public static final java.lang.String PARAM
public static final java.lang.String PLAINTEXT
public static final java.lang.String PRE
public static final java.lang.String SAMP
public static final java.lang.String SCRIPT
public static final java.lang.String SELECT
public static final java.lang.String SMALL
public static final java.lang.String SPACER
public static final java.lang.String STRIKE
public static final java.lang.String STRONG
public static final java.lang.String STYLE
public static final java.lang.String SUB
public static final java.lang.String SUP
public static final java.lang.String TABLE
public static final java.lang.String TD
public static final java.lang.String TEXTAREA
public static final java.lang.String TH
public static final java.lang.String TITLE
public static final java.lang.String TR
public static final java.lang.String TT
public static final java.lang.String U
public static final java.lang.String UL
public static final java.lang.String VAR
public static final java.lang.String WBR
public static final java.lang.String XMP
public static int MAX_LENGTH
Constructor Detail |
public Tag(Page page, int start, int end, java.lang.String tagName, boolean startTag)
page
- Page containing tagstart
- Starting offset of tag in pageend
- Ending offset of tagtagName
- Name of tag (like "p")startTag
- true for start tags (like "<p>"), false for end tags ("</p>")Method Detail |
public java.lang.String getTagName()
public Element getElement()
public static java.lang.String toTagName(java.lang.String name)
getTagName() == Tag.IMG
.name
- Name to convert (e.g., "P")public boolean isStartTag()
public boolean isEndTag()
public boolean isBlockTag()
public boolean isFlowTag()
public boolean isHeadTag()
public boolean isBodyTag()
public static java.lang.String toHTMLAttributeName(java.lang.String name)
name
- Name to convert (e.g., "HREF")public boolean hasHTMLAttribute(java.lang.String name)
name
- Name of HTML attribute (e.g. "HREF"). Doesn't have to be
converted with toHTMLAttributeName().public java.lang.String getHTMLAttribute(java.lang.String name)
name
- Name of HTML attribute (e.g. "HREF"). Doesn't have to be
converted with toHTMLAttributeName().public java.lang.String getHTMLAttribute(java.lang.String name, java.lang.String defaultValue)
name
- Name of HTML attribute (e.g. "HREF"). Doesn't have to be
converted with toHTMLAttributeName().defaultValue
- default value to return if the attribute
doesn't existpublic int countHTMLAttributes()
public java.lang.String[] getHTMLAttributes()
public java.util.Enumeration enumerateHTMLAttributes()
public Tag removeHTMLAttribute(java.lang.String name)
name
- Name of HTML attribute (e.g. "HREF"). Doesn't have to be
converted with toHTMLAttributeName().public Tag replaceHTMLAttribute(java.lang.String name)
name
- Name of HTML attribute (e.g. "HREF"). Doesn't have to be
converted with toHTMLAttributeName().public Tag replaceHTMLAttribute(java.lang.String name, java.lang.String value)
name
- Name of HTML attribute (e.g. "HREF"). Doesn't have to be
converted with toHTMLAttributeName().value
- New value for the attribute
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |