Class RouteLoadHelper

java.lang.Object
org.deltava.dao.RouteLoadHelper

public final class RouteLoadHelper extends Object
A utility class to load flight routes from the database.
Since:
3.4
Version:
11.1
Author:
Luke
  • Constructor Details

    • RouteLoadHelper

      public RouteLoadHelper(Connection c, RoutePair rp)
      Initializes the helper.
      Parameters:
      c - the JDBC connection to use
      rp - the RoutePar
  • Method Details

    • setPreferredRunway

      public void setPreferredRunway(String rwy)
      Sets the preferred departure runway.
      Parameters:
      rwy - the runway ID, or null if none
    • getRoutes

      public Collection<? extends FlightRoute> getRoutes()
      Returns the loaded Flight Routes.
      Returns:
      a Collection of FlightRoute beans
    • hasRoutes

      public boolean hasRoutes()
      Returns whether any routes have been loaded.
      Returns:
      TRUE if routes have been loaded, otherwise FALSE
    • loadWeather

      public void loadWeather() throws DAOException
      Loads METARS for the departure and arrival Airports.
      Throws:
      DAOException - if a JDBC error occurs
    • loadDispatchRoutes

      public void loadDispatchRoutes() throws DAOException
      Loads ACARS Dispatch routes from the database.
      Throws:
      DAOException - if a JDBC error occurs
    • loadCachedRoutes

      public void loadCachedRoutes() throws DAOException
      Loads cached FlightAware routes from the database.
      Throws:
      DAOException - if a JDBC error occurs
    • loadFlightAwareRoutes

      public void loadFlightAwareRoutes(boolean saveRoutes) throws DAOException
      Loads flight routes from FlightAware via FlightXML.
      Parameters:
      saveRoutes - TRUE if the fetched routes should be saved in the database, otherwise FALSE
      Throws:
      DAOException - if an I/O or JDBC error occurs
    • loadPIREPRoutes

      public void loadPIREPRoutes(String dbName) throws DAOException
      Loads flight routes from filed ACARS Flight Reports.
      Parameters:
      dbName - the database name
      Throws:
      DAOException - if a JDBC error occurs
    • calculateBestTerminalRoute

      public void calculateBestTerminalRoute() throws DAOException
      Calculates the "best" SID and STAR for each route, taking into consideration winds and runway popularity.
      Throws:
      DAOException - if a JDBC error occurs
    • populateRoutes

      public void populateRoutes() throws DAOException
      Populates the routes with waypoint data. Even if the route was originally populated, this step is required since the SIDs and STARs may have been updated based on weather data.
      Throws:
      DAOException - if a JDBC error occurs