Package thredds.cataloggen
Interface CatalogBuilder
-
- All Known Implementing Classes:
DatasetScanCatalogBuilder
,SimpleCatalogBuilder
,StandardCatalogBuilder
public interface CatalogBuilder
An interface for building catalogs where each instance only builds catalogs for the dataset collection root it was setup to handle.- Since:
- Dec 6, 2005 12:09:36 PM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.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)
Generate the catalog for a resolver request of the given ProxyDatasetHandler.CrawlableDataset
requestCrawlableDataset(String path)
Return the CrawlableDataset for the given path, null if this CatalogBuilder does not allow the requested CrawlableDataset.
-
-
-
Method Detail
-
requestCrawlableDataset
CrawlableDataset requestCrawlableDataset(String path) throws IOException
Return the CrawlableDataset for the given path, null if this CatalogBuilder does not allow the requested CrawlableDataset.This method can handle requests for regular datasets and proxy datasets.
- Parameters:
path
- the path of the requested CrawlableDataset- Returns:
- the CrawlableDataset for the given path or null if the path is not allowed by this CatalogBuilder either due to filtering or due to the path not being a descendant (or self) of the collection level path.
- Throws:
IOException
- if an I/O error occurs while locating the children datasets.
-
generateCatalog
InvCatalogImpl generateCatalog(CrawlableDataset catalogCrDs) throws IOException
Return an InvCatalog for the level in the collection hierarchy specified by catalogPath.- Parameters:
catalogCrDs
- the location in the collection at which to generate a catalog- Returns:
- an InvCatalog for the specified location
- Throws:
IOException
- if problems accessing the dataset collection.
-
generateProxyDsResolverCatalog
InvCatalogImpl generateProxyDsResolverCatalog(CrawlableDataset catalogCrDs, ProxyDatasetHandler pdh) throws IOException
Generate the catalog for a resolver request of the given ProxyDatasetHandler. This method is optional, it does not need to be supported by all CatalogBuilder implementations.- Parameters:
catalogCrDs
- the location in the collection at which to generate a catalogpdh
- the ProxyDatasetHandler corresponding to the resolver request.- Returns:
- the catalog for a resolver request of the given proxy dataset.
- Throws:
IllegalArgumentException
- if the given ProxyDatasetHandler is not known by this CollectionLevelScanner.IOException
-
generateCatalogAsDocument
org.jdom2.Document generateCatalogAsDocument(CrawlableDataset catalogCrDs) throws IOException
Return a JDOM Document representation of the catalog for the level in the collection hierarchy specified by catalogPath.- Parameters:
catalogCrDs
- the location in the collection at which to generate a catalog- Returns:
- an org.jdom.Document representing the catalog for the specified location
- Throws:
IOException
- if problems accessing the dataset collection.
-
generateCatalogAsString
String generateCatalogAsString(CrawlableDataset catalogCrDs) throws IOException
Return a String containing the XML representation of the catalog for the level in the collection hierarchy specified by catalogPath.- Parameters:
catalogCrDs
- the location in the collection at which to generate a catalog- Returns:
- a String containing the XML representation of the catalog for the specified location
- Throws:
IOException
- if problems accessing the dataset collection.
-
-