Class NetworkConverter


  • public class NetworkConverter
    extends Object
    Network converter class able to convert a network from one type to another
    Author:
    markr
    • Constructor Detail

      • NetworkConverter

        protected NetworkConverter​(NetworkReader reader,
                                   NetworkWriter writer)
        constructor
        Parameters:
        reader - to use for parsing
        writer - to use for persisting
    • Method Detail

      • isModeConversionValid

        protected boolean isModeConversionValid()
        verify if mode conversion between reader and writer is valid
        Returns:
        true if valid, false otherwise
      • convert

        public void convert()
                     throws PlanItException
        Convert the network parsed by the reader by passing it on to the writer. It is assumed both reader and writer are fully configured when this method is called
        Throws:
        PlanItException - thrown if error
      • getReader

        public NetworkReader getReader()
        get the reader
        Returns:
        the reader
      • getWriter

        public NetworkWriter getWriter()
        get the writer
        Returns:
        the writer