pull/65/merge
DALL'AGNOLA Cédric 7 years ago committed by GitHub
commit edaa1191e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,6 +30,7 @@ import java.io.InputStream;
import java.util.LinkedList;
import java.util.List;
import java.util.Stack;
import java.util.stream.Stream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@ -118,6 +119,15 @@ public class SclParser {
public Communication getCommunication() {
return communication;
}
public Stream<IED> getIeds() {
return ieds.stream();
}
public int getIedsCount() {
return ieds.size();
}
public static Document parseXmlWithLineNumberInformation(InputStream xmlInputStream) throws IOException, SAXException {
final Document xmlDocument;
@ -314,4 +324,4 @@ public class SclParser {
return null;
}
}
}

@ -42,12 +42,11 @@ public class AccessPoint {
Node serverNode = ParserUtils.getChildNodeWithTag(apNode, "Server");
if (serverNode == null)
throw new SclParserException(apNode, "AccessPoint has no server defined!");
this.server = new Server(serverNode, typeDeclarations);
}
if (serverNode == null) {
server = null;
} else {
server = new Server(serverNode, typeDeclarations);
}
public String getName() {
return name;

@ -41,9 +41,6 @@ public class IED {
List<Node> accessPointNodes = ParserUtils.getChildNodesWithTag(iedNode, "AccessPoint");
if (accessPointNodes.size() == 0)
throw new SclParserException(iedNode, "no AccessPoint defined in IED " + name);
this.accessPoints = new LinkedList<AccessPoint>();
for (Node accessPointNode : accessPointNodes) {

Loading…
Cancel
Save