Class RouteLoadHelper
java.lang.Object
org.deltava.dao.RouteLoadHelper
A utility class to load flight routes from the database.
- Since:
- 3.4
- Version:
- 11.1
- Author:
- Luke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalculates the "best" SID and STAR for each route, taking into consideration winds and runway popularity.Collection<? extends FlightRoute> Returns the loaded Flight Routes.booleanReturns whether any routes have been loaded.voidLoads cached FlightAware routes from the database.voidLoads ACARS Dispatch routes from the database.voidloadFlightAwareRoutes(boolean saveRoutes) Loads flight routes from FlightAware via FlightXML.voidloadPIREPRoutes(String dbName) Loads flight routes from filed ACARS Flight Reports.voidLoads METARS for the departure and arrival Airports.voidPopulates the routes with waypoint data.voidsetPreferredRunway(String rwy) Sets the preferred departure runway.
-
Constructor Details
-
RouteLoadHelper
Initializes the helper.- Parameters:
c- the JDBC connection to userp- the RoutePar
-
-
Method Details
-
setPreferredRunway
Sets the preferred departure runway.- Parameters:
rwy- the runway ID, or null if none
-
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
Loads METARS for the departure and arrival Airports.- Throws:
DAOException- if a JDBC error occurs
-
loadDispatchRoutes
Loads ACARS Dispatch routes from the database.- Throws:
DAOException- if a JDBC error occurs
-
loadCachedRoutes
Loads cached FlightAware routes from the database.- Throws:
DAOException- if a JDBC error occurs
-
loadFlightAwareRoutes
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
Loads flight routes from filed ACARS Flight Reports.- Parameters:
dbName- the database name- Throws:
DAOException- if a JDBC error occurs
-
calculateBestTerminalRoute
Calculates the "best" SID and STAR for each route, taking into consideration winds and runway popularity.- Throws:
DAOException- if a JDBC error occurs
-
populateRoutes
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
-