|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.io.csvwriter.FileWriterSettings
public class FileWriterSettings
Holds all settings used by the file writer. Writes them to and reads them from the node settings objects and checks the values. This object is used in the NodeModel to pass settings to the file writer.
Nested Class Summary | |
---|---|
static class |
FileWriterSettings.quoteMode
mode specifying how to quote the data. |
Constructor Summary | |
---|---|
FileWriterSettings()
Creates a settings object with default settings (backward compatible to the old CSV writer). |
|
FileWriterSettings(FileWriterSettings settings)
Creates a copy of the specified settings object. |
|
FileWriterSettings(NodeSettingsRO settings)
Constructs a new object reading the settings from the specified NodeSettings object. |
Method Summary | |
---|---|
static String |
escapeString(String str)
Returns a string with all TABS and newLines being replaced by "\t" or "\n" - and backslashes replaced by "\\". |
String |
getColSeparator()
|
(package private) char |
getDecimalSeparator()
|
String |
getMissValuePattern()
|
String |
getQuoteBegin()
|
String |
getQuoteEnd()
|
FileWriterSettings.quoteMode |
getQuoteMode()
|
String |
getQuoteReplacement()
|
String |
getSeparatorReplacement()
|
boolean |
replaceSeparatorInStrings()
|
void |
saveSettingsTo(NodeSettingsWO settings)
Saves the current values (even if they are incomplete or invalid) in the specified settings object. |
void |
setColSeparator(String colSeparator)
|
(package private) void |
setDecimalSeparator(char newSeparator)
Sets a new decimal separator character. |
void |
setMissValuePattern(String missValuePattern)
|
void |
setQuoteBegin(String quoteBegin)
|
void |
setQuoteEnd(String quoteEnd)
|
void |
setQuoteMode(FileWriterSettings.quoteMode quoteMode)
|
void |
setQuoteReplacement(String quoteReplacement)
|
void |
setReplaceSeparatorInStrings(boolean replaceSepInStrings)
|
void |
setSeparatorReplacement(String separatorReplacement)
|
void |
setWriteColumnHeader(boolean writeColumnHeader)
|
void |
setWriteRowID(boolean writeRowID)
|
static String |
unescapeString(String str)
takes a string that could contain "\t", or "\n", or "\\", and returns a corresponding string with these patterns replaced by the characters '\t', '\n', '\'. |
boolean |
writeColumnHeader()
|
boolean |
writeRowID()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileWriterSettings()
public FileWriterSettings(FileWriterSettings settings)
settings
- the settings to copy into the new object.public FileWriterSettings(NodeSettingsRO settings) throws InvalidSettingsException
settings
- the object to read the initial values from.
InvalidSettingsException
- if the settings object contains
incomplete, invalid, or inconsistent values.Method Detail |
---|
public void saveSettingsTo(NodeSettingsWO settings)
settings
- the object to write the current values to.public String getColSeparator()
public void setColSeparator(String colSeparator)
colSeparator
- the string that is written our between data items.public String getMissValuePattern()
public void setMissValuePattern(String missValuePattern)
missValuePattern
- the string that is written out for data cells
with missing values.public String getQuoteBegin()
public void setQuoteBegin(String quoteBegin)
quoteBegin
- the string that is used as opening quotation mark.public String getQuoteEnd()
public void setQuoteEnd(String quoteEnd)
quoteEnd
- the string used as closing quotation mark.public FileWriterSettings.quoteMode getQuoteMode()
public void setQuoteMode(FileWriterSettings.quoteMode quoteMode)
quoteMode
- the quoteMode to setpublic String getSeparatorReplacement()
public void setSeparatorReplacement(String separatorReplacement)
separatorReplacement
- the separatorReplacement to setpublic boolean replaceSeparatorInStrings()
public void setReplaceSeparatorInStrings(boolean replaceSepInStrings)
replaceSepInStrings
- if set true, the column separator will be
replaced in non-numerical columns - even if the data item written was
quoted.public boolean writeColumnHeader()
public void setWriteColumnHeader(boolean writeColumnHeader)
writeColumnHeader
- the writeColumnHeader to setpublic boolean writeRowID()
public void setWriteRowID(boolean writeRowID)
writeRowID
- the writeRowID to setpublic String getQuoteReplacement()
public void setQuoteReplacement(String quoteReplacement)
quoteReplacement
- the quoteReplacement to setchar getDecimalSeparator()
void setDecimalSeparator(char newSeparator)
newSeparator
- the new decimal separatorpublic static String unescapeString(String str)
str
- a string with escape sequences in
public static String escapeString(String str)
str
- a string with tabs and newlines
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |