Class GCSEmitter
java.lang.Object
org.apache.tika.pipes.emitter.AbstractEmitter
org.apache.tika.pipes.emitter.gcs.GCSEmitter
- All Implemented Interfaces:
Initializable
,Emitter
,StreamEmitter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkInitialization
(InitializableProblemHandler problemHandler) void
emit
(String path, InputStream is, Metadata userMetadata) void
Requires the src-bucket/path/to/my/file.txt in theTikaCoreProperties.SOURCE_PATH
.void
initialize
(Map<String, Param> params) This initializes the gcs client.void
void
setFileExtension
(String fileExtension) If you want to customize the output file's file extension.void
void
setProjectId
(String projectId) Methods inherited from class org.apache.tika.pipes.emitter.AbstractEmitter
emit, getName, setName
-
Constructor Details
-
GCSEmitter
public GCSEmitter()
-
-
Method Details
-
emit
public void emit(String emitKey, List<Metadata> metadataList) throws IOException, TikaEmitterException Requires the src-bucket/path/to/my/file.txt in theTikaCoreProperties.SOURCE_PATH
.- Specified by:
emit
in interfaceEmitter
- Parameters:
metadataList
-- Throws:
IOException
TikaException
TikaEmitterException
-
emit
public void emit(String path, InputStream is, Metadata userMetadata) throws IOException, TikaEmitterException - Specified by:
emit
in interfaceStreamEmitter
- Parameters:
path
- -- object path, not including the bucketis
- inputStream to copyuserMetadata
- this will be written to the s3 ObjectMetadata's userMetadata- Throws:
TikaEmitterException
- or IOexception if there is a Runtime s3 client exceptionIOException
-
setProjectId
-
setBucket
-
setPrefix
-
setFileExtension
If you want to customize the output file's file extension. Do not include the "."- Parameters:
fileExtension
-
-
initialize
This initializes the gcs client.- Specified by:
initialize
in interfaceInitializable
- Parameters:
params
- params to use for initialization- Throws:
TikaConfigException
-
checkInitialization
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
checkInitialization
in interfaceInitializable
- Parameters:
problemHandler
- if there is a problem and no custom initializableProblemHandler has been configured via Initializable parameters, this is called to respond.- Throws:
TikaConfigException
-