Esempio n. 1
0
 private boolean isBusOrTrainFlight(DgOagLine line) {
   String aircraftType = line.getAircraftType();
   if (aircraftType.equalsIgnoreCase("BUS") // filter busses
       || aircraftType.equalsIgnoreCase("RFS") // filter bus/train
       || aircraftType.equalsIgnoreCase("TRN")) { // filter trains
     this.ignoredBusOrTrainFlights++;
     return true;
   }
   return false;
 }
Esempio n. 2
0
 private DgOagFlight createFlight(
     String flightDesignator, double departureInSec, double duration, String route, DgOagLine l) {
   DgOagFlight dgf = new DgOagFlight(flightDesignator);
   dgf.setAircraftType(l.getAircraftType());
   dgf.setCarrier(l.getCarrier());
   dgf.setDepartureTime(departureInSec);
   dgf.setDuration(duration);
   dgf.setSeatsAvailable(l.getSeatsAvailable());
   dgf.setRoute(route);
   dgf.setDistanceKm(l.getFlightDistanceKm());
   dgf.setOriginCode(l.getOriginAirport());
   dgf.setDestinationCode(l.getDestinationAirport());
   return dgf;
 }