Changeset 4834 for ndgCommon/trunk/ndg


Ignore:
Timestamp:
19/01/09 10:17:46 (11 years ago)
Author:
cbyrom
Message:

Add support for retrieving DIF documents produced in provider eXist DB

  • i.e. not via discovery service - to allow retrieval of DIF docs

produced when atom docs are published; this will aid harvesting of
info from feeds.

Location:
ndgCommon/trunk/ndg/common/src/dal
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/src/dal/DocumentRetrieve.py

    r4793 r4834  
    66from ndg.common.src.clients.xmldb.eXist.eXistInterface import ndg_eXist 
    77from ndg.common.src.lib.ndgXqueries import ndgXqueries 
     8from ndg.common.src.models.ndgObject import ndgObject as no 
    89from xml.etree import ElementTree as ET 
    910import urllib2, logging, socket 
     
    3738                           'NDG-B0':'moles','NDG-B1':'molesObjectType','MDIP':'moles2mdip', \ 
    3839                           'NDG-A0':'csml','NumSim':'numsim', self.ATOM:'atom', \ 
    39                            self.ATOM_BACKUP_TYPE:'atom', self.ATOM_TYPE:'atomTypeList'} 
     40                           self.ATOM_BACKUP_TYPE:'atom', self.ATOM_TYPE:'atomTypeList', 
     41                           no.BROWSE_DIF_DOC_TYPE:'dif'} 
    4042 
    4143    def _retrieveDoc(self, schema, xqtype, targetCollection, repository, localID): 
  • ndgCommon/trunk/ndg/common/src/dal/ndgRetrieve.py

    r4793 r4834  
    9797        target = ATOM_COLLECTION  
    9898    elif uri.schema == no.ATOM_BACKUP_DOC_TYPE: 
    99         target = ATOM_BACKUP_COLLECTION  
     99        target = ATOM_BACKUP_COLLECTION 
     100    elif uri.schema == no.BROWSE_DIF_DOC_TYPE: 
     101        target = DIF_COLLECTION  
    100102    else: 
    101103        target = MOLES_COLLECTION 
Note: See TracChangeset for help on using the changeset viewer.