Class PlanitRoutedServicesWriter
- java.lang.Object
-
- org.goplanit.converter.BaseWriterImpl<T>
-
- org.goplanit.converter.CrsWriterImpl<T>
-
- org.goplanit.io.converter.PlanitWriterImpl<RoutedServices>
-
- org.goplanit.io.converter.service.PlanitRoutedServicesWriter
-
- All Implemented Interfaces:
ConverterEntity
,ConverterWriter<RoutedServices>
,RoutedServicesWriter
public class PlanitRoutedServicesWriter extends PlanitWriterImpl<RoutedServices> implements RoutedServicesWriter
Writer to persist PLANit routed services to disk in the native PLANit format. By default the xml ids are used for writing out the ids in the XML.- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.converter.BaseWriterImpl
idMapper
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PlanitRoutedServicesWriter(String outputPath, String countryName, org.goplanit.xml.generated.XMLElementRoutedServices xmlRawRoutedServices)
Constructorprotected
PlanitRoutedServicesWriter(String outputPath, org.goplanit.xml.generated.XMLElementRoutedServices xmlRawRoutedServices)
Constructorprotected
PlanitRoutedServicesWriter(org.goplanit.xml.generated.XMLElementRoutedServices xmlRawRoutedServices)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoutedServicesIdMapper
getPrimaryIdMapper()
The (main) Id mapper used by this writer (only present after write has been completed)PlanitRoutedServicesWriterSettings
getSettings()
any settings to configure the writer can be configured by collecting these settingsprotected void
populateXmlRoutedServicesLayers(RoutedServices routedServices)
Populate the available routed services layersvoid
reset()
reset the reader to allow for marking unnecessary resources for garbage collectionvoid
write(RoutedServices routedServices)
write a network to the writer's output format.-
Methods inherited from class org.goplanit.io.converter.PlanitWriterImpl
getSettingsAsXmlWriterSettings, getXmlModeReference, persist
-
Methods inherited from class org.goplanit.converter.CrsWriterImpl
createTransformedCoordinate, extractSrsName, getDestinationCoordinateReferenceSystem, getDestinationCrsTransformer, getGeoUtils, getTransformedCoordinates, prepareCoordinateReferenceSystem
-
Methods inherited from class org.goplanit.converter.BaseWriterImpl
getComponentIdMappers, getIdMapperType, setIdMapperType, setParentIdMappers
-
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.ConverterWriter
getIdMapperType, setIdMapperType
-
Methods inherited from interface org.goplanit.converter.service.RoutedServicesWriter
getTypeDescription
-
-
-
-
Constructor Detail
-
PlanitRoutedServicesWriter
protected PlanitRoutedServicesWriter(org.goplanit.xml.generated.XMLElementRoutedServices xmlRawRoutedServices)
Constructor- Parameters:
xmlRawRoutedServices
- to populate with PLANit routed services when persisting
-
PlanitRoutedServicesWriter
protected PlanitRoutedServicesWriter(String outputPath, org.goplanit.xml.generated.XMLElementRoutedServices xmlRawRoutedServices)
Constructor- Parameters:
outputPath
- to persist inxmlRawRoutedServices
- to populate with PLANit routed services when persisting
-
PlanitRoutedServicesWriter
protected PlanitRoutedServicesWriter(String outputPath, String countryName, org.goplanit.xml.generated.XMLElementRoutedServices xmlRawRoutedServices)
Constructor- Parameters:
outputPath
- to persist incountryName
- to optimise projection for (if available, otherwise ignore)xmlRawRoutedServices
- to populate with PLANit routed services when persisting
-
-
Method Detail
-
populateXmlRoutedServicesLayers
protected void populateXmlRoutedServicesLayers(RoutedServices routedServices)
Populate the available routed services layers- Parameters:
routedServices
- to extract layers from and populate xml
-
getPrimaryIdMapper
public RoutedServicesIdMapper getPrimaryIdMapper()
The (main) Id mapper used by this writer (only present after write has been completed)- Specified by:
getPrimaryIdMapper
in classBaseWriterImpl<RoutedServices>
- Returns:
- mapper
-
write
public void write(RoutedServices routedServices) throws PlanItException
write a network to the writer's output format.- Specified by:
write
in interfaceConverterWriter<RoutedServices>
- Parameters:
routedServices
- entity to write- Throws:
PlanItException
- thrown if error
-
reset
public void reset()
reset the reader to allow for marking unnecessary resources for garbage collection- Specified by:
reset
in interfaceConverterEntity
-
getSettings
public PlanitRoutedServicesWriterSettings getSettings()
any settings to configure the writer can be configured by collecting these settings- Specified by:
getSettings
in interfaceConverterWriter<RoutedServices>
- Returns:
- the settings to configure the writer
-
-