Changeset 2457


Ignore:
Timestamp:
03/05/07 11:43:18 (12 years ago)
Author:
ko23
Message:

Index prototype

Location:
TI07-MOLES/trunk
Files:
3 added
3 edited

Legend:

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

    r1744 r2457  
     1import module namespace voclib='http://ndg.nerc.ac.uk/xquery/lib/vocab' at 'xmldb:exist:///db/xqueryLib/Vocabs/vocab_xquery_lib.xquery'; 
     2import module namespace utillib='http://ndg.nerc.ac.uk/xquery/lib/utilities' at 'xmldb:exist:///db/xqueryLib/Utilities/utility_xquery_lib.xquery'; 
    13declare default element namespace 'http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/'; 
    24declare namespace xsi='http://www.w3.org/2001/XMLSchema-instance';  
     
    46declare namespace f='http://ndg.nerc.ac.uk/moles/localfunctions'; 
    57 
    6 for $DE in collection('/db/ndg_B_metadata')/moles:dgMetadata/moles:dgMetadataRecord[ 
     8declare variable $targetCollection as xs:string {'TargetCollection'}; 
     9declare variable $repositoryIdentifier as xs:string {'RepositoryID'}; 
     10declare variable $localIdentifier as xs:string {'LocalID'}; 
     11 
     12for $DE in collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[ 
    713        exists('moles:dgDataEntity')  
    814        and moles:dgMetadataID/moles:schemeIdentifier='NDG-B0'  
    9         and moles:dgMetadataID/moles:repositoryIdentifier='grid.bodc.nerc.ac.uk'  
    10         and moles:dgMetadataID/moles:localIdentifier='HGFS3751'] 
     15        and moles:dgMetadataID/moles:repositoryIdentifier=$repositoryIdentifier  
     16        and moles:dgMetadataID/moles:localIdentifier=$localIdentifier] 
    1117return 
    1218    element DIF { 
     
    1723            for $DataCreatorRole in $DE/moles:dgDataEntity/moles:dgDataRoles/moles:dgDataCreator/moles:dgRoleHolder[not(exists(moles:endDate)) or moles:endDate=''][1] 
    1824                return  
    19                     for $DataCreatorRoleHolder in collection('/db/ndg_B_metadata')/moles:dgMetadata/*[(moles:dgMetadataID/moles:schemeIdentifier='NDG-B0' 
     25                    for $DataCreatorRoleHolder in collection($targetCollection)/moles:dgMetadata/*[(moles:dgMetadataID/moles:schemeIdentifier='NDG-B0' 
    2026                               and moles:dgMetadataID/moles:repositoryIdentifier=$DataCreatorRole/*/moles:repositoryIdentifier 
    2127                               and moles:dgMetadataID/moles:localIdentifier=$DataCreatorRole/*/moles:localIdentifier)] 
     
    6268        return  
    6369            element Sensor_Name { 
    64                 for $DepDPTAbbrev in distinct-values((collection('/db/ndg_B_metadata')/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepDPT/moles:repositoryIdentifier and moles:localIdentifier=$DepDPT/moles:localIdentifier]]/moles:abbreviation)) 
     70                for $DepDPTAbbrev in distinct-values((collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepDPT/moles:repositoryIdentifier and moles:localIdentifier=$DepDPT/moles:localIdentifier]]/moles:abbreviation)) 
    6571                    return element Short_Name {data($DepDPTAbbrev)}, 
    66                 for $DepDPTName in distinct-values((collection('/db/ndg_B_metadata')/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepDPT/moles:repositoryIdentifier and moles:localIdentifier=$DepDPT/moles:localIdentifier]]/moles:name)) 
     72                for $DepDPTName in distinct-values((collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepDPT/moles:repositoryIdentifier and moles:localIdentifier=$DepDPT/moles:localIdentifier]]/moles:name)) 
    6773                    return element Long_Name {data($DepDPTName)} 
    6874                }, 
     
    7076        return  
    7177            element Source_Name { 
    72                 for $DepObsStnAbbrev in distinct-values((collection('/db/ndg_B_metadata')/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepObsStn/moles:repositoryIdentifier and moles:localIdentifier=$DepObsStn/moles:localIdentifier]]/moles:abbreviation)) 
     78                for $DepObsStnAbbrev in distinct-values((collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepObsStn/moles:repositoryIdentifier and moles:localIdentifier=$DepObsStn/moles:localIdentifier]]/moles:abbreviation)) 
    7379                    return element Short_Name {data($DepObsStnAbbrev)}, 
    74                 for $DepObsStnName in distinct-values((collection('/db/ndg_B_metadata')/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepObsStn/moles:repositoryIdentifier and moles:localIdentifier=$DepObsStn/moles:localIdentifier]]/moles:name)) 
     80                for $DepObsStnName in distinct-values((collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepObsStn/moles:repositoryIdentifier and moles:localIdentifier=$DepObsStn/moles:localIdentifier]]/moles:name)) 
    7581                    return element Long_Name {data($DepObsStnName)} 
    7682                }, 
     
    100106        return  
    101107            element Project { 
    102                 for $DepActAbbrev in distinct-values(collection('/db/ndg_B_metadata')/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepAct/moles:repositoryIdentifier and moles:localIdentifier=$DepAct/moles:localIdentifier]]/moles:abbreviation) 
     108                for $DepActAbbrev in distinct-values(collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepAct/moles:repositoryIdentifier and moles:localIdentifier=$DepAct/moles:localIdentifier]]/moles:abbreviation) 
    103109                    return  
    104110                        element Short_Name {data($DepActAbbrev)}, 
    105                 for $DepActName in distinct-values(collection('/db/ndg_B_metadata')/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepAct/moles:repositoryIdentifier and moles:localIdentifier=$DepAct/moles:localIdentifier]]/moles:name) 
     111                for $DepActName in distinct-values(collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepAct/moles:repositoryIdentifier and moles:localIdentifier=$DepAct/moles:localIdentifier]]/moles:name) 
    106112                    return  
    107113                        element Long_Name {data($DepActName)} 
     
    133139                    order by $DataCreatorRole/moles:startDate empty least 
    134140                            return  
    135                                 for $DataCreatorRoleHolder in collection('/db/ndg_B_metadata')/moles:dgMetadata/(moles:dgOrganisation | moles:dgPerson) 
     141                                for $DataCreatorRoleHolder in collection($targetCollection)/moles:dgMetadata/(moles:dgOrganisation | moles:dgPerson) 
    136142                                                [(moles:dgMetadataID/moles:schemeIdentifier='NDG-B0' 
    137143                                                and moles:dgMetadataID/moles:repositoryIdentifier=$DataCreatorRole/(moles:dgOrganisationID | moles:dgPersonID)/moles:repositoryIdentifier 
     
    148154        for $DataCuratorRole in $DE/moles:dgDataEntity/moles:dgDataRoles/moles:dgDataCurator/moles:dgRoleHolder[not(exists(moles:endDate)) or moles:endDate=''] 
    149155            return  
    150                 for $DataCuratorRoleHolder in collection('/db/ndg_B_metadata')/moles:dgMetadata/*[(moles:dgMetadataID/moles:schemeIdentifier='NDG-B0' 
     156                for $DataCuratorRoleHolder in collection($targetCollection)/moles:dgMetadata/*[(moles:dgMetadataID/moles:schemeIdentifier='NDG-B0' 
    151157                   and moles:dgMetadataID/moles:repositoryIdentifier=$DataCuratorRole/*/moles:repositoryIdentifier 
    152158                   and moles:dgMetadataID/moles:localIdentifier=$DataCuratorRole/*/moles:localIdentifier)] 
  • TI07-MOLES/trunk/MDIP/MDIPRelated.spp

    r2358 r2457  
    99        <Folder FolderName="HTML Files" ExtStr="html;htm;xhtml;asp"/> 
    1010        <Folder FolderName="DTD/Schemas" ExtStr="dtd;dcd;xdr;biz;xsd"> 
    11                 <File FilePath="C:\Documents and Settings\Kevin\Desktop\NDG Subversion Repository\TI07-MOLES\trunk\DIF\Schemae\dif9-4.xsd" HomeFolder="Yes"/> 
     11                <File FilePath="C:\Documents and Settings\ko23\Desktop\NDG Subversion repository\TI07-MOLES\trunk\DIF\Schemae\dif9-4.xsd" HomeFolder="Yes"/> 
    1212                <File FilePath=".\Schemae\MDIPMetaData_v0_5.xsd" HomeFolder="Yes"/> 
    1313                <File FilePath=".\Schemae\MDIPMetaData_v1_0.xsd" HomeFolder="Yes"/> 
     
    1717        </Folder> 
    1818        <Folder FolderName="Entities" ExtStr="ent"/> 
     19        <File FilePath="C:\Documents and Settings\ko23\Desktop\NDG Subversion repository\TI07-MOLES\trunk\eXist specific\indexing\moles.xconf" HomeFolder="Yes"/> 
    1920</Project> 
Note: See TracChangeset for help on using the changeset viewer.