org.activemath.content
Class Toc

java.lang.Object
  extended by org.activemath.content.Toc

public class Toc
extends Object


Field Summary
protected static Category log
           
protected static org.jdom.output.XMLOutputter xml
           
 
Constructor Summary
Toc(Book book)
          Creates a new toc using a book
Toc(Grouping grouping)
           
Toc(String refId, TocEntry tocRoot)
           
 
Method Summary
protected  void buildToc0(int level, TocEntry toc, OJElement elem)
          builds a TocEntry at level level using the given element.
protected  void buildTocWithItems(int level, TocEntry toc, OJElement elem)
          builds a TocEntry at level level using the given element.
 TocEntry getRealTocRoot()
           
 TocEntry getTocEntry(String id)
           
 TocEntry getTocEntryByPage(String page)
           
 TocEntry getTocRoot()
           
 void setTocRoot(TocEntry entry)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Category log

xml

protected static org.jdom.output.XMLOutputter xml
Constructor Detail

Toc

public Toc(String refId,
           TocEntry tocRoot)

Toc

public Toc(Grouping grouping)

Toc

public Toc(Book book)
Creates a new toc using a book

Parameters:
book - The book this Toc belongs to.
Method Detail

buildTocWithItems

protected void buildTocWithItems(int level,
                                 TocEntry toc,
                                 OJElement elem)
builds a TocEntry at level level using the given element. Will not fail if the Toc's book field is null.

Parameters:
level -
toc -
elem -

buildToc0

protected void buildToc0(int level,
                         TocEntry toc,
                         OJElement elem)
builds a TocEntry at level level using the given element. Will not fail if the Toc's book field is null.

Parameters:
level -
toc -
elem -

getRealTocRoot

public TocEntry getRealTocRoot()

getTocRoot

public TocEntry getTocRoot()
Returns:
Returns the tocRoot.

getTocEntry

public TocEntry getTocEntry(String id)

getTocEntryByPage

public TocEntry getTocEntryByPage(String page)

setTocRoot

public void setTocRoot(TocEntry entry)
Parameters:
decoratedRoot -