Class TntpDemandsReader
- java.lang.Object
-
- org.goplanit.converter.BaseReaderImpl<Demands>
-
- org.goplanit.tntp.converter.demands.TntpDemandsReader
-
- All Implemented Interfaces:
ConverterEntity,ConverterReader<Demands>,DemandsReader
public class TntpDemandsReader extends BaseReaderImpl<Demands> implements DemandsReader
Demands reader component for TNTP data format- Author:
- gman, markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.converter.BaseReaderImpl
sourceIdTracker
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTntpDemandsReader(TntpDemandsReaderSettings settings, MacroscopicNetwork referenceNetwork, Zoning referenceZoning, Demands demandsToPopulate)ConstructorprotectedTntpDemandsReader(TntpDemandsReaderSettings settings, TntpZoningReader referenceZoningReader)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacroscopicNetworkgetReferenceNetwork()ZoninggetReferenceZoning()each demands reader is expected to ensure that its demand relates to a zoning this reference zoning can be obtained (after reading is complete).TntpDemandsReaderSettingsgetSettings()any settings to configure the reader can be configured by collecting these settingsDemandsread()parse the network based on the configuration of the implementing class to yield a PLANit networkvoidreset()reset the reader to allow for marking unnecessary resources for garbage collection-
Methods inherited from class org.goplanit.converter.BaseReaderImpl
getBySourceId, getSourceIdContainer, initialiseSourceIdMap, initialiseSourceIdMap, registerBySourceId, registerBySourceId
-
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.demands.DemandsReader
getTypeDescription
-
-
-
-
Constructor Detail
-
TntpDemandsReader
protected TntpDemandsReader(TntpDemandsReaderSettings settings, MacroscopicNetwork referenceNetwork, Zoning referenceZoning, Demands demandsToPopulate)
Constructor- Parameters:
settings- to usereferenceNetwork- to usereferenceZoning- to usedemandsToPopulate- to use
-
TntpDemandsReader
protected TntpDemandsReader(TntpDemandsReaderSettings settings, TntpZoningReader referenceZoningReader)
Constructor- Parameters:
settings- to usereferenceZoningReader- to use
-
-
Method Detail
-
getSettings
public TntpDemandsReaderSettings getSettings()
any settings to configure the reader can be configured by collecting these settings- Specified by:
getSettingsin interfaceConverterReader<Demands>- Returns:
- the settings to configrue the reader
-
read
public Demands read()
parse the network based on the configuration of the implementing class to yield a PLANit network- Specified by:
readin interfaceConverterReader<Demands>- Returns:
- parsed network
-
getReferenceNetwork
public MacroscopicNetwork getReferenceNetwork()
-
getReferenceZoning
public Zoning getReferenceZoning()
Description copied from interface:DemandsReadereach demands reader is expected to ensure that its demand relates to a zoning this reference zoning can be obtained (after reading is complete). the converter uses this to avoid the user having to manually transfer this zoning to the writer which also requires this same zoning consistency This is what this method enables- Specified by:
getReferenceZoningin interfaceDemandsReader- Returns:
- referenceZoning to supply demands writer with (after invoking
ConverterReader.read()
-
reset
public void reset()
reset the reader to allow for marking unnecessary resources for garbage collection- Specified by:
resetin interfaceConverterEntity- Overrides:
resetin classBaseReaderImpl<Demands>
-
-