Class PlanitIntermodalWriter
- java.lang.Object
-
- org.goplanit.io.converter.intermodal.PlanitIntermodalWriter
-
- All Implemented Interfaces:
ConverterEntity
,IntermodalWriter
,MultiConverterWriter<MacroscopicNetwork,Zoning>
public class PlanitIntermodalWriter extends Object implements IntermodalWriter
Planit intermodal writer for native Planit format, wrapping a planit network writer and planit zoning writer in one- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected IdMapperType
idMapper
the id mapper to useprotected PlanitIntermodalWriterSettings
settings
intermodal writer settings to useprotected org.goplanit.xml.generated.XMLElementMacroscopicNetwork
xmlRawNetwork
xml element to populate network onprotected org.goplanit.xml.generated.XMLElementMacroscopicZoning
xmlRawZoning
xml element to populate zoning on
-
Constructor Summary
Constructors Modifier Constructor Description protected
PlanitIntermodalWriter(String outputDirectory, String countryName, org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork, org.goplanit.xml.generated.XMLElementMacroscopicZoning xmlRawZoning)
Constructorprotected
PlanitIntermodalWriter(String outputDirectory, org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork, org.goplanit.xml.generated.XMLElementMacroscopicZoning xmlRawZoning)
Constructor with default country, use default destination Crs as a result.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdMapperType
getIdMapperType()
collect the way the ids should be mappedPlanitIntermodalWriterSettings
getSettings()
Any settings to configure the writer can be configured by collecting these settingsvoid
reset()
reset the reader to allow for marking unnecessary resources for garbage collectionvoid
setIdMapperType(IdMapperType idMapper)
set the way ids should be mappedvoid
write(MacroscopicNetwork macroscopicNetwork, Zoning zoning)
Write a network to the writer's output format.-
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.IntermodalWriter
getTypeDescription
-
-
-
-
Field Detail
-
settings
protected final PlanitIntermodalWriterSettings settings
intermodal writer settings to use
-
xmlRawNetwork
protected final org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork
xml element to populate network on
-
xmlRawZoning
protected final org.goplanit.xml.generated.XMLElementMacroscopicZoning xmlRawZoning
xml element to populate zoning on
-
idMapper
protected IdMapperType idMapper
the id mapper to use
-
-
Constructor Detail
-
PlanitIntermodalWriter
protected PlanitIntermodalWriter(String outputDirectory, org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork, org.goplanit.xml.generated.XMLElementMacroscopicZoning xmlRawZoning)
Constructor with default country, use default destination Crs as a result.- Parameters:
outputDirectory
- to persist onxmlRawNetwork
- to populate with PLANit network when persistingxmlRawZoning
- to populate with PLANit zoning when persisting
-
PlanitIntermodalWriter
protected PlanitIntermodalWriter(String outputDirectory, String countryName, org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork, org.goplanit.xml.generated.XMLElementMacroscopicZoning xmlRawZoning)
Constructor- Parameters:
outputDirectory
- to persist oncountryName
- to optimise projection for (if available, otherwise ignore)xmlRawNetwork
- to populate with PLANit network when persistingxmlRawZoning
- to populate with PLANit zoning when persisting
-
-
Method Detail
-
write
public void write(MacroscopicNetwork macroscopicNetwork, Zoning zoning) throws PlanItException
Write a network to the writer's output format.- Specified by:
write
in interfaceMultiConverterWriter<MacroscopicNetwork,Zoning>
- Parameters:
macroscopicNetwork
- to writezoning
- to write- Throws:
PlanItException
- thrown if error
-
getIdMapperType
public IdMapperType getIdMapperType()
collect the way the ids should be mapped- Specified by:
getIdMapperType
in interfaceMultiConverterWriter<MacroscopicNetwork,Zoning>
- Returns:
- the id mapping choice
-
setIdMapperType
public void setIdMapperType(IdMapperType idMapper)
set the way ids should be mapped- Specified by:
setIdMapperType
in interfaceMultiConverterWriter<MacroscopicNetwork,Zoning>
- Parameters:
idMapper
- to use
-
reset
public void reset()
reset the reader to allow for marking unnecessary resources for garbage collection- Specified by:
reset
in interfaceConverterEntity
-
getSettings
public PlanitIntermodalWriterSettings getSettings()
Any settings to configure the writer can be configured by collecting these settings- Specified by:
getSettings
in interfaceMultiConverterWriter<MacroscopicNetwork,Zoning>
- Returns:
- the settings to configure the writer
-
-