|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectthredds.crawlabledataset.CrawlableDatasetFile
public class CrawlableDatasetFile
An implementation of CrawlableDataset where the dataset being represented is a local file (java.io.File).
The constructor extends the allowed form of a CrawlableDataset path to allow file paths to be given in their native formats including Unix (/my/file), Windows (c:\my\file), and UNC file paths (\\myhost\my\file). However, the resulting CrawlableDataset path is normalized to conform to the allowed form of the CrawlableDataset path.
This is the default implementation of CrawlableDataset used by CrawlableDatasetFactory if the class name handed to the createCrawlableDataset() method is null.
| Constructor Summary | |
|---|---|
CrawlableDatasetFile(File file)
|
|
CrawlableDatasetFile(String path,
Object configObj)
Constructor required by CrawlableDatasetFactory. |
|
| Method Summary | |
|---|---|
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)
A factory method for getting a descendant of this datasets. |
File |
getFile()
Provide access to the java.io.File that this CrawlableDataset represents. |
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. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CrawlableDatasetFile(String path,
Object configObj)
path - the path of the CrawlableDataset being constructed.configObj - the configuration object required by CrawlableDatasetFactory; it is ignored.public CrawlableDatasetFile(File file)
| Method Detail |
|---|
public File getFile()
public Object getConfigObject()
CrawlableDataset
getConfigObject in interface CrawlableDatasetpublic String getPath()
CrawlableDataset
getPath in interface CrawlableDatasetpublic String getName()
CrawlableDataset
getName in interface CrawlableDatasetpublic boolean exists()
CrawlableDataset
exists in interface CrawlableDatasetpublic boolean isCollection()
CrawlableDataset
isCollection in interface CrawlableDatasetpublic CrawlableDataset getDescendant(String relativePath)
CrawlableDataset
getDescendant in interface CrawlableDatasetrelativePath - the path relative to this dataset of the requested dataset.
public List<CrawlableDataset> listDatasets()
throws IOException
CrawlableDataset
listDatasets in interface CrawlableDatasetIOException - if an I/O error occurs while accessing the children datasets.
public List<CrawlableDataset> listDatasets(CrawlableDatasetFilter filter)
throws IOException
CrawlableDataset
listDatasets in interface CrawlableDatasetfilter - a CrawlableDataset filter (if null, accept all datasets).
IOException - if an I/O error occurs while accessing the children datasets.public CrawlableDataset getParentDataset()
CrawlableDataset
getParentDataset in interface CrawlableDatasetpublic long length()
CrawlableDataset
length in interface CrawlableDatasetpublic Date lastModified()
CrawlableDataset
lastModified in interface CrawlableDatasetpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||