IoT CAS Frameworks/IOT_Server/Report_Generator_Framework/IT/source/DashBoard-JSONgenerator/src/com/merit/dashboard/DAO/metrics/LineChartMetrics_2.java
@SuppressWarnings("rawtypes")
    public String generateJsonForMultipleMetricType(HashMap<String, String> Metricsla, HashMap<String, String> MetricName, HashMap<String, String> MetricValue, HashMap<String, String> MetricTimeStamp) {
        String Json_data = "[";
        Set set = MetricName.entrySet();
        Iterator it = set.iterator();
        while (it.hasNext()) {

            Map.Entry entry = (Map.Entry) it.next();
            String host_key = (String) entry.getKey();
            String[] serviceResourcetypehost = host_key.split(",");
            String host_MetricName = (String) entry.getValue() + "]";
            String host_MetricValue = (String) MetricValue.get(host_key) + "]";
            String host_timestamp = (String) MetricTimeStamp.get(host_key);
            Json_data = Json_data + "{ \"ServiceName\":\"" + serviceResourcetypehost[0] + "\",\"ResourceType\":\"" + serviceResourcetypehost[1] + "\",\"ServerName\":\"" + serviceResourcetypehost[2] + "\",\"TimeStamps\":[" + host_timestamp + "],\"ResourceNames\":" + host_MetricName + ",\"ResourceValues\":" + host_MetricValue + ",\"SlaValues\":" + Metricsla.get(host_key) + "],\"ResourceID\":\"" + host_key + "\"},";
        }
        Json_data = Json_data.substring(0, Json_data.lastIndexOf(",")) + "]";

        return Json_data;
        //SendFileToJson file_send_jvmheap = new SendFileToJson(customer,timestampselection, resourcetype, json_Filename, Json_data);
    }
/**
     * ***************************************************************************************************
     * creating JSON For Line Chart and Sending generated JSON to SendFileToJson
     * class
     *
     * @param Metricsla HashMap having SLAValues
     * @param MetricName HashMap having MetricNames
     * @param MetricValue HashMap having MetricValues
     * @param MetricTimeStamp HashMap having Timestamp
     *
     * ***************************************************************************************************
     */
creating JSON For Line Chart and Sending generated JSON to SendFileToJson
class


creating JSON For Line Chart and Sending generated JSON to SendFileToJson class
@SuppressWarnings("rawtypes")
    public String generateJsonForMultipleMetricType(HashMap<String, String> Metricsla, HashMap<String, String> MetricName, HashMap<String, String> MetricValue, HashMap<String, String> MetricTimeStamp) {
        String Json_data = "[";
        Set set = MetricName.entrySet();
        Iterator it = set.iterator();
        while (it.hasNext()) {
            Map.Entry entry = (Map.Entry) it.next();
            String host_key = (String) entry.getKey();
            String[] serviceResourcetypehost = host_key.split(",");
            String host_MetricName = (String) entry.getValue() + "]";
            String host_MetricValue = (String) MetricValue.get(host_key) + "]";
            String host_timestamp = (String) MetricTimeStamp.get(host_key);
            Json_data = Json_data + "{ \"ServiceName\":\"" + serviceResourcetypehost[0] + "\",\"ResourceType\":\"" + serviceResourcetypehost[1] + "\",\"ServerName\":\"" + serviceResourcetypehost[2] + "\",\"TimeStamps\":[" + host_timestamp + "],\"ResourceNames\":" + host_MetricName + ",\"ResourceValues\":" + host_MetricValue + ",\"SlaValues\":" + Metricsla.get(host_key) + "],\"ResourceID\":\"" + host_key + "\"},";
        }
        Json_data = Json_data.substring(0, Json_data.lastIndexOf(",")) + "]";
        return Json_data;
    }
@ SuppressWarnings ( "rawtypes" ) public String generateJsonForMultipleMetricType ( HashMap < String , String > Metricsla , HashMap < String , String > MetricName , HashMap < String , String > MetricValue , HashMap < String , String > MetricTimeStamp ) { String Json_data = "[" ; Set set = MetricName . entrySet ( ) ; Iterator it = set . iterator ( ) ; while ( it . hasNext ( ) ) { Map . Entry entry = ( Map . Entry ) it . next ( ) ; String host_key = ( String ) entry . getKey ( ) ; String [ ] serviceResourcetypehost = host_key . split ( "," ) ; String host_MetricName = ( String ) entry . getValue ( ) + "]" ; String host_MetricValue = ( String ) MetricValue . get ( host_key ) + "]" ; String host_timestamp = ( String ) MetricTimeStamp . get ( host_key ) ; Json_data = Json_data + "{ \"ServiceName\":\"" + serviceResourcetypehost [ 0 ] + "\",\"ResourceType\":\"" + serviceResourcetypehost [ 1 ] + "\",\"ServerName\":\"" + serviceResourcetypehost [ 2 ] + "\",\"TimeStamps\":[" + host_timestamp + "],\"ResourceNames\":" + host_MetricName + ",\"ResourceValues\":" + host_MetricValue + ",\"SlaValues\":" + Metricsla . get ( host_key ) + "],\"ResourceID\":\"" + host_key + "\"}," ; } Json_data = Json_data . substring ( 0 , Json_data . lastIndexOf ( "," ) ) + "]" ; return Json_data ; }
creating JSON For Line Chart and Sending generated JSON to SendFileToJson
 class
creating JSON For Line Chart and Sending generated JSON to SendFileToJson class
//SendFileToJson file_send_jvmheap = new SendFileToJson(customer,timestampselection, resourcetype, json_Filename, Json_data);