source: TI07-MOLES/trunk/DIF/XQuery/NDG-DIF.xquery @ 811

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI07-MOLES/trunk/DIF/XQuery/NDG-DIF.xquery@811
Revision 811, 3.9 KB checked in by ko23, 14 years ago (diff)

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.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
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']
2return
3        <DIF>
4        <Entry_ID>{concat($DE/dgMetadataID/repositoryIdentifier, ':DIF:', $DE/dgMetadataID/localIdentifier)}</Entry_ID>
5        <Entry_Title>{string($DE/name)}</Entry_Title>
6        <Parameters>
7        {for $StructuredKeyword in ($DE//(dgStructuredKeyword | dgStdParameterMeasured)[dgValidTermID/ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_parameters.html' and ListLevel = 0])
8                return if (exists($StructuredKeyword/*/dgValidTerm)) then (
9                <Parameter>
10                        <Category>{string($StructuredKeyword/*/dgValidTerm)}</Category>
11                        {if (exists($StructuredKeyword//dgValidSubterm)
12                                and $StructuredKeyword//dgValidSubterm != ''
13                                and $StructuredKeyword//dgValidSubterm != ' ') then (
14                        for $Subterm in $StructuredKeyword//dgValidSubterm[exists(dgValidTerm)]
15                        where exists($Subterm/dgValidSubterm)
16                                order by $Subterm/ListLevel
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>))))
26                                )       
27                        else()}
28                </Parameter>
29                )
30                else()
31        }
32        </Parameters>
33        {for $ISOTopicCategory in ($DE/dgStructuredKeyword[dgValidTermID/ParentListID='ISO 19115 Topic Category'])
34                return
35                        <ISO_Topic_Category>{$ISOTopicCategory/dgValidTerm}</ISO_Topic_Category>
36        }
37        {for $DataCuratorRole in $DE/dgDataEntity/dgDataRoles/dgDataCurator/dgRoleHolder[not(exists(endDate)) or endDate='']
38                return
39                        <Data_Center>
40                                {if (exists($DataCuratorRole/dgPersonID)) then
41                                        for $DataCuratorRoleHolder in collection('/db/ndg_B_metadata')/dgMetadata/dgPerson[(dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier=$DataCuratorRole/*/repositoryIdentifier and dgMetadataID/localIdentifier=$DataCuratorRole/*/localIdentifier)]
42                                                return
43                                                string(concat(string($DataCuratorRoleHolder/name/initials), ' ', string($DataCuratorRoleHolder/name/familyName)))
44                                else if (exists($DataCuratorRole/dgOrganisationID)) then
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)]
48                                                return
49                                                string($DataCuratorRoleHolder/name)
50                                else ()
51                                }
52                        </Data_Center>
53                }
54        <Summary>{string($DE/dgMetadataDescription/abstract/abstractText)}</Summary>
55        <Metadata_Name>[CEOS IDN DIF]</Metadata_Name>
56        <Metadata_Version>9.4</Metadata_Version>
57        </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 TracBrowser for help on using the repository browser.