Class PlanitIntermodalReader
- java.lang.Object
-
- org.goplanit.io.converter.intermodal.PlanitIntermodalReader
-
- All Implemented Interfaces:
ConverterEntity
,IntermodalReader<ServiceNetwork,RoutedServices>
,PairConverterReader<MacroscopicNetwork,Zoning>
public class PlanitIntermodalReader extends Object implements IntermodalReader<ServiceNetwork,RoutedServices>
Planit intermodal reader in native format. Wraps a network and zoning reader in one- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected PlanitIntermodalReaderSettings
intermodalReaderSettings
intermodal reader settings to useprotected MacroscopicNetwork
networkToPopulate
the network to populateprotected RoutedServices
routedServicesToPopulate
the routed services to (optionally) populateprotected ServiceNetwork
serviceNetworkToPopulate
the service network to (optionally) populateprotected org.goplanit.xml.generated.XMLElementMacroscopicNetwork
xmlRawNetwork
protected org.goplanit.xml.generated.XMLElementRoutedServices
xmlRawRoutedServices
protected org.goplanit.xml.generated.XMLElementServiceNetwork
xmlRawServiceNetwork
protected org.goplanit.xml.generated.XMLElementMacroscopicZoning
xmlRawZoning
protected Zoning
zoningToPopulate
the zoning to populate
-
Constructor Summary
Constructors Modifier Constructor Description protected
PlanitIntermodalReader(String inputPathDirectory, String xmlFileExtension, MacroscopicNetwork network, Zoning zoning)
constructor where xml content is still on disk and first needs to be parsed into memory before converted to planit memory modelprotected
PlanitIntermodalReader(String inputPathDirectory, String xmlFileExtension, MacroscopicNetwork network, Zoning zoning, ServiceNetwork serviceNetwork, RoutedServices routedServices)
constructor where xml content is still on disk and first needs to be parsed into memory before converted to planit memory modelprotected
PlanitIntermodalReader(String inputPathDirectory, String xmlFileExtension, IdGroupingToken idToken)
constructor where xml content is still on disk and first needs to be parsed into memory before converted to planit memory model.PlanitIntermodalReader(PlanitIntermodalReaderSettings settings, MacroscopicNetwork network, Zoning zoning, ServiceNetwork serviceNetwork, RoutedServices routedServices)
Constructorprotected
PlanitIntermodalReader(PlanitIntermodalReaderSettings settings, IdGroupingToken idToken)
constructor where xml content is still on disk and first needs to be parsed into memory before converted to planit memory model.PlanitIntermodalReader(PlanitIntermodalReaderSettings settings, org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork, org.goplanit.xml.generated.XMLElementMacroscopicZoning xmlRawZoning, org.goplanit.xml.generated.XMLElementServiceNetwork xmlRawServiceNetwork, org.goplanit.xml.generated.XMLElementRoutedServices xmlRawRoutedServices, MacroscopicNetwork network, Zoning zoning, ServiceNetwork serviceNetwork, RoutedServices routedServices)
constructor where the xml content has already been parsed into a JAXB memory model which subsequently needs to be converted into the planit memory modelPlanitIntermodalReader(org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork, org.goplanit.xml.generated.XMLElementMacroscopicZoning xmlRawZoning, MacroscopicNetwork network, Zoning zoning)
constructor where the xml content has already been parsed into a JAXB memory model which subsequently needs to be converted into the planit memory model
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlanitIntermodalReaderSettings
getSettings()
any settings to configure the reader can be configured by collecting these settingsPair<MacroscopicNetwork,Zoning>
read()
parse the network based on the configuration of the implementing class to yield a PLANit networkQuadruple<MacroscopicNetwork,Zoning,ServiceNetwork,RoutedServices>
readWithServices()
PArse network, zoning, service network, and routed services that belong togethervoid
reset()
reset the reader to allow for marking unnecessary resources for garbage collectionboolean
supportServiceConversion()
Currently no support for this yet on the PLANit side.-
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
-
intermodalReaderSettings
protected final PlanitIntermodalReaderSettings intermodalReaderSettings
intermodal reader settings to use
-
networkToPopulate
protected final MacroscopicNetwork networkToPopulate
the network to populate
-
zoningToPopulate
protected final Zoning zoningToPopulate
the zoning to populate
-
serviceNetworkToPopulate
protected final ServiceNetwork serviceNetworkToPopulate
the service network to (optionally) populate
-
routedServicesToPopulate
protected final RoutedServices routedServicesToPopulate
the routed services to (optionally) populate
-
xmlRawNetwork
protected final org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork
-
xmlRawZoning
protected final org.goplanit.xml.generated.XMLElementMacroscopicZoning xmlRawZoning
-
xmlRawServiceNetwork
protected final org.goplanit.xml.generated.XMLElementServiceNetwork xmlRawServiceNetwork
-
xmlRawRoutedServices
protected final org.goplanit.xml.generated.XMLElementRoutedServices xmlRawRoutedServices
-
-
Constructor Detail
-
PlanitIntermodalReader
protected PlanitIntermodalReader(String inputPathDirectory, String xmlFileExtension, IdGroupingToken idToken)
constructor where xml content is still on disk and first needs to be parsed into memory before converted to planit memory model. Network and zoning instance are created internally and returned upon completion- Parameters:
inputPathDirectory
- to use for both network and zoning input file assuming default input file names for both (network.xml, zoning.xml) *xmlFileExtension
- to useidToken
- to use for the network and zoning that are to be created
-
PlanitIntermodalReader
protected PlanitIntermodalReader(PlanitIntermodalReaderSettings settings, IdGroupingToken idToken)
constructor where xml content is still on disk and first needs to be parsed into memory before converted to planit memory model. Network and zoning instance are created internally and returned upon completion- Parameters:
settings
- to useidToken
- to use for the network and zoning that are to be created
-
PlanitIntermodalReader
protected PlanitIntermodalReader(String inputPathDirectory, String xmlFileExtension, MacroscopicNetwork network, Zoning zoning)
constructor where xml content is still on disk and first needs to be parsed into memory before converted to planit memory model- Parameters:
inputPathDirectory
- to use for both network and zoning input file assuming default input file names for both (network.xml, zoning.xml) *xmlFileExtension
- to usenetwork
- to populatezoning
- to populate
-
PlanitIntermodalReader
protected PlanitIntermodalReader(String inputPathDirectory, String xmlFileExtension, MacroscopicNetwork network, Zoning zoning, ServiceNetwork serviceNetwork, RoutedServices routedServices)
constructor where xml content is still on disk and first needs to be parsed into memory before converted to planit memory model- Parameters:
inputPathDirectory
- to use for both network and zoning input file assuming default input file names for both (network.xml, zoning.xml) *xmlFileExtension
- to usenetwork
- to populatezoning
- to populateserviceNetwork
- to populate (if reading with services)routedServices
- to populate (if reading with services)
-
PlanitIntermodalReader
public PlanitIntermodalReader(org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork, org.goplanit.xml.generated.XMLElementMacroscopicZoning xmlRawZoning, MacroscopicNetwork network, Zoning zoning)
constructor where the xml content has already been parsed into a JAXB memory model which subsequently needs to be converted into the planit memory model- Parameters:
xmlRawNetwork
- to extract fromxmlRawZoning
- to extract fromnetwork
- to extract referenced entities fromzoning
- to populate
-
PlanitIntermodalReader
public PlanitIntermodalReader(PlanitIntermodalReaderSettings settings, MacroscopicNetwork network, Zoning zoning, ServiceNetwork serviceNetwork, RoutedServices routedServices)
Constructor- Parameters:
settings
- to usenetwork
- to extract references from (if any)zoning
- to populateserviceNetwork
- to populateroutedServices
- to populate
-
PlanitIntermodalReader
public PlanitIntermodalReader(PlanitIntermodalReaderSettings settings, org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork, org.goplanit.xml.generated.XMLElementMacroscopicZoning xmlRawZoning, org.goplanit.xml.generated.XMLElementServiceNetwork xmlRawServiceNetwork, org.goplanit.xml.generated.XMLElementRoutedServices xmlRawRoutedServices, MacroscopicNetwork network, Zoning zoning, ServiceNetwork serviceNetwork, RoutedServices routedServices)
constructor where the xml content has already been parsed into a JAXB memory model which subsequently needs to be converted into the planit memory model- Parameters:
settings
- to usexmlRawNetwork
- to extract fromxmlRawZoning
- to extract fromxmlRawServiceNetwork
- to extract fromxmlRawRoutedServices
- to extract fromnetwork
- to extract references from (if any)zoning
- to populateserviceNetwork
- to populateroutedServices
- to populate
-
-
Method Detail
-
read
public Pair<MacroscopicNetwork,Zoning> read()
parse the network based on the configuration of the implementing class to yield a PLANit network- Specified by:
read
in interfacePairConverterReader<MacroscopicNetwork,Zoning>
- Returns:
- parsed entities
-
readWithServices
public Quadruple<MacroscopicNetwork,Zoning,ServiceNetwork,RoutedServices> readWithServices()
PArse network, zoning, service network, and routed services that belong together- Specified by:
readWithServices
in interfaceIntermodalReader<ServiceNetwork,RoutedServices>
- Returns:
- created network, zoning, service network and services
-
reset
public void reset()
reset the reader to allow for marking unnecessary resources for garbage collection- Specified by:
reset
in interfaceConverterEntity
-
getSettings
public PlanitIntermodalReaderSettings getSettings()
any settings to configure the reader can be configured by collecting these settings- Specified by:
getSettings
in interfacePairConverterReader<MacroscopicNetwork,Zoning>
- Returns:
- the settings to configrue the reader
-
supportServiceConversion
public boolean supportServiceConversion()
Currently no support for this yet on the PLANit side. To be implemented in the future- Specified by:
supportServiceConversion
in interfaceIntermodalReader<ServiceNetwork,RoutedServices>
- Returns:
- false
-
-