Class PlanitServiceNetworkReaderFactory


  • public class PlanitServiceNetworkReaderFactory
    extends Object
    Factory for creating PlanitServiceNetworkReaders
    Author:
    markr
    • Constructor Detail

      • PlanitServiceNetworkReaderFactory

        public PlanitServiceNetworkReaderFactory()
    • Method Detail

      • create

        public static PlanitServiceNetworkReader create​(MacroscopicNetwork parentNetwork)
        Create a PLANitServiceNetworkReader
        Parameters:
        parentNetwork - the parent network the service network is assumed to be built upon
        Returns:
        created service network reader
      • create

        public static PlanitServiceNetworkReader create​(IdGroupingToken idToken,
                                                        MacroscopicNetwork parentNetwork)
        Create a PLANitServiceNetworkReader based on custom id token
        Parameters:
        idToken - to use for service network id generation
        parentNetwork - the network the service network is assumed to be built upon
        Returns:
        created service network reader
      • create

        public static PlanitServiceNetworkReader create​(String inputDirectory,
                                                        MacroscopicNetwork parentNetwork)
        Create a PLANitServiceNetworkReader sourced from given input directory
        Parameters:
        inputDirectory - to use (directory only, find first compatible file)
        parentNetwork - the network the service network is assumed to be built upon
        Returns:
        created service network reader
      • create

        public static PlanitServiceNetworkReader create​(PlanitServiceNetworkReaderSettings settings)
        Create a PLANitServiceNetworkReader based on given settings which in turn contain information on location and parent network to use
        Parameters:
        settings - to use
        Returns:
        created service network reader
      • create

        public static PlanitServiceNetworkReader create​(String inputDirectory,
                                                        String xmlFileExtension,
                                                        ServiceNetwork serviceNetwork)
        Create a Service Network Reader for location and service network to populate
        Parameters:
        inputDirectory - to use (directory only, find first compatible file)
        xmlFileExtension - to consider
        serviceNetwork - to populate
        Returns:
        created service network reader
      • create

        public static PlanitServiceNetworkReader create​(org.goplanit.xml.generated.XMLElementServiceNetwork xmlRawServiceNetwork,
                                                        ServiceNetwork serviceNetwork)
        Create a Service Network Reader for given XML root element and service network to populate
        Parameters:
        xmlRawServiceNetwork - the raw network based on the JAXB parser
        serviceNetwork - to populate
        Returns:
        created PLANit service network reader