@@ -114,10 +114,10 @@ public List<TExtRef> getExtRefs(ExtRefSignalInfo filter) {
114114 .filter (tExtRef ->
115115 ((filter .getDesc () == null && tExtRef .getDesc ().isEmpty ())
116116 || Objects .equals (filter .getDesc (),tExtRef .getDesc ()) ) &&
117- Objects .equals (filter .getPDO (),tExtRef .getPDO ()) &&
118- Objects .equals (filter .getPDA (),tExtRef .getPDA ()) &&
119- Objects .equals (filter .getIntAddr (),tExtRef .getIntAddr ()) &&
120- Objects .equals (filter .getPServT (),tExtRef .getPServT ()))
117+ Objects .equals (filter .getPDO (),tExtRef .getPDO ()) &&
118+ Objects .equals (filter .getPDA (),tExtRef .getPDA ()) &&
119+ Objects .equals (filter .getIntAddr (),tExtRef .getIntAddr ()) &&
120+ Objects .equals (filter .getPServT (),tExtRef .getPServT ()))
121121 .collect (Collectors .toList ());
122122 }
123123
@@ -139,9 +139,9 @@ public List<TExtRef> getExtRefsBySignalInfo(ExtRefSignalInfo signalInfo) {
139139 return currentElem .getInputs ().getExtRef ()
140140 .stream ()
141141 .filter (tExtRef -> Objects .equals (signalInfo .getDesc (), tExtRef .getDesc ()) &&
142- Objects .equals (tExtRef .getPDO (), signalInfo .getPDO ()) &&
143- Objects .equals (signalInfo .getIntAddr (), tExtRef .getIntAddr ()) &&
144- Objects .equals (signalInfo .getPServT (), tExtRef .getPServT ())
142+ Objects .equals (tExtRef .getPDO (), signalInfo .getPDO ()) &&
143+ Objects .equals (signalInfo .getIntAddr (), tExtRef .getIntAddr ()) &&
144+ Objects .equals (signalInfo .getPServT (), tExtRef .getPServT ())
145145 )
146146 .collect (Collectors .toList ());
147147 }
@@ -229,12 +229,12 @@ protected List<ControlBlock<?>> getControlBlocks(List<TDataSet> tDataSets, TServ
229229 tControls = this .lookUpControlBlocksByDataSetRef (tDataSet .getName (),TGSEControl .class );
230230 controlBlocks .addAll (
231231 tControls .stream ()
232- .map (tgseControl -> {
233- var g = new GooseControlBlock ((TGSEControl )tgseControl );
234- g .setMetaData (metaData );
235- return g ;
236- })
237- .collect (Collectors .toList ())
232+ .map (tgseControl -> {
233+ var g = new GooseControlBlock ((TGSEControl )tgseControl );
234+ g .setMetaData (metaData );
235+ return g ;
236+ })
237+ .collect (Collectors .toList ())
238238 );
239239 }
240240
@@ -243,25 +243,25 @@ protected List<ControlBlock<?>> getControlBlocks(List<TDataSet> tDataSets, TServ
243243 tControls = this .lookUpControlBlocksByDataSetRef (tDataSet .getName (),TSampledValueControl .class );
244244 controlBlocks .addAll (
245245 tControls .stream ()
246- .map (sampledValueControl -> {
247- var s = new SMVControlBlock ((TSampledValueControl ) sampledValueControl );
248- s .setMetaData (metaData );
249- return s ;
250- })
251- .collect (Collectors .toList ())
246+ .map (sampledValueControl -> {
247+ var s = new SMVControlBlock ((TSampledValueControl ) sampledValueControl );
248+ s .setMetaData (metaData );
249+ return s ;
250+ })
251+ .collect (Collectors .toList ())
252252 );
253253 }
254254
255255 if (serviceType == null || serviceType == TServiceType .REPORT ) {
256256 tControls = this .lookUpControlBlocksByDataSetRef (tDataSet .getName (),TReportControl .class );
257257 controlBlocks .addAll (
258258 tControls .stream ()
259- .map (reportControl -> {
260- var r = new ReportControlBlock ((TReportControl ) reportControl );
261- r .setMetaData (metaData );
262- return r ;
263- })
264- .collect (Collectors .toList ())
259+ .map (reportControl -> {
260+ var r = new ReportControlBlock ((TReportControl ) reportControl );
261+ r .setMetaData (metaData );
262+ return r ;
263+ })
264+ .collect (Collectors .toList ())
265265 );
266266 }
267267 }
@@ -443,11 +443,11 @@ public List<ResumedDataTemplate> getDAI(ResumedDataTemplate rDtt, boolean updata
443443 SclRootAdapter sclRootAdapter = parentAdapter .getParentAdapter ().getParentAdapter ();
444444 DataTypeTemplateAdapter dttAdapter = sclRootAdapter .getDataTypeTemplateAdapter ();
445445 LNodeTypeAdapter lNodeTypeAdapter = dttAdapter .getLNodeTypeAdapterById (lnType )
446- .orElseThrow (
447- () -> new ScdException (
448- String .format ("Corrupted SCD : lnType missing for LN : %s%s" , getLNClass (),getLNInst ())
449- )
450- );
446+ .orElseThrow (
447+ () -> new ScdException (
448+ String .format ("Corrupted SCD : lnType missing for LN : %s%s" , getLNClass (),getLNInst ())
449+ )
450+ );
451451 List <ResumedDataTemplate > resumedDTTs = lNodeTypeAdapter .getResumedDTTs (rDtt );
452452
453453 resumedDTTs .forEach (this ::overrideAttributesFromDAI );
@@ -461,23 +461,23 @@ public List<ResumedDataTemplate> getDAI(ResumedDataTemplate rDtt, boolean updata
461461
462462 protected void overrideAttributesFromDAI (final ResumedDataTemplate rDtt ) {
463463 findMatch (rDtt .getDoName (), rDtt .getDaName ())
464- .map (iDataAdapter -> (AbstractDAIAdapter <?>) iDataAdapter )
465- .map (AbstractDAIAdapter ::getCurrentElem )
466- .ifPresent (tdai -> {
467- rDtt .setDaiValues (tdai .getVal ());
468- if (rDtt .getDaName ().getFc () == TFCEnum .SG || rDtt .getDaName ().getFc () == TFCEnum .SE ) {
469- boolean isGroup = hasSgGroup (tdai );
470- if (isGroup ) {
471- rDtt .setValImport ((!tdai .isSetValImport () || tdai .isValImport ()) && iedHasConfSG ());
472- } else {
473- rDtt .setValImport (false );
474- log .warn ("Inconsistency in the SCD file - DAI {} with fc={} must have a sGroup attribute" ,
475- rDtt .getObjRef (getCurrentIED ().getName (), parentAdapter .getInst ()), rDtt .getDaName ().getFc ());
464+ .map (iDataAdapter -> (AbstractDAIAdapter <?>) iDataAdapter )
465+ .map (AbstractDAIAdapter ::getCurrentElem )
466+ .ifPresent (tdai -> {
467+ rDtt .setDaiValues (tdai .getVal ());
468+ if (rDtt .getDaName ().getFc () == TFCEnum .SG || rDtt .getDaName ().getFc () == TFCEnum .SE ) {
469+ boolean isGroup = hasSgGroup (tdai );
470+ if (isGroup ) {
471+ rDtt .setValImport ((!tdai .isSetValImport () || tdai .isValImport ()) && iedHasConfSG ());
472+ } else {
473+ rDtt .setValImport (false );
474+ log .warn ("Inconsistency in the SCD file - DAI {} with fc={} must have a sGroup attribute" ,
475+ rDtt .getObjRef (getCurrentIED ().getName (), parentAdapter .getInst ()), rDtt .getDaName ().getFc ());
476+ }
477+ } else if (tdai .isSetValImport ()) {
478+ rDtt .setValImport (tdai .isValImport ());
476479 }
477- } else if (tdai .isSetValImport ()) {
478- rDtt .setValImport (tdai .isValImport ());
479- }
480- });
480+ });
481481 }
482482
483483 private boolean iedHasConfSG () {
@@ -570,7 +570,7 @@ public void updateDAI(@NonNull ResumedDataTemplate rDtt) throws ScdException {
570570 }
571571 }
572572 if (daiAdapter == null ){
573- daiAdapter = doiOrSdoiAdapter .addDAI (daTypeName .getName (),rDtt .isUpdatable ());
573+ daiAdapter = doiOrSdoiAdapter .addDAI (daTypeName .getName (),rDtt .isUpdatable ());
574574 }
575575
576576 daiAdapter .update (daTypeName .getDaiValues ());
@@ -609,9 +609,9 @@ public boolean matches(ObjectReference objRef) {
609609 )
610610 );
611611 ResumedDataTemplate filter = ResumedDataTemplate .builder ()
612- .lnInst (getLNInst ())
613- .lnClass (getLNClass ())
614- .lnType (currentElem .getLnType ()).build ();
612+ .lnInst (getLNInst ())
613+ .lnClass (getLNClass ())
614+ .lnType (currentElem .getLnType ()).build ();
615615 List <ResumedDataTemplate > rDtts = lNodeTypeAdapter .getResumedDTTs (filter );
616616
617617 return matchesDataAttributes (dataAttribute ) ||
@@ -663,7 +663,7 @@ public Map<Long, String> getDAIValues(ResumedDataTemplate rDtt) {
663663
664664 Map <Long ,String > res = new HashMap <>();
665665 tVals .forEach ( tVal -> res .put (
666- tVal .isSetSGroup () ? tVal .getSGroup () : 0L , tVal .getValue ())
666+ tVal .isSetSGroup () ? tVal .getSGroup () : 0L , tVal .getValue ())
667667 );
668668
669669 return res ;
0 commit comments