FileDocCategorySizeDatePackage
Element.javaAPI DocGlassfish v2 API4685Fri May 04 22:34:48 BST 2007com.sun.enterprise.diagnostics.report.html

Element

public interface Element implements Container
A single element in an HTML document. Elements may contain other elements and text, in a strict order. They may also have attributes assigned to them.

Fields Summary
Constructors Summary
Methods Summary
public AttributeaddAttribute(java.lang.String id, java.lang.String value)
Add a attribute to this element.

param
id The name of the attribute.
param
value The value of the attribute.

public TextaddComment(java.lang.String content)
Factory method to create a new comment and add it to this element. The content of the comment is escaped as appropriate.

param
content The content of this comment.
return
The new comment.
see
Text

public com.sun.enterprise.diagnostics.report.html.ElementaddElement(java.lang.String name)
Add a element to this element.

param
name The name of the new element.

public TextaddText(java.lang.String text)
Factory method to create a new text instance and add it to this element. The content of the text is escaped as appropriate.

param
text The text to add.
return
The new text instance.

public java.util.ListgetAttributes(java.lang.String name)
Get all attributes of this element whose name matches the given name.

param
name The attribute name.
return
The list of all matching attributes.

public java.util.ListgetAttributes()
Get all attributes of this element.

return
The list of all attributes.

public java.util.ListgetComments()
Get all comments in this element.

return
The list of all comments.

public java.util.ListgetElements()
Get all child elements of this element.

return
The list of child elements.

public java.util.ListgetElements(java.lang.String name)
Get all child elements of this element which have the specified name.

param
name The element name.
return
The list of child elements.

public java.lang.StringgetName()
Get the name of this element.

return
The name of this element.

public java.util.ListgetTexts()
Get all text contained in this element.

return
The list of text nodes contained in this element.

public voidsetName(java.lang.String name)
Set the name of this element. The previous name is discarded. Note that element names are not case-sensitive; on output they are all converted to upper-case.

param
name The new name of this element.