.build()); final List<Marker> markers = locations.stream() .filter(locationInfo -> locationInfo.getCoordinates() != null) .map(locationInfo -> { final Vertex vertex = vertices.stream() .get(); return new Marker( locationInfo.getCoordinates(), createTooltip(vertex, locationInfo.getAddressInfo()), container.getSelectionManager().isVertexRefSelected(vertex));
.build()); final List<Marker> markers = locations.stream() .filter(locationInfo -> locationInfo.getCoordinates() != null) .map(locationInfo -> { final Vertex vertex = vertices.stream() .get(); return new Marker( locationInfo.getCoordinates(), createTooltip(vertex, locationInfo.getAddressInfo()), container.getSelectionManager().isVertexRefSelected(vertex));
private static MapNode createMapNode(GeolocationInfo geolocationInfo) { final MapNode node = new MapNode(); // Coordinates if (geolocationInfo.getCoordinates() != null) { node.setLatitude(geolocationInfo.getCoordinates().getLatitude()); node.setLongitude(geolocationInfo.getCoordinates().getLongitude()); } // Node Info final NodeInfo nodeInfo = geolocationInfo.getNodeInfo(); node.setNodeId(String.valueOf(nodeInfo.getNodeId())); node.setNodeLabel(nodeInfo.getNodeLabel()); node.setForeignSource(nodeInfo.getForeignSource()); node.setForeignId(nodeInfo.getForeignId()); node.setIpAddress(nodeInfo.getIpAddress()); node.setDescription(nodeInfo.getDescription()); node.setMaintcontract(nodeInfo.getMaintcontract()); node.setCategories(new ArrayList<>(nodeInfo.getCategories())); // Severity node.setSeverityLabel(geolocationInfo.getSeverityInfo().getLabel()); node.setSeverity(String.valueOf(geolocationInfo.getSeverityInfo().getId())); // Count node.setUnackedCount(geolocationInfo.getAlarmUnackedCount()); return node; } }
private static MapNode createMapNode(GeolocationInfo geolocationInfo) { final MapNode node = new MapNode(); // Coordinates if (geolocationInfo.getCoordinates() != null) { node.setLatitude(geolocationInfo.getCoordinates().getLatitude()); node.setLongitude(geolocationInfo.getCoordinates().getLongitude()); } // Node Info final NodeInfo nodeInfo = geolocationInfo.getNodeInfo(); node.setNodeId(String.valueOf(nodeInfo.getNodeId())); node.setNodeLabel(nodeInfo.getNodeLabel()); node.setForeignSource(nodeInfo.getForeignSource()); node.setForeignId(nodeInfo.getForeignId()); node.setIpAddress(nodeInfo.getIpAddress()); node.setDescription(nodeInfo.getDescription()); node.setMaintcontract(nodeInfo.getMaintcontract()); node.setCategories(new ArrayList<>(nodeInfo.getCategories())); // Severity node.setSeverityLabel(geolocationInfo.getSeverityInfo().getLabel()); node.setSeverity(String.valueOf(geolocationInfo.getSeverityInfo().getId())); // Count node.setUnackedCount(geolocationInfo.getAlarmUnackedCount()); return node; } }