public class ProcessingResult extends Object implements Serializable
A ProcessingResult at a minimum contains the result Code of a document processing step. The ProcessingResult may contain an
arbitrary status message. Additionally a ProcessingResult may contain new auxiliary messages (
ProcessingResult#addMessage(PlatformMessage)
or new documents derived from the processing step (
ProcessingResult#addDocument(IngestDocument)
.
Generally a processing step will only set a Code however more complex stages such as those that process archive files may produce new documents and messages.
Modifier and Type | Class and Description |
---|---|
static class |
ProcessingResult.Data |
static class |
ProcessingResult.DocData |
static class |
ProcessingResult.MsgData |
Constructor and Description |
---|
ProcessingResult()
Convenience constructor.
|
ProcessingResult(UUID clientId,
String component)
Creates a new Processing result.
|
public ProcessingResult()
This form should only be used when it will be merged with another result which has the clientId and component set.
public static String formatError(ErrorCode error, String message)
message
for error
.@Deprecated public void created(PlatformMessage pm)
public void drop(PlatformMessage pm)
public void drop(PlatformMessage pm, ErrorCode errorCode, Throwable t)
public void drop(PlatformMessage pm, ErrorCode errorCode, String msg)
public void drop(PlatformMessage pm, ErrorCode errorCode, Throwable t, String msg)
public void fail(PlatformMessage pm, ErrorCode errorCode, String msg)
public void fail(PlatformMessage pm, Throwable t)
public void fail(PlatformMessage pm, AttivioException ex)
public void fail(PlatformMessage pm, ErrorCode errorCode, Throwable t, String msg)
public void warn(PlatformMessage pm, ErrorCode errorCode, Throwable t, String msg)
public void notHandled(PlatformMessage pm)
public void notHandled(PlatformMessage pm, ErrorCode errorCode, Throwable t)
public void completed(PlatformMessage pm)
public void debug(IngestDocument doc, String msg)
public void drop(IngestDocument doc)
public void drop(IngestDocument doc, ErrorCode errorCode)
public void drop(IngestDocument doc, String msg)
public void lost(IngestDocument doc)
public void drop(IngestDocument doc, Throwable t)
public void notHandled(IngestDocument doc)
public void error(IngestDocument doc, Throwable e, String msg)
public void warn(IngestDocument doc, Throwable e)
public void warn(IngestDocument doc, Throwable e, String msg, Object... args)
public void warn(IngestDocument doc, ErrorCode errorCode, String msg, Object... args)
public void warn(IngestDocument doc, ErrorCode defaultErrorCode, Throwable e, String msg)
public void fail(IngestDocument doc)
public void fail(IngestDocument doc, String msg)
public void fail(IngestDocument doc, Throwable e)
public void fail(IngestDocument doc, ErrorCode errorCode, Throwable e)
public void fail(IngestDocument doc, ErrorCode defaultErrorCode, Throwable e, String msg)
public void completed(IngestDocument doc)
public void reset()
public void merge(ProcessingResult pr)
public void addDocumentData(ProcessingResult.DocData dd)
public void addMessageData(ProcessingResult.MsgData md)
public UUID getClientId()
public void setClientId(UUID value)
public String getComponent()
public List<ProcessingResult.MsgData> getMsgData()
public List<ProcessingResult.DocData> getDocData()
public ProcessingResultCode getCode(String docId)
ProcessingResultCode
.docId
- docId
in the results or ProcessingResultCode.OK
.public void add(ProcessingResult.DocData dd)
public void setCurrentDocument(IngestDocument currentDocument)
null
in place of the document, the currentDocument
is used. The currentDocument
is cleared
when the reset()
method is called.
A null
parameter sets the current values to null
.
currentDocument
- may be nullCopyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.