Exemplo n.º 1
0
    def store_aircraft(new_aircraft_data):
        '''Stores a new aircraft.'''
        new_aircraft = Aircraft(new_aircraft_data[0], new_aircraft_data[1],
                                new_aircraft_data[2], new_aircraft_data[3],
                                Aircraft_LL.get_new_aircraft_id())

        IO_API.append_data("aircraft", [new_aircraft])
Exemplo n.º 2
0
    def store_new_voyage(destination_id, departure_time):

        flight_number_1,\
        flight_number_2 = Voyage_LL.__get_voyage_flight_numbers(destination_id,
                                                            departure_time)
        new_voyage = Voyage(None, destination_id, str(departure_time),
                            flight_number_1, flight_number_2, [], False,
                            Voyage_LL.get_new_voyage_id())
        IO_API.append_data("voyage", [new_voyage])
Exemplo n.º 3
0
    def store_employee(employee_info):
        new_employee = Employee(employee_info[0],
                                employee_info[1],
                                employee_info[2],
                                employee_info[3],
                                employee_info[4],
                                employee_info[5],
                                employee_info[6])
        '''Stores a new employee.'''

        IO_API.append_data("employee", [new_employee])
Exemplo n.º 4
0
    def store_destination(destination_info):
        '''Stores a new destination.'''


        new_destination = Destination(destination_info[1],
                                      destination_info[2],
                                      destination_info[3],
                                      destination_info[4],
                                      destination_info[5],
                                      destination_info[6],
                                      Destination_LL.get_new_destination_id(),
                                      destination_info[0]
                                      )

        IO_API.append_data("destination", [new_destination])
Exemplo n.º 5
0
 def store_old_voyage(old_voyage):
     """ Take in an a Old Voyage object, gives it a new id and writes it to file """
     old_voyage.set_id(Old_Voyage_LL.get_new_id(old_voyage))
     IO_API.append_data("old_voyage", [old_voyage])
Exemplo n.º 6
0
 def append_aircraft_list(aircraft_list):
     IO_API.append_data(Aircraft_LL.AIRCRAFT_ID, aircraft_list)