- Timestamp:
- 19/01/09 16:51:33 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ndgCommon/trunk/ndg/common/src/clients/xmldb/eXist/existdbclient.py
r4828 r4843 414 414 415 415 # create the collection, if it doesn't already exist - NB, this won't overwrite anything 416 if self.collections is None or not self.collections.get(collection):416 if self.collections is None or not collection in self.collections.values(): 417 417 self.createCollections([collection]) 418 418 … … 422 422 logging.error(errorMessage) 423 423 raise SystemError(errorMessage) 424 425 # update the stored collections info, if being used 426 if self.collections: 427 self.collections[fileName] = collection 424 428 425 429 logging.info("File added to eXist") … … 490 494 Get all atom collection paths and store in a dictionary - for easy 491 495 reference when doing lots of things at once 492 @return: dict with key/val of atomID/collectionPath496 @return: dict with key/val of filename/collectionPath 493 497 ''' 494 498 logging.info("Retrieving all atom collection paths") … … 506 510 collection = member.findtext('{http://www.w3.org/2005/Atom}fileName') 507 511 fileName = collection.split('/')[-1] 508 fileName = fileName.split('.')[0] 512 fileName = fileName.split('.')[0:-1] 513 fileName = '.'.join(fileName) 509 514 dir = '/'.join(collection.split('/')[0:-1]) 510 515 colData[fileName] = dir
Note: See TracChangeset
for help on using the changeset viewer.