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 newConverterResultImplwith empty content -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContentEntry(ContentEntry entry) Add an entry to the "external" table of contentsvoidaddDocument(OutputFile file) Adds anOutputFileto the listGet the entry which contains the bibliographyGet the content table (based on headings) for thisConverterResultGet 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 thisConverterResultGet 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 anIteratorto access theListofOutputFileobjectsvoidreset()Resets all data.voidsetBibliographyFile(ContentEntry entry) Define the entry which contains the bibliographyvoidsetCoverFile(ContentEntry entry) Define the entry which contains the covervoidsetCoverImageFile(ContentEntry entry) Define the entry which contains the cover imagevoidsetIndexFile(ContentEntry entry) Define the entry which contains the alphabetical indexvoidsetLofFile(ContentEntry entry) Define the entry which contains the list of figuresvoidsetLotFile(ContentEntry entry) Define the entry which contains the list of tablesvoidsetMetaData(MetaData metaData) Set the meta data of thisConverterResultvoidsetTextFile(ContentEntry entry) Define the entry which contains the main text filevoidsetTitlePageFile(ContentEntry entry) Define the entry which contains the title pagevoidsetTocFile(ContentEntry entry) Define the entry which contains the table of contentsvoidWrite all files to a given directory
-
Constructor Details
-
ConverterResultImpl
public ConverterResultImpl()Construct a newConverterResultImplwith empty content
-
-
Method Details
-
reset
public void reset()Resets all data. This empties allOutputFileandContentEntryobjects objects from this class. This allows reuse of aConvertResultobject. -
addDocument
Adds anOutputFileto the list- Parameters:
file- TheOutputFileto add.
-
getMasterDocument
Get the first master document- Specified by:
getMasterDocumentin interfaceConverterResult- Returns:
OutputFilethe master document
-
iterator
Gets anIteratorto access theListofOutputFileobjects- Specified by:
iteratorin interfaceConverterResult- Returns:
- The
Iteratorto access theListofOutputFileobjects.
-
addContentEntry
Add an entry to the "external" table of contents- Parameters:
entry- the entry to add
-
getContent
Description copied from interface:ConverterResultGet the content table (based on headings) for thisConverterResult- Specified by:
getContentin 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:ConverterResultGet the entry which contains the table page- Specified by:
getTitlePageFilein 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:ConverterResultGet 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:
getTextFilein interfaceConverterResult- Returns:
- the entry
-
setTocFile
Define the entry which contains the table of contents- Parameters:
entry- the entry
-
getTocFile
Description copied from interface:ConverterResultGet the entry which contains the table of contents- Specified by:
getTocFilein 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:ConverterResultGet the entry which contains the list of figures- Specified by:
getLofFilein 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:ConverterResultGet the entry which contains the list of tables- Specified by:
getLotFilein 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:ConverterResultGet the entry which contains the alphabetical index- Specified by:
getIndexFilein 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:ConverterResultGet the entry which contains the bibliography- Specified by:
getBibliographyFilein 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:ConverterResultGet the entry which contains the cover (which usually will contain a cover image)- Specified by:
getCoverFilein 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:ConverterResultGet the entry which contains the actual cover image- Specified by:
getCoverImageFilein 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:
getMetaDatain interfaceConverterResult- Returns:
- the meta data
-
write
Write all files to a given directory- Specified by:
writein interfaceConverterResult- Parameters:
dir- the directory to use- Throws:
IOException- if the directory does not exist or one or more files could not be written
-