public interface FieldDelimiterSpecifier extends RecordSeparatorSpecifier
Examples of such files are CSV and TSV files.
Modifier and Type | Method and Description |
---|---|
boolean |
getAutoDiscoverDelimiter()
Indicates whether automated field delimiter discovery
is configured.
|
boolean |
getAutoDiscoverSeparator()
Indicates whether automated field separator discovery
is configured.
|
String |
getFieldEndDelimiter()
Returns the end of field delimiter.
|
String |
getFieldSeparator()
Returns the delimiter used to distinguish field boundaries.
|
String |
getFieldStartDelimiter()
Returns the start of field delimiter.
|
void |
set(FieldDelimiterSpecifier source)
Copies the settings from the given structure specifier.
|
void |
setAutoDiscoverDelimiter(boolean enabled)
Sets whether automated field delimiter discovery is configured.
|
void |
setAutoDiscoverSeparator(boolean enabled)
Sets whether automated field separator discovery is configured.
|
void |
setFieldDelimiter(String delimiter)
Sets the delimiter used to denote the boundaries of a data field.
|
void |
setFieldEndDelimiter(String delimiter)
Sets the delimiter used to denote the end of a data field.
|
void |
setFieldSeparator(String separator)
Sets the delimiter used to define the boundary between data fields.
|
void |
setFieldStartDelimiter(String delimiter)
Sets the delimiter used to denote the beginning of a data field.
|
getAutoDiscoverNewline, getRecordSeparator, set, setAutoDiscoverNewline, setRecordSeparator
void set(FieldDelimiterSpecifier source)
source
- field data specifier containing the desired settingsString getFieldSeparator()
void setFieldSeparator(String separator)
separator
- string used to separate fieldsInvalidPropertyValueException
- if the delimiter is
null
or the empty stringboolean getAutoDiscoverSeparator()
true
if field separator discovery is enabled,
false
otherwise.void setAutoDiscoverSeparator(boolean enabled)
Only a small set of common separators are considered when
attempting to discover the field separator. Those considered
are: comma (','
), semi-colon (';'
),
tab ('\t'
), pipe ('|'
), and space (' '
).
This option is enabled by default. If a field separator is explicitly specified, separator discovery is disabled.
enabled
- indicates whether to discover the field separator
character.setFieldSeparator(String)
String getFieldEndDelimiter()
String getFieldStartDelimiter()
void setFieldDelimiter(String delimiter)
This method is generally equivalent to calling
setFieldStartDelimiter()
and setFieldEndDelimiter()
with the same parameter values. However, those methods do not
allow the empty string as a parameter.
delimiter
- string used to optionally mark the start and end
of a field value. An empty string indicates field values are not
delimited.InvalidPropertyValueException
- if the delimiter is
null
void setFieldStartDelimiter(String delimiter)
setFieldDelimiter(String)
instead to indicate no
delimiters.delimiter
- string used to mark the start of a field valueInvalidPropertyValueException
- if the delimiter is
null
or the empty stringvoid setFieldEndDelimiter(String delimiter)
setFieldDelimiter(String)
instead to indicate no
delimiters.delimiter
- string used to mark the start of a field valueInvalidPropertyValueException
- if the delimiter is
null
or the empty stringboolean getAutoDiscoverDelimiter()
true
if field separator discovery is enabled,
false
otherwise.void setAutoDiscoverDelimiter(boolean enabled)
Only double quote ("
) and single quote ('
)
are considered as possible delimiters. To be chosen,
the delimiter must appear in the sample. If neither
is appropriate (or if both seem appropriate) for the sample,
the text is assumed to be undelimited.
This option is enabled by default. If a field delimiter is explicitly specified, delimiter discovery is disabled.
enabled
- indicates whether to discover the field delimiter
character.setFieldDelimiter(String)
Copyright © 2024 Actian Corporation. All rights reserved.