@Test public void testExport() throws IOException { Network network = loadNetworkFromResourceFile("/expectedExport.uct"); testExporter(network, "/expectedExport.uct"); }
@Override public void export(Network network, Properties parameters, DataSource dataSource) { if (network == null) { throw new IllegalArgumentException("network is null"); } String namingStrategyName = ConversionParameters.readStringParameter(getFormat(), parameters, NAMING_STRATEGY_PARAMETER, defaultValueConfig); NamingStrategy namingStrategy = findNamingStrategy(namingStrategyName, NAMING_STRATEGY_SUPPLIERS.get()); UcteNetwork ucteNetwork = createUcteNetwork(network, namingStrategy); try (OutputStream os = dataSource.newOutputStream(null, "uct", false); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8))) { new UcteWriter(ucteNetwork).write(writer); } catch (IOException e) { throw new UncheckedIOException(e); } }
UcteExporter implements Exporter { @Override public void export(Network network, Properties parameters, DataSource dataSource) { if (network == null) { throw new IllegalArgumentException("network is null"); } String namingStrategyName = ConversionParameters.readStringParameter(getFormat(), parameters, NAMING_STRATEGY_PARAMETER, defaultValueConfig); NamingStrategy namingStrategy = findNamingStrategy(namingStrategyName, NAMING_STRATEGY_SUPPLIERS.get()); UcteNetwork ucteNetwork = createUcteNetwork(network, namingStrategy); try (OutputStream os = dataSource.newOutputStream(null, "uct", false); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8))) { new UcteWriter(ucteNetwork).write(writer); } catch (IOException e) { throw new UncheckedIOException(e); } } }
UcteExporter implements Exporter { @Override public void export(Network network, Properties parameters, DataSource dataSource) { if (network == null) { throw new IllegalArgumentException("network is null"); } String namingStrategyName = ConversionParameters.readStringParameter(getFormat(), parameters, NAMING_STRATEGY_PARAMETER, defaultValueConfig); NamingStrategy namingStrategy = findNamingStrategy(namingStrategyName, NAMING_STRATEGY_SUPPLIERS.get()); UcteNetwork ucteNetwork = createUcteNetwork(network, namingStrategy); try (OutputStream os = dataSource.newOutputStream(null, "uct", false); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8))) { new UcteWriter(ucteNetwork).write(writer); } catch (IOException e) { throw new UncheckedIOException(e); } } UcteExporter();  UcteExporter(PlatformConfig platformConfig); }
UcteExporter implements Exporter { @Override public void export(Network network, Properties parameters, DataSource dataSource) { if (network == null) { throw new IllegalArgumentException("network is null"); } String namingStrategyName = ConversionParameters.readStringParameter(getFormat(), parameters, NAMING_STRATEGY_PARAMETER, defaultValueConfig); NamingStrategy namingStrategy = findNamingStrategy(namingStrategyName, NAMING_STRATEGY_SUPPLIERS.get()); UcteNetwork ucteNetwork = createUcteNetwork(network, namingStrategy); try (OutputStream os = dataSource.newOutputStream(null, "uct", false); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8))) { new UcteWriter(ucteNetwork).write(writer); } catch (IOException e) { throw new UncheckedIOException(e); } } UcteExporter();  UcteExporter(PlatformConfig platformConfig); @Override String getFormat(); @Override String getComment(); @Override void export(Network network, Properties parameters, DataSource dataSource); }
UcteExporter implements Exporter { @Override public void export(Network network, Properties parameters, DataSource dataSource) { if (network == null) { throw new IllegalArgumentException("network is null"); } String namingStrategyName = ConversionParameters.readStringParameter(getFormat(), parameters, NAMING_STRATEGY_PARAMETER, defaultValueConfig); NamingStrategy namingStrategy = findNamingStrategy(namingStrategyName, NAMING_STRATEGY_SUPPLIERS.get()); UcteNetwork ucteNetwork = createUcteNetwork(network, namingStrategy); try (OutputStream os = dataSource.newOutputStream(null, "uct", false); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8))) { new UcteWriter(ucteNetwork).write(writer); } catch (IOException e) { throw new UncheckedIOException(e); } } UcteExporter();  UcteExporter(PlatformConfig platformConfig); @Override String getFormat(); @Override String getComment(); @Override void export(Network network, Properties parameters, DataSource dataSource); static final String NAMING_STRATEGY; }