Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi Nathan, Nathan Potter wrote: > > Ethan, > > Is it allowed for a dataset to have the serviceName and/or the urlPath > specified as child elements? (I think the answer is yes to serviceName > and no to urlPath) That is correct. There is a "serviceName" element; there is no "urlPath" element. > Examples: > > <dataset name="level2_b" ID="nc/level2_b.nc" > > <serviceName>s2</serviceName> > <urlPath>nc/level2b_.nc</urlPath> > </dataset> > > > <dataset name="level2_b" urlPath="nc/level2_b.nc" ID="nc/level2_b.nc" > > <serviceName>s2</serviceName> > </dataset> > > > <dataset name="level2_b" serviceName="s2" ID="nc/level2_b.nc" > > <urlPath>nc/level2b_.nc</urlPath> > </dataset> > > > > Is it allowed for a dataset to have both a serviceName/urlPath pair as > attributes AND as child elements? > If so, which has priority? (My guess is that none of these are allowed) The XML Schema does not expressly forbid a dataset having both a "serviceName" child element and a "serviceName" attribute. However, the "serviceName" attribute is documented as deprecated in both the schema and the specification document: http://www.unidata.ucar.edu/projects/THREDDS/tech/catalog/v1.0.2/InvCatalogSpec.html#dataset So, we don't write datasets that use the "serviceName" attribute but we don't choke when reading a dataset with the attribute or both the attribute and element (our code uses the element if it is avialable). > Examples: > > <dataset name="level2_b" serviceName="s2" urlPath="nc/level2_b.nc" > ID="nc/level2_b.nc" > > <serviceName>s3</serviceName> > </dataset> > > > <dataset name="level2_b" serviceName="s2" urlPath="nc/level2_b.nc" > ID="nc/level2_b.nc" > > <serviceName>s3</serviceName> > <urlPath>data/level2b_.nc</urlPath> > </dataset> > > <dataset name="level2_b" serviceName="s2" urlPath="nc/level2_b.nc" > ID="nc/level2_b.nc" > > <urlPath>data/examples/level2b_.nc</urlPath> > </dataset> > > > Is a dataset allowed to have a serviceName/urlPathr via inheritance, > attribute, or children and also have access element children? Yes. > If so are there rules about precedence? Is it cumulative? It is cumulative. A dataset can have multiple access methods. That is, a dataset can define multiple service/urlPath combinations that each define a service type and an access URL. Each access method provides access to the same dataset. There are two ways for a dataset to define its access methods: 1) The dataset's "urlPath" attribute value is combined with the dataset's "default" service [*]. If that service is a "Compound" service, this results in multiple access methods/URLs. 2) Each child "access" element results in a single access method/URL. A dataset can have any number of "access" elements; the service referenced by an "access" element can be a "Compound" service. [If the "access" element does not include a "serviceName" attribute, the dataset's "default" service [*] is used.] [*] By "default" service, I mean the service named by the highest precedence local or inherited "serviceName" value. Precedence: 1) Local a) child "serviceName" element (XPath: "./serviceName") b) child "serviceName" element of a child "metadata" element (XPath: "./metadata/serviceName") c) "serviceName" attribute (XPath: "@serviceName") 2) Inherited: - the closest ancestor "dataset" with an inherited metadata that contains a serviceName element (XPath-ish: the first item in the set given by "ancestor::dataset/metadata[@inherited=true]/serviceName") Some examples and more details (though, without the precedence discussion, yet) are given in the "Dataset Access Methods" section of the catalog spec document: http://www.unidata.ucar.edu/projects/THREDDS/tech/catalog/v1.0.2/InvCatalogSpec.html#Dataset_Access_Methods > Examples: > > <dataset name="level1" ID="degenerate examples"> > > <metadata inherited='true'> > <serviceName>s1</serviceName> > </metadata> > > <dataset name="level2_a" urlPath="nc/level2_a.nc" ID="nc/level2_a.nc"> > <access serviceName="s2" urlPath="nc/level2_a" dataFormat="NetCDF" /> > </dataset> > > <dataset name="level2_b" serviceName="s2" urlPath="nc/level2_b.nc" > ID="nc/level2_b.nc" > > <access serviceName="s3" urlPath="nc/level2_a" dataFormat="NetCDF" /> > </dataset> > > <dataset name="level2_b" urlPath="nc/level2_b.nc" ID="nc/level2_b.nc" > > <serviceName>s2</serviceName> > <access serviceName="s3" urlPath="nc/level2_a" dataFormat="NetCDF" /> > </dataset> > > </dataset> > > > > > Thanks for all of your help with this! No problem. Hope I didn't muddy the waters even more. Ethan > > > N > > > = = = > Nathan Potter ndp at opendap.org > OPeNDAP, Inc. +1.541.231.3317
thredds
archives: