Package thredds.catalog
Class CrawlableCatalog
- java.lang.Object
-
- thredds.catalog.CrawlableCatalog
-
- All Implemented Interfaces:
CrawlableDataset
public class CrawlableCatalog extends Object implements CrawlableDataset
A CrawlableDataset from a THREDDS catalog.- Since:
- Aug 10, 2007
-
-
Constructor Summary
Constructors Constructor Description CrawlableCatalog(String catalogURL, Object configObj)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists()Return true if the dataset represented by this CrawlableDataset actually exists, null if it does not or an I/O error occurs.ObjectgetConfigObject()Return the configuration Object (can be null).CrawlableDatasetgetDescendant(String relativePath)Return the requested descendant of this dataset.StringgetName()Returns the dataset name, i.e., the last part of the dataset path.CrawlableDatasetgetParentDataset()Returns the parent CrawlableDataset or null if this dataset has no parent.StringgetPath()Returns the dataset path.booleanisCollection()Return true if the dataset is a collection dataset.DatelastModified()Returns the date the dataset was last modified, null if unknown.longlength()Returns the size in bytes of the dataset, -1 if unknown.List<CrawlableDataset>listDatasets()Returns the list of CrawlableDatasets contained in this collection dataset.List<CrawlableDataset>listDatasets(CrawlableDatasetFilter filter)Returns the list of CrawlableDatasets contained in this collection dataset that satisfy the given filter.
-
-
-
Method Detail
-
getConfigObject
public Object getConfigObject()
Description copied from interface:CrawlableDatasetReturn the configuration Object (can be null).- Specified by:
getConfigObjectin interfaceCrawlableDataset- Returns:
- the configuration Object (can be null).
-
getPath
public String getPath()
Description copied from interface:CrawlableDatasetReturns the dataset path.- Specified by:
getPathin interfaceCrawlableDataset- Returns:
- the dataset path.
-
getName
public String getName()
Description copied from interface:CrawlableDatasetReturns the dataset name, i.e., the last part of the dataset path.- Specified by:
getNamein interfaceCrawlableDataset- Returns:
- the dataset name, i.e., the last part of the dataset path.
-
getParentDataset
public CrawlableDataset getParentDataset()
Description copied from interface:CrawlableDatasetReturns the parent CrawlableDataset or null if this dataset has no parent.- Specified by:
getParentDatasetin interfaceCrawlableDataset- Returns:
- the parent CrawlableDataset or null if this dataset has no parent.
-
exists
public boolean exists()
Description copied from interface:CrawlableDatasetReturn true if the dataset represented by this CrawlableDataset actually exists, null if it does not or an I/O error occurs.- Specified by:
existsin interfaceCrawlableDataset- Returns:
- true if the dataset represented by this CrawlableDataset actually exists.
-
isCollection
public boolean isCollection()
Description copied from interface:CrawlableDatasetReturn true if the dataset is a collection dataset.- Specified by:
isCollectionin interfaceCrawlableDataset- Returns:
- true if the dataset is a collection dataset.
-
getDescendant
public CrawlableDataset getDescendant(String relativePath)
Description copied from interface:CrawlableDatasetReturn the requested descendant of this dataset.- Specified by:
getDescendantin interfaceCrawlableDataset- Parameters:
relativePath- the path, relative to this dataset, of the requested dataset.- Returns:
- the requested descendant of this dataset.
-
listDatasets
public List<CrawlableDataset> listDatasets() throws IOException
Description copied from interface:CrawlableDatasetReturns the list of CrawlableDatasets contained in this collection dataset. The returned list will be empty if this collection dataset does not contain any children datasets. If this dataset is not a collection dataset, this method returns null.- Specified by:
listDatasetsin interfaceCrawlableDataset- Returns:
- Returns a list of the CrawlableDatasets contained in this collection dataset. The llist will be empty if no datasets are contained in this collection dataset.
- Throws:
IOException- if an I/O error occurs while accessing the children datasets.
-
listDatasets
public List<CrawlableDataset> listDatasets(CrawlableDatasetFilter filter) throws IOException
Description copied from interface:CrawlableDatasetReturns the list of CrawlableDatasets contained in this collection dataset that satisfy the given filter. The returned list will be empty if this collection dataset does not contain any children datasets that satisfy the given filter.- Specified by:
listDatasetsin interfaceCrawlableDataset- Parameters:
filter- a CrawlableDataset filter (if null, accept all datasets).- Returns:
- Returns a list of the CrawlableDatasets contained in this collection dataset that satisfy the given filter. The list will be empty if no datasets are contained in this collection dataset.
- Throws:
IOException- if an I/O error occurs while accessing the children datasets.
-
length
public long length()
Description copied from interface:CrawlableDatasetReturns the size in bytes of the dataset, -1 if unknown.- Specified by:
lengthin interfaceCrawlableDataset- Returns:
- the size in bytes of the dataset, -1 if unknown.
-
lastModified
public Date lastModified()
Description copied from interface:CrawlableDatasetReturns the date the dataset was last modified, null if unknown.- Specified by:
lastModifiedin interfaceCrawlableDataset- Returns:
- the date the dataset was last modified, null if unknown.
-
-