Changeset 2572 for TI07-MOLES


Ignore:
Timestamp:
11/06/07 13:41:42 (12 years ago)
Author:
ko23
Message:
 
Location:
TI07-MOLES/trunk
Files:
3 edited

Legend:

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

    r2553 r2572  
    8585                    element Long_Name {data($DepObsStnRecord/moles:name)} 
    8686                }, 
    87         for $TemporalRange in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage/moles:dgTemporalCoverage/moles:DateRange) 
     87        for $TemporalRange in $DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage/(moles:dgTemporalCoverage | moles:dgSpatioTemporalCoverage/moles:dgSpatioTemporalRange/moles:dgTemporalCoverage)/moles:DateRange 
    8888                return  
    8989                    element Temporal_Coverage 
     
    9292                        element End_Date {data($TemporalRange/moles:DateRangeEnd)} 
    9393                        }, 
    94         for $TemporalTerm in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage/moles:dgTemporalCoverage/moles:dgChronostratigraphicTerm[voclib:spot-vocab($voclib:gcmd_chronostratigraphic_valids, moles:dgValidTermID/moles:ParentListID)]/moles:dgValidTerm) 
     94        for $TemporalTerm in $DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage/(moles:dgTemporalCoverage | moles:dgSpatioTemporalCoverage/moles:dgSpatioTemporalRange/moles:dgTemporalCoverage)/moles:dgChronostratigraphicTerm[voclib:spot-vocab($voclib:gcmd_chronostratigraphic_valids, moles:dgValidTermID/moles:ParentListID)]/moles:dgValidTerm 
    9595                return element Paleo_Temporal_Coverage {element Chronostratigraphic_Unit {data($TemporalTerm)}},  
    9696        for $Data_Set_Progress in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataStatus/moles:dgDatasetClosure) 
    9797                return element Data_Set_Progress {data($Data_Set_Progress)}, 
    98         for $BoundingBox in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage/moles:dgSpatialCoverage/moles:BoundingBox) 
     98        for $BoundingBox in $DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage/(moles:dgSpatialCoverage | moles:dgSpatioTemporalCoverage/moles:dgSpatioTemporalRange/moles:dgSpatialCoverage)/moles:BoundingBox 
    9999        return  
    100100            element Spatial_Coverage { 
     
    104104                    element Easternmost_Longitude {data($BoundingBox/moles:LimitEast)} 
    105105                }, 
    106         for $Location in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage/moles:dgSpatialCoverage/moles:dgArea[voclib:spot-vocab($voclib:gcmd_location_valids, moles:dgValidTermID/moles:ParentListID)]) 
     106        for $Location in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage/(moles:dgSpatialCoverage | moles:dgSpatioTemporalCoverage/moles:dgSpatioTemporalRange/moles:dgSpatialCoverage)/moles:dgArea[voclib:spot-vocab($voclib:gcmd_location_valids, moles:dgValidTermID/moles:ParentListID)]) 
    107107                return element Location {data($Location/moles:dgValidTerm)},  
    108108        for $DepActRepository in distinct-values($DE/moles:dgDataEntity/moles:RelatedDeployment/moles:ActivityID/moles:repositoryIdentifer) 
  • TI07-MOLES/trunk/MOLES.xpr

    r2512 r2572  
    1313        <file name="MDIP/XQueries/MDIP2MOLES.xquery"/> 
    1414        <file name="StubB/XQuery/NDG-ActStubB.xquery"/> 
     15        <file name="StubB/XQuery/NDG-ActStubBFull.xquery"/> 
    1516        <file name="StubB/XQuery/NDG-ActStubBnew.xquery"/> 
    1617        <file name="StubB/XQuery/NDG-DEStubB.xquery"/> 
     18        <file name="StubB/XQuery/NDG-DEStubBFull.xquery"/> 
    1719        <file name="StubB/XQuery/NDG-DEStubBnew.xquery"/> 
    1820        <file name="DIF/XQuery/NDG-DIF.xquery"/> 
    1921        <file name="DIF/XQuery/NDG-DIFtemplate.xquery"/> 
    2022        <file name="StubB/XQuery/NDG-DPTStubB.xquery"/> 
     23        <file name="StubB/XQuery/NDG-DPTStubBFull.xquery"/> 
    2124        <file name="StubB/XQuery/NDG-DPTStubBnew.xquery"/> 
    2225        <file name="DublinCore/XQuery/NDG-DublinCore.xquery"/> 
     
    2730        <file name="StubB/XQuery/NDG-ObsStnStubB.xquery"/> 
    2831        <file name="DIF/Schemae/dif9-4.xsd"/> 
     32        <file name="StubB/XQuery/NDG-ObsStnStubBFull.xquery"/> 
    2933        <file name="StubB/XQuery/NDG-ObsStnStubBnew.xquery"/> 
    3034        <file name="v1Schema/Schemae/ndgmetadata1.2.4.xsd"/> 
  • TI07-MOLES/trunk/StubB/XQuery/NDG-ObsStnStubB.xquery

    r2553 r2572  
    3030($SRAct/moles:name), 
    3131($SRAct/moles:abbreviation), 
    32 ($SRAct/moles:logos), 
    33 element dgActivity { 
    34 if (exists($SRAct/moles:dgActivity/moles:dgActivityDataCollection)) then  
    35 ($SRAct/*/moles:dgActivityDataCollection) 
    36 else if (exists($SRAct/moles:dgActivity/moles:dgActivityDataProject)) then  
    37 ($SRAct/*/moles:dgActivityDataProject) 
    38 else if (exists($SRAct/moles:dgActivity/moles:dgActivityDataCampaign)) then 
    39 ($SRAct/moles:dgActivity/moles:dgActivityDataCampaign) 
    40 else  
    41 ($SRAct/moles:dgActivity/moles:dgActivityDataInvestigation),  
    42 ($SRAct/moles:dgActivity/moles:dgActivityCoverage), 
    43 ($SRAct/moles:dgActivity/moles:dgActivityDuration) 
    44 } (: </dgActivity> :)  
     32($SRAct/moles:logos) 
    4533} (: </activity> :)  
    4634} ; 
     
    5644($SRDE/moles:dgMetadataDescription), 
    5745($SRDE/moles:name), 
    58 ($SRDE/moles:abbreviation), 
    59 element dgDataEntity { 
    60 ($SRDE/moles:dgDataEntity/moles:dgDataSetType), 
    61 ($SRDE/moles:dgDataEntity/moles:dgDataGranule), 
    62 ($SRDE/moles:dgDataEntity/moles:dgDataSummary) 
     46($SRDE/moles:abbreviation) 
    6347} (: </dgDataEntity> :)         
    64 } 
    6548} ; 
    6649 
     
    8063$SRDPT/moles:name, 
    8164$SRDPT/moles:abbreviation, 
    82 $SRDPT/moles:logos, 
    83 element dgDataProductionTool { 
    84 $SRDPT/moles:dgDataProductionTool/moles:contactDetails, 
    85 if (exists($SRDPT/moles:dgDataProductionTool/moles:dgModel)) then 
    86 $SRDPT/moles:dgDataProductionTool/moles:dgModel 
    87 else (), 
    88 if (exists($SRDPT/moles:dgDataProductionTool/moles:dgInstrument)) then 
    89 $SRDPT/moles:dgDataProductionTool/moles:dgInstrument 
    90 else () 
    91 } (: </dgDataProductionTool> :) 
     65$SRDPT/moles:logos 
    9266} (: </dataproductiontool> :) 
    9367} ; 
     
    10882($SRObsStn/moles:name), 
    10983($SRObsStn/moles:abbreviation), 
    110 ($SRObsStn/moles:logos), 
    111 element dgObservationStation { 
    112 ($SRObsStn/moles:dgObservationStation/moles:contactDetails), 
    113 if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform)) then 
    114 element dgStationaryPlatform { 
    115 $SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:position, 
    116 if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgLandStation)) then element dgLandStation {''} 
    117 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgMooring)) then element dgMooring {''} 
    118 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgStationGroup)) then element dgStationGroup {''} 
    119 else () 
    120 } 
    121 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgMovingPlatform)) then  
    122 $SRObsStn/moles:dgObservationStation/moles:dgMovingPlatform 
    123 else () 
    124 } (: </dgObservationStation> :) 
     84($SRObsStn/moles:logos) 
    12585} 
    12686} ; 
     
    209169} (: End </dgStationaryPlatform>  :)   
    210170else $ObsStn/moles:dgObservationStation/moles:dgMovingPlatform ,  
    211 for $RelDep in $ObsStn/moles:dgObservationStation/moles:ObsStationDeployment  
    212 return  
    213 element ObsStationDeployment { 
    214 $RelDep/moles:DateStart, 
    215 $RelDep/moles:DateEnd, 
    216 $RelDep/moles:dgMetadataID, 
    217 f:return-stub-activity('activity', data($RelDep/moles:ActivityID/moles:repositoryIdentifier), data($RelDep/moles:ActivityID/moles:localIdentifier)), 
    218 f:return-stub-dpt('dataproductiontool', data($RelDep/moles:DataProductionToolID/moles:repositoryIdentifier), data($RelDep/moles:DataProductionToolID/moles:localIdentifier)),  
    219 for $DE in collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[ 
    220 moles:dgDataEntity/moles:RelatedDeployment/moles:dgMetadataID/moles:localIdentifier=$RelDep/moles:dgMetadataID/moles:localIdentifier 
    221 and 
    222 moles:dgDataEntity/moles:RelatedDeployment/moles:dgMetadataID/moles:repositoryIdentifier=$RelDep/moles:dgMetadataID/moles:repositoryIdentifier] 
    223 return 
    224 f:return-stub-dataentity('dataentity', $DE), 
    225 $RelDep/moles:Coverage 
    226 } (: </RelatedDeployment> :)  
     171 
     172 
     173element ObsStationDeploymentSummary { 
     174element activityList { 
     175for $DepActRepository in distinct-values($ObsStn/moles:dgObservationStation/moles:ObsStationDeployment/moles:ActivityID/moles:repositoryIdentifier) 
     176for $DepActLocal in distinct-values(($ObsStn/moles:dgObservationStation/moles:ObsStationDeployment)/moles:ActivityID/moles:localIdentifier) 
     177let $DepAct :=  f:return-stub-activity('activity', data($DepActRepository), data($DepActLocal)) 
     178return $DepAct  
     179}, 
     180element dptList { 
     181for $DepDPTRepository in distinct-values($ObsStn/moles:dgObservationStation/moles:ObsStationDeployment/moles:DataProductionToolID/moles:repositoryIdentifier) 
     182for $DepDPTLocal in distinct-values(($ObsStn/moles:dgObservationStation/moles:ObsStationDeployment)/moles:DataProductionToolID/moles:localIdentifier) 
     183let $DepDPT :=  f:return-stub-dpt('dataproductiontool', data($DepDPTRepository), data($DepDPTLocal)) 
     184return $DepDPT  
     185}, 
     186element dataEntityList { 
     187$ObsStn/moles:dgMetadataID, 
     188for $DE in  
     189collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgDataEntity/moles:RelatedDeployment 
     190/moles:ObservationStationID 
     191[moles:localIdentifier=$ObsStn/moles:dgMetadataID/moles:localIdentifier 
     192and moles:repositoryIdentifier=$ObsStn/moles:dgMetadataID/moles:repositoryIdentifier]] 
     193return f:return-stub-dataentity('dataentity', $DE) 
     194} 
     195(:  
     196for $DERepository in distinct-values( 
     197collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord/moles:dgDataEntity/moles:RelatedDeployment 
     198[moles:ObservationStationID 
     199[moles:localIdentifier=$ObsStn/moles:dgMetadataID/moles:localIdentifier 
     200and moles:repositoryIdentifier=$ObsStn/moles:dgMetadataID/moles:repositoryIdentifier]] 
     201/moles:repositoryIdentifier) 
     202for $DELocal in (collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord/moles:dgDataEntity/moles:RelatedDeployment 
     203[moles:ObservationStationID 
     204[moles:localIdentifier=$ObsStn/moles:dgMetadataID/moles:localIdentifier 
     205and moles:repositoryIdentifier=$ObsStn/moles:dgMetadataID/moles:repositoryIdentifier]] 
     206/moles:localIdentifier) 
     207let $DERecord := collection('/db/ndg_B_metadata/badc.nerc.ac.uk')/moles:dgMetadata/moles:dgMetadataRecord 
     208[moles:dgDataEntity/moles:RelatedDeployment/moles:ObservationStationID 
     209[moles:localIdentifier=$DELocal 
     210and moles:repositoryIdentifier=$DERepository]] 
     211return f:return-stub-dataentity('dataentity', $DERecord) 
     212:) 
     213} (: </ObsStationDeploymentSummary> :)  
    227214} (: </dgObservationStation> :),  
    228215for $strkwrd in $ObsStn/moles:dgStructuredKeyword return $strkwrd, 
Note: See TracChangeset for help on using the changeset viewer.