public class SimpleCatalogBuilder extends java.lang.Object implements CatalogBuilder
Constructor and Description |
---|
SimpleCatalogBuilder(java.lang.String collectionPath,
CrawlableDataset collectionCrDs,
java.lang.String serviceName,
java.lang.String serviceTypeName,
java.lang.String serviceURL)
Construct a SimpleCatalogBuilder for a given collection.
|
Modifier and Type | Method and Description |
---|---|
InvCatalogImpl |
generateCatalog(CrawlableDataset catalogCrDs)
Return an InvCatalog for the level in the collection hierarchy specified by catalogPath.
|
org.jdom2.Document |
generateCatalogAsDocument(CrawlableDataset catalogCrDs)
Return a JDOM Document representation of the catalog for the level in
the collection hierarchy specified by catalogPath.
|
java.lang.String |
generateCatalogAsString(CrawlableDataset catalogCrDs)
Return a String containing the XML representation of the catalog for the
level in the collection hierarchy specified by catalogPath.
|
InvCatalogImpl |
generateProxyDsResolverCatalog(CrawlableDataset catalogCrDs,
ProxyDatasetHandler pdh)
Not supported by SimpleCatalogBuilder.
|
CrawlableDataset |
requestCrawlableDataset(java.lang.String path)
Return the CrawlableDataset for the given path, null if this CatalogBuilder
does not allow the requested CrawlableDataset.
|
public SimpleCatalogBuilder(java.lang.String collectionPath, CrawlableDataset collectionCrDs, java.lang.String serviceName, java.lang.String serviceTypeName, java.lang.String serviceURL)
collectionPath
- an path for the collection to be cataloged (used as the base of the generated URL, can be an empty string or null). If null, the collectionLevel final path segment is used.collectionCrDs
- the root level of the collection to be cataloged.serviceName
- specifies the name of the service to be used in the resulting catalogs.serviceTypeName
- specifies the THREDDS service type, e.g., "OPENDAP"serviceURL
- the base URL to the servicepublic CrawlableDataset requestCrawlableDataset(java.lang.String path)
CatalogBuilder
This method can handle requests for regular datasets and proxy datasets.
requestCrawlableDataset
in interface CatalogBuilder
path
- the path of the requested CrawlableDatasetpublic InvCatalogImpl generateCatalog(CrawlableDataset catalogCrDs) throws java.io.IOException
CatalogBuilder
generateCatalog
in interface CatalogBuilder
catalogCrDs
- the location in the collection at which to generate a catalogjava.io.IOException
- if problems accessing the dataset collection.public InvCatalogImpl generateProxyDsResolverCatalog(CrawlableDataset catalogCrDs, ProxyDatasetHandler pdh) throws java.io.IOException
generateProxyDsResolverCatalog
in interface CatalogBuilder
catalogCrDs
- the location in the collection at which to generate a catalogpdh
- the ProxyDatasetHandler corresponding to the resolver request.java.io.IOException
public org.jdom2.Document generateCatalogAsDocument(CrawlableDataset catalogCrDs) throws java.io.IOException
CatalogBuilder
generateCatalogAsDocument
in interface CatalogBuilder
catalogCrDs
- the location in the collection at which to generate a catalogjava.io.IOException
- if problems accessing the dataset collection.public java.lang.String generateCatalogAsString(CrawlableDataset catalogCrDs) throws java.io.IOException
CatalogBuilder
generateCatalogAsString
in interface CatalogBuilder
catalogCrDs
- the location in the collection at which to generate a catalogjava.io.IOException
- if problems accessing the dataset collection.