Module org.entur.netex.gtfs.export
Class DefaultTripProducer
java.lang.Object
org.entur.netex.gtfs.export.producer.DefaultTripProducer
- All Implemented Interfaces:
TripProducer
Produce a GTFS Trip or null if the service journey does not correspond to a valid TFS Trip
In particular ServiceJourney having a ServiceAlteration=cancelled or ServiceAlteration=replaced are not valid GTFS Trip.
-
Field Summary
Fields inherited from interface org.entur.netex.gtfs.export.producer.TripProducer
GTFS_DIRECTION_INBOUND, GTFS_DIRECTION_OUTBOUND -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTripProducer(NetexDatasetRepository netexDatasetRepository, GtfsDatasetRepository gtfsDatasetRepository, GtfsServiceRepository gtfsServiceRepository) -
Method Summary
Modifier and TypeMethodDescriptionorg.onebusaway.gtfs.model.Tripproduce(org.rutebanken.netex.model.ServiceJourney serviceJourney, org.rutebanken.netex.model.Route netexRoute, org.onebusaway.gtfs.model.Route gtfsRoute, org.onebusaway.gtfs.model.AgencyAndId shapeId, org.rutebanken.netex.model.DestinationDisplay initialDestinationDisplay) Return a GTFS Trip corresponding to the ServiceJourney or null if the ServiceJourney cannot be converted into a valid GTFS trip.
-
Constructor Details
-
DefaultTripProducer
public DefaultTripProducer(NetexDatasetRepository netexDatasetRepository, GtfsDatasetRepository gtfsDatasetRepository, GtfsServiceRepository gtfsServiceRepository)
-
-
Method Details
-
produce
public org.onebusaway.gtfs.model.Trip produce(org.rutebanken.netex.model.ServiceJourney serviceJourney, org.rutebanken.netex.model.Route netexRoute, org.onebusaway.gtfs.model.Route gtfsRoute, org.onebusaway.gtfs.model.AgencyAndId shapeId, org.rutebanken.netex.model.DestinationDisplay initialDestinationDisplay) Description copied from interface:TripProducerReturn a GTFS Trip corresponding to the ServiceJourney or null if the ServiceJourney cannot be converted into a valid GTFS trip.- Specified by:
producein interfaceTripProducer- Parameters:
serviceJourney- the NeTEx service journeynetexRoute- the NeTEx routegtfsRoute- the GTFS routeshapeId- the optional shape idinitialDestinationDisplay- the initial destination display.- Returns:
- a GTFS Trip corresponding to the ServiceJourney or null if the ServiceJourney cannot be converted into a valid GTFS trip.
-