Changeset 2263 for TI01-discovery/trunk


Ignore:
Timestamp:
12/03/07 23:34:44 (13 years ago)
Author:
selatham
Message:

nocs config etc.

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

Legend:

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

    r2262 r2263  
    3232def do_insert(Mid,west,south,east,north,startdate,enddate): 
    3333        sql = "INSERT INTO spatiotemp (id, coordinates, startdate, enddate) VALUES ( '"+Mid+ "', sbox'(("+west+"d , "+south+"d), ("+east+"d , "+north+"d))', '"+startdate+"', '"+enddate+"');" 
    34         #sql.replace("'null'",None) 
     34        sql.replace("nulld","null") 
    3535        print sql 
    3636        cursor = connection.cursor() 
     
    4343def do_update(Mid,west,south,east,north,startdate,enddate): 
    4444        sql = "UPDATE spatiotemp SET coordinates = sbox'(("+west+"d , "+south+"d), ("+east+"d , "+north+"d))', startdate='"+startdate+"', enddate= '"+enddate+"', update_time= now() WHERE id='"+Mid+"';" 
    45         #sql.replace("'null'",None) 
     45        sql.replace("nulld","null") 
    4646        print sql 
    4747        cursor = connection.cursor() 
     
    7171            no_bbox = False 
    7272            no_dates = False 
    73             east = 0 
    74             west = 0 
    75             north = 0 
    76             south = 0 
    77             startdate="January 1, 01 BC" 
    78             enddate="January 1, 01 BC" 
     73            east = 'null' 
     74            west = 'null' 
     75            north = 'null' 
     76            south = 'null' 
     77            startdate="null" 
     78            enddate="null" 
    7979            dgMeta=MRW.dgMetadata() 
    8080            try: 
     
    192192                #print "North = %s" %south 
    193193 
     194            print "west= %s,south %s, east %s, north %s, startdate %s, enddate %s" %(west,south,east,north,startdate,enddate) 
    194195            if id_exists( Mid ): 
    195196                print "INFO: doc %s exists, updating\n" %Mid 
     
    197198            else: 
    198199                print "INFO: doc %s does not exist, inserting new record\n" %Mid 
     200 
    199201                do_insert( Mid, west, south, east, north, startdate, enddate ) 
    200202            numfilesproc += 1 
  • TI01-discovery/trunk/ingestAutomation/OAIBatch/nocs_config.properties

    r1988 r2263  
    1616namespace noc.soton.ac.uk 
    1717# 
     18#Say whether this is a full NDG data Provider who uses NDG identifiers etc. 
     19NDG_dataProvider 
  • TI01-discovery/trunk/ingestAutomation/OAIBatch/oai_ingest.py

    r2252 r2263  
    213213                    ident=getID(original_filename) 
    214214                    if NDG_dataProvider: 
    215                         molesLocalID = ident.split(":",2)[2] 
     215                        ident.replace(":","__") 
     216                        molesLocalID = ident.split("__",2)[2] 
    216217                    else: 
    217218                        molesLocalID = ident 
Note: See TracChangeset for help on using the changeset viewer.