ZipGtfsFeedWriter

class ZipGtfsFeedWriter @JvmOverloads constructor(outputStream: OutputStream, compressionLevel: Int = Deflater.BEST_COMPRESSION) : GtfsFeedWriter

Writes the GTFS feed to a ZIP archive.

Parameters

outputStream

Output stream where the GTFS zip will be written

compressionLevel

Compression level to be used, see java.util.zip.Deflater for possible values

Constructors

Link copied to clipboard
constructor(outputFile: Path, compressionLevel: Int = Deflater.BEST_COMPRESSION)
constructor(outputStream: OutputStream, compressionLevel: Int = Deflater.BEST_COMPRESSION)

Functions

Link copied to clipboard
open override fun close()

Closes the underlying output stream

Link copied to clipboard
fun writeAgencies(agencies: Stream<Agency>)
fun writeAgencies(agencies: Iterable<Agency>)

Writes agencies to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard

Writes attributions to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard

Writes calendar dates to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writeCalendars(calendars: Stream<Calendar>)

Writes calendars to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard

Writes fare attributes to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writeFareRules(fareRules: Stream<FareRule>)

Writes fare rules to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writeFeedInfos(feedInfos: Stream<FeedInfo>)

Writes feed info to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writeFrequencies(frequencies: Stream<Frequency>)

Writes frequencies to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writeGtfsFeed(agencies: Collection<Agency>?, attributions: Collection<Attribution>?, calendars: Collection<Calendar>?, calendarDates: Collection<CalendarDate>?, fareAttributes: Collection<FareAttribute>?, fareRules: Collection<FareRule>?, feedInfos: Collection<FeedInfo>?, frequencies: Collection<Frequency>?, levels: Collection<Level>?, pathways: Collection<Pathway>?, routes: Collection<Route>?, shapes: Collection<Shape>?, stops: Collection<Stop>?, stopTimes: Collection<StopTime>?, transfers: Collection<Transfer>?, translations: Collection<Translation>?, trips: Collection<Trip>?)

Writes content to the GTFS feed. Parameters which are null or contain an empty collection are not written

Link copied to clipboard
fun writeLevels(levels: Stream<Level>)
fun writeLevels(levels: Iterable<Level>)

Writes levels to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writePathways(pathways: Stream<Pathway>)

Writes pathways to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writeRoutes(routes: Stream<Route>)
fun writeRoutes(routes: Iterable<Route>)

Writes routes to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writeShapes(shapes: Stream<Shape>)
fun writeShapes(shapes: Iterable<Shape>)

Writes shapes to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writeStops(stops: Stream<Stop>)
fun writeStops(stops: Iterable<Stop>)

Writes stops to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writeStopTimes(stopTimes: Stream<StopTime>)

Writes stop times to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writeTransfers(transfers: Stream<Transfer>)

Writes transfers to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard

Writes translations to the GTFS feed. If the file already exists, it will be overwritten

Link copied to clipboard
fun writeTrips(trips: Stream<Trip>)
fun writeTrips(trips: Iterable<Trip>)

Writes trips to the GTFS feed. If the file already exists, it will be overwritten