|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.univocity.parsers.common.CommonSettings<F>
com.univocity.parsers.common.CommonWriterSettings<F>
F - the format supported by this writer.public abstract class CommonWriterSettings<F extends Format>
This is the parent class for all configuration classes used by writers (AbstractWriter)
By default, all writers work with, at least, the following configuration options in addition to the ones provided by CommonSettings:
RowWriterProcessor which processes input objects into a manageable format for writing.
RowWriterProcessor,
CsvWriterSettings,
FixedWidthWriterSettings| Constructor Summary | |
|---|---|
CommonWriterSettings()
|
|
| Method Summary | |
|---|---|
protected void |
addConfiguration(Map<String,Object> out)
|
protected void |
clearInputSpecificSettings()
Clears settings that are likely to be specific to a given input. |
protected CommonWriterSettings |
clone()
Clones this configuration object. |
protected CommonWriterSettings |
clone(boolean clearInputSpecificSettings)
Clones this configuration object to reuse user-provided settings. |
protected void |
configureFromAnnotations(Class<?> beanClass)
Configures the writer based on the annotations provided in a given class |
String |
getEmptyValue()
Returns the String representation of an empty value (defaults to null) |
boolean |
getExpandIncompleteRows()
Indicates whether the writer should expand records with less columns than the number of headers. |
RowWriterProcessor<?> |
getRowWriterProcessor()
Returns the implementation of the interface RowWriterProcessor which processes input objects into a manageable format for writing. |
boolean |
isHeaderWritingEnabled()
Returns a flag indicating whether automatic writing of headers is enabled. |
void |
setEmptyValue(String emptyValue)
Sets the String representation of an empty value (defaults to null) |
void |
setExpandIncompleteRows(boolean expandIncompleteRows)
Defines whether the writer should expand records with less columns than the number of headers. |
void |
setHeaderWritingEnabled(boolean headerWritingEnabled)
Enables automatic writing of headers when they are available. |
void |
setRowWriterProcessor(RowWriterProcessor<?> rowWriterProcessor)
Defines a processor for input objects that converts them into a manageable format for writing. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CommonWriterSettings()
| Method Detail |
|---|
public String getEmptyValue()
When writing, if the writer has an empty String to write to the output, the emptyValue is used instead of an empty string
public void setEmptyValue(String emptyValue)
If the writer has an empty String to write to the output, the emptyValue is used instead of an empty string
emptyValue - the String representation of an empty valuepublic RowWriterProcessor<?> getRowWriterProcessor()
RowWriterProcessor which processes input objects into a manageable format for writing.
RowWriterProcessor which processes input objects into a manageable format for writing.ObjectRowWriterProcessor,
BeanWriterProcessorpublic void setRowWriterProcessor(RowWriterProcessor<?> rowWriterProcessor)
rowWriterProcessor - the implementation of the interface RowWriterProcessor which processes input objects into a manageable format for writing.ObjectRowWriterProcessor,
BeanWriterProcessorpublic final boolean isHeaderWritingEnabled()
CommonSettings.isAutoConfigurationEnabled() evaluates to true),
the writer will invoke the AbstractWriter.writeHeaders() method automatically. In this case, attempting to explicitly write the headers will result in a TextWritingException.
Defaults to false
true if automatic header writing is enabled, otherwise false.public final void setHeaderWritingEnabled(boolean headerWritingEnabled)
CommonSettings.isAutoConfigurationEnabled() evaluates to true),
the writer will invoke the AbstractWriter.writeHeaders() method automatically. In this case, attempting to explicitly write the headers will result in a TextWritingException.
Defaults to false
headerWritingEnabled - a flag to enable or disable automatic header writing.public final boolean getExpandIncompleteRows()
null will be
introduced in column C, generating the output "V1,V2,null".
Defaults to false
public final void setExpandIncompleteRows(boolean expandIncompleteRows)
null will be
introduced in column C, generating the output "V1,V2,null".
Defaults to false
expandIncompleteRows - a flag indicating whether records with less columns than the number of headers are to be expanded with nulls.protected void addConfiguration(Map<String,Object> out)
addConfiguration in class CommonSettings<F extends Format>protected void configureFromAnnotations(Class<?> beanClass)
beanClass - the classes whose annotations will be processed to derive configurations for writing.protected CommonWriterSettings clone(boolean clearInputSpecificSettings)
CommonSettingsclearInputSpecificSettings flag is set to true
clone in class CommonSettings<F extends Format>clearInputSpecificSettings - flag indicating whether to clear settings that are likely to be associated with a given input.
protected CommonWriterSettings clone()
CommonSettingsCommonSettings.clone(boolean) method to reset properties that are
specific to a given input, such as header names and selection of fields.
clone in class CommonSettings<F extends Format>protected void clearInputSpecificSettings()
CommonSettings
clearInputSpecificSettings in class CommonSettings<F extends Format>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||