org.onebusaway.gtfs.services.GtfsRelationalDao Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of onebusaway-gtfs Show documentation
Show all versions of onebusaway-gtfs Show documentation
A Java library for reading and writing General Transit Feed Spec feeds
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);
}