public interface CrawlableDataset
The CrawlableDataset interface is a generalization (and simplification) of the java.io.File class. A CrawlableDataset path is made up of ONE or more path segments each seperated by a slash ("/"). The path may start or end with a slash ("/").
Implementation Notes:
CollectionLevelScanner uses CrawlableDatasets to scan a dataset
collection and create a THREDDS catalog.| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
Return true if the dataset represented by this CrawlableDataset actually
exists, null if it does not or an I/O error occurs.
|
Object |
getConfigObject()
Return the configuration Object (can be null).
|
CrawlableDataset |
getDescendant(String relativePath)
Return the requested descendant of this dataset.
|
String |
getName()
Returns the dataset name, i.e., the last part of the dataset path.
|
CrawlableDataset |
getParentDataset()
Returns the parent CrawlableDataset or null if this dataset has no parent.
|
String |
getPath()
Returns the dataset path.
|
boolean |
isCollection()
Return true if the dataset is a collection dataset.
|
Date |
lastModified()
Returns the date the dataset was last modified, null if unknown.
|
long |
length()
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.
|
Object getConfigObject()
String getPath()
String getName()
CrawlableDataset getParentDataset()
boolean exists()
boolean isCollection()
CrawlableDataset getDescendant(String relativePath)
relativePath - the path, relative to this dataset, of the requested dataset.IllegalArgumentException - if the relative path is not relative (e.g., starts with a slash ("/")).IllegalStateException - if this dataset is not a collection, the isCollection() method should be used to
check.List<CrawlableDataset> listDatasets() throws IOException
IOException - if an I/O error occurs while accessing the children datasets.IllegalStateException - if this dataset is not a collection, the isCollection() method should be used to
check.List<CrawlableDataset> listDatasets(CrawlableDatasetFilter filter) throws IOException
filter - a CrawlableDataset filter (if null, accept all datasets).IOException - if an I/O error occurs while accessing the children datasets.IllegalStateException - if this dataset is not a collection, the isCollection() method should be used to
check.long length()
Date lastModified()