Package it.smartio.docs.fop.nodes
Class FoNode
- java.lang.Object
-
- it.smartio.docs.fop.nodes.FoNode
-
- Direct Known Subclasses:
FoBasicLink,FoBlock,FoBlockContainer,FoBookmark,FoExternalGraphic,FoFlow,FoFootnote,FoLeader,FoListBlock,FoListItem,FoPageNumberCitation,FoPageSequence,FoPageSequenceMaster,FoRegion,FoRoot,FoSimplePageMaster,FoStaticContent,FoTable,FoTableArea,FoTableCell,FoTableRow
public class FoNode extends java.lang.Object implements Fo, java.lang.Iterable<FoNode>
TheFoNodeis a builder implementation for Apache Formating Objects.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FoNodeaddNode(FoNode builder)Add a new childFoNode.voidaddText(java.lang.String text)Add a new child textFoNode.java.lang.Stringbuild()Build the String.static FoNodecreate(java.lang.String name)Creates a new instance of aFoNode.protected java.util.Map<java.lang.String,java.lang.String>getAttributes()Get the attributes.protected java.lang.StringgetTagName()Get the name.booleanhasChildren()Returnstrueif this list contains no elements.java.util.Iterator<FoNode>iterator()Returns an iterator over childFoNode.static FoRootroot(java.lang.String font)Creates a new instance of aFoRoot.FoNodeset(java.lang.String name, java.lang.String value)Set an attribute.FoNodesetId(java.lang.String id)Set the ID.static FoNodetext(java.lang.String text)Constructs a textFoNode.
-
-
-
Constructor Detail
-
FoNode
protected FoNode(java.lang.String name)
Constructs an instance ofFoNode.- Parameters:
name-
-
-
Method Detail
-
getTagName
protected final java.lang.String getTagName()
Get the name.
-
getAttributes
protected final java.util.Map<java.lang.String,java.lang.String> getAttributes()
Get the attributes.
-
hasChildren
public final boolean hasChildren()
Returnstrueif this list contains no elements.- Returns:
trueif this list contains no elements
-
setId
public final FoNode setId(java.lang.String id)
Set the ID.- Parameters:
id-
-
set
public final FoNode set(java.lang.String name, java.lang.String value)
Set an attribute.
-
addText
public final void addText(java.lang.String text)
Add a new child textFoNode.- Parameters:
text-
-
iterator
public final java.util.Iterator<FoNode> iterator()
Returns an iterator over childFoNode.- Specified by:
iteratorin interfacejava.lang.Iterable<FoNode>
-
build
public java.lang.String build()
Build the String.
-
-