Changeset 2482 for TI07-MOLES/trunk


Ignore:
Timestamp:
15/05/07 16:44:17 (12 years ago)
Author:
ko23
Message:

Update to give what was wanted as well as what was needed

Location:
TI07-MOLES/trunk
Files:
7 edited

Legend:

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

    r2464 r2482  
    1313declare variable $targetCollection as xs:string {'/db/ndg_B_metadata'}; 
    1414declare variable $repositoryIdentifier as xs:string {'badc.nerc.ac.uk'}; 
    15 declare variable $localIdentifier as xs:string {'dataent_ATSR'}; 
     15declare variable $localIdentifier as xs:string {'dataent_chablis'}; 
    1616 
    1717for $DE in collection($targetCollection)/dgMetadata/dgMetadataRecord[ 
  • TI07-MOLES/trunk/MOLES.xpr

    r2358 r2482  
    77    </meta> 
    88    <projectTree name="MOLES.xpr"> 
     9        <folder path="eXist%20specific/xqueryLib/"/> 
    910        <folder path="ISO19115-19139/Examples/"/> 
    10         <folder path="xqueryLib/"/> 
    1111        <file name="DIF/XQuery/DIF2MOLES.xquery"/> 
    1212        <file name="MDIP/XQueries/MDIP2MOLES.xquery"/> 
  • TI07-MOLES/trunk/PythonCode/wsgi/ndg_xqueries.py

    r2467 r2482  
    2222import module namespace stubblib='http://ndg.nerc.ac.uk/xquery/lib/stubb' at 'xmldb:exist:///db/xqueryLib/StubB/stubb_xquery_lib.xquery'; 
    2323:) 
    24  
    2524declare variable $targetCollection as xs:string {'TargetCollection'}; 
    2625declare variable $repositoryIdentifier as xs:string {'RepositoryID'}; 
     
    3736element  {$out-element-name} {  
    3837($SRAct/moles:dgMetadataID), 
    39 ($SRAct/moles:dgMetadataDescription), 
    4038($SRAct/moles:name), 
    4139($SRAct/moles:abbreviation), 
    4240($SRAct/moles:logos), 
    4341element dgActivity { 
    44 if (exists($SRAct/moles:dgActivity/moles:dgActivityDataCollection)) then  
    45 ($SRAct/*/moles:dgActivityDataCollection) 
    46 else if (exists($SRAct/moles:dgActivity/moles:dgActivityDataProject)) then  
    47 ($SRAct/*/moles:dgActivityDataProject) 
    48 else if (exists($SRAct/moles:dgActivity/moles:dgActivityDataCampaign)) then 
    49 ($SRAct/moles:dgActivity/moles:dgActivityDataCampaign) 
    50 else  
    51 ($SRAct/moles:dgActivity/moles:dgActivityDataInvestigation),  
    52 ($SRAct/moles:dgActivity/moles:dgActivityCoverage), 
    53 ($SRAct/moles:dgActivity/moles:dgActivityDuration) 
    5442} (: </dgActivity> :)  
    5543} (: </activity> :)  
     
    6452element {$out-element-name} { 
    6553($SRDE/moles:dgMetadataID), 
    66 ($SRDE/moles:dgMetadataDescription), 
    6754($SRDE/moles:name), 
    6855($SRDE/moles:abbreviation), 
    69 ($SRDE/moles:abbreviation), 
    7056element dgDataEntity { 
    71 ($SRDE/moles:dgDataEntity/moles:dgDataSetType), 
    72 ($SRDE/moles:dgDataEntity/moles:dgDataGranule), 
    73 ($SRDE/moles:dgDataEntity/moles:dgDataSummary) 
    7457} (: </dgDataEntity> :)         
    7558} 
     
    8871element {$out-element-name} { 
    8972$SRDPT/moles:dgMetadataID, 
    90 $SRDPT/moles:dgMetadataDescription, 
    9173$SRDPT/moles:name, 
    9274$SRDPT/moles:abbreviation, 
    9375$SRDPT/moles:logos, 
    9476element dgDataProductionTool { 
    95 $SRDPT/moles:dgDataProductionTool/moles:contactDetails, 
    96 if (exists($SRDPT/moles:dgDataProductionTool/moles:dgModel)) then 
    97 $SRDPT/moles:dgDataProductionTool/moles:dgModel 
    98 else (), 
    99 if (exists($SRDPT/moles:dgDataProductionTool/moles:dgInstrument)) then 
    100 $SRDPT/moles:dgDataProductionTool/moles:dgInstrument 
    101 else () 
    10277} (: </dgDataProductionTool> :) 
    10378} (: </dataproductiontool> :) 
     
    11691element {$out-element-name} { 
    11792($SRObsStn/moles:dgMetadataID), 
    118 ($SRObsStn/moles:dgMetadataDescription), 
    11993($SRObsStn/moles:name), 
    12094($SRObsStn/moles:abbreviation), 
    12195($SRObsStn/moles:logos), 
    12296element dgObservationStation { 
    123 ($SRObsStn/moles:dgObservationStation/moles:contactDetails), 
    124 if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform)) then 
    125 element dgStationaryPlatform { 
    126 $SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:position, 
    127 if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgLandStation)) then element dgLandStation {''} 
    128 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgMooring)) then element dgMooring {''} 
    129 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgStationGroup)) then element dgStationGroup {''} 
    130 else () 
    131 } 
    132 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgMovingPlatform)) then  
    133 $SRObsStn/moles:dgObservationStation/moles:dgMovingPlatform 
    134 else () 
    13597} (: </dgObservationStation> :) 
    13698} 
     
    303265import module namespace stubblib='http://ndg.nerc.ac.uk/xquery/lib/stubb' at 'xmldb:exist:///db/xqueryLib/StubB/stubb_xquery_lib.xquery'; 
    304266:) 
    305  
    306267declare variable $targetCollection as xs:string {'TargetCollection'}; 
    307268declare variable $repositoryIdentifier as xs:string {'RepositoryID'}; 
     
    323284($SRAct/moles:logos), 
    324285element dgActivity { 
    325 if (exists($SRAct/moles:dgActivity/moles:dgActivityDataCollection)) then  
    326 ($SRAct/*/moles:dgActivityDataCollection) 
    327 else if (exists($SRAct/moles:dgActivity/moles:dgActivityDataProject)) then  
    328 ($SRAct/*/moles:dgActivityDataProject) 
    329 else if (exists($SRAct/moles:dgActivity/moles:dgActivityDataCampaign)) then 
    330 ($SRAct/moles:dgActivity/moles:dgActivityDataCampaign) 
    331 else  
    332 ($SRAct/moles:dgActivity/moles:dgActivityDataInvestigation),  
    333 ($SRAct/moles:dgActivity/moles:dgActivityCoverage), 
    334 ($SRAct/moles:dgActivity/moles:dgActivityDuration) 
    335286} (: </dgActivity> :)  
    336287} (: </activity> :)  
     
    348299($SRDE/moles:name), 
    349300($SRDE/moles:abbreviation), 
    350 ($SRDE/moles:abbreviation), 
    351301element dgDataEntity { 
    352 ($SRDE/moles:dgDataEntity/moles:dgDataSetType), 
    353 ($SRDE/moles:dgDataEntity/moles:dgDataGranule), 
    354 ($SRDE/moles:dgDataEntity/moles:dgDataSummary) 
    355302} (: </dgDataEntity> :)         
    356303} 
     
    374321$SRDPT/moles:logos, 
    375322element dgDataProductionTool { 
    376 $SRDPT/moles:dgDataProductionTool/moles:contactDetails, 
    377 if (exists($SRDPT/moles:dgDataProductionTool/moles:dgModel)) then 
    378 $SRDPT/moles:dgDataProductionTool/moles:dgModel 
    379 else (), 
    380 if (exists($SRDPT/moles:dgDataProductionTool/moles:dgInstrument)) then 
    381 $SRDPT/moles:dgDataProductionTool/moles:dgInstrument 
    382 else () 
    383323} (: </dgDataProductionTool> :) 
    384324} (: </dataproductiontool> :) 
     
    402342($SRObsStn/moles:logos), 
    403343element dgObservationStation { 
    404 ($SRObsStn/moles:dgObservationStation/moles:contactDetails), 
    405 if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform)) then 
    406 element dgStationaryPlatform { 
    407 $SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:position, 
    408 if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgLandStation)) then element dgLandStation {''} 
    409 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgMooring)) then element dgMooring {''} 
    410 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgStationGroup)) then element dgStationGroup {''} 
    411 else () 
    412 } 
    413 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgMovingPlatform)) then  
    414 $SRObsStn/moles:dgObservationStation/moles:dgMovingPlatform 
    415 else () 
    416344} (: </dgObservationStation> :) 
    417345} 
     
    616544''' 
    617545 
    618 StubBDPTQuery = '''declare default element namespace 'http://ndg.nerc.ac.uk/moles/dataproductiontool';  
     546StubBDPTQuery = ''' 
     547declare default element namespace 'http://ndg.nerc.ac.uk/moles/dataproductiontool';  
    619548import module namespace voclib='http://ndg.nerc.ac.uk/xquery/lib/vocab' at 'xmldb:exist:///db/xqueryLib/Vocabs/vocab_xquery_lib.xquery'; 
    620549import module namespace utillib='http://ndg.nerc.ac.uk/xquery/lib/utilities' at 'xmldb:exist:///db/xqueryLib/Utilities/utility_xquery_lib.xquery'; 
     
    640569element  {$out-element-name} {  
    641570($SRAct/moles:dgMetadataID), 
    642 ($SRAct/moles:dgMetadataDescription), 
    643571($SRAct/moles:name), 
    644572($SRAct/moles:abbreviation), 
    645573($SRAct/moles:logos), 
    646574element dgActivity { 
    647 if (exists($SRAct/moles:dgActivity/moles:dgActivityDataCollection)) then  
    648 ($SRAct/*/moles:dgActivityDataCollection) 
    649 else if (exists($SRAct/moles:dgActivity/moles:dgActivityDataProject)) then  
    650 ($SRAct/*/moles:dgActivityDataProject) 
    651 else if (exists($SRAct/moles:dgActivity/moles:dgActivityDataCampaign)) then 
    652 ($SRAct/moles:dgActivity/moles:dgActivityDataCampaign) 
    653 else  
    654 ($SRAct/moles:dgActivity/moles:dgActivityDataInvestigation),  
    655 ($SRAct/moles:dgActivity/moles:dgActivityCoverage), 
    656 ($SRAct/moles:dgActivity/moles:dgActivityDuration) 
    657575} (: </dgActivity> :)  
    658576} (: </activity> :)  
     
    667585element {$out-element-name} { 
    668586($SRDE/moles:dgMetadataID), 
    669 ($SRDE/moles:dgMetadataDescription), 
    670587($SRDE/moles:name), 
    671588($SRDE/moles:abbreviation), 
    672 ($SRDE/moles:abbreviation), 
    673589element dgDataEntity { 
    674 ($SRDE/moles:dgDataEntity/moles:dgDataSetType), 
    675 ($SRDE/moles:dgDataEntity/moles:dgDataGranule), 
    676 ($SRDE/moles:dgDataEntity/moles:dgDataSummary) 
    677590} (: </dgDataEntity> :)         
    678591} 
     
    691604element {$out-element-name} { 
    692605$SRDPT/moles:dgMetadataID, 
    693 $SRDPT/moles:dgMetadataDescription, 
    694606$SRDPT/moles:name, 
    695607$SRDPT/moles:abbreviation, 
    696608$SRDPT/moles:logos, 
    697609element dgDataProductionTool { 
    698 $SRDPT/moles:dgDataProductionTool/moles:contactDetails, 
    699 if (exists($SRDPT/moles:dgDataProductionTool/moles:dgModel)) then 
    700 $SRDPT/moles:dgDataProductionTool/moles:dgModel 
    701 else (), 
    702 if (exists($SRDPT/moles:dgDataProductionTool/moles:dgInstrument)) then 
    703 $SRDPT/moles:dgDataProductionTool/moles:dgInstrument 
    704 else () 
    705610} (: </dgDataProductionTool> :) 
    706611} (: </dataproductiontool> :) 
     
    719624element {$out-element-name} { 
    720625($SRObsStn/moles:dgMetadataID), 
    721 ($SRObsStn/moles:dgMetadataDescription), 
    722626($SRObsStn/moles:name), 
    723627($SRObsStn/moles:abbreviation), 
    724628($SRObsStn/moles:logos), 
    725629element dgObservationStation { 
    726 ($SRObsStn/moles:dgObservationStation/moles:contactDetails), 
    727 if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform)) then 
    728 element dgStationaryPlatform { 
    729 $SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:position, 
    730 if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgLandStation)) then element dgLandStation {''} 
    731 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgMooring)) then element dgMooring {''} 
    732 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgStationGroup)) then element dgStationGroup {''} 
    733 else () 
    734 } 
    735 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgMovingPlatform)) then  
    736 $SRObsStn/moles:dgObservationStation/moles:dgMovingPlatform 
    737 else () 
    738630} (: </dgObservationStation> :) 
    739631} 
     
    849741element  {$out-element-name} {  
    850742($SRAct/moles:dgMetadataID), 
    851 ($SRAct/moles:dgMetadataDescription), 
    852743($SRAct/moles:name), 
    853744($SRAct/moles:abbreviation), 
    854745($SRAct/moles:logos), 
    855746element dgActivity { 
    856 if (exists($SRAct/moles:dgActivity/moles:dgActivityDataCollection)) then  
    857 ($SRAct/*/moles:dgActivityDataCollection) 
    858 else if (exists($SRAct/moles:dgActivity/moles:dgActivityDataProject)) then  
    859 ($SRAct/*/moles:dgActivityDataProject) 
    860 else if (exists($SRAct/moles:dgActivity/moles:dgActivityDataCampaign)) then 
    861 ($SRAct/moles:dgActivity/moles:dgActivityDataCampaign) 
    862 else  
    863 ($SRAct/moles:dgActivity/moles:dgActivityDataInvestigation),  
    864 ($SRAct/moles:dgActivity/moles:dgActivityCoverage), 
    865 ($SRAct/moles:dgActivity/moles:dgActivityDuration) 
    866747} (: </dgActivity> :)  
    867748} (: </activity> :)  
     
    876757element {$out-element-name} { 
    877758($SRDE/moles:dgMetadataID), 
    878 ($SRDE/moles:dgMetadataDescription), 
    879759($SRDE/moles:name), 
    880760($SRDE/moles:abbreviation), 
    881 ($SRDE/moles:abbreviation), 
    882761element dgDataEntity { 
    883 ($SRDE/moles:dgDataEntity/moles:dgDataSetType), 
    884 ($SRDE/moles:dgDataEntity/moles:dgDataGranule), 
    885 ($SRDE/moles:dgDataEntity/moles:dgDataSummary) 
    886762} (: </dgDataEntity> :)         
    887763} 
     
    900776element {$out-element-name} { 
    901777$SRDPT/moles:dgMetadataID, 
    902 $SRDPT/moles:dgMetadataDescription, 
    903778$SRDPT/moles:name, 
    904779$SRDPT/moles:abbreviation, 
    905780$SRDPT/moles:logos, 
    906781element dgDataProductionTool { 
    907 $SRDPT/moles:dgDataProductionTool/moles:contactDetails, 
    908 if (exists($SRDPT/moles:dgDataProductionTool/moles:dgModel)) then 
    909 $SRDPT/moles:dgDataProductionTool/moles:dgModel 
    910 else (), 
    911 if (exists($SRDPT/moles:dgDataProductionTool/moles:dgInstrument)) then 
    912 $SRDPT/moles:dgDataProductionTool/moles:dgInstrument 
    913 else () 
    914782} (: </dgDataProductionTool> :) 
    915783} (: </dataproductiontool> :) 
     
    928796element {$out-element-name} { 
    929797($SRObsStn/moles:dgMetadataID), 
    930 ($SRObsStn/moles:dgMetadataDescription), 
    931798($SRObsStn/moles:name), 
    932799($SRObsStn/moles:abbreviation), 
    933800($SRObsStn/moles:logos), 
    934801element dgObservationStation { 
    935 ($SRObsStn/moles:dgObservationStation/moles:contactDetails), 
    936 if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform)) then 
    937 element dgStationaryPlatform { 
    938 $SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:position, 
    939 if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgLandStation)) then element dgLandStation {''} 
    940 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgMooring)) then element dgMooring {''} 
    941 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgStationaryPlatform/moles:dgStationGroup)) then element dgStationGroup {''} 
    942 else () 
    943 } 
    944 else if (exists($SRObsStn/moles:dgObservationStation/moles:dgMovingPlatform)) then  
    945 $SRObsStn/moles:dgObservationStation/moles:dgMovingPlatform 
    946 else () 
    947802} (: </dgObservationStation> :) 
    948803} 
  • TI07-MOLES/trunk/StubB/XQuery/NDG-ActStubB.xquery

    r2466 r2482  
    5757($SRDE/moles:dgMetadataDescription), 
    5858($SRDE/moles:name), 
    59 ($SRDE/moles:abbreviation), 
    6059($SRDE/moles:abbreviation), 
    6160element dgDataEntity { 
  • TI07-MOLES/trunk/StubB/XQuery/NDG-DEStubB.xquery

    r2466 r2482  
    5757($SRDE/moles:dgMetadataDescription), 
    5858($SRDE/moles:name), 
    59 ($SRDE/moles:abbreviation), 
    6059($SRDE/moles:abbreviation), 
    6160element dgDataEntity { 
  • TI07-MOLES/trunk/StubB/XQuery/NDG-DPTStubB.xquery

    r2466 r2482  
    5757($SRDE/moles:dgMetadataDescription), 
    5858($SRDE/moles:name), 
    59 ($SRDE/moles:abbreviation), 
    6059($SRDE/moles:abbreviation), 
    6160element dgDataEntity { 
  • TI07-MOLES/trunk/StubB/XQuery/NDG-ObsStnStubB.xquery

    r2466 r2482  
    5656($SRDE/moles:dgMetadataDescription), 
    5757($SRDE/moles:name), 
    58 ($SRDE/moles:abbreviation), 
    5958($SRDE/moles:abbreviation), 
    6059element dgDataEntity { 
Note: See TracChangeset for help on using the changeset viewer.