#NEWLINE# def __init__( self , collection , dataset ) : #NEWLINE# #INDENT# self . collection = collection #NEWLINE# self . datacube = collection . datacube #NEWLINE# self . db = IngestDBWrapper ( self . datacube . db_connection ) #NEWLINE# self . acquisition_dict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . acquisiton_id = None #NEWLINE# for field in self . ACQUISITION_METADATA_FIELDS : #NEWLINE# #INDENT# self . acquisition_dict [ field ] = dataset . metadata_dict [ field ] #NEWLINE# #UNINDENT# self . acquisition_dict [ 'satellite_id' ] = self . db . get_satellite_id ( self . acquisition_dict [ 'satellite_tag' ] ) #NEWLINE# self . acquisition_dict [ 'sensor_id' ] = self . db . get_sensor_id ( self . acquisition_dict [ 'satellite_id' ] , self . acquisition_dict [ 'sensor_name' ] ) #NEWLINE# self . acquisition_id = self . db . get_acquisition_id_fuzzy ( self . acquisition_dict ) #NEWLINE# if ( self . acquisition_id is None ) : #NEWLINE# #INDENT# self . acquisition_id = self . db . insert_acquisition_record ( self . acquisition_dict ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . acquisition_dict [ 'acquisition_id' ] = collection . acquisition_id