Class EmitDataImpl
java.lang.Object
org.apache.tika.pipes.core.emitter.EmitDataImpl
- All Implemented Interfaces:
EmitData
-
Constructor Summary
ConstructorsConstructorDescriptionEmitDataImpl(String emitKey, List<Metadata> metadataList) EmitDataImpl(String emitKey, List<Metadata> metadataList, String containerStackTrace) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Raw UTF-8 content bytes, set only when the request opted in viacontent-bytes-configunderParseMode.CONTENT_ONLY; the metadata then no longer carriesTIKA_CONTENT.longGets the ParseContext.voidInverse of the content-bytes move: puts the content back inTIKA_CONTENTfor consumers that only read the metadata list (e.g. a regular Emitter).voidsetContentBytes(byte[] contentBytes) voidsetParseContext(ParseContext parseContext) Sets the ParseContext.toString()
-
Constructor Details
-
EmitDataImpl
-
EmitDataImpl
-
-
Method Details
-
getEmitKey
- Specified by:
getEmitKeyin interfaceEmitData
-
getMetadataList
- Specified by:
getMetadataListin interfaceEmitData
-
getContainerStackTrace
- Specified by:
getContainerStackTracein interfaceEmitData
-
getContentBytes
public byte[] getContentBytes()Description copied from interface:EmitDataRaw UTF-8 content bytes, set only when the request opted in viacontent-bytes-configunderParseMode.CONTENT_ONLY; the metadata then no longer carriesTIKA_CONTENT. Null otherwise.- Specified by:
getContentBytesin interfaceEmitData
-
setContentBytes
public void setContentBytes(byte[] contentBytes) -
restoreContentFromBytes
public void restoreContentFromBytes()Inverse of the content-bytes move: puts the content back inTIKA_CONTENTfor consumers that only read the metadata list (e.g. a regular Emitter). No-op when there are no content bytes or the metadata already carries content. -
getEstimatedSizeBytes
public long getEstimatedSizeBytes()- Specified by:
getEstimatedSizeBytesin interfaceEmitData
-
getParseContext
Gets the ParseContext. This is not serialized - it's set by PipesClient after deserialization from the original FetchEmitTuple.- Specified by:
getParseContextin interfaceEmitData
-
setParseContext
Sets the ParseContext. Called by PipesClient after deserialization to restore the ParseContext from the original FetchEmitTuple. -
toString
-