From b611e2941071ecf2b6602c0f337853921c96ae86 Mon Sep 17 00:00:00 2001 From: Christian Biasuzzi Date: Thu, 19 Dec 2024 15:16:35 +0100 Subject: [PATCH] aligns to the latest powsybl-diagram APIs Signed-off-by: Christian Biasuzzi --- java/pom.xml | 3 +++ .../java/com/powsybl/python/network/NetworkCFunctions.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/java/pom.xml b/java/pom.xml index db5719dac9..9bdb154319 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -75,6 +75,7 @@ 1.5.5-3 6.0.1 9.10.4067 + 4.7.0 @@ -294,10 +295,12 @@ com.powsybl powsybl-single-line-diagram-core + ${powsybl-diagram-temp.version} com.powsybl powsybl-network-area-diagram + ${powsybl-diagram-temp.version} com.powsybl diff --git a/java/src/main/java/com/powsybl/python/network/NetworkCFunctions.java b/java/src/main/java/com/powsybl/python/network/NetworkCFunctions.java index aca81460d5..acb8b531ba 100644 --- a/java/src/main/java/com/powsybl/python/network/NetworkCFunctions.java +++ b/java/src/main/java/com/powsybl/python/network/NetworkCFunctions.java @@ -34,9 +34,9 @@ import com.powsybl.iidm.reducer.*; import com.powsybl.nad.NadParameters; import com.powsybl.nad.layout.BasicForceLayoutFactory; -import com.powsybl.nad.layout.FixedLayoutFactoryUtils; import com.powsybl.nad.layout.GeographicalLayoutFactory; import com.powsybl.nad.layout.LayoutFactory; +import com.powsybl.nad.layout.LayoutFactoryUtils; import com.powsybl.nad.svg.SvgParameters; import com.powsybl.python.commons.CTypeUtil; import com.powsybl.python.commons.Directives; @@ -1018,7 +1018,7 @@ public static NadParameters convertNadParameters(NadParametersPointer nadParamet NadParameters nadParameters = NetworkAreaDiagramUtil.createNadParameters(); LayoutFactory layoutFactory = switch (nadParametersPointer.getLayoutType()) { case 1: yield new GeographicalLayoutFactory(network, nadParametersPointer.getScalingFactor(), nadParametersPointer.getRadiusFactor(), new BasicForceLayoutFactory()); - case 2: yield FixedLayoutFactoryUtils.create(new StringReader(CTypeUtil.toString(nadParametersPointer.getMetadata())), new BasicForceLayoutFactory()); + case 2: yield LayoutFactoryUtils.create(new StringReader(CTypeUtil.toString(nadParametersPointer.getMetadata())), new BasicForceLayoutFactory()); default: yield new BasicForceLayoutFactory(); }; SvgParameters.EdgeInfoEnum edgeInfo = switch (nadParametersPointer.getEdgeInfoDisplayed()) {