Class AZBlobFetcher
java.lang.Object
org.apache.tika.plugins.AbstractTikaExtension
org.apache.tika.pipes.fetcher.azblob.AZBlobFetcher
- All Implemented Interfaces:
Fetcher,TikaExtension,org.pf4j.ExtensionPoint
Fetches files from Azure blob storage.
There are two modes: 1) If you are only using one endpoint and one sas token and one container, configure those in the config file. In this case, your fetchKey will be the path in the container to the blob. 2) If you have different endpoints or sas tokens or containers across your requests, your fetchKey will be the complete SAS url pointing to the blob.
-
Field Summary
Fields inherited from class org.apache.tika.plugins.AbstractTikaExtension
pluginConfig -
Method Summary
Modifier and TypeMethodDescriptionstatic AZBlobFetcherbuild(ExtensionConfig extensionConfig) fetch(String fetchKey, Metadata metadata, ParseContext parseContext) Fetches a resource and returns it as a TikaInputStream.Methods inherited from class org.apache.tika.plugins.AbstractTikaExtension
getExtensionConfigMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tika.plugins.TikaExtension
getExtensionConfig
-
Method Details
-
build
public static AZBlobFetcher build(ExtensionConfig extensionConfig) throws IOException, TikaConfigException - Throws:
IOExceptionTikaConfigException
-
fetch
public TikaInputStream fetch(String fetchKey, Metadata metadata, ParseContext parseContext) throws TikaException, IOException Description copied from interface:FetcherFetches a resource and returns it as a TikaInputStream.- Specified by:
fetchin interfaceFetcher- Parameters:
fetchKey- the key identifying the resource to fetch (interpretation depends on the implementation, e.g., file path, URL, S3 key)metadata- metadata object to be updated with resource informationparseContext- the parse context- Returns:
- a TikaInputStream for reading the resource content
- Throws:
TikaException- if a Tika-specific error occurs during fetchingIOException- if an I/O error occurs during fetching
-