Package writer2latex.base
Class ConverterResultImpl
java.lang.Object
writer2latex.base.ConverterResultImpl
- All Implemented Interfaces:
ConverterResult
ConverterResultImpl
is a straightforward implementation of ConverterResult
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a newConverterResultImpl
with empty content -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContentEntry
(ContentEntry entry) Add an entry to the "external" table of contentsvoid
addDocument
(OutputFile file) Adds anOutputFile
to the listGet the entry which contains the bibliographyGet the content table (based on headings) for thisConverterResult
Get the entry which contains the cover (which usually will contain a cover image)Get the entry which contains the actual cover imageGet the entry which contains the alphabetical indexGet the entry which contains the list of figuresGet the entry which contains the list of tablesGet the first master documentGet the meta data of thisConverterResult
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)Get the entry which contains the table pageGet the entry which contains the table of contentsiterator()
Gets anIterator
to access theList
ofOutputFile
objectsvoid
reset()
Resets all data.void
setBibliographyFile
(ContentEntry entry) Define the entry which contains the bibliographyvoid
setCoverFile
(ContentEntry entry) Define the entry which contains the covervoid
setCoverImageFile
(ContentEntry entry) Define the entry which contains the cover imagevoid
setIndexFile
(ContentEntry entry) Define the entry which contains the alphabetical indexvoid
setLofFile
(ContentEntry entry) Define the entry which contains the list of figuresvoid
setLotFile
(ContentEntry entry) Define the entry which contains the list of tablesvoid
setMetaData
(MetaData metaData) Set the meta data of thisConverterResult
void
setTextFile
(ContentEntry entry) Define the entry which contains the main text filevoid
setTitlePageFile
(ContentEntry entry) Define the entry which contains the title pagevoid
setTocFile
(ContentEntry entry) Define the entry which contains the table of contentsvoid
Write all files to a given directory
-
Constructor Details
-
ConverterResultImpl
public ConverterResultImpl()Construct a newConverterResultImpl
with empty content
-
-
Method Details
-
reset
public void reset()Resets all data. This empties allOutputFile
andContentEntry
objects objects from this class. This allows reuse of aConvertResult
object. -
addDocument
Adds anOutputFile
to the list- Parameters:
file
- TheOutputFile
to add.
-
getMasterDocument
Get the first master document- Specified by:
getMasterDocument
in interfaceConverterResult
- Returns:
OutputFile
the master document
-
iterator
Gets anIterator
to access theList
ofOutputFile
objects- Specified by:
iterator
in interfaceConverterResult
- Returns:
- The
Iterator
to access theList
ofOutputFile
objects.
-
addContentEntry
Add an entry to the "external" table of contents- Parameters:
entry
- the entry to add
-
getContent
Description copied from interface:ConverterResult
Get the content table (based on headings) for thisConverterResult
- Specified by:
getContent
in interfaceConverterResult
- Returns:
- list view of the content
-
setTitlePageFile
Define the entry which contains the title page- Parameters:
entry
- the entry
-
getTitlePageFile
Description copied from interface:ConverterResult
Get the entry which contains the table page- Specified by:
getTitlePageFile
in interfaceConverterResult
- Returns:
- the entry or null if there is no title page
-
setTextFile
Define the entry which contains the main text file- Parameters:
entry
- the entry
-
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 interfaceConverterResult
- Returns:
- the entry
-
setTocFile
Define the entry which contains the table of contents- Parameters:
entry
- the entry
-
getTocFile
Description copied from interface:ConverterResult
Get the entry which contains the table of contents- Specified by:
getTocFile
in interfaceConverterResult
- Returns:
- the entry or null if a table of content does not exist
-
setLofFile
Define the entry which contains the list of figures- Parameters:
entry
- the entry
-
getLofFile
Description copied from interface:ConverterResult
Get the entry which contains the list of figures- Specified by:
getLofFile
in interfaceConverterResult
- Returns:
- the entry or null if a list of figures does not exist
-
setLotFile
Define the entry which contains the list of tables- Parameters:
entry
- the entry
-
getLotFile
Description copied from interface:ConverterResult
Get the entry which contains the list of tables- Specified by:
getLotFile
in interfaceConverterResult
- Returns:
- the entry or null if a list of tables does not exist
-
setIndexFile
Define the entry which contains the alphabetical index- Parameters:
entry
- the entry
-
getIndexFile
Description copied from interface:ConverterResult
Get the entry which contains the alphabetical index- Specified by:
getIndexFile
in interfaceConverterResult
- Returns:
- the entry or null if an alphabetical index does not exist
-
setBibliographyFile
Define the entry which contains the bibliography- Parameters:
entry
- the entry
-
getBibliographyFile
Description copied from interface:ConverterResult
Get the entry which contains the bibliography- Specified by:
getBibliographyFile
in interfaceConverterResult
- Returns:
- the entry or null if a bibliography does not exist
-
setCoverFile
Define the entry which contains the cover- Parameters:
entry
- the entry
-
getCoverFile
Description copied from interface:ConverterResult
Get the entry which contains the cover (which usually will contain a cover image)- Specified by:
getCoverFile
in interfaceConverterResult
- Returns:
- the entry or null if a cover does not exist
-
setCoverImageFile
Define the entry which contains the cover image- Parameters:
entry
- the entry
-
getCoverImageFile
Description copied from interface:ConverterResult
Get the entry which contains the actual cover image- Specified by:
getCoverImageFile
in interfaceConverterResult
- Returns:
- the entry or null if a cover image does not exist
-
setMetaData
Set the meta data of thisConverterResult
- Parameters:
metaData
- the meta data
-
getMetaData
Get the meta data of thisConverterResult
- Specified by:
getMetaData
in interfaceConverterResult
- Returns:
- the meta data
-
write
Write all files to a given directory- Specified by:
write
in interfaceConverterResult
- Parameters:
dir
- the directory to use- Throws:
IOException
- if the directory does not exist or one or more files could not be written
-