public abstract class ACustomOutputHandler extends Object implements IOutputHandler
OXPathExtractionNode
.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_WRAPPER_ID |
Modifier | Constructor and Description |
---|---|
protected |
ACustomOutputHandler()
Only one value is allowed per attribute
|
protected |
ACustomOutputHandler(boolean allowMultipleValuesPerAttribute) |
protected |
ACustomOutputHandler(String wrapperId,
boolean allowMultipleValuesPerAttribute) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
getAllowMultipleValuesPerAttribute() |
protected Set<String> |
getAttributesSeenPerTuple() |
List<Throwable> |
getOuterExceptions() |
String |
getOuterExceptionStackTracesAsString() |
String |
getWrapperId() |
boolean |
hasOuterException() |
boolean |
isEndNodeReceived() |
protected void |
logInfo(String message,
org.slf4j.Logger logger)
Helper function: Log message with wrapper id attached
|
void |
processNode(OXPathExtractionNode node)
The OXPath engine invokes this method to output extraction nodes.
|
protected abstract void |
processNodeImpl(OXPathExtractionNode node) |
void |
receiveOuterException(Throwable e)
This method is called by the OXPath engine if the exception affecting the output has been received.
|
public static final String DEFAULT_WRAPPER_ID
protected ACustomOutputHandler()
protected ACustomOutputHandler(boolean allowMultipleValuesPerAttribute)
allowMultipleValuesPerAttribute
- true: multiple values are allowed per attributeprotected ACustomOutputHandler(String wrapperId, boolean allowMultipleValuesPerAttribute)
wrapperId
- The ID of the execution.allowMultipleValuesPerAttribute
- true: multiple values are allowed per attributepublic boolean isEndNodeReceived()
isEndNodeReceived
in interface IOutputHandler
protected boolean getAllowMultipleValuesPerAttribute()
public void processNode(OXPathExtractionNode node)
IAbstractOutputHandler
<result>
node, the root. The last node is the "end node".processNode
in interface IAbstractOutputHandler
protected abstract void processNodeImpl(OXPathExtractionNode node)
public String getWrapperId()
getWrapperId
in interface IOutputHandler
public void receiveOuterException(Throwable e)
IAbstractOutputHandler
receiveOuterException
in interface IAbstractOutputHandler
public boolean hasOuterException()
hasOuterException
in interface IAbstractOutputHandler
public List<Throwable> getOuterExceptions()
getOuterExceptions
in interface IOutputHandler
public String getOuterExceptionStackTracesAsString()
getOuterExceptionStackTracesAsString
in interface IOutputHandler
protected void logInfo(String message, org.slf4j.Logger logger)
string
- Copyright © 2020 OXPath Team. All rights reserved.