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 void
checkInitialization(InitializableProblemHandler problemHandler)
InputStream
fetch(String fetchKey, Metadata metadata, ParseContext parseContext)
void
initialize(Map<String,Param> params)
This initializes the gcs storage client.void
setBucket(String bucket)
void
setExtractUserMetadata(boolean extractUserMetadata)
Whether or not to extract user metadata from the S3Objectvoid
setProjectId(String projectId)
void
setSpoolToTemp(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:
fetch
in interfaceFetcher
- Throws:
TikaException
IOException
-
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:
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
-
-