Changeset 4532


Ignore:
Timestamp:
04/12/08 09:52:37 (11 years ago)
Author:
cbyrom
Message:

Generalise atomDeploymentsList.xq to become atomTypeList.xq and adjust
surrounding code + tidy up some vocab data wrt deployment terms.

Location:
exist/trunk
Files:
4 edited
1 moved

Legend:

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

    r4444 r4532  
    2626         
    2727class DocumentRetrieve(ndg_eXist): 
    28     ''' This class provides a document retrieval service via the NDG exist interfaces ''' 
    29      
    30     ATOM_DEPLOYMENTS = 'ATOM-DEPLOYMENTS' 
     28    '''  
     29    This class provides a document retrieval service via the NDG exist interfaces  
     30    ''' 
     31 
     32    ATOM_TYPE = 'ATOM-TYPE' 
    3133    def __init__(self, repository, pwfile='passwords.txt'): 
    3234        logging.info("Using repository, '%s'" %repository) 
     
    3941                           'NDG-B0':'moles','NDG-B1':'molesObjectType','MDIP':'moles2mdip', \ 
    4042                           'NDG-A0':'csml','NumSim':'numsim', 'ATOM':'atom', \ 
    41                            'ATOM-BACKUP':'atom', self.ATOM_DEPLOYMENTS:'atomDeploymentsList'} 
     43                           'ATOM-BACKUP':'atom', self.ATOM_TYPE:'atomTypeList'} 
    4244 
    4345    def _retrieveDoc(self, schema, xqtype, targetCollection, repository, localID): 
  • exist/trunk/python/ndgUtils/lib/utilities.py

    r4505 r4532  
    3030    logging.debug("Checking validity of uri, '%s'" %uri) 
    3131    # set the socket timeout period 
    32     socket.setdefaulttimeout(5) 
     32    socket.setdefaulttimeout(10) 
    3333     
    3434    try: 
  • exist/trunk/python/ndgUtils/ndgXqueries.py

    r4490 r4532  
    7575            return xq[s+2:e] 
    7676        else: return 'No help available for [%s]'%key 
     77         
     78         
    7779    def actual(self,key,targetCollection,repositoryID,localID): 
    7880        ''' Return an actual xquery targetted for a specific localID, repositoryID and 
  • exist/trunk/python/ndgUtils/vocabtermdata.py

    r4505 r4532  
    158158                 CSML_TERM:VocabTermItem('http://vocab.ndg.nerc.ac.uk/term/N021', '1'), 
    159159                 ACTIVITY_TERM:VocabTermItem('Activity - NOT YET SET UP', ACTIVITY_TERM, title = 'Activity'), 
    160                  ACTIVITY_DEPLOYMENT_TERM:VocabTermItem('Activity Deployment - NOT YET SET UP', ACTIVITY_DEPLOYMENT_TERM, title = 'Activity Deployment'), 
     160                 ACTIVITY_DEPLOYMENT_TERM:VocabTermItem('Activity Deployment - NOT YET SET UP', ACTIVITY_DEPLOYMENT_TERM, title = DEPLOYMENT_TERM), 
    161161                 DPT_TERM:VocabTermItem('DPT - NOT YET SET UP', DPT_TERM, title = 'Data Production Tool'), 
    162162                 OBS_TERM:VocabTermItem('OBS - NOT YET SET UP', OBS_TERM, title = 'Observation Station'), 
     
    207207                 } 
    208208 
    209     ATOM_TYPES = [ACTIVITY_TERM, DE_TERM, DEPLOYMENT_TERM, DPT_TERM, GRANULE_TERM, OBS_TERM] 
     209    ATOM_TYPES = [DE_TERM, GRANULE_TERM, ACTIVITY_DEPLOYMENT_TERM, ACTIVITY_TERM, DPT_TERM, OBS_TERM] 
    210210     
    211211    DEPLOYABLE_ATOM_TYPES = [ACTIVITY_TERM, DPT_TERM, OBS_TERM] 
     
    263263    VOCAB_SERVER_URL = 'http://vocab.ndg.nerc.ac.uk/clients/whatLists' 
    264264 
     265#    BROWSE_ROOT_URL = "http://snow.badc.rl.ac.uk:5000/view/" 
    265266    BROWSE_ROOT_URL = "http://localhost:5000/view/" 
    266267 
  • exist/trunk/xquery/atomTypeList.xq

    r4444 r4532  
    44declare variable $targetCollection as xs:string := 'TargetCollection'; 
    55declare variable $localIdentifier as xs:string := 'LocalID'; 
     6declare variable $atomType as xs:string := 'RepositoryID'; 
    67<docs> 
    78{ 
    8 for $DE in collection($targetCollection)/atom:entry[atom:category/@label = 'Deployment' and 
     9for $DE in collection($targetCollection)/atom:entry[atom:category/@label = $atomType and 
    910        atom:link/@href = $localIdentifier] return 
    1011$DE 
Note: See TracChangeset for help on using the changeset viewer.