From d7e7dfef942adca492bc0521db0433a0b89e7b58 Mon Sep 17 00:00:00 2001 From: Samir Romdhani Date: Thu, 4 Apr 2024 16:38:55 +0200 Subject: [PATCH] feat : update xsd (epf) Signed-off-by: Samir Romdhani feat : update xsd (epf) - remove whitespace Signed-off-by: Samir Romdhani --- .../sct/commons/ExtRefEditorService.java | 6 ++--- sct-commons/src/main/resources/xsd/LDEPF.xsd | 22 +++++++++---------- .../sct/commons/ExtRefEditorServiceTest.java | 14 ++++++------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/sct-commons/src/main/java/org/lfenergy/compas/sct/commons/ExtRefEditorService.java b/sct-commons/src/main/java/org/lfenergy/compas/sct/commons/ExtRefEditorService.java index d221e4492..b5ada60ed 100644 --- a/sct-commons/src/main/java/org/lfenergy/compas/sct/commons/ExtRefEditorService.java +++ b/sct-commons/src/main/java/org/lfenergy/compas/sct/commons/ExtRefEditorService.java @@ -11,7 +11,7 @@ import org.lfenergy.compas.sct.commons.dto.*; import org.lfenergy.compas.sct.commons.exception.ScdException; import org.lfenergy.compas.sct.commons.model.epf.EPF; -import org.lfenergy.compas.sct.commons.model.epf.TCBscopeType; +import org.lfenergy.compas.sct.commons.model.epf.TCBScopeType; import org.lfenergy.compas.sct.commons.model.epf.TChannel; import org.lfenergy.compas.sct.commons.model.epf.TChannelType; import org.lfenergy.compas.sct.commons.scl.ExtRefService; @@ -65,9 +65,9 @@ public class ExtRefEditorService implements ExtRefEditor { */ private static List getIedSources(SclRootAdapter sclRootAdapter, TCompasBay compasBay, TChannel channel) { return sclRootAdapter.streamIEDAdapters() - .filter(iedAdapter -> (channel.getBayScope().equals(TCBscopeType.BAY_EXTERNAL) + .filter(iedAdapter -> (channel.getBayScope().equals(TCBScopeType.BAY_EXTERNAL) && iedAdapter.getPrivateCompasBay().stream().noneMatch(bay -> bay.getUUID().equals(compasBay.getUUID()))) - || (channel.getBayScope().equals(TCBscopeType.BAY_INTERNAL) + || (channel.getBayScope().equals(TCBScopeType.BAY_INTERNAL) && iedAdapter.getPrivateCompasBay().stream().anyMatch(bay -> bay.getUUID().equals(compasBay.getUUID())))) .filter(iedAdapter -> doesIcdHeaderMatchLDEPFChannel(iedAdapter, channel)) .filter(iedAdapter -> getActiveSourceLDeviceByLDEPFChannel(iedAdapter, channel) diff --git a/sct-commons/src/main/resources/xsd/LDEPF.xsd b/sct-commons/src/main/resources/xsd/LDEPF.xsd index 5f1af5c9f..46fe23543 100644 --- a/sct-commons/src/main/resources/xsd/LDEPF.xsd +++ b/sct-commons/src/main/resources/xsd/LDEPF.xsd @@ -1,11 +1,11 @@ - + @@ -26,10 +26,10 @@ SPDX-License-Identifier: Apache-2.0 - - - - + + + + @@ -53,7 +53,7 @@ SPDX-License-Identifier: Apache-2.0 - + @@ -74,12 +74,12 @@ SPDX-License-Identifier: Apache-2.0 - + - + diff --git a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/ExtRefEditorServiceTest.java b/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/ExtRefEditorServiceTest.java index 32dd52463..b576e3ad9 100644 --- a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/ExtRefEditorServiceTest.java +++ b/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/ExtRefEditorServiceTest.java @@ -217,7 +217,7 @@ void manageBindingForLDEPF_whenFlowKindIsInternalAndAllExtRefInSameBay_should_re //Given SCL scd = SclTestMarshaller.getSCLFromFile("/scd-ldepf/scd_ldepf_iedSources_in_different_bay.xml"); TChannel channel = new TChannel(); - channel.setBayScope(TCBscopeType.BAY_INTERNAL); + channel.setBayScope(TCBScopeType.BAY_INTERNAL); channel.setChannelType(TChannelType.DIGITAL); channel.setChannelNum("1"); channel.setChannelShortLabel("MR.PX1"); @@ -286,7 +286,7 @@ void manageBindingForLDEPF_when_internalBindingMatchEPFChannel_should_update_suc // Given SCL scd = SclTestMarshaller.getSCLFromFile("/scd-ldepf/scd_ldepf_extref_with_IedType_BCU.xml"); TChannel channel = new TChannel(); - channel.setBayScope(TCBscopeType.BAY_INTERNAL); + channel.setBayScope(TCBScopeType.BAY_INTERNAL); channel.setChannelType(TChannelType.DIGITAL); channel.setChannelNum("1"); channel.setChannelShortLabel("MR.PX1"); @@ -349,7 +349,7 @@ void manageBindingForLDEPF_when_manyIedSourceFound_should_return_reportMassages( //Given SCL scd = SclTestMarshaller.getSCLFromFile("/scd-ldepf/scd_ldepf_manyIedSources_in_same_bay.xml"); TChannel channel = new TChannel(); - channel.setBayScope(TCBscopeType.BAY_INTERNAL); + channel.setBayScope(TCBScopeType.BAY_INTERNAL); channel.setChannelType(TChannelType.DIGITAL); channel.setChannelNum("1"); channel.setChannelShortLabel("MR.PX1"); @@ -410,7 +410,7 @@ void manageBindingForLDEPF_when_extRefMatchFlowKindInternalOrExternal_should_upd SCL scd = SclTestMarshaller.getSCLFromFile("/scd-ldepf/scd_ldepf_dataTypeTemplateValid.xml"); TChannel analogueChannel1WithBayInternalScope = new TChannel(); - analogueChannel1WithBayInternalScope.setBayScope(TCBscopeType.BAY_INTERNAL); + analogueChannel1WithBayInternalScope.setBayScope(TCBScopeType.BAY_INTERNAL); analogueChannel1WithBayInternalScope.setChannelType(TChannelType.ANALOG); analogueChannel1WithBayInternalScope.setChannelNum("1"); analogueChannel1WithBayInternalScope.setChannelShortLabel("V0"); @@ -431,7 +431,7 @@ void manageBindingForLDEPF_when_extRefMatchFlowKindInternalOrExternal_should_upd analogueChannel1WithBayInternalScope.setBDAName("i"); TChannel analogueChannel10WithBayExternalBayScope = new TChannel(); - analogueChannel10WithBayExternalBayScope.setBayScope(TCBscopeType.BAY_EXTERNAL); + analogueChannel10WithBayExternalBayScope.setBayScope(TCBScopeType.BAY_EXTERNAL); analogueChannel10WithBayExternalBayScope.setChannelType(TChannelType.ANALOG); analogueChannel10WithBayExternalBayScope.setChannelNum("10"); analogueChannel10WithBayExternalBayScope.setChannelShortLabel("U101"); @@ -505,7 +505,7 @@ void manageBindingForLDEPF_when_DOI_Mod_and_DAI_stVal_notExists_should_precede() SCL scd = SclTestMarshaller.getSCLFromFile("/scd-ldepf/scd_ldepf_withoutModStValInLN0.xml"); // When TChannel channel = new TChannel(); - channel.setBayScope(TCBscopeType.BAY_INTERNAL); + channel.setBayScope(TCBScopeType.BAY_INTERNAL); channel.setChannelType(TChannelType.DIGITAL); channel.setChannelNum("1"); channel.setChannelShortLabel("MR.PX1"); @@ -545,7 +545,7 @@ void manageBindingForLDEPF_when_LDEPF_NotActive_should_precede() { //Given SCL scd = SclTestMarshaller.getSCLFromFile("/scd-ldepf/scd_with_inactive_ldevice_ldepf.xml"); TChannel channel = new TChannel(); - channel.setBayScope(TCBscopeType.BAY_INTERNAL); + channel.setBayScope(TCBScopeType.BAY_INTERNAL); channel.setChannelType(TChannelType.DIGITAL); channel.setChannelNum("1"); channel.setChannelShortLabel("MR.PX1");