public abstract class ExportWriter extends Object
Modifier and Type | Field and Description |
---|---|
protected ExportFormat |
exportFormat
The format of the export.
|
Constructor and Description |
---|
ExportWriter() |
Modifier and Type | Method and Description |
---|---|
void |
addSeparator()
Adds a separator.
|
abstract void |
addSeparator(WorkbookStyle textStyle)
Adds a separator.
|
abstract void |
close()
Writes the content in cache and closes the connection to the file.
|
abstract void |
decreseDepth()
Notifies the writer that data of a lower hierarchical depth will be
written, e.g.
|
ExportFormat |
getExportFormat()
Returns the export of the format.
|
static ExportWriter |
getExportWriter(ExportFormat exportFormat,
File destinationFile,
String separator,
int nSeparationLines)
Returns an export writer for the desired format.
|
abstract void |
increaseDepth()
Notifies the writer that data of a higher hierarchical depth will be
written, e.g.
|
abstract void |
newLine()
Adds a separator.
|
void |
startNewSection()
Starts a new section.
|
void |
startNewSection(String sectionTitle)
Starts a new section.
|
abstract void |
startNewSection(String sectionTitle,
WorkbookStyle textStyle)
Starts a new section.
|
void |
write(String text)
Writes text to the export.
|
abstract void |
write(String text,
WorkbookStyle textStyle)
Writes text to the export.
|
void |
writeHeaderText(String text)
Writes header text to the export.
|
abstract void |
writeHeaderText(String text,
WorkbookStyle textStyle)
Writes header text to the export.
|
void |
writeMainTitle(String text)
Writes the main title.
|
abstract void |
writeMainTitle(String text,
WorkbookStyle textStyle)
Writes the main title.
|
protected ExportFormat exportFormat
public ExportFormat getExportFormat()
public void write(String text) throws IOException
text
- the text to writeIOException
public abstract void write(String text, WorkbookStyle textStyle) throws IOException
text
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
public void writeMainTitle(String text) throws IOException
text
- the text to writeIOException
public abstract void writeMainTitle(String text, WorkbookStyle textStyle) throws IOException
text
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
public void startNewSection() throws IOException
IOException
public void startNewSection(String sectionTitle) throws IOException
sectionTitle
- the text to writeIOException
public abstract void startNewSection(String sectionTitle, WorkbookStyle textStyle) throws IOException
sectionTitle
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
public void writeHeaderText(String text) throws IOException
text
- the text to writeIOException
public abstract void writeHeaderText(String text, WorkbookStyle textStyle) throws IOException
text
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
public void addSeparator() throws IOException
IOException
public abstract void addSeparator(WorkbookStyle textStyle) throws IOException
textStyle
- the style to use, overwrites any previous/defaultIOException
public abstract void newLine() throws IOException
IOException
public abstract void close() throws IOException, FileNotFoundException
IOException
FileNotFoundException
public abstract void increaseDepth()
public abstract void decreseDepth()
public static ExportWriter getExportWriter(ExportFormat exportFormat, File destinationFile, String separator, int nSeparationLines) throws IOException
exportFormat
- the export formatdestinationFile
- the file where to write the exportseparator
- the separator for a text exportnSeparationLines
- the number of separation lines between two
sections for a text exportIOException
Copyright © 2014. All rights reserved.