writer2latex.office
Class TocReader

java.lang.Object
  extended by writer2latex.office.TocReader

public class TocReader
extends java.lang.Object

The class reads a text:table-of-content element.


Field Summary
(package private)  boolean bIsByChapter
           
(package private)  boolean bUseIndexMarks
           
(package private)  boolean bUseIndexSourceStyles
           
(package private)  boolean bUseOutlineLevel
           
(package private)  org.w3c.dom.Element indexBody
           
(package private)  java.util.Hashtable<java.lang.String,java.lang.Integer> indexSourceStyles
           
(package private)  org.w3c.dom.Element indexTitleTemplate
           
(package private)  int nOutlineLevel
           
(package private)  java.lang.String sName
           
(package private)  java.lang.String sStyleName
           
(package private)  org.w3c.dom.Element[] tocEntryTemplate
           
(package private)  org.w3c.dom.Element tocSource
           
 
Constructor Summary
TocReader(org.w3c.dom.Element onode)
          Initialize the TocReader with a table of content node.
 
Method Summary
 org.w3c.dom.Element getIndexBody()
          Return the generated content of this toc, if available
 int getIndexSourceStyleLevel(java.lang.String sStyleName)
          Get the level associated with a specific index source style
 java.util.Set<java.lang.String> getIndexSourceStyles()
          Get a set view of all index source styles
 org.w3c.dom.Element getIndexTitleTemplate()
          Get the index title template for this toc
 java.lang.String getName()
          Get the (section) name for this toc
 int getOutlineLevel()
          Get max outline level for this toc
 java.lang.String getStyleName()
          Get the (section) style name for this toc
 org.w3c.dom.Element getTocEntryTemplate(int nLevel)
          Get the entry template for this toc at a specific level
 boolean isByChapter()
          Is this toc by chapter?
 boolean useIndexMarks()
          Do we use toc marks in this toc?
 boolean useIndexSourceStyles()
          Do we use additional styles in this toc?
 boolean useOutlineLevel()
          Do we use outline (headings) in this toc?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tocSource

org.w3c.dom.Element tocSource

indexBody

org.w3c.dom.Element indexBody

sName

java.lang.String sName

sStyleName

java.lang.String sStyleName

nOutlineLevel

int nOutlineLevel

bUseOutlineLevel

boolean bUseOutlineLevel

bUseIndexSourceStyles

boolean bUseIndexSourceStyles

bUseIndexMarks

boolean bUseIndexMarks

bIsByChapter

boolean bIsByChapter

indexTitleTemplate

org.w3c.dom.Element indexTitleTemplate

tocEntryTemplate

org.w3c.dom.Element[] tocEntryTemplate

indexSourceStyles

java.util.Hashtable<java.lang.String,java.lang.Integer> indexSourceStyles
Constructor Detail

TocReader

public TocReader(org.w3c.dom.Element onode)

Initialize the TocReader with a table of content node.

Parameters:
onode - a text:table-of-content
Method Detail

getName

public java.lang.String getName()

Get the (section) name for this toc

Returns:
the name of the toc

getStyleName

public java.lang.String getStyleName()

Get the (section) style name for this toc

Returns:
name of the section style to use for this toc

getOutlineLevel

public int getOutlineLevel()

Get max outline level for this toc

Returns:
max outline level

useOutlineLevel

public boolean useOutlineLevel()

Do we use outline (headings) in this toc?

Returns:
true if headings should be used

useIndexSourceStyles

public boolean useIndexSourceStyles()

Do we use additional styles in this toc?

Returns:
true if additional styles should be used

useIndexMarks

public boolean useIndexMarks()

Do we use toc marks in this toc?

Returns:
true if toc marks should be used

isByChapter

public boolean isByChapter()

Is this toc by chapter?

Returns:
true if the scope is a chapter only

getIndexTitleTemplate

public org.w3c.dom.Element getIndexTitleTemplate()

Get the index title template for this toc

Returns:
the text:index-title-template element, or null

getTocEntryTemplate

public org.w3c.dom.Element getTocEntryTemplate(int nLevel)

Get the entry template for this toc at a specific level

Parameters:
nLevel - the outline level
Returns:
the text:table-of-content-entry-template element, or null

getIndexSourceStyles

public java.util.Set<java.lang.String> getIndexSourceStyles()

Get a set view of all index source styles

Returns:
a set of all index source style names

getIndexSourceStyleLevel

public int getIndexSourceStyleLevel(java.lang.String sStyleName)

Get the level associated with a specific index source style

Parameters:
sStyleName - the style name of the index source style
Returns:
the level or -1 if the style is not used in this toc

getIndexBody

public org.w3c.dom.Element getIndexBody()

Return the generated content of this toc, if available

Returns:
the text:index-body element