public class DocumentFieldConcatenator extends AbstractSingleTextualConverter<Document,Textual>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_FIELD_SEPARATOR
The default field separator is a newline.
|
protected java.util.List<java.lang.String> |
fieldNames
The list of fields to concatenate together from a document.
|
protected java.lang.String |
fieldSeparator
The field separator.
|
| Constructor and Description |
|---|
DocumentFieldConcatenator()
Creates a new
DocumentFieldConcatenator with an empty list of
fields and a newline separator. |
DocumentFieldConcatenator(java.util.List<java.lang.String> fieldNames,
java.lang.String fieldSeparator)
Creates a new
DocumentFieldConcatenator with the given field
names and field separator. |
| Modifier and Type | Method and Description |
|---|---|
Textual |
evaluate(Document document)
Evaluates the function on the given input and returns the output.
|
java.util.List<java.lang.String> |
getFieldNames()
Gets the list of field names whose text are to be concatenated together.
|
java.lang.String |
getFieldSeparator()
Gets the string used as a separator between field text values.
|
void |
setFieldNames(java.util.List<java.lang.String> fieldNames)
Sets the list of field names whose text are to be concatenated together.
|
void |
setFieldSeparator(java.lang.String fieldSeparator)
Sets the string used as a separator between field text values.
|
convert, convertAllclonepublic static final java.lang.String DEFAULT_FIELD_SEPARATOR
protected java.util.List<java.lang.String> fieldNames
protected java.lang.String fieldSeparator
public DocumentFieldConcatenator()
DocumentFieldConcatenator with an empty list of
fields and a newline separator.public DocumentFieldConcatenator(java.util.List<java.lang.String> fieldNames,
java.lang.String fieldSeparator)
DocumentFieldConcatenator with the given field
names and field separator.fieldNames - The names of the fields to include.fieldSeparator - The field separator.public Textual evaluate(Document document)
Evaluatordocument - The input to evaluate.public java.util.List<java.lang.String> getFieldNames()
public void setFieldNames(java.util.List<java.lang.String> fieldNames)
fieldNames - The list of field names.public java.lang.String getFieldSeparator()
public void setFieldSeparator(java.lang.String fieldSeparator)
fieldSeparator - The separator between fields used in the result.