Class GCSEmitter
java.lang.Object
org.apache.tika.pipes.emitter.AbstractEmitter
org.apache.tika.pipes.emitter.gcs.GCSEmitter
- All Implemented Interfaces:
org.apache.tika.config.Initializable,org.apache.tika.pipes.emitter.Emitter,org.apache.tika.pipes.emitter.StreamEmitter
public class GCSEmitter
extends org.apache.tika.pipes.emitter.AbstractEmitter
implements org.apache.tika.config.Initializable, org.apache.tika.pipes.emitter.StreamEmitter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckInitialization(org.apache.tika.config.InitializableProblemHandler problemHandler) voidemit(String path, InputStream is, org.apache.tika.metadata.Metadata userMetadata, org.apache.tika.parser.ParseContext parseContext) voidemit(String emitKey, List<org.apache.tika.metadata.Metadata> metadataList, org.apache.tika.parser.ParseContext parseContext) Requires the src-bucket/path/to/my/file.txt in theTikaCoreProperties.SOURCE_PATH.voidinitialize(Map<String, org.apache.tika.config.Param> params) This initializes the gcs client.voidvoidsetFileExtension(String fileExtension) If you want to customize the output file's file extension.voidvoidsetProjectId(String projectId) Methods inherited from class org.apache.tika.pipes.emitter.AbstractEmitter
emit, getName, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tika.pipes.emitter.Emitter
emit, getName
-
Constructor Details
-
GCSEmitter
public GCSEmitter()
-
-
Method Details
-
emit
public void emit(String emitKey, List<org.apache.tika.metadata.Metadata> metadataList, org.apache.tika.parser.ParseContext parseContext) throws IOException, org.apache.tika.pipes.emitter.TikaEmitterException Requires the src-bucket/path/to/my/file.txt in theTikaCoreProperties.SOURCE_PATH.- Specified by:
emitin interfaceorg.apache.tika.pipes.emitter.Emitter- Parameters:
metadataList-- Throws:
IOExceptionorg.apache.tika.exception.TikaExceptionorg.apache.tika.pipes.emitter.TikaEmitterException
-
emit
public void emit(String path, InputStream is, org.apache.tika.metadata.Metadata userMetadata, org.apache.tika.parser.ParseContext parseContext) throws IOException, org.apache.tika.pipes.emitter.TikaEmitterException - Specified by:
emitin interfaceorg.apache.tika.pipes.emitter.StreamEmitter- Parameters:
path- -- object path, not including the bucketis- inputStream to copyuserMetadata- this will be written to the s3 ObjectMetadata's userMetadata- Throws:
org.apache.tika.pipes.emitter.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
public void initialize(Map<String, org.apache.tika.config.Param> params) throws org.apache.tika.exception.TikaConfigExceptionThis initializes the gcs client.- Specified by:
initializein interfaceorg.apache.tika.config.Initializable- Parameters:
params- params to use for initialization- Throws:
org.apache.tika.exception.TikaConfigException
-
checkInitialization
public void checkInitialization(org.apache.tika.config.InitializableProblemHandler problemHandler) throws org.apache.tika.exception.TikaConfigException - Specified by:
checkInitializationin interfaceorg.apache.tika.config.Initializable- Throws:
org.apache.tika.exception.TikaConfigException
-