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; } }