Changeset 811


Ignore:
Timestamp:
21/04/06 11:02:21 (14 years ago)
Author:
ko23
Message:

Modifications from 1.02.03:

addition of Citation data type;
addition of dgPolygon2DType;
addition of dgCourse2DType;
addition of dgPoint2DType;
addition of dgDataQuality to dgDataSummary;
addition of dgDataUseNotice to dgDataQuality;
addition of dgPolygon2D to dgSpatialCoverage;
addition of dgCourse2D to dgSpatialCoverage/dgCourse;
extension of dgSecurityConditionType to allow plain English explanatory text.
requirement for a deployment to have an end date removed;
correct spelling of "principal";
correct spelling of "DataProvenance?" to "dgMetadataProvenance".

Will be tagged in a week's time (20060428) to allow time for comment.

Location:
TI07-MOLES
Files:
4 added
1 edited

Legend:

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

    r648 r811  
    1 for $DE in collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[dgDataEntity!='' and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier='repositoryID' and dgMetadataID/localIdentifier='localID'] 
     1for $DE in collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[exists('dgDataEntity') and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier='www.npm.ac.uk' and dgMetadataID/localIdentifier='recordID.0'] 
    22return 
    33        <DIF> 
     
    55        <Entry_Title>{string($DE/name)}</Entry_Title> 
    66        <Parameters> 
    7         {for $StructuredKeyword in ($DE//(dgStructuredKeyword | dgStdParameterMeasured)) 
    8                 where (($DE//(dgStructuredKeyword | dgStdParameterMeasured)/dgValidTermID/ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_parameters.html'        or $DE//(dgStructuredKeyword | dgStdParameterMeasured)/dgValidTermID/ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/projects.html') and ($DE//(dgStructuredKeyword | dgStdParameterMeasured)/ListLevel = 0)) 
     7        {for $StructuredKeyword in ($DE//(dgStructuredKeyword | dgStdParameterMeasured)[dgValidTermID/ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_parameters.html' and ListLevel = 0]) 
    98                return if (exists($StructuredKeyword/*/dgValidTerm)) then ( 
    109                <Parameter> 
    11                         {string($StructuredKeyword/*/dgValidTerm)} 
    12                         {if (exists($StructuredKeyword//dgValidSubterm) and $StructuredKeyword//dgValidSubterm != '' and $StructuredKeyword//dgValidSubterm != ' ') then ( 
     10                        <Category>{string($StructuredKeyword/*/dgValidTerm)}</Category> 
     11                        {if (exists($StructuredKeyword//dgValidSubterm)  
     12                                and $StructuredKeyword//dgValidSubterm != ''  
     13                                and $StructuredKeyword//dgValidSubterm != ' ') then ( 
    1314                        for $Subterm in $StructuredKeyword//dgValidSubterm[exists(dgValidTerm)] 
    1415                        where exists($Subterm/dgValidSubterm) 
    1516                                order by $Subterm/ListLevel 
    16                                 return concat(' &gt; ', string($Subterm/dgValidSubterm/dgValidTerm)) 
     17                                return  
     18                                        if ($Subterm/ListLevel=1) then (<Topic>{string($Subterm/dgValidSubterm/dgValidTerm)}</Topic>)  
     19                                        else ( 
     20                                        if ($Subterm/ListLevel=2) then (<Term>{string($Subterm/dgValidSubterm/dgValidTerm)}</Term>)  
     21                                        else ( 
     22                                        if ($Subterm/ListLevel=3) then (<Variable>{string($Subterm/dgValidSubterm/dgValidTerm)}</Variable>)  
     23                                        else ( 
     24                                        if ($Subterm/ListLevel=4) then (<Detailed_Variable>{string($Subterm/dgValidSubterm/dgValidTerm)}</Detailed_Variable>)  
     25                                        else (<GCMD_Science_Valid>{string($Subterm/dgValidSubterm/dgValidTerm)}</GCMD_Science_Valid>)))) 
    1726                                )        
    1827                        else()} 
     
    2231        } 
    2332        </Parameters> 
    24         <ISO_Topic_Category> 
    25         </ISO_Topic_Category> 
     33        {for $ISOTopicCategory in ($DE/dgStructuredKeyword[dgValidTermID/ParentListID='ISO 19115 Topic Category']) 
     34                return  
     35                        <ISO_Topic_Category>{$ISOTopicCategory/dgValidTerm}</ISO_Topic_Category> 
     36        } 
    2637        {for $DataCuratorRole in $DE/dgDataEntity/dgDataRoles/dgDataCurator/dgRoleHolder[not(exists(endDate)) or endDate=''] 
    2738                return  
     
    3243                                                string(concat(string($DataCuratorRoleHolder/name/initials), ' ', string($DataCuratorRoleHolder/name/familyName))) 
    3344                                else if (exists($DataCuratorRole/dgOrganisationID)) then 
    34                                         for $DataCuratorRoleHolder in collection('/db/ndg_B_metadata')/dgMetadata/dgOrganisation[(dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier=$DataCuratorRole/*/repositoryIdentifier and dgMetadataID/localIdentifier=$DataCuratorRole/*/localIdentifier)] 
     45                                        for $DataCuratorRoleHolder in collection('/db/ndg_B_metadata')/dgMetadata/dgOrganisation[(dgMetadataID/schemeIdentifier='NDG-B0'  
     46                                                and dgMetadataID/repositoryIdentifier=$DataCuratorRole/*/repositoryIdentifier  
     47                                                and dgMetadataID/localIdentifier=$DataCuratorRole/*/localIdentifier)] 
    3548                                                return  
    3649                                                string($DataCuratorRoleHolder/name) 
     
    4356        <Metadata_Version>9.4</Metadata_Version> 
    4457        </DIF> 
     58(: Stylus Studio meta-information - (c) 2004-2005. Progress Software Corporation. All rights reserved. 
     59<metaInformation> 
     60<scenarios ><scenario default="yes" name="StubB" userelativepaths="yes" externalpreview="no" url="..\..\..\..\..\..\..\My Documents\ndgBXML\ndgB.xml" outputurl="" processortype="saxon" tcpport="2233" profilemode="7" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" host="" port="8000" user="" password=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition></MapperMetaTag> 
     61</metaInformation> 
     62:) 
Note: See TracChangeset for help on using the changeset viewer.