Re: datasetNamer: using DodsAttrib

Hi Mark,

Mark A Ohrenschall wrote:
> 
> Yes I do, and yes you are right. Here are the top few lines from the generated
> catalog:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE catalog SYSTEM 
> "http://www.unidata.ucar.edu/projects/THREDDS/xml/InvCatalog.0.6.dtd";>
> <catalog xmlns="http://www.unidata.ucar.edu/thredds"; 
> xmlns:xlink="http://www.w3.org/1999/xlink"; name="my data" version="0.6">
>   <dataset name="SAA netCDF Products" dataType="Grid">
>     <service name="DODSserver" serviceType="DODS" 
> base="http://panther.ngdc.noaa.gov/cgi-bin/dods/nph-dods/dods/"; />
>     <dataset name="dir sst50" serviceName="DODSserver">
>       <dataset name="SST 50 KM FIELD" 
> urlPath="saa/Products/netcdf/sst50/19990313.cdf" />
>       <dataset name="SST 50 KM FIELD" 
> urlPath="saa/Products/netcdf/sst50/19990403.cdf" />
>       <dataset name="SST 50 KM FIELD" 
> urlPath="saa/Products/netcdf/sst50/19990501.cdf" />
>       <dataset name="SST 50 KM FIELD" 
> urlPath="saa/Products/netcdf/sst50/19990601.cdf" />
> 
> and an excerpt from the configuration file:
> 
> <datasetSource name="ds source" type="Local" structure="DirTree" 
> accessPoint="/data/www/html/dods/saa/Products/netcdf/">
>   <resultService name="DODSserver" serviceType="DODS" 
> base="http://panther.ngdc.noaa.gov/cgi-bin/dods/nph-dods/dods/"; 
> accessPointHeader="/data/www/html/dods/"/>
>   <datasetNamer name="netCDF namer" type="DodsAttrib" addLevel="false" 
> attribName="title" attribContainer="NC_GLOBAL"/>
>   <datasetNamer name="dir namer" type="RegExp" addLevel="false" 
> matchPattern="\/([^\/]+)$" substitutePattern="dir $1"/>
>   <datasetFilter name="My Test" type="RegExp" matchPattern="\/.+\.cdf$"/>
> </datasetSource>
> 
> Since I'm getting the error message about dataset is not DODS accessible but
> the (directory-level) dataset is still getting named (using the "dir namer"
> datasetNamer) does that mean the catalog generator is first applying "netCDF
> namer" with failure, and then applying "dir namer?" How is the datasetFilter
> element being used?

Yes, for each dataset, it goes through the namers until it finds a namer that
works (returns a string rather than a null). 

As the catalog generator is crawling, it checks each possible dataset with all
the datasetFilters to see if any of the filters "accept" the current dataset. If
so, the dataset is added to the catalog. The filters are currently not applied
to the directories but perhaps they should be. Once the crawling is done and the
catalog structure is built, the namers are applied to each dataset.

> Thanks again for all your help and advice.

No problem. Hope this is helpful.

Ethan

-- 
Ethan R. Davis                       Telephone: (303) 497-8155
Software Engineer                    Fax:       (303) 497-8690
UCAR Unidata Program Center          E-mail:    edavis@xxxxxxxx
P.O. Box 3000
Boulder, CO  80307-3000              http://www.unidata.ucar.edu/

  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: