public class ThreddsCatalogUtil
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ThreddsCatalogUtil.SERVICE |
class |
ThreddsCatalogUtil.threddsCrawlerEnumeration
Implements a modified depth-first traversal of a thredds catalog.
|
| Constructor and Description |
|---|
ThreddsCatalogUtil()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
crawlTest(java.io.PrintStream ps,
java.lang.String catalogURLString,
boolean recurse) |
java.util.Enumeration<java.lang.String> |
getCatalogEnumeration(java.lang.String topCatalog)
Crawl a thredds catalog.
|
java.util.Vector<java.lang.String> |
getCatalogRefURLs(java.lang.String catalogUrlString,
boolean recurse)
Returns all of the THREDDS catalog URLs contained in the THREDDS catalog
located at the passed URL.
|
java.util.Enumeration<java.lang.String> |
getCatalogURLs(java.lang.String topCatalog)
Crawl a collection of thredds catalogs using a Enumeration.
|
java.util.Vector<java.lang.String> |
getDataAccessURLs(java.lang.String catalogUrlString,
ThreddsCatalogUtil.SERVICE service,
boolean recurse)
Returns a vector of data access URIs from The THREDDS catalog located at
the URL contained in the passed parameter String
catalogUrlString. |
java.util.Vector<org.jdom.Document> |
getDDXDocuments(java.lang.String catalogUrlString,
boolean recurse) |
java.util.Vector<org.jdom.Element> |
getDDXRootElements(java.lang.String catalogUrlString,
boolean recurse) |
java.util.Vector<java.lang.String> |
getDDXUrls(java.lang.String catalogUrlString,
boolean recurse) |
static java.lang.String |
getUrlInfo(java.net.URL url) |
static void |
main(java.lang.String[] args) |
void |
printDDXDocuments(java.io.PrintStream ps,
java.lang.String catalogUrlString,
boolean recurse) |
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionpublic void crawlTest(java.io.PrintStream ps,
java.lang.String catalogURLString,
boolean recurse)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void printDDXDocuments(java.io.PrintStream ps,
java.lang.String catalogUrlString,
boolean recurse)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic java.util.Vector<org.jdom.Element> getDDXRootElements(java.lang.String catalogUrlString,
boolean recurse)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic java.util.Vector<org.jdom.Document> getDDXDocuments(java.lang.String catalogUrlString,
boolean recurse)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic java.util.Vector<java.lang.String> getDDXUrls(java.lang.String catalogUrlString,
boolean recurse)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic java.util.Vector<java.lang.String> getCatalogRefURLs(java.lang.String catalogUrlString,
boolean recurse)
throws java.lang.InterruptedException
catalogUrlString - The URL from where the catalog was retrieved.recurse - If true the code will recursively descend into all of the
child catalogs and return all the contained catalog URLs. Be
Careful!catalogUrlString is 'bad' (e.g., the
server returns a 404 response), then the Vectorjava.lang.InterruptedExceptionpublic java.util.Enumeration<java.lang.String> getCatalogEnumeration(java.lang.String topCatalog)
throws java.lang.InterruptedException
topCatalog - The THREDDS catalog that will serve as the root nodejava.lang.Exception - Thrown if the cache cannot be configuredjava.lang.InterruptedExceptionpublic java.util.Enumeration<java.lang.String> getCatalogURLs(java.lang.String topCatalog)
throws java.lang.InterruptedException
topCatalog - The THREDDS Catalog to serve as the root nodejava.lang.Exception - Thrown if the cache cannot be configuredjava.lang.InterruptedExceptionpublic static java.lang.String getUrlInfo(java.net.URL url)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic java.util.Vector<java.lang.String> getDataAccessURLs(java.lang.String catalogUrlString,
ThreddsCatalogUtil.SERVICE service,
boolean recurse)
throws java.lang.InterruptedException
catalogUrlString.catalogUrlString - The THREDDS catalog to crawl.service - The SERVICE whose data access URLs you wish to get.recurse - Controls recursion. A value of True will cause the software to
recursively traverse the catalog (via thredds:catalogRef
elements) in search of data access URLs.catalogUrlString is 'bad' (e.g., the
server returns a 404 response), then the Vectorjava.lang.InterruptedException