Module org.entur.netex.gtfs.export
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 TypeMethodDescriptionorg.onebusaway.gtfs.model.AgencygetAgencyById(String agencyId) Return a GTFS agency by id.org.onebusaway.gtfs.model.Agencyorg.onebusaway.gtfs.model.StopgetStopById(String stopId) Return a GTFS stop by id.org.onebusaway.gtfs.model.TripgetTripById(String tripId) Return a GTFS trip by id.voidsaveEntity(Object entity) 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
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.
-
getTripById
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
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
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()
-