|
6 | 6 |
|
7 | 7 |
|
8 | 8 | import lombok.*; |
9 | | -import org.apache.commons.lang3.StringUtils; |
10 | 9 | import org.lfenergy.compas.scl2007b4.model.TExtRef; |
11 | 10 | import org.lfenergy.compas.scl2007b4.model.TFCDA; |
12 | | -import org.lfenergy.compas.scl2007b4.model.TLLN0Enum; |
13 | | -import org.lfenergy.compas.sct.commons.scl.ied.AbstractLNAdapter; |
14 | | - |
15 | | -import java.util.Objects; |
16 | 11 | /** |
17 | 12 | * A representation of the model object <em><b>ExtRef</b></em>. |
18 | 13 | * |
@@ -75,48 +70,6 @@ public static ExtRefInfo from(TExtRef tExtRef, String iedName, String ldInst, |
75 | 70 | return extRefInfo; |
76 | 71 | } |
77 | 72 |
|
78 | | - /** |
79 | | - * Check match between FCDA and ExtRef information (for binding) |
80 | | - * @param tfcda FCDA data object |
81 | | - * @return match state |
82 | | - */ |
83 | | - //TODO this method should be checked, return if parameter tested are not present in FCDA even if two object are different |
84 | | - public boolean matchFCDA(@NonNull TFCDA tfcda){ |
85 | | - boolean returnValue = true; |
86 | | - if(AbstractLNAdapter.isFCDANull(tfcda)) { |
87 | | - returnValue = false; |
88 | | - } |
89 | | - |
90 | | - if(tfcda.getLdInst() != null && |
91 | | - (bindingInfo == null || !tfcda.getLdInst().equals(bindingInfo.getLdInst()))){ |
92 | | - returnValue = false; |
93 | | - } |
94 | | - if (!tfcda.getLnClass().isEmpty() && |
95 | | - ( bindingInfo == null || !tfcda.getLnClass().contains(bindingInfo.getLnClass())) ){ |
96 | | - returnValue = false; |
97 | | - } |
98 | | - |
99 | | - boolean isLN0 = tfcda.getLnClass().contains(TLLN0Enum.LLN_0.value()); |
100 | | - if (!isLN0 && tfcda.getLnInst() != null && |
101 | | - (bindingInfo == null || !tfcda.getLnInst().equals(bindingInfo.getLnInst()))) { |
102 | | - returnValue = false; |
103 | | - } |
104 | | - if (!isLN0 && !StringUtils.isBlank(tfcda.getPrefix()) && |
105 | | - (bindingInfo == null || !tfcda.getPrefix().equals(bindingInfo.getPrefix()))) { |
106 | | - returnValue = false; |
107 | | - } |
108 | | - |
109 | | - if(!StringUtils.isBlank(tfcda.getDoName()) && |
110 | | - (signalInfo == null || !Objects.equals(signalInfo.getPDO(),tfcda.getDoName())) ){ |
111 | | - returnValue = false; |
112 | | - } |
113 | | - |
114 | | - if(!StringUtils.isBlank(tfcda.getDaName()) && |
115 | | - (signalInfo == null || !Objects.equals(signalInfo.getPDA(),tfcda.getDaName())) ){ |
116 | | - returnValue = false; |
117 | | - } |
118 | | - return returnValue; |
119 | | - } |
120 | 73 | /** |
121 | 74 | * Check matching between FCDA and ExtRef information (for external binding) |
122 | 75 | * Check is done for parameter lDInst(mandatory), lNClass(mandatory), lNInst, prefix doName as pDO(mandatory) and daName as pDA |
|
0 commit comments