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 separated 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.
|
java.lang.Object |
getConfigObject()
Return the configuration Object (can be null).
|
CrawlableDataset |
getDescendant(java.lang.String relativePath)
Return the requested descendant of this dataset.
|
java.lang.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.
|
java.lang.String |
getPath()
Returns the dataset path.
|
boolean |
isCollection()
Return true if the dataset is a collection dataset.
|
java.util.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.
|
java.util.List<CrawlableDataset> |
listDatasets()
Returns the list of CrawlableDatasets contained in this collection dataset.
|
java.util.List<CrawlableDataset> |
listDatasets(CrawlableDatasetFilter filter)
Returns the list of CrawlableDatasets contained in this collection dataset
that satisfy the given filter.
|
java.lang.Object getConfigObject()
java.lang.String getPath()
java.lang.String getName()
CrawlableDataset getParentDataset()
boolean exists()
boolean isCollection()
CrawlableDataset getDescendant(java.lang.String relativePath)
relativePath
- the path, relative to this dataset, of the requested dataset.java.lang.IllegalArgumentException
- if the relative path is not relative (e.g., starts with a slash ("/")).java.lang.IllegalStateException
- if this dataset is not a collection, the isCollection() method should be used to
check.java.util.List<CrawlableDataset> listDatasets() throws java.io.IOException
java.io.IOException
- if an I/O error occurs while accessing the children datasets.java.lang.IllegalStateException
- if this dataset is not a collection, the isCollection() method should be used to
check.java.util.List<CrawlableDataset> listDatasets(CrawlableDatasetFilter filter) throws java.io.IOException
filter
- a CrawlableDataset filter (if null, accept all datasets).java.io.IOException
- if an I/O error occurs while accessing the children datasets.java.lang.IllegalStateException
- if this dataset is not a collection, the isCollection() method should be used to
check.long length()
java.util.Date lastModified()