public class CatalogCrawler extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
CatalogCrawler.Filter |
static interface |
CatalogCrawler.Listener |
static class |
CatalogCrawler.Type |
| Constructor and Description |
|---|
CatalogCrawler(CatalogCrawler.Type type,
int max,
CatalogCrawler.Filter filter,
CatalogCrawler.Listener listen,
CancelTask task,
PrintWriter out,
Object context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
crawl(Catalog cat)
Crawl a catalog thats already been opened.
|
int |
crawl(String catUrl)
Open a catalog and crawl (depth first) all the datasets in it.
|
int |
getNumReadFailures() |
static void |
main(String[] args) |
String |
toString() |
public CatalogCrawler(CatalogCrawler.Type type, int max, CatalogCrawler.Filter filter, CatalogCrawler.Listener listen, CancelTask task, PrintWriter out, Object context)
type - CatalogCrawler.Typemax - if > 0, only process max datasets, then exit (random_direct_max only)filter - dont process this dataset or its descendants. may be nulllisten - each dataset gets passed to the listener. if null, send the dataset name to standard outtask - user can cancel the task (may be null)out - send status messages to here (may be null)context - caller can pass this object to Listener (eg used for thread safety)public int crawl(String catUrl) throws IOException
catUrl - url of catalog to open (xml, not html)IOExceptionpublic int crawl(Catalog cat) throws IOException
cat - the catalogIOExceptionpublic int getNumReadFailures()