public class ImpExXMLExportWriter extends ImpExExportWriter
| Modifier and Type | Field and Description |
|---|---|
static String |
IMPEX_HEADER_TAG |
static String |
IMPEX_MODE_ATTR |
static String |
IMPEX_ROOT_TAG |
static String |
IMPEX_TYPE_ATTR |
protected Writer |
writer |
protected XMLOutputter |
xmlout |
| Constructor and Description |
|---|
ImpExXMLExportWriter(Writer writer,
String encoding) |
ImpExXMLExportWriter(Writer writer,
String encoding,
SessionContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the underlying writer.
|
void |
comment(String text)
Writes a comment.
|
Object |
getExportWriter()
Returns the general writer which is used for this export.
|
void |
newLine()
Write a newline.
|
void |
writeComment(String scrline)
Writes the String
comment to the writer as a line comment. |
void |
writeCurrentHeader(boolean asComment)
Writes the the current header either as a comment, if
asComment is set to true, or as a
normal row if asComment is false. |
protected void |
writeHeaderColumn(AbstractColumnDescriptor col) |
protected void |
writeHeaderColumn(AbstractDescriptor.ColumnParams colParams,
boolean special) |
void |
writeLine(Item item)
Exports the Item into the underlying Writer using current header.
|
void |
writeSrcLine(String scrline)
Writes the String
srcLine to the writer as a normal line. |
getAllAttributeValues, getAttributeValue, getColumnOffset, getCurrentHeader, getLanguage, setColumnOffset, setCurrentHeader, setCurrentHeader, setCurrentHeader, setCurrentHeaderpublic static final String IMPEX_ROOT_TAG
public static final String IMPEX_HEADER_TAG
public static final String IMPEX_MODE_ATTR
public static final String IMPEX_TYPE_ATTR
protected Writer writer
protected XMLOutputter xmlout
public ImpExXMLExportWriter(Writer writer, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic ImpExXMLExportWriter(Writer writer, String encoding, SessionContext ctx) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic void comment(String text)
ImpExExportWritercomment in class ImpExExportWritertext - comment to writepublic void close()
ImpExExportWriterclose in class ImpExExportWriterpublic Object getExportWriter()
ImpExExportWritergetExportWriter in class ImpExExportWriterpublic void newLine()
ImpExExportWriternewLine in class ImpExExportWriterpublic void writeCurrentHeader(boolean asComment)
throws ImpExException
ImpExExportWriterasComment is set to true, or as a
normal row if asComment is false. The columns are shifted according to the set column offset.writeCurrentHeader in class ImpExExportWriterImpExException - error while writingImpExExportWriter.setColumnOffset(int),
ImpExExportWriter.getColumnOffset()protected void writeHeaderColumn(AbstractColumnDescriptor col) throws IOException
IOExceptionprotected void writeHeaderColumn(AbstractDescriptor.ColumnParams colParams, boolean special) throws IOException
IOExceptionpublic void writeLine(Item item) throws ImpExException
ImpExExportWriterwriteLine in class ImpExExportWriteritem - Item to export.ImpExException - error while translating item to textpublic void writeComment(String scrline) throws IOException
ImpExExportWritercomment to the writer as a line comment.writeComment in class ImpExExportWriterscrline - the line to be written to the writerIOException - if an error occurs while writingpublic void writeSrcLine(String scrline) throws IOException
ImpExExportWritersrcLine to the writer as a normal line.writeSrcLine in class ImpExExportWriterscrline - the line to be written to the writerIOException - if an error occurs while writingCopyright © 2017 SAP SE. All Rights Reserved.