Changeset 1898
- Timestamp:
- 19/12/06 19:07:48 (14 years ago)
- Location:
- TI01-discovery/trunk/ingestAutomation/OAIBatch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TI01-discovery/trunk/ingestAutomation/OAIBatch/SpaceTimeIngestFromMOLES.py
r1821 r1898 48 48 if filename.find('.xml') != -1: 49 49 full_filename = indir + "/" + filename 50 no_bbox, no_dates = False 50 51 dgMeta=MRW.dgMetadata() 51 52 try: … … 56 57 try: 57 58 bbox=dgMeta.dgMetadataRecord.dgDataEntity.dgDataSummary.dgDataCoverage.dgSpatialCoverage.BoundingBox 59 print bbox 58 60 except: 59 61 print "INFO: XML moles document %s does not contain a bounding box." %full_filename 60 62 no_bbox=True 61 63 try: 62 64 dates=dgMeta.dgMetadataRecord.dgDataEntity.dgDataSummary.dgDataCoverage.dgTemporalCoverage.DateRange 63 except: 64 print "INFO: XML moles document %s does not contain a bounding box." %full_filename 65 print dates 66 except: 67 print "INFO: XML moles document %s does not contain temporal info." %full_filename 68 no_dates=True 65 69 66 coverage= [dates.DateRangeEnd, dates.DateRangeStart, bbox.LimitNorth, bbox.LimitSouth,bbox.LimitEast, bbox.LimitWest] 70 if no_bbox and no_dates: 71 print "INFO: XML moles document %s does not contain any spatiotemporal info." %full_filename 72 continue 73 #coverage= [dates.DateRangeEnd, dates.DateRangeStart, bbox.LimitNorth, bbox.LimitSouth,bbox.LimitEast, bbox.LimitWest] 67 74 #Mid = dgMeta.dgMetadataRecord.dgMetadataID.repositoryIdentifier+"__"+dgMeta.dgMetadataRecord.dgMetadataID.localIdentifier 68 75 Mid = filename 69 print coverage,Mid76 print Mid 70 77 #parse the coordinates somewhat 71 78 #west -
TI01-discovery/trunk/ingestAutomation/OAIBatch/oai_ingest.py
r1889 r1898 27 27 import commands 28 28 import string 29 import SpaceTimeIngestFromMOLES 29 30 #import oaiClean 30 31 … … 178 179 print "ERROR: couldn't create the minimum moles records" 179 180 sys.exit 181 #are there any records 182 outdir = "./DIF2MOLES" 183 try: 184 os.stat(outdir) 185 except: 186 print "ERROR: couldn't create the minimum moles records for %s" %datacentre 187 sys.exit() 180 188 181 189 # ingest the created discovery minimum molesrecords into eXist db. … … 187 195 188 196 #Extract the spatiotemporal info from created moles and put in Postgres db 189 outdir = "./DIF2MOLES" 190 try: 191 SpaceTimeIngestFromMOLES.main(outdir) 192 except: 193 print "ERROR: SpaceTimeIngestFromMOLES failed. Carrying on to do backups" 197 SpaceTimeIngestFromMOLES.main(outdir) 194 198 195 199 #Make copies of discovery and oai/originals and DIF2MOLES areas to backup area for tape backups
Note: See TracChangeset
for help on using the changeset viewer.