Class PlanitZoningReader


  • public class PlanitZoningReader
    extends PlanitXmlReader<org.planit.xml.generated.XMLElementMacroscopicZoning>
    Class to parse zoning from native XML format
    Author:
    markr
    • Constructor Detail

      • PlanitZoningReader

        public PlanitZoningReader​(String pathDirectory,
                                  String xmlFileExtension,
                                  Zoning zoning)
                           throws PlanItException
        constructor
        Parameters:
        pathDirectory - to use
        xmlFileExtension - to use
        zoning - to populate
        Throws:
        PlanItException - thrown if error
      • PlanitZoningReader

        public PlanitZoningReader​(org.planit.xml.generated.XMLElementMacroscopicZoning xmlMacroscopicZoning,
                                  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:
        xmlMacroscopicZoning - to extract from
        zoning - to populate
        Throws:
        PlanItException - thrown if error
    • Method Detail

      • setZoning

        protected void setZoning​(Zoning zoning)
        set the zoning to populate
        Parameters:
        zoning - to populate
      • populateODZones

        protected void populateODZones​(Map<String,​Node> nodesByXmlIds)
                                throws PlanItException
        parse the OD zones from Xml element into Planit memory
        Parameters:
        nodesByXmlIds - nodes indexed by xml id to use
        Throws:
        PlanItException - thrown if error
      • populateIntermodal

        protected void populateIntermodal​(Modes modes,
                                          Map<String,​MacroscopicLinkSegment> linkSegmentsByXmlId)
                                   throws PlanItException
        parse the intermodal zones, i.e., platforms, stops, stations, etc. from Xml element into Planit memory
        Parameters:
        modes - that can be referred to
        linkSegmentsByXmlId - to identify mapping between (transfer) connectoids and network
        Throws:
        PlanItException - thrown if error