public abstract class PathResolverCrawlableDataset extends java.lang.Object implements CrawlableDataset
File resolve( String path);
The path handed to the resolve() method is the relative path of the CrDs.getDescendant() method.
NOTE: The current implementation does not support crawling a hierarchy. All relative paths must resolve to a dataset file, not a directory. This means that classes derived from this may only be used behind datasetRoot elements.
| Constructor and Description |
|---|
PathResolverCrawlableDataset(java.lang.String rootDirectoryPath,
java.lang.Object configObj)
The constructor used by the TDS when creating all CrawlableDatset instances.
|
| 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)
A factory method for getting a descendant of this datasets.
|
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.String |
toString() |
public PathResolverCrawlableDataset(java.lang.String rootDirectoryPath,
java.lang.Object configObj)
NOTE: The configObj parameter is ignored by this implementation because it is not supported by datasetRoot elements in a configuration catalog.
rootDirectoryPath - the absolute path of the directory for a particular dataset root. E.g., the datasetRoot@location value.configObj - a configuration object that is ignored.public java.lang.Object getConfigObject()
CrawlableDatasetgetConfigObject in interface CrawlableDatasetpublic java.lang.String getPath()
CrawlableDatasetgetPath in interface CrawlableDatasetpublic java.lang.String getName()
CrawlableDatasetgetName in interface CrawlableDatasetpublic CrawlableDataset getParentDataset()
CrawlableDatasetgetParentDataset in interface CrawlableDatasetpublic boolean exists()
CrawlableDatasetexists in interface CrawlableDatasetpublic boolean isCollection()
CrawlableDatasetisCollection in interface CrawlableDatasetpublic CrawlableDataset getDescendant(java.lang.String relativePath)
CrawlableDatasetgetDescendant in interface CrawlableDatasetrelativePath - the path relative to this dataset of the requested dataset.public java.util.List<CrawlableDataset> listDatasets() throws java.io.IOException
CrawlableDatasetlistDatasets in interface CrawlableDatasetjava.io.IOException - if an I/O error occurs while accessing the children datasets.public java.util.List<CrawlableDataset> listDatasets(CrawlableDatasetFilter filter) throws java.io.IOException
CrawlableDatasetlistDatasets in interface CrawlableDatasetfilter - a CrawlableDataset filter (if null, accept all datasets).java.io.IOException - if an I/O error occurs while accessing the children datasets.public long length()
CrawlableDatasetlength in interface CrawlableDatasetpublic java.util.Date lastModified()
CrawlableDatasetlastModified in interface CrawlableDatasetpublic java.lang.String toString()
toString in class java.lang.Object