nl.lxtreme.ols.util
Interface ExportUtils.HtmlExporter.Element

All Superinterfaces:
Cloneable
All Known Implementing Classes:
TagElement, TextElement
Enclosing interface:
ExportUtils.HtmlExporter

public static interface ExportUtils.HtmlExporter.Element
extends Cloneable

Denotes a HTML element.


Method Summary
 ExportUtils.HtmlExporter.Element addAttribute(String aName, String aValue)
          Adds an attribute to this element.
 ExportUtils.HtmlExporter.Element addChild(ExportUtils.HtmlExporter.Element aChild)
          Adds a new child element to this element.
 ExportUtils.HtmlExporter.Element addChild(String aName)
          Adds a new child element to this element.
 ExportUtils.HtmlExporter.Element addContent(String... aValues)
          Adds text content to this element.
 ExportUtils.HtmlExporter.Element clone()
          Creates a deep copy of this element.
 Collection<ExportUtils.HtmlExporter.Attribute> getAttributes()
          Returns the attributes of this element.
 ExportUtils.HtmlExporter.Element getChildByName(String aName)
          Returns the first child with the given name.
 Collection<ExportUtils.HtmlExporter.Element> getChildren()
          Returns the child-elements of this element.
 String getName()
          Returns the name of this element.
 String toString(ExportUtils.HtmlExporter.MacroResolver aResolver)
          Returns the string representation of this HTML-element.
 

Method Detail

addAttribute

ExportUtils.HtmlExporter.Element addAttribute(String aName,
                                              String aValue)
Adds an attribute to this element.

Parameters:
aName - the name of the attribute to add;
aValue - the value of the attribute to add.
Returns:
this element.

addChild

ExportUtils.HtmlExporter.Element addChild(ExportUtils.HtmlExporter.Element aChild)
Adds a new child element to this element.

Parameters:
aChild - the child element to add, cannot be null.
Returns:
the added child element (which is a clone of the one given!).

addChild

ExportUtils.HtmlExporter.Element addChild(String aName)
Adds a new child element to this element.

Parameters:
aName - the name of the child element to add, cannot be null.
Returns:
the added child element.

addContent

ExportUtils.HtmlExporter.Element addContent(String... aValues)
Adds text content to this element.

Parameters:
aValues - the text-values to add, cannot be null.
Returns:
this element.

clone

ExportUtils.HtmlExporter.Element clone()
Creates a deep copy of this element.

See Also:
Object.clone()

getAttributes

Collection<ExportUtils.HtmlExporter.Attribute> getAttributes()
Returns the attributes of this element.

Returns:
a collection of attributes, never null.

getChildByName

ExportUtils.HtmlExporter.Element getChildByName(String aName)
Returns the first child with the given name.

Parameters:
aName - the name of the child to get, cannot be null.
Returns:
the first child with the given name, or null if no such child was found.

getChildren

Collection<ExportUtils.HtmlExporter.Element> getChildren()
Returns the child-elements of this element.

Returns:
a collection of child-elements, never null.

getName

String getName()
Returns the name of this element.

Returns:
the name of this element, never null.

toString

String toString(ExportUtils.HtmlExporter.MacroResolver aResolver)
Returns the string representation of this HTML-element.

Parameters:
aResolver - the macro resolver to use for any found macros.
Returns:
the string representation of this element, never null.


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.