org.htmlparser.tags

Class ObjectTag

Implemented Interfaces:
Cloneable, Node, Serializable, Tag

public class ObjectTag
extends CompositeTag

ObjectTag represents an <Object> tag. It extends a basic tag by providing accessors to the type, codetype, codebase, classid, data, height, width, standby attributes and parameters.

Field Summary

Fields inherited from class org.htmlparser.tags.CompositeTag

mDefaultCompositeScanner, mEndTag

Fields inherited from class org.htmlparser.nodes.TagNode

breakTags, mAttributes, mDefaultScanner

Fields inherited from class org.htmlparser.nodes.AbstractNode

children, mPage, nodeBegin, nodeEnd, parent

Constructor Summary

ObjectTag()
Create a new object tag.

Method Summary

Hashtable
createObjectParamsTable()
Extract the object PARAM tags from the child list.
String[]
getEndTagEnders()
Return the set of end tag names that cause this tag to finish.
String[]
getIds()
Return the set of names handled by this tag.
String
getObjectClassId()
Get the classid of the object.
String
getObjectCodeBase()
Get the codebase of the object.
String
getObjectCodeType()
Get the codetype of the object.
String
getObjectData()
Get the data of the object.
String
getObjectHeight()
Get the height of the object.
Hashtable
getObjectParams()
Get the object parameters.
String
getObjectStandby()
Get the standby of the object.
String
getObjectType()
Get the type of the object.
String
getObjectWidth()
Get the width of the object.
String
getParameter(String key)
Get the PARAM tag with the given name.
Enumeration
getParameterNames()
Get an enumeration over the (String) parameter names.
void
setObjectClassId(String newClassId)
Set the CLASSID attribute.
void
setObjectCodeBase(String newCodeBase)
Set the CODEBASE attribute.
void
setObjectCodeType(String newCodeType)
Set the CODETYPE attribute.
void
setObjectData(String newData)
Set the DATA attribute.
void
setObjectHeight(String newHeight)
Set the HEIGHT attribute.
void
setObjectParams(Hashtable newObjectParams)
Set the enclosed PARAM children.
void
setObjectStandby(String newStandby)
Set the STANDBY attribute.
void
setObjectType(String newType)
Set the TYPE attribute.
void
setObjectWidth(String newWidth)
Set the WIDTH attribute.
String
toString()
Output a string representing this object tag.

Methods inherited from class org.htmlparser.tags.CompositeTag

accept, childAt, children, collectInto, digupStringNode, elements, findPositionOf, findPositionOf, findPositionOf, getChild, getChildCount, getChildrenAsNodeArray, getChildrenHTML, getEndTag, getStringText, getText, putChildrenInto, putEndTagInto, removeChild, searchByName, searchFor, searchFor, searchFor, searchFor, setEndTag, toHtml, toPlainTextString, toString, toString

Methods inherited from class org.htmlparser.nodes.TagNode

accept, breaksFlow, getAttribute, getAttributeEx, getAttributesEx, getEndTag, getEndTagEnders, getEnders, getEndingLineNumber, getIds, getRawTagName, getStartingLineNumber, getTagBegin, getTagEnd, getTagName, getText, getThisScanner, isEmptyXmlTag, isEndTag, removeAttribute, setAttribute, setAttribute, setAttribute, setAttributeEx, setAttributesEx, setEmptyXmlTag, setEndTag, setTagBegin, setTagEnd, setTagName, setText, setThisScanner, toHtml, toPlainTextString, toString

Methods inherited from class org.htmlparser.nodes.AbstractNode

accept, clone, collectInto, doSemanticAction, getChildren, getEndPosition, getFirstChild, getLastChild, getNextSibling, getPage, getParent, getPreviousSibling, getStartPosition, getText, setChildren, setEndPosition, setPage, setParent, setStartPosition, setText, toHtml, toHtml, toPlainTextString, toString

Constructor Details

ObjectTag

public ObjectTag()
Create a new object tag.

Method Details

createObjectParamsTable

public Hashtable createObjectParamsTable()
Extract the object PARAM tags from the child list.
Returns:
The list of object parameters (keys and values are String objects).

getEndTagEnders

public String[] getEndTagEnders()
Return the set of end tag names that cause this tag to finish.
Specified by:
getEndTagEnders in interface Tag
Overrides:
getEndTagEnders in interface TagNode
Returns:
The names of following end tags that stop further scanning.

getIds

public String[] getIds()
Return the set of names handled by this tag.
Specified by:
getIds in interface Tag
Overrides:
getIds in interface TagNode
Returns:
The names to be matched that create tags of this type.

getObjectClassId

public String getObjectClassId()
Get the classid of the object.
Returns:
The value of the CLASSID attribute.

getObjectCodeBase

public String getObjectCodeBase()
Get the codebase of the object.
Returns:
The value of the CODEBASE attribute.

getObjectCodeType

public String getObjectCodeType()
Get the codetype of the object.
Returns:
The value of the CODETYPE attribute.

getObjectData

public String getObjectData()
Get the data of the object.
Returns:
The value of the DATA attribute.

getObjectHeight

public String getObjectHeight()
Get the height of the object.
Returns:
The value of the HEIGHT attribute.

getObjectParams

public Hashtable getObjectParams()
Get the object parameters.
Returns:
The list of parameter values (keys and values are String objects).

getObjectStandby

public String getObjectStandby()
Get the standby of the object.
Returns:
The value of the STANDBY attribute.

getObjectType

public String getObjectType()
Get the type of the object.
Returns:
The value of the TYPE attribute.

getObjectWidth

public String getObjectWidth()
Get the width of the object.
Returns:
The value of the WIDTH attribute.

getParameter

public String getParameter(String key)
Get the PARAM tag with the given name.
Parameters:
key - The object parameter name to get.
Returns:
The value of the parameter or null if there is no parameter of that name.

getParameterNames

public Enumeration getParameterNames()
Get an enumeration over the (String) parameter names.
Returns:
An enumeration of the PARAM tag NAME attributes.

setObjectClassId

public void setObjectClassId(String newClassId)
Set the CLASSID attribute.
Parameters:
newClassId - The new classid.

setObjectCodeBase

public void setObjectCodeBase(String newCodeBase)
Set the CODEBASE attribute.
Parameters:
newCodeBase - The new codebase.

setObjectCodeType

public void setObjectCodeType(String newCodeType)
Set the CODETYPE attribute.
Parameters:
newCodeType - The new codetype.

setObjectData

public void setObjectData(String newData)
Set the DATA attribute.
Parameters:
newData - The new data.

setObjectHeight

public void setObjectHeight(String newHeight)
Set the HEIGHT attribute.
Parameters:
newHeight - The new height.

setObjectParams

public void setObjectParams(Hashtable newObjectParams)
Set the enclosed PARAM children.
Parameters:
newObjectParams - The new parameters.

setObjectStandby

public void setObjectStandby(String newStandby)
Set the STANDBY attribute.
Parameters:
newStandby - The new standby.

setObjectType

public void setObjectType(String newType)
Set the TYPE attribute.
Parameters:
newType - The new type.

setObjectWidth

public void setObjectWidth(String newWidth)
Set the WIDTH attribute.
Parameters:
newWidth - The new width.

toString

public String toString()
Output a string representing this object tag.
Specified by:
toString in interface Node
Overrides:
toString in interface CompositeTag
Returns:
A string showing the contents of the object tag.

HTML Parser is an open source library released under LGPL. SourceForge.net