source: MOLES/trunk/DublinCore/Schemae/NDG-DublinCore.xquery @ 326

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/MOLES/trunk/DublinCore/Schemae/NDG-DublinCore.xquery@326
Revision 326, 4.3 KB checked in by ko23, 14 years ago (diff)

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1declare namespace dc="http://purl.org/dc/elements/1.1/";
2declare namespace oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc";
3for $DE in //dgMetadataRecord[dgDataEntity!='' and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier='badc.nerc.ac.uk' and dgMetadataID/localIdentifier='dataent2']
4return
5<oai_dc:dc>
6        <dc:title>{string($DE/name)}</dc:title>
7        <dc:type>Dataset</dc:type>
8        <dc:identifier>{concat($DE/dgMetadataID/repositoryIdentifier, ':DC:', $DE/dgMetadataID/localIdentifier)}</dc:identifier>
9        <dc:description>{string($DE/dgMetadataDescription/abstract/abstractText)}</dc:description>
10        {for $StructuredKeyword in $DE/(dgStructuredKeyword | dgStdParameterMeasured)[dgValidTermID/ParentListID='http://www.cgd.ucar.edu/cms/eaton/cf-metadata/standard_name.html'     or dgValidTermID/ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_parameters.html' or dgValidTermID/ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/projects.html']
11                order by $StructuredKeyword/dgValidTerm
12                return
13                <dc:subject>
14                        {string($StructuredKeyword/dgValidTerm)}
15                </dc:subject>
16        }
17        {for $DataCreatorRole in $DE/dgDataEntity/dgDataRoles/dgDataCreator/dgRoleHolder
18        order by $DataCreatorRole/startDate empty least, $DataCreatorRole/endDate empty least
19        return
20                for $DataCreatorRoleHolder in /*/(dgOrganisation | dgPerson)[(dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier=$DataCreatorRole/*/repositoryIdentifier and dgMetadataID/localIdentifier=$DataCreatorRole/*/localIdentifier)]
21                return
22                <dc:creator>
23                {if ($DataCreatorRoleHolder/name()='dgOrganisation') then
24                        (string($DataCreatorRoleHolder/name))
25                else if ($DataCreatorRoleHolder/name()='dgPerson') then
26                        (concat(string($DataCreatorRoleHolder/name/initials), ' ', string($DataCreatorRoleHolder/name/familyName)))
27                else ()}
28                </dc:creator>
29        }
30        {for $DataCuratorRole in $DE/dgDataEntity/dgDataRoles/dgDataCurator/dgRoleHolder[empty(endDate)]
31        order by $DataCuratorRole/startDate empty least
32        return
33                for $DataCuratorRoleHolder in /*/(dgOrganisation | dgPerson)[(empty($DataCuratorRole/endDate) and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier=$DataCuratorRole/*/repositoryIdentifier and dgMetadataID/localIdentifier=$DataCuratorRole/*/localIdentifier)]
34                return
35                <dc:publisher>
36                {if ($DataCuratorRoleHolder/name()='dgOrganisation') then
37                        (string($DataCuratorRoleHolder/name))
38                else if ($DataCuratorRoleHolder/name()='dgPerson') then
39                        (string(concat($DataCuratorRoleHolder/name/initials), ' ', string($DataCuratorRoleHolder/name/familyName)))
40                else ()}
41                </dc:publisher>
42        }
43</oai_dc:dc>
44(: Stylus Studio meta-information - (c) 2004-2005. Progress Software Corporation. All rights reserved.
45<metaInformation>
46<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" ><SourceSchema srcSchemaPath="..\..\..\Project File Archive\NERC DataGRID\MetadataModelv1a\ndgmetadata.xsd" srcSchemaRoot="dgMetadata" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template name="xquery_body"><block path="flwr" x="220" y="18"/><block path="flwr/dgMetadataRecord/dgDataEntity/dgDataRoles/dgDataCreator/flwr" x="140" y="126"/><block path="flwr/dgMetadataRecord/dgDataEntity/dgDataRoles/dgDataCurator/flwr" x="180" y="162"/><block path="flwr/dgMetadataRecord/dgDataEntity/flwr" x="220" y="180"/><block path="flwr/dgMetadataRecord/dgDataEntity/flwr/RelatedDeployment/flwr" x="260" y="198"/><block path="flwr/dgMetadataRecord/dgDataEntity/flwr/RelatedDeployment/flwr[1]" x="260" y="109"/><block path="flwr/dgMetadataRecord/dgDataEntity/flwr/RelatedDeployment/flwr[2]" x="180" y="109"/><block path="flwr/dgMetadataRecord/dgDataEntity/flwr[1]" x="220" y="109"/></template></MapperBlockPosition></MapperMetaTag>
47</metaInformation>
48:)
Note: See TracBrowser for help on using the repository browser.