TDS Catalogs


TDS is configured with configuration catalogs that live in the directory ${tomcat_home}/content/thredds/. These usually contain some information needed only on the server, which is removed when the TDS sends the catalog to the client.

Configuration Catalogs

The default root catalog is ${tomcat_home}/content/thredds/catalog.xml. It may reference other configuration catalogs using the catalogRef element. These catalogs can also contain catalogRef elements, etc. If you want to serve other catalogs that are not linked to the root catalog, then declare them in ${tomcat_home}/content/thredds/threddsConfig.xml. The set of configuration catalogs is found by traversing all the root catalogs. This is the set of configuration catalogs, aka static catalogs.

The catalogRef element looks like:

<catalogRef xlink:href="idd/models.xml" xlink:title="NCEP Model Data" name="" />

The xlink:href attribute names the referenced catalog; it must be reletive to the catalog it is contained in. In this example, it would be in the subdirectory idd under the directory of the catalog containing it . You can also use ".." to name peer directories:

<catalogRef xlink:href="../idv/ncep.xml" xlink:title="IDV NCEP Model Data" name="" />

in this example, if the catalog is ${tomcat_home}/content/thredds/idd/models.xml, then the referenced catalog is ${tomcat_home}/content/thredds/idv/ncep.xml

You can also use a relative URL that begins with / (a slash):

<catalogRef xlink:href="/galeon/wcs/test.xml" xlink:title="GALEON Test Data" name="" />

which points to the catalog at ${tomcat_home}/content/thredds/galeon/wcs/test.xml no matter what catalog it appears in. Note that the base directory is ${tomcat_home}/content/thredds/, and that all configuration catalogs must live under it.

Catalog Caching

Static catalogs are read and cached in memory when the TDS web application starts up (e.g. when Tomcat starts up). The expires attribute can be used to decide whether to reread the catalog. If no expires attribute, the catalog is not automatically reread:

You can also force a reread of the configuration catalogs (without having to restart TDS) through the Reinitialize command in TDS Remote Management.

Dynamic Catalogs

Dynamic catalogs are generated by DatasetScan elements, at the time the user request is made. These catalogs are not cached. The request casuses a single disk directory to be read. Files in the directory (that pass the filter) are made into dataset elements. Any subdirectories are made into catalogRef elements, and are not read until a request is made for them.

A DatasetScan actually refers to a generalization of a disk directory called a CrawlableDataset. This allows dynamic catalogs to be generated for other kinds of resources, such as OPeNDAP servers. However, the usual case is that a DatasetScan has a CrawlableDataset that is just a wrapper around a disk directory.



This document is maintained by John Caron and was last updated on July 26, 2007