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)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
crawl(Catalog cat,
CancelTask task,
java.io.PrintWriter out,
java.lang.Object context,
Indent indent)
Crawl a catalog thats already been opened.
|
int |
crawl(java.lang.String catUrl,
CancelTask task,
java.io.PrintWriter out,
java.lang.Object context)
Open a catalog and crawl (depth first) all the datasets in it.
|
int |
getNumReadFailures() |
java.lang.String |
toString() |
public CatalogCrawler(CatalogCrawler.Type type, int max, CatalogCrawler.Filter filter, CatalogCrawler.Listener listen)
type
- CatalogCrawler.Typemax
- return max (random_direct_max only)filter
- dont process this dataset or its descendants. may be nulllisten
- each dataset gets passed to the listenerpublic int crawl(java.lang.String catUrl, CancelTask task, java.io.PrintWriter out, java.lang.Object context) throws java.io.IOException
catUrl
- url of catalog to opentask
- user can cancel the task (may be null)out
- send status messages to here (may be null)context
- caller can pass this object in (used for thread safety)java.io.IOException
public int crawl(Catalog cat, CancelTask task, java.io.PrintWriter out, java.lang.Object context, Indent indent) throws java.io.IOException
cat
- the catalogtask
- user can cancel the task (may be null)out
- send status messages to here (may be null)context
- caller can pass this object in (used for thread safety)java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public int getNumReadFailures()