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