public class CrawlableDatasetFactory
extends java.lang.Object
Constructor and Description |
---|
CrawlableDatasetFactory() |
Modifier and Type | Method and Description |
---|---|
static CrawlableDataset |
createCrawlableDataset(java.lang.String path,
java.lang.String className,
java.lang.Object configObj)
Construct a CrawlableDataset for the given path using the
CrawlableDataset implementation indicated by the given class name.
|
static java.lang.String |
normalizePath(java.lang.String path)
Normalize the given path so that it can be used in the creation of a CrawlableDataset.
|
public static CrawlableDataset createCrawlableDataset(java.lang.String path, java.lang.String className, java.lang.Object configObj) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.InstantiationException, java.lang.IllegalArgumentException, java.lang.NullPointerException
path
- the path of the CrawlableDataset.className
- the class name of the CrawlableDataset implementation to instantiate.configObj
- java.io.IOException
- if a CrawlableDataset cannot be created due to IO problems.java.lang.ClassNotFoundException
- if the given CrawlableDataset implementation was not found.java.lang.NoSuchMethodException
- if the given CrawlableDataset implementation does not have a constructor with a single String parameter which is required.java.lang.IllegalAccessException
- if the constructor is inaccessible due to Java language access control.java.lang.reflect.InvocationTargetException
- if the constructor throws an exception.java.lang.InstantiationException
- if the given CrawlableDataset implementation is an abstract class.java.lang.NullPointerException
- if the given path is null.java.lang.IllegalArgumentException
- if the given class name is not an implementation of CrawlableDataset.public static java.lang.String normalizePath(java.lang.String path)
path
- the path to be normalized.java.lang.NullPointerException
- if path is null.