public class CatalogCrawler
extends java.lang.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,
java.io.PrintWriter out,
java.lang.Object context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
crawl(Catalog cat)
Crawl a catalog thats already been opened.
|
int |
crawl(java.lang.String catUrl)
Open a catalog and crawl (depth first) all the datasets in it.
|
int |
getNumReadFailures() |
static void |
main(java.lang.String[] args) |
java.lang.String |
toString() |
public CatalogCrawler(CatalogCrawler.Type type, int max, CatalogCrawler.Filter filter, CatalogCrawler.Listener listen, CancelTask task, java.io.PrintWriter out, java.lang.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(java.lang.String catUrl)
throws java.io.IOException
catUrl - url of catalog to open (xml, not html)java.io.IOExceptionpublic int crawl(Catalog cat) throws java.io.IOException
cat - the catalogjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic int getNumReadFailures()
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception