Class GtfsIntermodalReader
- java.lang.Object
-
- org.goplanit.gtfs.converter.intermodal.GtfsIntermodalReader
-
- All Implemented Interfaces:
ConverterEntity,IntermodalReader<ServiceNetwork,RoutedServices>,PairConverterReader<MacroscopicNetwork,Zoning>
public class GtfsIntermodalReader extends Object implements IntermodalReader<ServiceNetwork,RoutedServices>
GTFS intermodal reader. Supplements an already populated network and (partially populated) zoning with GTFS services resulting in a consistent service network and routed services PLANit memory model. In case the provided zoning already contains transfer zones an attempt is made to fuse the GTFS stops with existing transfer zones when appliccable, in case this is not possible or such zones are absent altogether they will be injected from scratch.- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected GtfsIntermodalReaderSettingssettingsintermodal reader settings to use
-
Constructor Summary
Constructors Modifier Constructor Description protectedGtfsIntermodalReader(PairConverterReader<MacroscopicNetwork,Zoning> networkAndZoningReader, GtfsIntermodalReaderSettings settings)Constructor where settings are directly provided such that input information can be extracted from it, use reader to obtain network and zoning instancesprotectedGtfsIntermodalReader(IdGroupingToken idToken, MacroscopicNetwork parentNetwork, Zoning parentZoning, GtfsIntermodalReaderSettings settings)Constructor where settings are directly provided such that input information can be extracted from it
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GtfsIntermodalReaderSettingsgetSettings()any settings to configure the reader can be configured by collecting these settingsPair<MacroscopicNetwork,Zoning>read()GTFS intermodal reader - when used - only supports reading with services included.Quadruple<MacroscopicNetwork,Zoning,ServiceNetwork,RoutedServices>readWithServices()Perform the conversion and parsing into PLANit memory model with service network and servicesvoidreset()reset the reader to allow for marking unnecessary resources for garbage collectionbooleansupportServiceConversion()GTFS intermodal reader supports reading with services.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.converter.intermodal.IntermodalReader
getTypeDescription
-
-
-
-
Field Detail
-
settings
protected final GtfsIntermodalReaderSettings settings
intermodal reader settings to use
-
-
Constructor Detail
-
GtfsIntermodalReader
protected GtfsIntermodalReader(IdGroupingToken idToken, MacroscopicNetwork parentNetwork, Zoning parentZoning, GtfsIntermodalReaderSettings 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 idsparentNetwork- to useparentZoning- to usesettings- to use
-
GtfsIntermodalReader
protected GtfsIntermodalReader(PairConverterReader<MacroscopicNetwork,Zoning> networkAndZoningReader, GtfsIntermodalReaderSettings settings)
Constructor where settings are directly provided such that input information can be extracted from it, use reader to obtain network and zoning instances- Parameters:
networkAndZoningReader- to usesettings- to use
-
-
Method Detail
-
read
public Pair<MacroscopicNetwork,Zoning> read()
GTFS intermodal reader - when used - only supports reading with services included. Hence, calling this method will log this to the user and will not generate any results- Specified by:
readin interfacePairConverterReader<MacroscopicNetwork,Zoning>- Returns:
- always null
-
reset
public void reset()
reset the reader to allow for marking unnecessary resources for garbage collection- Specified by:
resetin interfaceConverterEntity
-
getSettings
public GtfsIntermodalReaderSettings getSettings()
any settings to configure the reader can be configured by collecting these settings- Specified by:
getSettingsin interfacePairConverterReader<MacroscopicNetwork,Zoning>- Returns:
- the settings to configrue the reader
-
supportServiceConversion
public boolean supportServiceConversion()
GTFS intermodal reader supports reading with services.- Specified by:
supportServiceConversionin interfaceIntermodalReader<ServiceNetwork,RoutedServices>- Returns:
- true
-
readWithServices
public Quadruple<MacroscopicNetwork,Zoning,ServiceNetwork,RoutedServices> readWithServices()
Perform the conversion and parsing into PLANit memory model with service network and services- Specified by:
readWithServicesin interfaceIntermodalReader<ServiceNetwork,RoutedServices>- Returns:
- created and or further populated network, zoning, service network and services
-
-