Class GetFASchedule
java.lang.Object
org.deltava.dao.http.DAO
org.deltava.dao.http.FlightAwareDAO
org.deltava.dao.http.GetFASchedule
Loads airline schedule data from FlightAware.
- Since:
- 8.0
- Version:
- 11.1
- Author:
- Luke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSchedule(Airline a, int start, Instant startDate, int days, boolean includeCS) Loads flight schedule entries from FlightAware.Returns any unknown Airline codes from the import.Returns any unknown Airport codes from the import.Methods inherited from class FlightAwareDAO
buildURL, init, setKey, setMaxResultsModifier and TypeMethodDescriptionprotected StringBuilds a FlightAware REST URL.protected voidHelper method to open the connection.final voidSets the API Key to use.voidsetMaxResults(int maxResults) Sets the maximum number of results to retrieve.Methods inherited from class DAO
getCompression, getHeaderField, getIn, getOut, getResponseCode, reset, setAuthentication, setCompression, setConnectTimeout, setMethod, setReadTimeout, setRequestHeader, setReturnErrorStreamModifier and TypeMethodDescriptionReturns the response compression type.protected StringgetHeaderField(String name) Returns an HTTP response header.protected InputStreamgetIn()Retrieves an input stream to the URL.protected OutputStreamgetOut()Retrieves an output stream to the URL.protected intReturns the HTTP response code for this request.voidreset()Resets the connection for subsequent reuse.protected voidsetAuthentication(String userID, String pwd) Sets an authentication request header.voidsetCompression(Compression... cmps) Updates the allowed compression for this request.voidsetConnectTimeout(int timeout) Sets the HTTP connect timeout.voidSets the HTTP method to use if not GET.voidsetReadTimeout(int timeout) Sets the HTTP connect timeout.protected voidsetRequestHeader(String name, String value) Sets a request header.voidsetReturnErrorStream(boolean returnErrStream) Sets whether the error stream should be returned when connecting and an error occurs.
-
Constructor Details
-
GetFASchedule
public GetFASchedule()
-
-
Method Details
-
getUnknownAirports
Returns any unknown Airport codes from the import.- Returns:
- a Collection of Airport codes
-
getUnknownAirlines
Returns any unknown Airline codes from the import.- Returns:
- a Collection of Airline codes
-
getSchedule
public Collection<RawScheduleEntry> getSchedule(Airline a, int start, Instant startDate, int days, boolean includeCS) throws DAOException Loads flight schedule entries from FlightAware.- Parameters:
a- the Airlinestart- the result start offsetstartDate- the start datedays- the number of days to searchincludeCS- TRUE to include codeshare flights, otherwise FALSE- Returns:
- a Collection of RawScheduleEntry beans
- Throws:
DAOException- if an error occurs
-