public class GCSEmitter extends AbstractEmitter implements Initializable, StreamEmitter
| Constructor and Description |
|---|
GCSEmitter() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkInitialization(InitializableProblemHandler problemHandler) |
void |
emit(String path,
InputStream is,
Metadata userMetadata) |
void |
emit(String emitKey,
List<Metadata> metadataList)
Requires the src-bucket/path/to/my/file.txt in the
TikaCoreProperties.SOURCE_PATH. |
void |
initialize(Map<String,Param> params)
This initializes the gcs client.
|
void |
setBucket(String bucket) |
void |
setFileExtension(String fileExtension)
If you want to customize the output file's file extension.
|
void |
setPrefix(String prefix) |
void |
setProjectId(String projectId) |
emit, getName, setNamepublic void emit(String emitKey, List<Metadata> metadataList) throws IOException, TikaEmitterException
TikaCoreProperties.SOURCE_PATH.emit in interface EmittermetadataList - IOExceptionTikaExceptionTikaEmitterExceptionpublic void emit(String path, InputStream is, Metadata userMetadata) throws IOException, TikaEmitterException
emit in interface StreamEmitterpath - -- object path, not including the bucketis - inputStream to copyuserMetadata - this will be written to the s3 ObjectMetadata's userMetadataTikaEmitterException - or IOexception if there is a Runtime s3 client exceptionIOException@Field public void setFileExtension(String fileExtension)
fileExtension - public void initialize(Map<String,Param> params) throws TikaConfigException
initialize in interface Initializableparams - params to use for initializationTikaConfigExceptionpublic void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException
checkInitialization in interface InitializableproblemHandler - if there is a problem and no
custom initializableProblemHandler has been configured
via Initializable parameters,
this is called to respond.TikaConfigExceptionCopyright © 2007–2022 The Apache Software Foundation. All rights reserved.