From 38e93a1b6d2a03ef38bcdeb85ecc886b761d283f Mon Sep 17 00:00:00 2001 From: Abdelaziz Said Date: Thu, 30 Dec 2021 17:44:38 +0200 Subject: [PATCH] - Add ConnectionParam.java to extract the connection parameters under ConnectedAP tag in the CID/SCD file while parsing it. - Add the ConnectionParam to the ServerModel.java to be retrieved after parsing the CID/SCD file. - Enhance the SclParser.java to parse the ConnectionParam under the ConnectedAP tag. - Optimize imports in the SclParser.java - Remove the unnecessary .toStrings in the SclParser.java - Replace the If-else with switch case in the SclParser.java --- src/main/java/com/beanit/iec61850bean/SclParser.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/beanit/iec61850bean/SclParser.java b/src/main/java/com/beanit/iec61850bean/SclParser.java index a3468f1..d917443 100644 --- a/src/main/java/com/beanit/iec61850bean/SclParser.java +++ b/src/main/java/com/beanit/iec61850bean/SclParser.java @@ -38,7 +38,6 @@ public class SclParser { private final List serverModels = new ArrayList<>(); private boolean useResvTmsAttributes = false; - private String iedConnectedAP; ConnectionParam connectionParm; private final Map iedConnectionMap = new HashMap<>(); @@ -85,7 +84,7 @@ public class SclParser { for (int zz = 0; zz < connectedAPs.getLength(); zz++) { Node connectedAP = connectedAPs.item(zz); Node attributeName = connectedAP.getAttributes().getNamedItem("iedName"); - iedConnectedAP = attributeName.getNodeValue(); + String iedConnectedAP = attributeName.getNodeValue(); connectionParm = new ConnectionParam(); if ((iedConnectedAP == null) || (iedConnectedAP.length() == 0)) { throw new SclParseException("ConnectedAP must has a name");