Changeset 4778


Ignore:
Timestamp:
12/01/09 09:46:41 (11 years ago)
Author:
cbyrom
Message:

Move code to augment atom data when doing the atom to DIF xquery
transform - from xml_creation package to ndgUtils - putting in a new
package here. Also, move the organisation data, used in this
process, to new 'resource' dir in ndgUtils.

Location:
exist/trunk/python/ndgUtils
Files:
4 added
1 edited

Legend:

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

    r4532 r4778  
    4343                self.xqlib[f] = pkg_resources.resource_string('ndgUtils','%s/%s'%(dir,f)) 
    4444         
     45        # also add the organisation data files - NB, this class should be generalised 
     46        # to make more sense... 
     47        files = pkg_resources.resource_listdir('ndgUtils', 'resources') 
     48        self.resources = {} 
     49        for f in files: 
     50            if f.find('.xml') == -1:  
     51                continue 
     52            self.resources[f] = pkg_resources.resource_string('ndgUtils','resources/%s'%f) 
     53         
    4554    def __setitem__(self,key,value): 
    4655        ''' Add a new xquery to the xquery database dynamically''' 
Note: See TracChangeset for help on using the changeset viewer.