writer2latex.base
Class ConverterResultImpl

java.lang.Object
  extended by writer2latex.base.ConverterResultImpl
All Implemented Interfaces:
ConverterResult

public class ConverterResultImpl
extends java.lang.Object
implements ConverterResult

ConverterResultImpl is a straightforward implementation of ConverterResult


Constructor Summary
ConverterResultImpl()
          Construct a new ConverterResultImpl with empty content
 
Method Summary
 void addContentEntry(ContentEntry entry)
          Add an entry to the "external" table of contents
 void addDocument(OutputFile file)
          Adds an OutputFile to the list
 ContentEntry getBibliographyFile()
          Get the entry which contains the bibliography
 java.util.List<ContentEntry> getContent()
          Get the content table (based on headings) for this ConverterResult
 ContentEntry getIndexFile()
          Get the entry which contains the alphabetical index
 ContentEntry getLofFile()
          Get the entry which contains the list of figures
 ContentEntry getLotFile()
          Get the entry which contains the list of tables
 OutputFile getMasterDocument()
          Get the first master document
 MetaData getMetaData()
          Get the meta data of this ConverterResult
 ContentEntry getTextFile()
          Get the entry which contains the start of the actual text (the first chapter, or simply the start of the document if there are no headings)
 ContentEntry getTitlePageFile()
          Get the entry which contains the table page
 ContentEntry getTocFile()
          Get the entry which contains the table of contents
 java.util.Iterator<OutputFile> iterator()
          Gets an Iterator to access the List of OutputFile objects
 void reset()
          Resets all data.
 void setBibliographyFile(ContentEntry entry)
          Define the entry which contains the bibliography
 void setIndexFile(ContentEntry entry)
          Define the entry which contains the alphabetical index
 void setLofFile(ContentEntry entry)
          Define the entry which contains the list of figures
 void setLotFile(ContentEntry entry)
          Define the entry which contains the list of tables
 void setMetaData(MetaData metaData)
          Set the meta data of this ConverterResult
 void setTextFile(ContentEntry entry)
          Define the entry which contains the main text file
 void setTitlePageFile(ContentEntry entry)
          Define the entry which contains the title page
 void setTocFile(ContentEntry entry)
          Define the entry which contains the table of contents
 void write(java.io.File dir)
          Write all files to a given directory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterResultImpl

public ConverterResultImpl()
Construct a new ConverterResultImpl with empty content

Method Detail

reset

public void reset()
Resets all data. This empties all OutputFile and ContentEntry objects objects from this class. This allows reuse of a ConvertResult object.


addDocument

public void addDocument(OutputFile file)
Adds an OutputFile to the list

Parameters:
file - The OutputFile to add.

getMasterDocument

public OutputFile getMasterDocument()
Get the first master document

Specified by:
getMasterDocument in interface ConverterResult
Returns:
OutputFile the master document

iterator

public java.util.Iterator<OutputFile> iterator()
Gets an Iterator to access the List of OutputFile objects

Specified by:
iterator in interface ConverterResult
Returns:
The Iterator to access the List of OutputFile objects.

addContentEntry

public void addContentEntry(ContentEntry entry)
Add an entry to the "external" table of contents

Parameters:
entry - the entry to add

getContent

public java.util.List<ContentEntry> getContent()
Description copied from interface: ConverterResult
Get the content table (based on headings) for this ConverterResult

Specified by:
getContent in interface ConverterResult
Returns:
list view of the content

setTitlePageFile

public void setTitlePageFile(ContentEntry entry)
Define the entry which contains the title page

Parameters:
entry - the entry

getTitlePageFile

public ContentEntry getTitlePageFile()
Description copied from interface: ConverterResult
Get the entry which contains the table page

Specified by:
getTitlePageFile in interface ConverterResult
Returns:
the entry or null if there is no title page

setTextFile

public void setTextFile(ContentEntry entry)
Define the entry which contains the main text file

Parameters:
entry - the entry

getTextFile

public ContentEntry getTextFile()
Description copied from interface: ConverterResult
Get the entry which contains the start of the actual text (the first chapter, or simply the start of the document if there are no headings)

Specified by:
getTextFile in interface ConverterResult
Returns:
the entry

setTocFile

public void setTocFile(ContentEntry entry)
Define the entry which contains the table of contents

Parameters:
entry - the entry

getTocFile

public ContentEntry getTocFile()
Description copied from interface: ConverterResult
Get the entry which contains the table of contents

Specified by:
getTocFile in interface ConverterResult
Returns:
the entry or null if a table of content does not exist

setLofFile

public void setLofFile(ContentEntry entry)
Define the entry which contains the list of figures

Parameters:
entry - the entry

getLofFile

public ContentEntry getLofFile()
Description copied from interface: ConverterResult
Get the entry which contains the list of figures

Specified by:
getLofFile in interface ConverterResult
Returns:
the entry or null if a list of figures does not exist

setLotFile

public void setLotFile(ContentEntry entry)
Define the entry which contains the list of tables

Parameters:
entry - the entry

getLotFile

public ContentEntry getLotFile()
Description copied from interface: ConverterResult
Get the entry which contains the list of tables

Specified by:
getLotFile in interface ConverterResult
Returns:
the entry or null if a list of tables does not exist

setIndexFile

public void setIndexFile(ContentEntry entry)
Define the entry which contains the alphabetical index

Parameters:
entry - the entry

getIndexFile

public ContentEntry getIndexFile()
Description copied from interface: ConverterResult
Get the entry which contains the alphabetical index

Specified by:
getIndexFile in interface ConverterResult
Returns:
the entry or null if an alphabetical index does not exist

setBibliographyFile

public void setBibliographyFile(ContentEntry entry)
Define the entry which contains the bibliography

Parameters:
entry - the entry

getBibliographyFile

public ContentEntry getBibliographyFile()
Description copied from interface: ConverterResult
Get the entry which contains the bibliography

Specified by:
getBibliographyFile in interface ConverterResult
Returns:
the entry or null if a bibliography does not exist

setMetaData

public void setMetaData(MetaData metaData)
Set the meta data of this ConverterResult

Parameters:
metaData - the meta data

getMetaData

public MetaData getMetaData()
Get the meta data of this ConverterResult

Specified by:
getMetaData in interface ConverterResult
Returns:
the meta data

write

public void write(java.io.File dir)
           throws java.io.IOException
Write all files to a given directory

Specified by:
write in interface ConverterResult
Parameters:
dir - the directory to use
Throws:
java.io.IOException - if the directory does not exist or one or more files could not be written