Changeset 2508 for TI01-discovery


Ignore:
Timestamp:
22/05/07 18:10:10 (12 years ago)
Author:
selatham
Message:

various improvements

Location:
TI01-discovery/trunk/ingestAutomation/OAIBatch
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/trunk/ingestAutomation/OAIBatch/SchemaNameSpace.py

    r2324 r2508  
    1111        #print dir(self.ff) 
    1212        #print dir(self.ww) 
    13         print "format: %s" %self.format 
     13        #print "format: %s" %self.format 
    1414        self.lines=self.ff.readlines() 
    1515        for self.line in self.lines: 
    1616            if self.format== "DIF" and self.line.startswith('<DIF'): 
    17                 print "changing line" 
     17                print "INFO: changing line for %s. output to %s" %(infile,outfile) 
    1818                self.line='<DIF xmlns="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n' 
    1919            self.ww.write(self.line) 
  • TI01-discovery/trunk/ingestAutomation/OAIBatch/SpaceTimeIngestFromMOLES.py

    r2424 r2508  
    3737            sql=sql.replace("'"+startdate+"',"," ") 
    3838        if str(enddate)=='noenddate': 
     39            sql=sql.replace(", enddate"," ") 
    3940            sql=sql.replace("enddate"," ") 
     41            #print sql 
    4042            sql=sql.replace(",   'no '"," ") 
    41             sql=sql.replace("'"+enddate+"',"," ") 
     43            sql=sql.replace(", '"+enddate+"'"," ") 
     44            #print sql 
    4245        if str(west)=='null' or str(south)=='null' or str(east)=='null' or str(north)=='null': 
    4346            sql=sql.replace("coordinates,"," ") 
     
    117120                print "INFO: XML moles document %s does not contain any spatiotemporal info." %full_filename 
    118121                continue 
     122 
    119123            if no_dates: 
    120124                pass 
     
    122126                startdate=dates.DateRangeStart 
    123127                enddate= dates.DateRangeEnd 
    124                 if startdate==None: 
     128                if startdate==None or startdate=='None': 
    125129                    startdate="nostartdate" 
    126                 if enddate==None: 
     130                if enddate==None or enddate=='None': 
    127131                    enddate="noenddate" 
    128132 
  • TI01-discovery/trunk/ingestAutomation/OAIBatch/oai_ingest.py

    r2423 r2508  
    154154# Create/clear the directory for the 'out' namespace corrected copy of the discovery records. 
    155155if os.path.isdir("/usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery_corrected"): 
    156     commandline = "ls -1 /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/ | xargs -i rm /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery_corrected/{\}" 
     156    commandline = "ls -1 /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery_corrected/ | xargs -i rm /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery_corrected/{\}" 
    157157    print "Executing : " + commandline 
    158158    status = os.system(commandline) 
     
    193193                status = os.system(commandline) 
    194194                if status !=0: 
    195                     sys.exit("Failed at re-naming file stage") 
     195                    sys.exit("ERROR: Failed at re-naming file stage") 
    196196                numfilesproc += 1 
    197197        else: 
     
    209209                       SchemaNameSpace(in_filename, corrected_filename,datacentre_format) 
    210210                    except: 
    211                        print "SchemaNameSpace failed on file %s"%in_filename 
     211                       print "ERROR: SchemaNameSpace failed on file %s"%in_filename 
    212212 
    213213# ingest the datacentres records into eXist db (backups of exist happen nightly). 
     
    228228    status = os.system(commandline) 
    229229    if status !=0: 
    230         sys.exit("Failed at clearing out DIF2MOLES area.") 
     230        sys.exit("ERROR: Failed at clearing out DIF2MOLES area.") 
    231231 
    232232# Then run the minimum moles creator for each discovery record 
  • TI01-discovery/trunk/ingestAutomation/OAIBatch/ukho_config.properties

    r2252 r2508  
    55# 
    66#Define host_path as the full directory name where this data centre's records will be harvested into. 
    7 host_path /usr/local/jakarta-tomcat/webapps/oai/WEB-INF/harvested_records/www-dassh-ac-uk-8080-MDIP-ukho 
     7host_path /usr/local/jakarta-tomcat/webapps/oai/WEB-INF/harvested_records/62-172-108-26-8080-MDIP 
    88# 
    99#Define groups - portal groups for limiting searches by 'group of datacentres'. 
Note: See TracChangeset for help on using the changeset viewer.