public class RecStreamOutputHandler extends ACustomOutputHandler implements IStreaming
Modifier and Type | Class and Description |
---|---|
static interface |
RecStreamOutputHandler.IFilter<T> |
IStreaming.IStreamCloser, IStreaming.IStreamProcessor<T>
Modifier and Type | Field and Description |
---|---|
static RecStreamOutputHandler.IFilter<Record> |
EMPTY_RECORD_FILTER |
static String |
ID_LABEL_DEFAULT |
DEFAULT_WRAPPER_ID
Constructor and Description |
---|
RecStreamOutputHandler(boolean allowMultipleValuesPerAttribute,
String entity,
String[] attributes,
IStreaming.IStreamProcessor<Record> proc,
boolean includeId,
int initId,
RecStreamOutputHandler.IFilter<String> valFilter,
RecStreamOutputHandler.IFilter<Record> recFilter) |
RecStreamOutputHandler(String wrapperId,
boolean allowMultipleValuesPerAttribute,
String entity,
String[] attributes,
IStreaming.IStreamProcessor<Record> proc,
boolean includeId,
int initId,
RecStreamOutputHandler.IFilter<String> valFilter,
RecStreamOutputHandler.IFilter<Record> recFilter) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAttributes() |
Record |
getAttributesAsRecord() |
String |
getIdLabel() |
Record |
getLastRecord()
Get last received record
|
Integer |
getLastRecordId()
Get last received record's ID
|
IStreaming.IStreamCloser |
getStreamCloser() |
protected void |
processNodeImpl(OXPathExtractionNode node) |
getAllowMultipleValuesPerAttribute, getAttributesSeenPerTuple, getOuterExceptions, getOuterExceptionStackTracesAsString, getWrapperId, hasOuterException, isEndNodeReceived, logInfo, processNode, receiveOuterException
public static final String ID_LABEL_DEFAULT
public static RecStreamOutputHandler.IFilter<Record> EMPTY_RECORD_FILTER
public RecStreamOutputHandler(boolean allowMultipleValuesPerAttribute, String entity, String[] attributes, IStreaming.IStreamProcessor<Record> proc, boolean includeId, int initId, RecStreamOutputHandler.IFilter<String> valFilter, RecStreamOutputHandler.IFilter<Record> recFilter)
allowMultipleValuesPerAttribute
- true: multiple values are allowed per attributeentity
- the name of the entityattributes
- attributes to be serialisedproc
- callback function for processing streamed recordsvalFilter
- a function for filtering values (can be null)recFilter
- a function for filtering records (can be null)includeId
- true: the id is to be included into the resultinitId
- initial id used for recordspublic RecStreamOutputHandler(String wrapperId, boolean allowMultipleValuesPerAttribute, String entity, String[] attributes, IStreaming.IStreamProcessor<Record> proc, boolean includeId, int initId, RecStreamOutputHandler.IFilter<String> valFilter, RecStreamOutputHandler.IFilter<Record> recFilter)
wrapperId
- allowMultipleValuesPerAttribute
- true: multiple values are allowed per attributeentity
- the name of the entityattributes
- attributes to be serialisedproc
- callback function for processing streamed recordsvalFilter
- a function for filtering values (can be null)recFilter
- a function for filtering records (can be null)includeId
- true: the id is to be included into the resultinitId
- initial id used for recordspublic String getIdLabel()
public Record getAttributesAsRecord()
protected void processNodeImpl(OXPathExtractionNode node)
processNodeImpl
in class ACustomOutputHandler
public Record getLastRecord()
public Integer getLastRecordId()
public IStreaming.IStreamCloser getStreamCloser()
getStreamCloser
in interface IStreaming
Copyright © 2020 OXPath Team. All rights reserved.