Ignore:
Timestamp:
17/12/07 14:28:17 (12 years ago)
Author:
lawrence
Message:

... and support for creation dates of objects as well ...

File:
1 edited

Legend:

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

    r3156 r3158  
    4545        #Use the fact that we know its document name ... 
    4646        fn='%s.xml'%uri 
    47         print fn 
    4847        return self.xmldb.getDoc(self.targetCollection,fn) 
     48     
     49    def created(self,uri=None): 
     50        ''' Return the creation date of the collection (if uri is None), or 
     51        of the specific member within the collection ''' 
     52        q="'%s'"%self.targetCollection 
     53        if uri is not None: q+=",'%s.xml'"%uri 
     54        xq="<created>{xmldb:created(%s)}</created>"%q 
     55        r=self.xmldb.executeChunkedQuery(xq,1,1) 
     56        e=ET.fromstring(str(r)) 
     57        return e.findtext('created') 
     58        
     59         
    4960         
    5061        
Note: See TracChangeset for help on using the changeset viewer.