Class FlightAwareDAO

java.lang.Object
org.deltava.dao.http.DAO
org.deltava.dao.http.FlightAwareDAO
Direct Known Subclasses:
GetFARoutes, GetFASchedule, GetFAWeather

abstract class FlightAwareDAO extends DAO
An abstract class to describe FlightAware RESTful Data Access Objects.
Since:
8.0
Version:
11.1
Author:
Luke
  • Constructor Details

    • FlightAwareDAO

      FlightAwareDAO()
  • Method Details

    • setKey

      public final void setKey(String key)
      Sets the API Key to use.
      Parameters:
      key - the key
    • setMaxResults

      public void setMaxResults(int maxResults)
      Sets the maximum number of results to retrieve.
      Parameters:
      maxResults - the maximum number of results
    • init

      protected void init(String url) throws IOException
      Description copied from class: DAO
      Helper method to open the connection.
      Overrides:
      init in class DAO
      Parameters:
      url - the URI to connect to
      Throws:
      IOException - if an error occurs
    • buildURL

      protected String buildURL(String method, Map<String,String> params)
      Builds a FlightAware REST URL.
      Parameters:
      method - the API method name
      params - a Map of parameters and values
      Returns:
      the URL to call