Changeset 3840
- Timestamp:
- 01/05/08 14:20:37 (13 years ago)
- Location:
- exist/trunk/python
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
exist/trunk/python/ndgUtils/ndgDirectory.py
r3180 r3840 21 21 #get the right namespace 22 22 self.ns={'DIF':'http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/','MOLES':'http://ndg.nerc.ac.uk/moles','MDIP':'http://www.oceannet.org/mdip/xml'}[docType] 23 # select the query23 #load all queries 24 24 queries=ndgXqueries.ndgXqueries() 25 #select the right query according to the docType 25 26 xqName={'DIF':'DIFList','MOLES':'molesList', 'MDIP':'MDIPList', 'moles':'molesList'}[docType] 26 27 self.docType=docType 27 28 xq=queries[xqName] 29 # set the query up with the correct target collection 28 30 self.xq=xq.replace('TargetCollection',self.targetCollection) 29 31 -
exist/trunk/python/ndgUtils/ndgXqueries.py
r3125 r3840 14 14 #remember that .rstrip doesn't quite do what you think it does :-) 15 15 self.xq=dict([(re.sub('.xq\Z','',f),pkg_resources.resource_string('ndgUtils','%s/%s'%(directory,f))) for f in xq]) 16 17 # add the various xquery libraries, too 18 self.xqlib=dict() 19 dirs = ['xqueryLib/Vocabs', 'xqueryLib/Utilities', 'xqueryLib/StubB'] 20 for dir in dirs: 21 files = pkg_resources.resource_listdir('ndgUtils', dir) 22 for f in files: 23 if f.find('.xquery') == -1: 24 continue 25 26 #re.sub('.xquery\Z','',f)] = \ 27 self.xqlib[f] = pkg_resources.resource_string('ndgUtils','%s/%s'%(dir,f)) 28 16 29 def __setitem__(self,key,value): 17 30 ''' Add a new xquery to the xquery database dynamically''' -
exist/trunk/python/setup.py
r3186 r3840 9 9 packages=find_packages(), 10 10 test_suite='nose.collector', 11 package_data = {'ndgUtils':['xquery/*.xq' ]},11 package_data = {'ndgUtils':['xquery/*.xq','xqueryLib/*/*.xquery']}, 12 12 author = 'Bryan Lawrence', 13 13 license = 'LGPL',
Note: See TracChangeset
for help on using the changeset viewer.