Ignore:
Timestamp:
20/01/09 16:33:33 (11 years ago)
Author:
cbyrom
Message:

Add new ingest script - to allow ingest of DIF docs from eXist hosted
atom feed. NB, this required restructure of original OAI harvester
to allow re-use of shared code - by abstracting this out into new class,
absstractdocumentingester.

Add new documentation and tidy up codebase removing dependencies where possible to simplify things.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/branches/ingestAutomation-upgrade/OAIBatch/PostgresRecord.py

    r4664 r4854  
    44C Byrom Apr 08 
    55''' 
    6 try: #python 2.5 
    7     from xml.etree import cElementTree 
    8 except ImportError: 
    9     try: 
    10         # if you've installed it yourself it comes this way 
    11         import cElementTree 
    12     except ImportError: 
    13         # if you've egged it this is the way it comes 
    14         from ndgUtils.elementtree import cElementTree 
    15  
     6from xml.etree import cElementTree 
    167import os, sys, logging, re 
    17 import csml.csml2Moles.molesReadWrite as MRW 
    18 from ndgUtils.ndgObject import ndgObject 
    19 import ndgUtils.lib.fileutilities as FileUtilities 
     8#import csml.csml2Moles.molesReadWrite as MRW 
     9from ndg.common.src.models.ndgObject import ndgObject 
     10import ndg.common.src.lib.fileutilities as FileUtilities 
    2011from SpatioTemporalData import SpatioTemporalData 
    2112import keywordAdder 
     
    6455        tmp = filename.split('/') 
    6556        self._dir = '/'.join(tmp[0:len(tmp)-1]) 
    66         self.shortFilename = tmp[len(tmp)-1] 
     57        self.shortFilename = tmp[-1] 
    6758         
    6859        # dir to store a temp copy of the moles file, when produced - for use by other transforms 
     
    153144            raise SystemError, 'Cannot parse the XML moles document %s. Detail:\n%s' %(molesFile, detail) 
    154145 
    155              
    156146 
    157147    def doTransform(self, xQueryType): 
Note: See TracChangeset for help on using the changeset viewer.