Ignore:
Timestamp:
30/09/08 12:17:24 (11 years ago)
Author:
cbyrom
Message:

Add online reference terms data to the vocabtermdata class + extend the
utility methods to allow the retrieval of this data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • exist/trunk/python/ndgUtils/vocabtermdata.py

    r4236 r4248  
    2424    ''' 
    2525 
     26    OBJECT_PAGE_TERM = 'ObjectPage' 
     27    DATA_URL_TERM = 'DataURL' 
     28    DATA_PAGE_TERM = 'DataPage' 
     29    CURATOR_PAGE_TERM = 'CuratorPage' 
     30    EXT_METADATA_TERM = 'ExtMetadata' 
     31    METADATA_SOURCE_TERM = 'MetadataSource' 
    2632    URI_TERM = 'URI' 
    2733    LOGO_TERM = 'LOGO' 
     
    94100     
    95101    TERM_DATA = { 
    96                  URI_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N041', '3', title = 'Data Home Page'), 
     102                 OBJECT_PAGE_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N041', '1', title = 'Object Home Page'), 
     103                 DATA_URL_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N041', '2', title = 'Data URL'), 
     104                 DATA_PAGE_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N041', '3', title = 'Data Home Page'), 
     105                 CURATOR_PAGE_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N041', '4', title = 'Curator Home Page'), 
     106                 EXT_METADATA_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N041', '5', title = 'Extended Metadata'), 
     107                 METADATA_SOURCE_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N041', '6', title = 'Original Metadata Source'), 
     108                 #URI_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N041', '3URI', title = 'Data Home Page'), 
    97109                 BADC_TERM:VocabTermItem('NOT YET SET UP', BADC_TERM, title = 'British Atomspheric Data Centre'), 
    98110                 NEODC_TERM:VocabTermItem('NOT YET SET UP', NEODC_TERM, title = 'NERC Earth Observation Data Centre'), 
    99111                 LOGO_TERM:VocabTermItem('LOGO', 'LOGO', title = 'Logo'), 
    100112                 NUM_SIM_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N041', '7', title = 'NumSim description'), 
    101                  OPENDAP_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU010', title = 'GET DATA > OPENDAP DATA (DODS)'), 
    102                  THREDDS_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU013', title = 'GET DATA > THREDDS DATA'), 
    103                  WMS_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU026', title = 'GET SERVICE > GET WEB MAP SERVICE (WMS)'), 
    104                  WCS_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU024', title = 'GET SERVICE > GET WEB COVERAGE SERVICE (WCS)'), 
    105                  WFS_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU025', title = 'GET SERVICE > GET WEB FEATURE SERVICE (WFS)'), 
    106                  LAS_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU006', title = 'GET DATA > LAS'), 
     113                 OPENDAP_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU010', title = 'GET DATA > OPENDAP DATA (DODS)'), 
     114                 THREDDS_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU013', title = 'GET DATA > THREDDS DATA'), 
     115                 WMS_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU026', title = 'GET SERVICE > GET WEB MAP SERVICE (WMS)'), 
     116                 WCS_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU024', title = 'GET SERVICE > GET WEB COVERAGE SERVICE (WCS)'), 
     117                 WFS_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU025', title = 'GET SERVICE > GET WEB FEATURE SERVICE (WFS)'), 
     118                 LAS_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/P201', 'GCMDU006', title = 'GET DATA > LAS'), 
    107119                 DATA_EXTRACTOR_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N041', '8', title = 'NDG DataExtractor'), 
    108120                 FILE_BROWSER_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N041', '9', title = 'File Browser'), 
     
    160172    PROVIDER_TYPES = [BADC_TERM, NEODC_TERM] 
    161173 
     174    ONLINE_REF_TYPES = [ OBJECT_PAGE_TERM, DATA_URL_TERM, DATA_PAGE_TERM, \ 
     175                         CURATOR_PAGE_TERM, EXT_METADATA_TERM, METADATA_SOURCE_TERM, \ 
     176                         NUM_SIM_TERM, \ 
     177                         OPENDAP_TERM, THREDDS_TERM, WMS_TERM, WCS_TERM, WFS_TERM, \ 
     178                         DATA_EXTRACTOR_TERM, FILE_BROWSER_TERM, LAS_TERM, LOGO_TERM] 
     179#URI_TERM, \ 
     180 
    162181    ATOM_CATEGORY = "atom" 
     182    ONLINE_REF_CATEGORY = "onlineref" 
    163183    PROVIDER_CATEGORY = "provider" 
    164184     
     
    249269        elif category == self.PROVIDER_CATEGORY: 
    250270            catList = self.PROVIDER_TYPES 
     271        elif category == self.ONLINE_REF_CATEGORY: 
     272            catList = self.ONLINE_REF_TYPES 
    251273        else: 
    252274            errorMessage = "Unrecognised data category, '%s'" %category 
Note: See TracChangeset for help on using the changeset viewer.