Interface GtfsDatasetRepository

All Known Implementing Classes:
DefaultGtfsRepository

public interface GtfsDatasetRepository
Repository that gives read/write access to the GTFS data model being built.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<org.onebusaway.gtfs.model.Trip>
    Return an optional GTFS trip by id.
    org.onebusaway.gtfs.model.Agency
    Return a GTFS agency by id.
    org.onebusaway.gtfs.model.Agency
     
    org.onebusaway.gtfs.model.Stop
    Return a GTFS stop by id.
    org.onebusaway.gtfs.model.Trip
    Return a GTFS trip by id.
    void
    Add an entity to the in-memory GTFS object model.
    Generate a GTFS archive from the GTFS object model and return an input stream pointing to it.
  • Method Details

    • getAgencyById

      org.onebusaway.gtfs.model.Agency getAgencyById(String agencyId)
      Return a GTFS agency by id.
      Parameters:
      agencyId - the agency id
      Returns:
      the GTFS agency
      Throws:
      GtfsDatasetRepositoryException - if the agency cannot be found in the repository.
    • findTripById

      Optional<org.onebusaway.gtfs.model.Trip> findTripById(String tripId)
      Return an optional GTFS trip by id.
    • getTripById

      org.onebusaway.gtfs.model.Trip getTripById(String tripId)
      Return a GTFS trip by id.
      Parameters:
      tripId - the trip id
      Returns:
      the GTFS trip
      Throws:
      GtfsDatasetRepositoryException - if the trip cannot be found in the repository.
    • getStopById

      org.onebusaway.gtfs.model.Stop getStopById(String stopId)
      Return a GTFS stop by id.
      Parameters:
      stopId - the stop id
      Returns:
      the GTFS stop
      Throws:
      GtfsDatasetRepositoryException - if the stop cannot be found in the repository.
    • saveEntity

      void saveEntity(Object entity)
      Add an entity to the in-memory GTFS object model.
      Parameters:
      entity - the GTFS entity to be saved.
    • writeGtfs

      InputStream writeGtfs()
      Generate a GTFS archive from the GTFS object model and return an input stream pointing to it.
      Returns:
      the GTFS archive
    • getDefaultAgency

      org.onebusaway.gtfs.model.Agency getDefaultAgency()