@Description(value="Outputs the name and value of each literal which is received as a string. Name and value are separated by a separator string. The default separator string is a tab. If a literal name is empty, only the value will be output without a separator. The module ignores record and entity events. In particular, this means that literal names are not prefixed by the name of the entity which contains them.")
@In(value=org.metafacture.framework.StreamReceiver.class)
@Out(value=java.lang.String.class)
@FluxCommand(value="encode-literals")
public final class StreamLiteralFormatter
extends org.metafacture.framework.helpers.DefaultStreamPipe<org.metafacture.framework.ObjectReceiver<java.lang.String>>
The module ignores record and entity events. This means that literal names are not prefixed by the name of the entity which contains them.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_SEPARATOR
The default value for
setSeparator(String). |
| Constructor and Description |
|---|
StreamLiteralFormatter()
Creates an instance of
StreamLiteralFormatter. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getSeparator()
Gets the separator.
|
void |
literal(java.lang.String name,
java.lang.String value) |
void |
setSeparator(java.lang.String separator)
Sets the separator between the literal name and value.
|
endEntity, endRecord, startEntity, startRecordcloseStream, getReceiver, isClosed, onCloseStream, onResetStream, onSetReceiver, resetStream, setReceiverpublic static final java.lang.String DEFAULT_SEPARATOR
setSeparator(String).public StreamLiteralFormatter()
StreamLiteralFormatter.public void setSeparator(java.lang.String separator)
The default separator is “DEFAULT_SEPARATOR”.
The parameter can be changed at any time during processing. It becomes effective with the next literal received.
separator - the separator string.public java.lang.String getSeparator()
public void literal(java.lang.String name,
java.lang.String value)
literal in interface org.metafacture.framework.StreamReceiverliteral in class org.metafacture.framework.helpers.DefaultStreamPipe<org.metafacture.framework.ObjectReceiver<java.lang.String>>