Class GCSFetcher
java.lang.Object
org.apache.tika.pipes.fetcher.AbstractFetcher
org.apache.tika.pipes.fetcher.gcs.GCSFetcher
- All Implemented Interfaces:
Initializable,Fetcher
Fetches files from google cloud storage. Must set projectId and bucket via the config.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckInitialization(InitializableProblemHandler problemHandler) fetch(String fetchKey, Metadata metadata, ParseContext parseContext) voidinitialize(Map<String, Param> params) This initializes the gcs storage client.voidvoidsetExtractUserMetadata(boolean extractUserMetadata) Whether or not to extract user metadata from the S3ObjectvoidsetProjectId(String projectId) voidsetSpoolToTemp(boolean spoolToTemp) Methods inherited from class org.apache.tika.pipes.fetcher.AbstractFetcher
getName, setName
-
Constructor Details
-
GCSFetcher
public GCSFetcher() -
GCSFetcher
-
-
Method Details
-
fetch
public InputStream fetch(String fetchKey, Metadata metadata, ParseContext parseContext) throws TikaException, IOException - Specified by:
fetchin interfaceFetcher- Throws:
TikaExceptionIOException
-
setSpoolToTemp
-
setProjectId
-
setBucket
-
setExtractUserMetadata
Whether or not to extract user metadata from the S3Object- Parameters:
extractUserMetadata-
-
initialize
This initializes the gcs storage client.- Specified by:
initializein interfaceInitializable- Parameters:
params- params to use for initialization- Throws:
TikaConfigException
-
checkInitialization
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
checkInitializationin 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
-