-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #434 from com-pas/develop
Release 0.2.30
- Loading branch information
Showing
14 changed files
with
138 additions
and
565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
sct-commons/src/main/java/org/lfenergy/compas/sct/commons/HmiService.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
sct-commons/src/main/java/org/lfenergy/compas/sct/commons/VoltageLevelService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-FileCopyrightText: 2024 RTE FRANCE | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.lfenergy.compas.sct.commons; | ||
|
||
import org.lfenergy.compas.scl2007b4.model.*; | ||
|
||
import java.util.Collection; | ||
import java.util.Optional; | ||
import java.util.function.Predicate; | ||
import java.util.stream.Stream; | ||
|
||
public class VoltageLevelService { | ||
|
||
public Stream<TVoltageLevel> getVoltageLevels(SCL scd) { | ||
if (!scd.isSetSubstation()) { | ||
return Stream.empty(); | ||
} | ||
return scd.getSubstation() | ||
.stream() | ||
.map(TSubstation::getVoltageLevel) | ||
.flatMap(Collection::stream); | ||
} | ||
|
||
public Optional<TVoltageLevel> findVoltageLevel(SCL scd, Predicate<TVoltageLevel> tVoltageLevelPredicate) { | ||
return getVoltageLevels(scd).filter(tVoltageLevelPredicate).findFirst(); | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
sct-commons/src/main/java/org/lfenergy/compas/sct/commons/api/HmiEditor.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.