Skip to content

Commit

Permalink
remove Sld and Nad Parameters builders
Browse files Browse the repository at this point in the history
Signed-off-by: Sophie Frasnedo <sophie.frasnedo@rte-france.com>
  • Loading branch information
So-Fras committed Sep 4, 2023
1 parent f1433b0 commit a0b100b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static void writeSvg(Network network, List<String> voltageLevelIds, int depth, W
.setFixedWidth(800)
.setFixedHeight(600)
.setEdgeNameDisplayed(edgeNameDisplayed);
NadParameters nadParameters = NadParameters.builder().withSvgParameters(svgParameters);
NadParameters nadParameters = new NadParameters().setSvgParameters(svgParameters);

Predicate<VoltageLevel> filter = voltageLevelIds.size() > 0
? getNominalVoltageFilter(network, voltageLevelIds, highNominalVoltageBound, lowNominalVoltageBound, depth)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,13 +850,17 @@ public SldParametersExt(SvgParameters svgParameters, boolean topologicalColoring
this.svgParameters = svgParameters;
this.topologicalColoring = topologicalColoring;
this.componentLibrary = componentLibrary;
SldParametersBuilder sldParametersBuilder = new SldParametersBuilder()
.withSvgParameters(svgParameters)
.withComponentLibrary(ComponentLibrary.find(componentLibrary).orElseGet(ConvergenceComponentLibrary::new));

SldParameters sldParameters = new SldParameters()
.setSvgParameters(svgParameters)
.setComponentLibrary(ComponentLibrary.find(componentLibrary).orElseGet(ConvergenceComponentLibrary::new));

if (!topologicalColoring) {
sldParametersBuilder.withStyleProviderFactory(NominalVoltageStyleProviderFactory);
sldParameters.setStyleProviderFactory(NominalVoltageStyleProviderFactory);
}
this.sldParameters = sldParametersBuilder.build();

this.sldParameters = sldParameters;

}
}

Expand Down

0 comments on commit a0b100b

Please sign in to comment.