Skip to content

Commit

Permalink
Review remarks
Browse files Browse the repository at this point in the history
Signed-off-by: Slimane AMAR <[email protected]>
  • Loading branch information
Slimane AMAR committed Oct 4, 2024
1 parent 1fd93ea commit 2016ca3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public boolean isConnected() {

@Override
public String toString() {
return "NodeTopologyPoint(" +
return "BusTopologyPoint(" +
"voltageLevelId='" + voltageLevelId + '\'' +
", connectableBusId='" + connectableBusId + '\'' +
", connected=" + connected +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ public TerminalImpl(NetworkObjectIndex index, Connectable<?> connectable, Functi
public void moveConnectable(int node, String voltageLevelId) {
TopologyPoint oldTopologyPoint = TerminalImpl.this.getTopologyPoint();
super.moveConnectable(node, voltageLevelId);
index.notifyUpdate(connectable, "moveConnectable", oldTopologyPoint, TerminalImpl.this.getTopologyPoint());
index.notifyUpdate(connectable, "terminal" + getSide().getNum(), oldTopologyPoint, TerminalImpl.this.getTopologyPoint());
}
};
busBreakerView = new TerminalBusBreakerViewImpl<>(index, connectable, attributesGetter) {
@Override
public void moveConnectable(String busId, boolean connected) {
TopologyPoint oldTopologyPoint = TerminalImpl.this.getTopologyPoint();
super.moveConnectable(busId, connected);
index.notifyUpdate(connectable, "moveConnectable", oldTopologyPoint, TerminalImpl.this.getTopologyPoint());
index.notifyUpdate(connectable, "terminal" + getSide().getNum(), oldTopologyPoint, TerminalImpl.this.getTopologyPoint());
}
};
busView = new TerminalBusViewImpl<>(index, connectable, attributesGetter);
Expand Down Expand Up @@ -584,8 +584,11 @@ public String getVoltageLevelId() {

@Override
public ThreeSides getSide() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getSide'");
int index = connectable.getTerminals().indexOf(this);
if (index < 0) {
throw new IllegalStateException();
}
return ThreeSides.valueOf(index + 1);
}

public void addNewRegulatingPoint(RegulatingPoint regulatingPoint) {
Expand Down

0 comments on commit 2016ca3

Please sign in to comment.