5959 * </ol>
6060 * <li>DAI features</li>
6161 * <ol>
62- * <li>{@link SclService#getDAI <em>Returns list of <b>ResumedDataTemplate </b></em>}</li>
63- * <li>{@link SclService#updateDAI(SCL, String, String, ResumedDataTemplate )
64- * <em>Update the <b>TDAI </b> reference object for given <b>iedName</b>, <b>ldInst </b> and <b>ResumedDataTemplate </b> model</em>}</li>
62+ * <li>{@link SclService#getDAI <em>Returns list of <b>DataAttributeRef </b></em>}</li>
63+ * <li>{@link SclService#updateDAI(SCL, String, String, DataAttributeRef )
64+ * <em>Update the <b>TDAI </b> reference object for given <b>iedName</b>, <b>ldInst </b> and <b>DataAttributeRef </b> model</em>}</li>
6565 * </ol>
6666 * <li>EnumType features</li>
6767 * <ol>
@@ -392,43 +392,43 @@ public static TExtRef updateExtRefSource(SCL scd, ExtRefInfo extRefInfo) throws
392392
393393 /**
394394 * Gets a list of summarized DataTypeTemplate for DataAttribute DA (updatable or not) related to the one given
395- * in <em>rDtt </em>
395+ * in <em>dataAttributeRef </em>
396396 *
397397 * @param scd SCL file in which DataTypeTemplate of DAIs should be found
398398 * @param iedName name of IED in which DAs are localized
399399 * @param ldInst ldInst of LDevice in which DAIs are localized
400- * @param rDtt reference summarized DataTypeTemplate related to IED DAIs
400+ * @param dataAttributeRef reference summarized DataTypeTemplate related to IED DAIs
401401 * @param updatable true to retrieve DataTypeTemplate's related to only updatable DAIs, false to retrieve all
402- * @return List of resumed DataTypeTemplate for DataAttribute (updatable or not)
402+ * @return Set of Data Attribute Reference for DataAttribute (updatable or not)
403403 * @throws ScdException SCD illegal arguments exception, missing mandatory data
404404 */
405- public static Set <ResumedDataTemplate > getDAI (SCL scd , String iedName , String ldInst , ResumedDataTemplate rDtt , boolean updatable ) throws ScdException {
405+ public static Set <DataAttributeRef > getDAI (SCL scd , String iedName , String ldInst , DataAttributeRef dataAttributeRef , boolean updatable ) throws ScdException {
406406 LDeviceAdapter lDeviceAdapter = createLDeviceAdapter (scd , iedName , ldInst );
407- return lDeviceAdapter .getDAI (rDtt , updatable );
407+ return lDeviceAdapter .getDAI (dataAttributeRef , updatable );
408408 }
409409
410410 /**
411- * Updates DAI based on given data in <em>rDtt </em>
411+ * Updates DAI based on given data in <em>dataAttributeRef </em>
412412 *
413413 * @param scd SCL file in which DataTypeTemplate of DAI should be found
414414 * @param iedName name of IED in which DAI is localized
415415 * @param ldInst ldInst of LDevice in which DAI is localized
416- * @param rDtt reference summarized DataTypeTemplate related to DAI to update
416+ * @param dataAttributeRef reference summarized DataTypeTemplate related to DAI to update
417417 * @throws ScdException when inconsistency are found in th SCL's
418418 * DataTypeTemplate. Which should normally not happens.
419419 */
420- public static void updateDAI (SCL scd , String iedName , String ldInst , ResumedDataTemplate rDtt ) throws ScdException {
420+ public static void updateDAI (SCL scd , String iedName , String ldInst , DataAttributeRef dataAttributeRef ) throws ScdException {
421421 long startTime = System .nanoTime ();
422422 log .info (Utils .entering ());
423423 SclRootAdapter sclRootAdapter = new SclRootAdapter (scd );
424424 DataTypeTemplateAdapter dttAdapter = sclRootAdapter .getDataTypeTemplateAdapter ();
425- LNodeTypeAdapter lNodeTypeAdapter = dttAdapter .getLNodeTypeAdapterById (rDtt .getLnType ())
426- .orElseThrow (() -> new ScdException ("Unknown LNodeType : " + rDtt .getLnType ()));
427- lNodeTypeAdapter .check (rDtt .getDoName (), rDtt .getDaName ());
425+ LNodeTypeAdapter lNodeTypeAdapter = dttAdapter .getLNodeTypeAdapterById (dataAttributeRef .getLnType ())
426+ .orElseThrow (() -> new ScdException ("Unknown LNodeType : " + dataAttributeRef .getLnType ()));
427+ lNodeTypeAdapter .check (dataAttributeRef .getDoName (), dataAttributeRef .getDaName ());
428428
429- if (TPredefinedBasicTypeEnum .OBJ_REF == rDtt .getBType ()) {
430- Long sGroup = rDtt .getDaName ().getDaiValues ().keySet ().stream ().findFirst ().orElse (-1L );
431- String val = sGroup < 0 ? null : rDtt .getDaName ().getDaiValues ().get (sGroup );
429+ if (TPredefinedBasicTypeEnum .OBJ_REF == dataAttributeRef .getBType ()) {
430+ Long sGroup = dataAttributeRef .getDaName ().getDaiValues ().keySet ().stream ().findFirst ().orElse (-1L );
431+ String val = sGroup < 0 ? null : dataAttributeRef .getDaName ().getDaiValues ().get (sGroup );
432432 sclRootAdapter .checkObjRef (val );
433433 }
434434
@@ -438,16 +438,16 @@ public static void updateDAI(SCL scd, String iedName, String ldInst, ResumedData
438438
439439 AbstractLNAdapter <?> lnAdapter = AbstractLNAdapter .builder ()
440440 .withLDeviceAdapter (lDeviceAdapter )
441- .withLnClass (rDtt .getLnClass ())
442- .withLnInst (rDtt .getLnInst ())
443- .withLnPrefix (rDtt .getPrefix ())
441+ .withLnClass (dataAttributeRef .getLnClass ())
442+ .withLnInst (dataAttributeRef .getLnInst ())
443+ .withLnPrefix (dataAttributeRef .getPrefix ())
444444 .build ();
445445
446- if (TPredefinedCDCEnum .ING == rDtt .getCdc () || TPredefinedCDCEnum .ASG == rDtt .getCdc ()) {
447- DAITracker daiTracker = new DAITracker (lnAdapter , rDtt .getDoName (), rDtt .getDaName ());
446+ if (TPredefinedCDCEnum .ING == dataAttributeRef .getCdc () || TPredefinedCDCEnum .ASG == dataAttributeRef .getCdc ()) {
447+ DAITracker daiTracker = new DAITracker (lnAdapter , dataAttributeRef .getDoName (), dataAttributeRef .getDaName ());
448448 daiTracker .validateBoundedDAI ();
449449 }
450- lnAdapter .updateDAI (rDtt );
450+ lnAdapter .updateDAI (dataAttributeRef );
451451 log .info (Utils .leaving (startTime ));
452452 }
453453
0 commit comments