thredds.crawlabledataset
Class CrawlableDatasetDods

java.lang.Object
  extended by thredds.crawlabledataset.CrawlableDatasetDods
All Implemented Interfaces:
CrawlableDataset

public class CrawlableDatasetDods
extends java.lang.Object
implements CrawlableDataset

A description

Since:
Jun 8, 2005 15:34:04 -0600
Author:
Ethan Davis, Bas Retsios

Constructor Summary
protected CrawlableDatasetDods()
           
protected CrawlableDatasetDods(java.lang.String path, java.lang.Object configObj)
           
 
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.
 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.
 java.net.URI getUri()
          Provide access to the java.net.URI that this CrawlableDataset represents.
 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 listDatasets()
          Returns the list of CrawlableDatasets contained in this collection dataset.
 java.util.List listDatasets(CrawlableDatasetFilter filter)
          Returns the list of CrawlableDatasets contained in this collection dataset that satisfy the given filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrawlableDatasetDods

protected CrawlableDatasetDods()

CrawlableDatasetDods

protected CrawlableDatasetDods(java.lang.String path,
                               java.lang.Object configObj)
Method Detail

getUri

public java.net.URI getUri()
Provide access to the java.net.URI that this CrawlableDataset represents.

Returns:
the java.net.URI that this CrawlableDataset represents.

getConfigObject

public java.lang.Object getConfigObject()
Description copied from interface: CrawlableDataset
Return the configuration Object (can be null).

Specified by:
getConfigObject in interface CrawlableDataset

getPath

public java.lang.String getPath()
Description copied from interface: CrawlableDataset
Returns the dataset path.

Specified by:
getPath in interface CrawlableDataset

getName

public java.lang.String getName()
Description copied from interface: CrawlableDataset
Returns the dataset name, i.e., the last part of the dataset path.

Specified by:
getName in interface CrawlableDataset

isCollection

public boolean isCollection()
Description copied from interface: CrawlableDataset
Return true if the dataset is a collection dataset.

Specified by:
isCollection in interface CrawlableDataset

getDescendant

public CrawlableDataset getDescendant(java.lang.String relativePath)
Description copied from interface: CrawlableDataset
A factory method for getting a descendant of this datasets.

Specified by:
getDescendant in interface CrawlableDataset
Parameters:
relativePath - the path relative to this dataset of the requested dataset.
Returns:
the requested descendant of this dataset.

listDatasets

public java.util.List listDatasets()
                            throws java.io.IOException
Description copied from interface: CrawlableDataset
Returns 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:
listDatasets in interface CrawlableDataset
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:
java.io.IOException - if an I/O error occurs while accessing the children datasets.

listDatasets

public java.util.List listDatasets(CrawlableDatasetFilter filter)
                            throws java.io.IOException
Description copied from interface: CrawlableDataset
Returns 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:
listDatasets in interface CrawlableDataset
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:
java.io.IOException - if an I/O error occurs while accessing the children datasets.

getParentDataset

public CrawlableDataset getParentDataset()
Description copied from interface: CrawlableDataset
Returns the parent CrawlableDataset or null if this dataset has no parent.

Specified by:
getParentDataset in interface CrawlableDataset

exists

public boolean exists()
Description copied from interface: CrawlableDataset
Return true if the dataset represented by this CrawlableDataset actually exists, null if it does not or an I/O error occurs.

Specified by:
exists in interface CrawlableDataset
Returns:
true if the dataset represented by this CrawlableDataset actually exists.

length

public long length()
Description copied from interface: CrawlableDataset
Returns the size in bytes of the dataset, -1 if unknown.

Specified by:
length in interface CrawlableDataset

lastModified

public java.util.Date lastModified()
Description copied from interface: CrawlableDataset
Returns the date the dataset was last modified, null if unknown.

Specified by:
lastModified in interface CrawlableDataset