thredds.catalog
Class CrawlableCatalog

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

public class CrawlableCatalog
extends java.lang.Object
implements thredds.crawlabledataset.CrawlableDataset

Since:
Aug 10, 2007
Author:
caron

Constructor Summary
CrawlableCatalog(java.lang.String catalogURL, java.lang.Object configObj)
          Constructor.
 
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).
 thredds.crawlabledataset.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.
 thredds.crawlabledataset.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<thredds.crawlabledataset.CrawlableDataset> listDatasets()
          Returns the list of CrawlableDatasets contained in this collection dataset.
 java.util.List<thredds.crawlabledataset.CrawlableDataset> listDatasets(thredds.crawlabledataset.CrawlableDatasetFilter filter)
          Returns the list of CrawlableDatasets contained in this collection dataset that satisfy the given filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrawlableCatalog

public CrawlableCatalog(java.lang.String catalogURL,
                        java.lang.Object configObj)
Constructor.

Parameters:
catalogURL - the catalog URL
configObj - a JDOM Element, example:
    
      OPENDAP
    
  
Method Detail

getConfigObject

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

Specified by:
getConfigObject in interface thredds.crawlabledataset.CrawlableDataset
Returns:
the configuration Object (can be null).

getPath

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

Specified by:
getPath in interface thredds.crawlabledataset.CrawlableDataset
Returns:
the dataset path.

getName

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

Specified by:
getName in interface thredds.crawlabledataset.CrawlableDataset
Returns:
the dataset name, i.e., the last part of the dataset path.

getParentDataset

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

Specified by:
getParentDataset in interface thredds.crawlabledataset.CrawlableDataset
Returns:
the parent CrawlableDataset or null if this dataset has no parent.

exists

public boolean exists()
Description copied from interface: thredds.crawlabledataset.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 thredds.crawlabledataset.CrawlableDataset
Returns:
true if the dataset represented by this CrawlableDataset actually exists.

isCollection

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

Specified by:
isCollection in interface thredds.crawlabledataset.CrawlableDataset
Returns:
true if the dataset is a collection dataset.

getDescendant

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

Specified by:
getDescendant in interface thredds.crawlabledataset.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<thredds.crawlabledataset.CrawlableDataset> listDatasets()
                                                                       throws java.io.IOException
Description copied from interface: thredds.crawlabledataset.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 thredds.crawlabledataset.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<thredds.crawlabledataset.CrawlableDataset> listDatasets(thredds.crawlabledataset.CrawlableDatasetFilter filter)
                                                                       throws java.io.IOException
Description copied from interface: thredds.crawlabledataset.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 thredds.crawlabledataset.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.

length

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

Specified by:
length in interface thredds.crawlabledataset.CrawlableDataset
Returns:
the size in bytes of the dataset, -1 if unknown.

lastModified

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

Specified by:
lastModified in interface thredds.crawlabledataset.CrawlableDataset
Returns:
the date the dataset was last modified, null if unknown.