Class PlanitNetworkWriter

    • Constructor Detail

      • PlanitNetworkWriter

        protected PlanitNetworkWriter​(org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork)
        Constructor
        Parameters:
        xmlRawNetwork - to populate with PLANit network when persisting
      • PlanitNetworkWriter

        protected PlanitNetworkWriter​(String networkPath,
                                      org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork)
        Constructor
        Parameters:
        networkPath - to persist network on
        xmlRawNetwork - to populate with PLANit network when persisting
      • PlanitNetworkWriter

        protected PlanitNetworkWriter​(String networkPath,
                                      String countryName,
                                      org.goplanit.xml.generated.XMLElementMacroscopicNetwork xmlRawNetwork)
        Constructor
        Parameters:
        networkPath - to persist network on
        countryName - to optimise projection for (if available, otherwise ignore)
        xmlRawNetwork - to populate with PLANit network when persisting
    • Method Detail

      • populateXmlConfiguration

        protected void populateXmlConfiguration​(Modes modes)
        Populate the link configuration for this network, i.e., the modes
        Parameters:
        modes - to use to populate the XML elements
      • populateXmlLayerConfiguration

        protected void populateXmlLayerConfiguration​(org.goplanit.xml.generated.XMLElementInfrastructureLayer xmlNetworkLayer,
                                                     MacroscopicLinkSegmentTypes linkSegmentTypes)
        Populate the layer configuration for this network, i.e., link segment types
        Parameters:
        xmlNetworkLayer - to add types to
        linkSegmentTypes - to use to populate the XML elements
      • populateXmlNetworkLayer

        protected void populateXmlNetworkLayer​(org.goplanit.xml.generated.XMLElementInfrastructureLayers xmlInfrastructureLayers,
                                               MacroscopicNetworkLayerImpl physicalNetworkLayer,
                                               MacroscopicNetwork network)
        Populate the network layer
        Parameters:
        xmlInfrastructureLayers - to add xml layer to
        physicalNetworkLayer - to populate from
        network - to extract from
      • populateXmlNetworkLayers

        protected void populateXmlNetworkLayers​(MacroscopicNetwork network)
        Populate the available network layers
        Parameters:
        network - to extract layers from and populate xml
      • reset

        public void reset()
        reset the reader to allow for marking unnecessary resources for garbage collection
        Specified by:
        reset in interface ConverterEntity