Package org.eclipse.birt.report.engine.api

# Class TOCNode

java.lang.Object
org.eclipse.birt.report.engine.api.TOCNode

public class TOCNode extends Object
A node that wraps around a TOC entry. To navigate to a specific TOC entry, one starts with the TOC root and traverse down the TOC tree, obtaining list of TOC nodes. For each node, the user can go to a specific page by following the bookmark.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String`
`bookmark`
A bookmark that is stored for the TOC
`protected List`
`children`
A list of children for the TOC node
`protected String`
`displayString`
the string to be displayed for the TOC entry
`static final List`
`EMPTY_CHILDREN`
`protected String`
`nodeId`
identifier for the current node
`protected TOCNode`
`parent`
the parent node
`protected org.eclipse.birt.report.engine.api.script.instance.IScriptStyle`
`tocStyle`
The TOC's style

## Constructor Summary

Constructors
Constructor
Description
`TOCNode()`
Constructor.
`TOCNode(TOCNode node)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`String`
`getBookmark()`
`List`
`getChildren()`
`String`
`getDisplayString()`
`String`
`getNodeID()`
`TOCNode`
`getParent()`
`org.eclipse.birt.report.engine.api.script.instance.IScriptStyle`
`getTOCStyle()`
Get toc style.
`void`
`setBookmark(String bookmark)`
Set bookmark
`void`
`setDisplayString(String displayStr)`
`void`
`setNodeID(String id)`
Set Node id
`void`
`setParent(TOCNode parent)`
Set parent toc.
`void`
`setTOCStyle(org.eclipse.birt.report.engine.api.script.instance.IScriptStyle tocStyle)`
Set toc style.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### EMPTY_CHILDREN

public static final List EMPTY_CHILDREN

### displayString

protected String displayString
the string to be displayed for the TOC entry

### bookmark

protected String bookmark
A bookmark that is stored for the TOC

### parent

protected TOCNode parent
the parent node

### nodeId

protected String nodeId
identifier for the current node

### children

protected List children
A list of children for the TOC node

### tocStyle

protected org.eclipse.birt.report.engine.api.script.instance.IScriptStyle tocStyle
The TOC's style

## Constructor Details

### TOCNode

public TOCNode()
Constructor.

### TOCNode

public TOCNode(TOCNode node)
Constructor.

Parameters:
  `node` -

## Method Details

### getNodeID

public String getNodeID()

Returns:
  the unique ID for the TOC node

### getParent

public TOCNode getParent()

Returns:
  returns the parent node of the current TOC node

### getChildren

public List getChildren()

Returns:
  the list of child TOC nodes

### getDisplayString

public String getDisplayString()

Returns:
  the display string for the TOC entry

### setDisplayString

public void setDisplayString(String displayStr)

Parameters:
  `display` - the display string

### getBookmark

public String getBookmark()

Returns:
  the bookmark string that the TOC item points to.

### setBookmark

public void setBookmark(String bookmark)
Set bookmark

Parameters:
  `bookmark` -

### setNodeID

public void setNodeID(String id)
Set Node id

Parameters:
  `id` -

### setParent

public void setParent(TOCNode parent)
Set parent toc.

Parameters:
  `parent` -

### getTOCStyle

public org.eclipse.birt.report.engine.api.script.instance.IScriptStyle getTOCStyle()
Get toc style.

Returns:
  toc style

### setTOCStyle

public void setTOCStyle(org.eclipse.birt.report.engine.api.script.instance.IScriptStyle tocStyle)
Set toc style.

Parameters:
  `toc` - style