Class GCSFetcher
- java.lang.Object
-
- org.apache.tika.pipes.fetcher.AbstractFetcher
-
- org.apache.tika.pipes.fetcher.gcs.GCSFetcher
-
- All Implemented Interfaces:
Initializable,Fetcher
public class GCSFetcher extends AbstractFetcher implements Initializable
Fetches files from google cloud storage. Must set projectId and bucket via the config.
-
-
Constructor Summary
Constructors Constructor Description GCSFetcher()GCSFetcher(GCSFetcherConfig gcsFetcherConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckInitialization(InitializableProblemHandler problemHandler)InputStreamfetch(String fetchKey, Metadata metadata, ParseContext parseContext)voidinitialize(Map<String,Param> params)This initializes the gcs storage client.voidsetBucket(String bucket)voidsetExtractUserMetadata(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 Detail
-
GCSFetcher
public GCSFetcher()
-
GCSFetcher
public GCSFetcher(GCSFetcherConfig gcsFetcherConfig)
-
-
Method Detail
-
fetch
public InputStream fetch(String fetchKey, Metadata metadata, ParseContext parseContext) throws TikaException, IOException
- Specified by:
fetchin interfaceFetcher- Throws:
TikaExceptionIOException
-
setSpoolToTemp
@Field public void setSpoolToTemp(boolean spoolToTemp)
-
setExtractUserMetadata
@Field public void setExtractUserMetadata(boolean extractUserMetadata)
Whether or not to extract user metadata from the S3Object- Parameters:
extractUserMetadata-
-
initialize
public void initialize(Map<String,Param> params) throws TikaConfigException
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
-
-