All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.onebusaway.gtfs.services.GtfsRelationalDao Maven / Gradle / Ivy

There is a newer version: 1.3.4
Show newest version
package org.onebusaway.gtfs.services;

import org.onebusaway.gtfs.model.Agency;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Frequency;
import org.onebusaway.gtfs.model.Route;
import org.onebusaway.gtfs.model.ShapePoint;
import org.onebusaway.gtfs.model.Stop;
import org.onebusaway.gtfs.model.StopTime;
import org.onebusaway.gtfs.model.Trip;

import java.util.List;

/**
 * While {@link GtfsDao} has basic methods for retrieving collections of
 * entities and entities by id, {@link GtfsRelationalDao} adds some basic
 * methods for retrieving entities using more complex data relations.
 * 
 * You can imagine many complex queries that you might perform on GTFS data,
 * most of which will not be included here. These are just some basic relational
 * methods that we use to bootstrap other GTFS classes. To add more complex
 * queries, look at the specific mechanisms provided by classes implementing
 * {@link GtfsRelationalDao} and {@link GtfsDao}.
 * 
 * @author bdferris
 */
public interface GtfsRelationalDao extends GtfsDao {

  /****
   * ServiceId Methods
   ****/

  public List getTripAgencyIdsReferencingServiceId(AgencyAndId serviceId);

  /****
   * Route Methods
   ****/

  public List getRoutesForAgency(Agency agency);

  /****
   * {@link Trip} Methods
   ****/

  public List getTripsForRoute(Route route);

  /****
   * {@link StopTime} Methods
   ****/

  /**
   * @return the list of {@link StopTime} objects associated with the trip,
   *         sorted by {@link StopTime#getStopSequence()}
   */
  public List getStopTimesForTrip(Trip trip);

  /**
   * @return the list of {@link StopTime} objects associated with the specified
   *         {@link Stop}, in no particular order
   */
  public List getStopTimesForStop(Stop stop);

  /****
   * {@link ShapePoint} Methods
   ****/

  public List getShapePointsForShapeId(AgencyAndId shapeId);

  /****
   * {@link Frequency} Methods
   ****/

  public List getFrequenciesForTrip(Trip trip);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy