public void displayGraph(Map<Server, Set<Application>> connections) {
        graph.clear();
        if(connections != null) {
            int serverCounter = 0;
            int applicationCounter = 0;
            for (Server server : connections.keySet()) {
                Node serverNode;
                if((serverNode = graph.getNode(server.toString())) == null) {
                    serverNode = graph.addNode(server.toString());
                    serverNode.setAttribute("ui.label", serverNode.getId());
                    serverNode.setAttribute("xyz", serverCounter, 0, 0);
                }
                for (Application application : connections.get(server)) {
                    Node applicationNode;
                    if(graph.getNode(application.toString()) == null) {
                        applicationNode = graph.addNode(application.toString());
                        applicationNode.setAttribute("ui.label", applicationNode.getId());
                        applicationNode.setAttribute("xyz", applicationCounter, 2, 0);
                        applicationCounter++;
                    }
                    else {
                        applicationNode = graph.getNode(application.toString());
                    }
                    String edgeName = applicationNode.getAttribute("ui.label");
                    for (Service service : Tools.getMatchingServices(server.getServices(), application.getServices())) {
                        edgeName += service.getName() + "-";
                    }
                    if(graph.getEdge(edgeName) == null) {
                        graph.addEdge(edgeName, applicationNode.getId(), serverNode.getId()).setAttribute("ui.label", edgeName);
                    }
                }
                serverCounter++;
            }
        }
    }