Changeset 2302


Ignore:
Timestamp:
20/03/07 12:59:12 (12 years ago)
Author:
ko23
Message:

Corrected DIF output query (Related_URLs)

Location:
TI07-MOLES/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/DIF/XQuery/NDG-DIF.xquery

    r2291 r2302  
    1111        exists('moles:dgDataEntity')  
    1212        and moles:dgMetadataID/moles:schemeIdentifier='NDG-B0'  
    13         and moles:dgMetadataID/moles:repositoryIdentifier=$repositoryIdentifier] 
     13        and moles:dgMetadataID/moles:repositoryIdentifier=$repositoryIdentifier 
    1414        and moles:dgMetadataID/moles:localIdentifier=$localIdentifier] 
    1515        return 
     
    234234                        }, 
    235235        element Summary {string($DE/moles:dgMetadataDescription/moles:abstract/moles:abstractText)}, 
    236         element Related_URL  { 
    237             element URL_Content_Type {'NDG_B_SERVICE'}, 
    238             element URL {data($DE/moles:dgMetadataID/moles:repositoryIdentifier)}, 
    239             element Description {'The NDG service for browsing metadata.'} 
    240             }, 
    241236        for $DG in $DE/moles:dgDataEntity/moles:dgDataGranule 
    242237            return 
     
    291286            return 
    292287                    element Related_URL { 
    293                             element URL {data($RelURL_Desc)}, 
    294                             element Description {concat(data($RelURL_Desc/moles:name), ' - ', data($RelURL_Desc/moles:notes))}               
     288                    if (exist($RelURL_Desc/dgSimpleLink)) then 
     289                    element URL {data($RelURL_Desc/dgSimpleLink/URI)}, 
     290                    element Description {concat(data($RelURL_Desc/dgSimpleLink/moles:name), ' - ', data($RelURL_Desc/dgSimpleLink/moles:notes))} 
     291                    else () 
    295292                         }, 
    296293        element Metadata_Name {'[CEOS IDN DIF]'}, 
  • TI07-MOLES/trunk/PythonCode/wsgi/ndg_xqueries.py

    r2269 r2302  
    15271527    and moles:dgMetadataID/moles:repositoryIdentifier=$repositoryIdentifier 
    15281528    and moles:dgMetadataID/moles:localIdentifier=$localIdentifier] 
    1529 return 
     1529    return 
    15301530element DIF { 
    15311531    attribute xsi:schemaLocation {'http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/ http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/dif_v9.4.xsd'}, 
     
    15471547        element Dataset_Title {string($DE/moles:name)} 
    15481548    }, 
    1549     for $StructuredKeyword in ($DE//(moles:dgStructuredKeyword | moles:dgStdParameterMeasured)[(voclib:spot-vocab($voclib:gcmd_science_valids, moles:dgValidTermID/moles:ParentListID) or voclib:spot-vocab($voclib:gcmd_science_valids_correct, moles:dgValidTermID/moles:ParentListID))]) 
     1549    for $StructuredKeyword in ($DE//(moles:dgStructuredKeyword | moles:dgStdParameterMeasured)[(voclib:spot-vocab($voclib:gcmd_science_valids, moles:dgValidTermID/moles:ParentListID) or voclib:spot-vocab($voclib:gcmd_science_valids_correct, moles:dgValidTermID/moles:ParentListID) or voclib:spot-vocab($voclib:gcmd_science_valids_categories, moles:dgValidTermID/moles:ParentListID))] 
     1550    ) 
    15501551        return if (exists($StructuredKeyword/*/moles:dgValidTerm)) then  
    15511552            element Parameters { 
     
    16141615            }, 
    16151616    for $Location in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage//moles:dgArea[voclib:spot-vocab($voclib:gcmd_location_valids, moles:dgValidTermID/moles:ParentListID)]) 
    1616         return element Location {$Location},  
     1617        return element Location {data($Location/moles:dgValidTerm)},  
    16171618    for $DepAct in ($DE/moles:dgDataEntity/moles:RelatedDeployment/moles:ActivityID) 
    16181619    return  
     
    17471748                        }, 
    17481749    element Summary {string($DE/moles:dgMetadataDescription/moles:abstract/moles:abstractText)}, 
    1749     element Related_URL  { 
    1750         element URL_Content_Type {'NDG_B_SERVICE'}, 
    1751         element URL {data($DE/moles:dgMetadataID/moles:repositoryIdentifier)}, 
    1752         element Description {'The NDG service for browsing metadata.'} 
    1753         }, 
    17541750    for $DG in $DE/moles:dgDataEntity/moles:dgDataGranule 
    17551751        return 
     
    18041800        return 
    18051801                       element Related_URL { 
    1806                              element URL {data($RelURL_Desc)}, 
    1807                          element Description {concat(data($RelURL_Desc/moles:name), ' - ', data($RelURL_Desc/moles:notes))}            
     1802                       if (exists($RelURL_Desc/dgSimpleLink)) then ( 
     1803                       element URL {data($RelURL_Desc/dgSimpleLink/URI)}, 
     1804                       element Description {concat(data($RelURL_Desc/dgSimpleLink/moles:name), ' - ', data($RelURL_Desc/dgSimpleLink/moles:notes))} 
     1805                       ) 
     1806                       else () 
    18081807                       }, 
    18091808    element Metadata_Name {'[CEOS IDN DIF]'}, 
Note: See TracChangeset for help on using the changeset viewer.