Package thredds.cataloggen
Class DatasetScanCatalogBuilder
- java.lang.Object
-
- thredds.cataloggen.DatasetScanCatalogBuilder
-
- All Implemented Interfaces:
CatalogBuilder
public class DatasetScanCatalogBuilder extends Object implements CatalogBuilder
Build a catalog from one or more single level catalogs produced by CollectionScanners.- Since:
- Aug 2, 2005T3:16:37 PM
-
-
Constructor Summary
Constructors Constructor Description DatasetScanCatalogBuilder(InvDatasetScan datasetScan, CrawlableDataset collectionCrDs, InvService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvCatalogImplgenerateCatalog(CrawlableDataset catalogCrDs)Return an InvCatalog for the level in the collection hierarchy specified by catalogPath.org.jdom2.DocumentgenerateCatalogAsDocument(CrawlableDataset catalogCrDs)Return a JDOM Document representation of the catalog for the level in the collection hierarchy specified by catalogPath.StringgenerateCatalogAsString(CrawlableDataset catalogCrDs)Return a String containing the XML representation of the catalog for the level in the collection hierarchy specified by catalogPath.InvCatalogImplgenerateProxyDsResolverCatalog(CrawlableDataset catalogCrDs, ProxyDatasetHandler pdh)Generate the catalog for a resolver request of the given ProxyDatasetHandler.CrawlableDatasetrequestCrawlableDataset(String path)Return the CrawlableDataset for the given path, null if this CatalogBuilder does not allow the requested CrawlableDataset.
-
-
-
Constructor Detail
-
DatasetScanCatalogBuilder
public DatasetScanCatalogBuilder(InvDatasetScan datasetScan, CrawlableDataset collectionCrDs, InvService service)
-
-
Method Detail
-
requestCrawlableDataset
public CrawlableDataset requestCrawlableDataset(String path) throws IOException
Description copied from interface:CatalogBuilderReturn 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.
- Specified by:
requestCrawlableDatasetin interfaceCatalogBuilder- 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
public InvCatalogImpl generateCatalog(CrawlableDataset catalogCrDs) throws IOException
Description copied from interface:CatalogBuilderReturn an InvCatalog for the level in the collection hierarchy specified by catalogPath.- Specified by:
generateCatalogin interfaceCatalogBuilder- 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
public InvCatalogImpl generateProxyDsResolverCatalog(CrawlableDataset catalogCrDs, ProxyDatasetHandler pdh) throws IOException
Description copied from interface:CatalogBuilderGenerate 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.- Specified by:
generateProxyDsResolverCatalogin interfaceCatalogBuilder- 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:
IOException
-
generateCatalogAsDocument
public org.jdom2.Document generateCatalogAsDocument(CrawlableDataset catalogCrDs) throws IOException
Description copied from interface:CatalogBuilderReturn a JDOM Document representation of the catalog for the level in the collection hierarchy specified by catalogPath.- Specified by:
generateCatalogAsDocumentin interfaceCatalogBuilder- 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
public String generateCatalogAsString(CrawlableDataset catalogCrDs) throws IOException
Description copied from interface:CatalogBuilderReturn a String containing the XML representation of the catalog for the level in the collection hierarchy specified by catalogPath.- Specified by:
generateCatalogAsStringin interfaceCatalogBuilder- 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.
-
-