Class GtfsServicesReader

    • Constructor Detail

      • GtfsServicesReader

        protected GtfsServicesReader​(MacroscopicNetwork referenceNetwork,
                                     GtfsServicesReaderSettings settings)
        Constructor where settings are directly provided such that input information can be extracted from it
        Parameters:
        referenceNetwork - to use
        settings - to use
      • GtfsServicesReader

        protected GtfsServicesReader​(IdGroupingToken idToken,
                                     MacroscopicNetwork referenceNetwork,
                                     GtfsServicesReaderSettings settings)
        Constructor where settings are directly provided such that input information can be extracted from it
        Parameters:
        idToken - to use for the routed services and service network ids
        referenceNetwork - to use
        settings - to use
    • Method Detail

      • doMainProcessing

        protected void doMainProcessing​(GtfsServicesHandlerData fileHandlerData)
        Execute the actual parsing
        Parameters:
        fileHandlerData - containing all data to track and resources needed to perform the processing
      • getServiceNodeToGtfsStopIdMapping

        public Function<ServiceNode,​String> getServiceNodeToGtfsStopIdMapping()
        GTFS Services are ingested and lead to PLANit service nodes to be created based on GTFS stop ids. When at some later point in time these PLANit service nodes are to be linked to PLANit transfer zones (which in turn have an association with a GTFS stop) the mapping between PLANit service node and its underlying GTFS stop needs to remain available. This function provides this mapping.

        For now this mapping is purely based on the external id, but if this changes using this explicit functional approach allows us to change this without having to change the process flow itself

        Returns:
        mapping from PLANit service node to underlying source GTFS stop id
      • getTypeDescription

        public String getTypeDescription()
        short description (one word capitals) of this reader for logging purposes
        Specified by:
        getTypeDescription in interface ConverterEntity
        Returns:
        description
      • reset

        public void reset()
        reset the reader to allow for marking unnecessary resources for garbage collection
        Specified by:
        reset in interface ConverterEntity