[Thread Prev][Thread Next][Index]

Re: How to category?



Joe,

Thanks for the response.

So, it looks to me that the filter only factors on the name attribute of dataset tag  for apply-dataset case (and the name attribute of variable tag for apply-variable case). Is that right ? If that is true, then the filter function is quite limited.

Is it possible that we can use XPath expression or something like that that to catch the dataset/variable for category?

Bob
 

Joe McLean wrote:

Hi Bob,

Bob Yu wrote:

 
 
Hi  there,

when using <category> tag to catalogy the datasets, I have difficulties to list the dataset for what I wanted. My basic question is that the filter tag  such as <filter action="" contains="NOAA-CIRES" /> will get all the datasets that contains string "NOAA-CIRES" INSIDE the dataset tag ( such as <mydataset name="NOAA-CIRES SST">) , or INSIDE and UNDERNEATH the <mydataset> element?

INSIDE and UNDERNEATH do not factor into the filter.  The dataset name attribute and the variable name attribute are the only text strings involved in a filtering process at this time.

<filter action="" contains="NOAA-CIRES" /> will get all datasets with "NOAA-CIRES" as a substring of the dataset name.
<filter action="" equals="NOAA-CIRES" /> will get all datasets with "NOAA-CIRES" as the exact dataset name.

<filter action="" contains="SST" /> will get all variables with "SST" as a substring of the variable name.
<filter action="" equals="SST" /> will get all variables with "SST" as the exact variable name.

 In my practise, I tried to get this dataset:
 
<mydataset name="sea surafce Temp >
     <institution name="NOAA-CIRES ... " ....>
    ....
</mydataset>
The institution tag is not factored into the filter.

Say you have two datasets with the institution above and example XML config below.

 <mydataset name="sea surface Temp collection">
      <institution name="NOAA-CIRES ... " ....>
      [...]
 </mydataset>
 <myotherdset name="salinity obs collection">
      <institution name="NOAA-CIRES ... " ....>
      [...]
  </myotherdset>

You would need a category XML structure like:

<las_categories>
    <category name="By Serving Institutes">
        <category name="NOAA-CIRES Climate Diagnostics Center">

           <category name="sea surface Temp" doc="http://somedoc">
               <filter action=""  equals="sea surface Temp collection"/>
           </category>

            <category name="salinity" doc="http://somedoc">
               <filter action=""  equals="salinity obs collection"/>
           </category>

        <category/>
    </category>
</las_categories>
 
 

 
using the above filter. However I could not get the dataset listed.

Anyone has more experience on it for help?

Thanks.

Bob
----------------------------------------


Hope this helps,

Joe McLean
------------------------------------------

 

My test category.xml is like this:

<las_categories>
    <category name="By Serving Institutes">
        <category name="NOAA-CIRES Climate Diagnostics Center">
           <filter action=""  contains="NOAA-CIRES"/>
       </category>

       <category name="FSU COAPS">
           <filter action=""  contains="FSU"/>
       </category>

       <category name="GFDL, NOAA">
           <filter action=""  contains="GFDL"/>
       </category>

        <category name="IPRC-SOEST">
            <filter action=""  contains="IPRC-SOEST"/>
       </category>

        <category name="University of Hawaii Sea Level Center">
            <filter action=""  contains="Hawaii"/>
        </category>

        <category name="GSFC 971, NASA">
            <filter action=""  contains="My test institute"/>
        </category>
    </category>
</las_categories>
 

-- 
(Bob) Yunyue YU
Code 971, Goddard Space Flight Center
Greenbelt, MD 20771
(301)614-6850  yuy@nemo.gsfc.nasa.gov
 
-- 
(Bob) Yunyue YU
Code 971, Goddard Space Flight Center
Greenbelt, MD 20771
(301)614-6850  yuy@nemo.gsfc.nasa.gov
 
[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement