Changeset 2508 for TI01-discovery
- Timestamp:
- 22/05/07 18:10:10 (14 years ago)
- Location:
- TI01-discovery/trunk/ingestAutomation/OAIBatch
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TI01-discovery/trunk/ingestAutomation/OAIBatch/SchemaNameSpace.py
r2324 r2508 11 11 #print dir(self.ff) 12 12 #print dir(self.ww) 13 print "format: %s" %self.format13 #print "format: %s" %self.format 14 14 self.lines=self.ff.readlines() 15 15 for self.line in self.lines: 16 16 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) 18 18 self.line='<DIF xmlns="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n' 19 19 self.ww.write(self.line) -
TI01-discovery/trunk/ingestAutomation/OAIBatch/SpaceTimeIngestFromMOLES.py
r2424 r2508 37 37 sql=sql.replace("'"+startdate+"',"," ") 38 38 if str(enddate)=='noenddate': 39 sql=sql.replace(", enddate"," ") 39 40 sql=sql.replace("enddate"," ") 41 #print sql 40 42 sql=sql.replace(", 'no '"," ") 41 sql=sql.replace("'"+enddate+"',"," ") 43 sql=sql.replace(", '"+enddate+"'"," ") 44 #print sql 42 45 if str(west)=='null' or str(south)=='null' or str(east)=='null' or str(north)=='null': 43 46 sql=sql.replace("coordinates,"," ") … … 117 120 print "INFO: XML moles document %s does not contain any spatiotemporal info." %full_filename 118 121 continue 122 119 123 if no_dates: 120 124 pass … … 122 126 startdate=dates.DateRangeStart 123 127 enddate= dates.DateRangeEnd 124 if startdate==None :128 if startdate==None or startdate=='None': 125 129 startdate="nostartdate" 126 if enddate==None :130 if enddate==None or enddate=='None': 127 131 enddate="noenddate" 128 132 -
TI01-discovery/trunk/ingestAutomation/OAIBatch/oai_ingest.py
r2423 r2508 154 154 # Create/clear the directory for the 'out' namespace corrected copy of the discovery records. 155 155 if 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/{\}" 157 157 print "Executing : " + commandline 158 158 status = os.system(commandline) … … 193 193 status = os.system(commandline) 194 194 if status !=0: 195 sys.exit(" Failed at re-naming file stage")195 sys.exit("ERROR: Failed at re-naming file stage") 196 196 numfilesproc += 1 197 197 else: … … 209 209 SchemaNameSpace(in_filename, corrected_filename,datacentre_format) 210 210 except: 211 print " SchemaNameSpace failed on file %s"%in_filename211 print "ERROR: SchemaNameSpace failed on file %s"%in_filename 212 212 213 213 # ingest the datacentres records into eXist db (backups of exist happen nightly). … … 228 228 status = os.system(commandline) 229 229 if status !=0: 230 sys.exit(" Failed at clearing out DIF2MOLES area.")230 sys.exit("ERROR: Failed at clearing out DIF2MOLES area.") 231 231 232 232 # Then run the minimum moles creator for each discovery record -
TI01-discovery/trunk/ingestAutomation/OAIBatch/ukho_config.properties
r2252 r2508 5 5 # 6 6 #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-ukho7 host_path /usr/local/jakarta-tomcat/webapps/oai/WEB-INF/harvested_records/62-172-108-26-8080-MDIP 8 8 # 9 9 #Define groups - portal groups for limiting searches by 'group of datacentres'.
Note: See TracChangeset
for help on using the changeset viewer.