Changeset 4025 for exist


Ignore:
Timestamp:
24/06/08 16:32:05 (11 years ago)
Author:
cbyrom
Message:

DocumentRetrieve? - add granule atom support for get method.
ETxmlView - fix nsdumb.strip() - using lstrip() when should be using replace()
eXistConnectory - add removeDoc method to allow cleanup of eXist when
deleting granules.

Location:
exist/trunk/python/ndgUtils
Files:
3 edited

Legend:

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

    r3361 r4025  
    2626    def get(self,repository,schema,localID,targetCollection='/db/discovery/moles'): 
    2727 
    28         if schema in ['NDG-A0','NumSim']: 
     28        if schema in ['NDG-A0', 'NumSim', 'G_ATOM']: 
    2929            ''' These documents are stored in their own native format and have their 
    3030            own native xqueries ''' 
    31             query={'NDG-A0':'csml','NumSim':'numsim'}[schema] 
     31            query={'NDG-A0':'csml','NumSim':'numsim', 'G_ATOM':'granuleAtom'}[schema] 
    3232            xquery=self.xq.actual(query,targetCollection,repository,localID) 
     33            print xquery 
    3334            id,summary=self.executeQuery(xquery) 
    3435            if summary['hits']==1: 
  • exist/trunk/python/ndgUtils/ETxmlView.py

    r3494 r4025  
    102102    def strip(self,tag): 
    103103        ''' Given a tag, strip the default namespace ''' 
    104         return tag.lstrip(self.xmlns) 
     104        return tag.replace(self.xmlns, '', 1) 
    105105 
    106106def et2text(elem,indent='',html=0,space='   ',helper=None): 
  • exist/trunk/python/ndgUtils/eXistConnector.py

    r4010 r4025  
    110110        return r 
    111111     
     112    def removeDoc(self, docPath): 
     113        ''' Remove a document from the eXist database ''' 
     114        r=self.xmlrpc.remove(docPath) 
     115        return r 
     116     
    112117    def createCollection(self,collectionPath): 
    113118        ''' Create a collection in the eXist database at collectionPath ''' 
Note: See TracChangeset for help on using the changeset viewer.