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 ConverterResultOutputFile the master documentpublic java.util.Iterator<OutputFile> iterator()
Iterator to access the List
of OutputFile objectsiterator in interface ConverterResultIterator to access the
List of OutputFile objects.public void addContentEntry(ContentEntry entry)
entry - the entry to addpublic java.util.List<ContentEntry> getContent()
ConverterResultConverterResultgetContent in interface ConverterResultpublic void setTitlePageFile(ContentEntry entry)
entry - the entrypublic ContentEntry getTitlePageFile()
ConverterResultgetTitlePageFile in interface ConverterResultpublic void setTextFile(ContentEntry entry)
entry - the entrypublic ContentEntry getTextFile()
ConverterResultgetTextFile in interface ConverterResultpublic void setTocFile(ContentEntry entry)
entry - the entrypublic ContentEntry getTocFile()
ConverterResultgetTocFile in interface ConverterResultpublic void setLofFile(ContentEntry entry)
entry - the entrypublic ContentEntry getLofFile()
ConverterResultgetLofFile in interface ConverterResultpublic void setLotFile(ContentEntry entry)
entry - the entrypublic ContentEntry getLotFile()
ConverterResultgetLotFile in interface ConverterResultpublic void setIndexFile(ContentEntry entry)
entry - the entrypublic ContentEntry getIndexFile()
ConverterResultgetIndexFile in interface ConverterResultpublic void setBibliographyFile(ContentEntry entry)
entry - the entrypublic ContentEntry getBibliographyFile()
ConverterResultgetBibliographyFile in interface ConverterResultpublic void setCoverFile(ContentEntry entry)
entry - the entrypublic ContentEntry getCoverFile()
ConverterResultgetCoverFile in interface ConverterResultpublic void setCoverImageFile(ContentEntry entry)
entry - the entrypublic ContentEntry getCoverImageFile()
ConverterResultgetCoverImageFile in interface ConverterResultpublic void setMetaData(MetaData metaData)
ConverterResultmetaData - the meta datapublic MetaData getMetaData()
ConverterResultgetMetaData in interface ConverterResultpublic void write(java.io.File dir)
throws java.io.IOException
write in interface ConverterResultdir - the directory to usejava.io.IOException - if the directory does not exist or one or more files
could not be written