public class ConverterResultImpl extends java.lang.Object implements ConverterResult
ConverterResultImpl
is a straightforward implementation of ConverterResult
Constructor and Description |
---|
ConverterResultImpl()
Construct a new
ConverterResultImpl with empty content |
Modifier and Type | Method and Description |
---|---|
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 |
getCoverFile()
Get the entry which contains the cover (which usually will contain a cover image)
|
ContentEntry |
getCoverImageFile()
Get the entry which contains the actual cover image
|
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 |
setCoverFile(ContentEntry entry)
Define the entry which contains the cover
|
void |
setCoverImageFile(ContentEntry entry)
Define the entry which contains the cover image
|
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
|
public ConverterResultImpl()
ConverterResultImpl
with empty contentpublic void reset()
OutputFile
and ContentEntry
objects
objects from this class. This allows reuse of a ConvertResult
object.public void addDocument(OutputFile file)
OutputFile
to the listfile
- The OutputFile
to add.public OutputFile getMasterDocument()
getMasterDocument
in interface ConverterResult
OutputFile
the master documentpublic java.util.Iterator<OutputFile> iterator()
Iterator
to access the List
of OutputFile
objectsiterator
in interface ConverterResult
Iterator
to access the
List
of OutputFile
objects.public void addContentEntry(ContentEntry entry)
entry
- the entry to addpublic java.util.List<ContentEntry> getContent()
ConverterResult
ConverterResult
getContent
in interface ConverterResult
public void setTitlePageFile(ContentEntry entry)
entry
- the entrypublic ContentEntry getTitlePageFile()
ConverterResult
getTitlePageFile
in interface ConverterResult
public void setTextFile(ContentEntry entry)
entry
- the entrypublic ContentEntry getTextFile()
ConverterResult
getTextFile
in interface ConverterResult
public void setTocFile(ContentEntry entry)
entry
- the entrypublic ContentEntry getTocFile()
ConverterResult
getTocFile
in interface ConverterResult
public void setLofFile(ContentEntry entry)
entry
- the entrypublic ContentEntry getLofFile()
ConverterResult
getLofFile
in interface ConverterResult
public void setLotFile(ContentEntry entry)
entry
- the entrypublic ContentEntry getLotFile()
ConverterResult
getLotFile
in interface ConverterResult
public void setIndexFile(ContentEntry entry)
entry
- the entrypublic ContentEntry getIndexFile()
ConverterResult
getIndexFile
in interface ConverterResult
public void setBibliographyFile(ContentEntry entry)
entry
- the entrypublic ContentEntry getBibliographyFile()
ConverterResult
getBibliographyFile
in interface ConverterResult
public void setCoverFile(ContentEntry entry)
entry
- the entrypublic ContentEntry getCoverFile()
ConverterResult
getCoverFile
in interface ConverterResult
public void setCoverImageFile(ContentEntry entry)
entry
- the entrypublic ContentEntry getCoverImageFile()
ConverterResult
getCoverImageFile
in interface ConverterResult
public void setMetaData(MetaData metaData)
ConverterResult
metaData
- the meta datapublic MetaData getMetaData()
ConverterResult
getMetaData
in interface ConverterResult
public void write(java.io.File dir) throws java.io.IOException
write
in interface ConverterResult
dir
- the directory to usejava.io.IOException
- if the directory does not exist or one or more files
could not be written