Skip to content

Commit

Permalink
Replace deprecated methods usages (#542)
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
  • Loading branch information
olperr1 authored Jul 31, 2023
1 parent 40fbede commit 449f6b9
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void exportDiagramData(ThreeWindingsTransformer transformer) {
transformerDiagramData.getDiagramsNames().forEach(diagramName -> {
ThreeWindingsTransformerDiagramData.ThreeWindingsTransformerDiagramDataDetails details = transformerDiagramData.getData(diagramName);
String diagramId = context.getDiagramId(diagramName);
String diagramObjectId = addDiagramObject(transformer.getId(), transformer.getName(), details.getRotation(), diagramObjectStyleId, diagramId);
String diagramObjectId = addDiagramObject(transformer.getId(), transformer.getNameOrId(), details.getRotation(), diagramObjectStyleId, diagramId);
addDiagramObjectPoint(diagramObjectId, details.getPoint());
addTerminalData(transformer.getId(), transformer.getNameOrId(), 1, details.getTerminalPoints(DiagramTerminal.TERMINAL1), diagramObjectStyleId, diagramId);
addTerminalData(transformer.getId(), transformer.getNameOrId(), 2, details.getTerminalPoints(DiagramTerminal.TERMINAL2), diagramObjectStyleId, diagramId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void setUp() {

@Override
protected void checkStatements() {
checkStatements(bus.getId(), bus.getName(), "bus-branch");
checkStatements(bus.getId(), bus.getNameOrId(), "bus-branch");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void setUp() {

@Override
protected void checkStatements() {
checkStatements(busbarNodeId, busbar.getName(), "node-breaker");
checkStatements(busbarNodeId, busbar.getNameOrId(), "node-breaker");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void setUp() {

@Override
protected void checkStatements() {
checkStatements(danglingLine.getId(), danglingLine.getName(), "bus-branch");
checkStatements(danglingLine.getId(), danglingLine.getNameOrId(), "bus-branch");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void setUp() {

@Override
protected void checkStatements() {
checkStatements(generator.getId(), generator.getName(), "bus-branch");
checkStatements(generator.getId(), generator.getNameOrId(), "bus-branch");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void setUp() {

@Override
protected void checkStatements() {
checkStatements(hvdcLine.getId(), hvdcLine.getName(), "bus-branch");
checkStatements(hvdcLine.getId(), hvdcLine.getNameOrId(), "bus-branch");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void setUp() {

@Override
protected void checkStatements() {
checkStatements(line.getId(), line.getName(), "bus-branch");
checkStatements(line.getId(), line.getNameOrId(), "bus-branch");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void setUp() {

@Override
protected void checkStatements() {
checkStatements(load.getId(), load.getName(), "bus-branch");
checkStatements(load.getId(), load.getNameOrId(), "bus-branch");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void setUp() {

@Override
protected void checkStatements() {
checkStatements(shunt.getId(), shunt.getName(), "bus-branch");
checkStatements(shunt.getId(), shunt.getNameOrId(), "bus-branch");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void setUp() {

@Override
protected void checkStatements() {
checkStatements(svc.getId(), svc.getName(), "bus-branch");
checkStatements(svc.getId(), svc.getNameOrId(), "bus-branch");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void setUp() {

@Override
protected void checkStatements() {
checkStatements(sw.getId(), sw.getName(), "bus-branch");
checkStatements(sw.getId(), sw.getNameOrId(), "bus-branch");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected void checkStatements(String couplingDeviceId, String injectionName, St

@Override
protected void checkStatements() {
checkStatements(twt.getId(), twt.getName(), "bus-branch");
checkStatements(twt.getId(), twt.getNameOrId(), "bus-branch");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void setUp() {

@Override
protected void checkStatements() {
checkStatements(twt.getId(), twt.getName(), "bus-branch");
checkStatements(twt.getId(), twt.getNameOrId(), "bus-branch");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ private VoltageLevel createSecondVoltageLevel(Substation substation) {
.setBmin(0.0002)
.setBmax(0.0008)
.setRegulationMode(StaticVarCompensator.RegulationMode.VOLTAGE)
.setVoltageSetPoint(390.0)
.setReactivePowerSetPoint(1.0)
.setVoltageSetpoint(390.0)
.setReactivePowerSetpoint(1.0)
.add();
return voltageLevel2;
}
Expand Down

0 comments on commit 449f6b9

Please sign in to comment.