Package org.planit.io.intermodal
Class PlanitInterModalReader
- java.lang.Object
-
- org.planit.io.xml.util.PlanitXmlReader<org.planit.xml.generated.XMLElementMacroscopicIntermodal>
-
- org.planit.io.intermodal.PlanitInterModalReader
-
public class PlanitInterModalReader extends PlanitXmlReader<org.planit.xml.generated.XMLElementMacroscopicIntermodal>
Class to parse intermodal components from native XML format. Since the transfers occur at transfer zones which are closely related to regular (OD) zones, the intermodal memory model is closely related to theZoning
class- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected PlanitInterModalReaderSettings
settings
settings for the zoning readerprotected Zoning
zoning
the zoning to populate
-
Constructor Summary
Constructors Constructor Description PlanitInterModalReader(String pathDirectory, String xmlFileExtension, Zoning zoning)
constructorPlanitInterModalReader(org.planit.xml.generated.XMLElementMacroscopicIntermodal xmlElementMacroscopicIntermodal, Zoning zoning)
constructor where file has already been parsed and we only need to convert from raw XML objects to PLANit memory model
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlanitInterModalReaderSettings
getSettings()
settings for this readerZoning
read(InfrastructureNetwork network, Map<String,Node> nodesByXmlIds)
read the zoning from diskprotected void
setZoning(Zoning zoning)
set the oning to populate-
Methods inherited from class org.planit.io.xml.util.PlanitXmlReader
clearXmlContent, getXmlRootElement, initialiseAndParseXmlRootElement
-
-
-
-
Field Detail
-
settings
protected final PlanitInterModalReaderSettings settings
settings for the zoning reader
-
zoning
protected Zoning zoning
the zoning to populate
-
-
Constructor Detail
-
PlanitInterModalReader
public PlanitInterModalReader(String pathDirectory, String xmlFileExtension, Zoning zoning) throws PlanItException
constructor- Parameters:
pathDirectory
- to usexmlFileExtension
- to usezoning
- to populate- Throws:
PlanItException
- thrown if error
-
PlanitInterModalReader
public PlanitInterModalReader(org.planit.xml.generated.XMLElementMacroscopicIntermodal xmlElementMacroscopicIntermodal, Zoning zoning) throws PlanItException
constructor where file has already been parsed and we only need to convert from raw XML objects to PLANit memory model- Parameters:
xmlElementMacroscopicIntermodal
- to extract fromzoning
- to populate- Throws:
PlanItException
- thrown if error
-
-
Method Detail
-
setZoning
protected void setZoning(Zoning zoning)
set the oning to populate- Parameters:
zoning
- to populate
-
read
public Zoning read(InfrastructureNetwork network, Map<String,Node> nodesByXmlIds) throws PlanItException
read the zoning from disk- Parameters:
network
- this zoning is compatible withnodesByXmlIds
- to identify mapping between zones and network- Returns:
- zoning parsed
- Throws:
PlanItException
- thrown if error
-
getSettings
public PlanitInterModalReaderSettings getSettings()
settings for this reader- Returns:
- settings
-
-