Package org.apache.tika.pipes.fetcher
Class FetcherManager
- java.lang.Object
-
- org.apache.tika.config.ConfigBase
-
- org.apache.tika.pipes.fetcher.FetcherManager
-
public class FetcherManager extends ConfigBase
Utility class to hold multiple fetchers.This forbids multiple fetchers supporting the same name.
-
-
Constructor Summary
Constructors Constructor Description FetcherManager(List<Fetcher> fetchers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Fetcher
getFetcher()
Convenience method that returns a fetcher if only one fetcher is specified in the tika-config file.Fetcher
getFetcher(String fetcherName)
Set<String>
getSupported()
static FetcherManager
load(Path p)
-
Methods inherited from class org.apache.tika.config.ConfigBase
buildComposite, buildComposite, buildSingle, buildSingle, configure, handleSettings
-
-
-
-
Constructor Detail
-
FetcherManager
public FetcherManager(List<Fetcher> fetchers) throws TikaConfigException
- Throws:
TikaConfigException
-
-
Method Detail
-
load
public static FetcherManager load(Path p) throws IOException, TikaConfigException
- Throws:
IOException
TikaConfigException
-
getFetcher
public Fetcher getFetcher(String fetcherName) throws IOException, TikaException
- Throws:
IOException
TikaException
-
getFetcher
public Fetcher getFetcher()
Convenience method that returns a fetcher if only one fetcher is specified in the tika-config file. If 0 or > 1 fetchers are specified, this throws an IllegalArgumentException.- Returns:
-
-