-
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 #363 from com-pas/feat/362_RSR-812_Use_generated_J…
…AXB_class_for_configuration_of_Communication_of_Control_Blocks Feat/362 rsr 812 use generated jaxb class for configuration of communication of control blocks
- Loading branch information
Showing
17 changed files
with
995 additions
and
979 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
430 changes: 430 additions & 0 deletions
430
sct-commons/src/main/java/org/lfenergy/compas/sct/commons/ControlBlockEditorService.java
Large diffs are not rendered by default.
Oops, something went wrong.
159 changes: 0 additions & 159 deletions
159
sct-commons/src/main/java/org/lfenergy/compas/sct/commons/ControlBlockService.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
71 changes: 0 additions & 71 deletions
71
...ommons/src/main/java/org/lfenergy/compas/sct/commons/dto/ControlBlockNetworkSettings.java
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
sct-commons/src/main/java/org/lfenergy/compas/sct/commons/scl/ControlService.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,26 @@ | ||
// SPDX-FileCopyrightText: 2023 RTE FRANCE | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.lfenergy.compas.sct.commons.scl; | ||
|
||
import org.lfenergy.compas.scl2007b4.model.*; | ||
|
||
import java.util.stream.Stream; | ||
|
||
public class ControlService { | ||
|
||
public <T extends TControl> Stream<T> getControls(TAnyLN tAnyLN, Class<T> tControlClass){ | ||
if (tControlClass == TGSEControl.class && tAnyLN instanceof TLN0 tln0 && tln0.isSetGSEControl()){ | ||
return tln0.getGSEControl().stream().map(tControlClass::cast); | ||
} else if (tControlClass == TSampledValueControl.class && tAnyLN instanceof TLN0 tln0 && tln0.isSetSampledValueControl()){ | ||
return tln0.getSampledValueControl().stream().map(tControlClass::cast); | ||
} else if (tControlClass == TReportControl.class && tAnyLN.isSetReportControl()){ | ||
return tAnyLN.getReportControl().stream().map(tControlClass::cast); | ||
} else if (tControlClass == TLogControl.class){ | ||
return tAnyLN.getLogControl().stream().map(tControlClass::cast); | ||
} | ||
return Stream.empty(); | ||
} | ||
|
||
} |
Oops, something went wrong.