@SuppressWarnings("unchecked") public static ArrayList<JSONObject> createJSONDataElements(){
  ArrayList<JSONObject> dataElementsJSON=new ArrayList<>();
  JSONObject jsonObj1=new JSONObject();
  jsonObj1.put(DATE,"2016-02-20T23:29:05.000Z");
  jsonObj1.put(QNAME,"a.b.c.com");
  jsonObj1.put(SRCIP,"55.55.55.55");
  jsonObj1.put(DSTIP,"1.2.3.6");
  jsonObj1.put(QTYPE,new ArrayList<>(Collections.singletonList((short)1)));
  jsonObj1.put(RCODE,0);
  jsonObj1.put(IPS,new ArrayList<>(Arrays.asList("10.20.30.40","10.20.30.60")));
  dataElementsJSON.add(jsonObj1);
  JSONObject jsonObj2=new JSONObject();
  jsonObj2.put(DATE,"2016-02-20T23:29:06.000Z");
  jsonObj2.put(QNAME,"d.e.com");
  jsonObj2.put(SRCIP,"127.128.129.130");
  jsonObj2.put(DSTIP,"1.2.3.4");
  jsonObj2.put(QTYPE,new ArrayList<>(Collections.singletonList((short)1)));
  jsonObj2.put(RCODE,0);
  jsonObj2.put(IPS,new ArrayList<>(Collections.singletonList("5.6.7.8")));
  dataElementsJSON.add(jsonObj2);
  JSONObject jsonObj3=new JSONObject();
  jsonObj3.put(DATE,"2016-02-20T23:29:07.000Z");
  jsonObj3.put(QNAME,"d.e.com");
  jsonObj3.put(SRCIP,"131.132.133.134");
  jsonObj3.put(DSTIP,"9.10.11.12");
  jsonObj3.put(QTYPE,new ArrayList<>(Collections.singletonList((short)1)));
  jsonObj3.put(RCODE,0);
  jsonObj3.put(IPS,new ArrayList<>(Collections.singletonList("13.14.15.16")));
  dataElementsJSON.add(jsonObj3);
  JSONObject jsonObj4=new JSONObject();
  jsonObj4.put(DATE,"2016-02-20T23:29:08.000Z");
  jsonObj4.put(QNAME,"d.e.com");
  jsonObj4.put(SRCIP,"135.136.137.138");
  jsonObj4.put(DSTIP,"17.18.19.20");
  jsonObj4.put(QTYPE,new ArrayList<>(Collections.singletonList((short)1)));
  jsonObj4.put(RCODE,3);
  jsonObj4.put(IPS,new ArrayList<>(Collections.singletonList("21.22.23.24")));
  dataElementsJSON.add(jsonObj4);
  JSONObject jsonObj5=new JSONObject();
  jsonObj5.put(DATE,"2016-02-20T23:29:09.000Z");
  jsonObj5.put(QNAME,"d.e.com");
  jsonObj5.put(SRCIP,"139.140.141.142");
  jsonObj5.put(DSTIP,"25.26.27.28");
  jsonObj5.put(QTYPE,new ArrayList<>(Collections.singletonList((short)1)));
  jsonObj5.put(RCODE,0);
  jsonObj5.put(IPS,new ArrayList<>(Collections.singletonList("5.6.7.8")));
  dataElementsJSON.add(jsonObj5);
  JSONObject jsonObj6=new JSONObject();
  jsonObj6.put(DATE,"2016-02-20T23:29:10.000Z");
  jsonObj6.put(QNAME,"d.e.com");
  jsonObj6.put(SRCIP,"143.144.145.146");
  jsonObj6.put(DSTIP,"33.34.35.36");
  jsonObj6.put(QTYPE,new ArrayList<>(Collections.singletonList((short)1)));
  jsonObj6.put(RCODE,0);
  jsonObj6.put(IPS,new ArrayList<>(Collections.singletonList("5.6.7.8")));
  dataElementsJSON.add(jsonObj6);
  JSONObject jsonObj7=new JSONObject();
  jsonObj7.put(DATE,"2016-02-20T23:29:11.000Z");
  jsonObj7.put(QNAME,"something.else");
  jsonObj7.put(SRCIP,"1.1.1.1");
  jsonObj7.put(DSTIP,"2.2.2.2");
  jsonObj7.put(QTYPE,new ArrayList<>(Collections.singletonList((short)1)));
  jsonObj7.put(RCODE,0);
  jsonObj7.put(IPS,new ArrayList<>(Collections.singletonList("3.3.3.3")));
  dataElementsJSON.add(jsonObj7);
  JSONObject jsonObj8=new JSONObject();
  jsonObj8.put(DATE,"2016-02-20T23:29:12.000Z");
  jsonObj8.put(QNAME,"something.else2");
  jsonObj8.put(SRCIP,"5.6.7.8");
  jsonObj8.put(DSTIP,"2.2.2.22");
  jsonObj8.put(QTYPE,new ArrayList<>(Collections.singletonList((short)1)));
  jsonObj8.put(RCODE,0);
  jsonObj8.put(IPS,new ArrayList<>(Collections.singletonList("3.3.3.132")));
  dataElementsJSON.add(jsonObj8);
  JSONObject jsonObj9=new JSONObject();
  jsonObj9.put(DATE,"2016-02-20T23:29:13.000Z");
  jsonObj9.put(QNAME,"something.else.on.stoplist");
  jsonObj9.put(SRCIP,"55.55.55.55");
  jsonObj9.put(DSTIP,"2.2.2.232");
  jsonObj9.put(QTYPE,new ArrayList<>(Collections.singletonList((short)1)));
  jsonObj9.put(RCODE,0);
  jsonObj9.put(IPS,new ArrayList<>(Collections.singletonList("3.3.3.132")));
  dataElementsJSON.add(jsonObj9);
  return dataElementsJSON;
}

@ SuppressWarnings ( "unchecked" ) public static ArrayList < JSONObject > createJSONDataElements ( ) { ArrayList < JSONObject > dataElementsJSON = new ArrayList < > ( ) ; JSONObject jsonObj1 = new JSONObject ( ) ; jsonObj1 . put ( DATE , "2016-02-20T23:29:05.000Z" ) ; jsonObj1 . put ( QNAME , "a.b.c.com" ) ; jsonObj1 . put ( SRCIP , "55.55.55.55" ) ; jsonObj1 . put ( DSTIP , "1.2.3.6" ) ; jsonObj1 . put ( QTYPE , new ArrayList < > ( Collections . singletonList ( ( short ) 1 ) ) ) ; jsonObj1 . put ( RCODE , 0 ) ; jsonObj1 . put ( IPS , new ArrayList < > ( Arrays . asList ( "10.20.30.40" , "10.20.30.60" ) ) ) ; dataElementsJSON . add ( jsonObj1 ) ; JSONObject jsonObj2 = new JSONObject ( ) ; jsonObj2 . put ( DATE , "2016-02-20T23:29:06.000Z" ) ; jsonObj2 . put ( QNAME , "d.e.com" ) ; jsonObj2 . put ( SRCIP , "127.128.129.130" ) ; jsonObj2 . put ( DSTIP , "1.2.3.4" ) ; jsonObj2 . put ( QTYPE , new ArrayList < > ( Collections . singletonList ( ( short ) 1 ) ) ) ; jsonObj2 . put ( RCODE , 0 ) ; jsonObj2 . put ( IPS , new ArrayList < > ( Collections . singletonList ( "5.6.7.8" ) ) ) ; dataElementsJSON . add ( jsonObj2 ) ; JSONObject jsonObj3 = new JSONObject ( ) ; jsonObj3 . put ( DATE , "2016-02-20T23:29:07.000Z" ) ; jsonObj3 . put ( QNAME , "d.e.com" ) ; jsonObj3 . put ( SRCIP , "131.132.133.134" ) ; jsonObj3 . put ( DSTIP , "9.10.11.12" ) ; jsonObj3 . put ( QTYPE , new ArrayList < > ( Collections . singletonList ( ( short ) 1 ) ) ) ; jsonObj3 . put ( RCODE , 0 ) ; jsonObj3 . put ( IPS , new ArrayList < > ( Collections . singletonList ( "13.14.15.16" ) ) ) ; dataElementsJSON . add ( jsonObj3 ) ; JSONObject jsonObj4 = new JSONObject ( ) ; jsonObj4 . put ( DATE , "2016-02-20T23:29:08.000Z" ) ; jsonObj4 . put ( QNAME , "d.e.com" ) ; jsonObj4 . put ( SRCIP , "135.136.137.138" ) ; jsonObj4 . put ( DSTIP , "17.18.19.20" ) ; jsonObj4 . put ( QTYPE , new ArrayList < > ( Collections . singletonList ( ( short ) 1 ) ) ) ; jsonObj4 . put ( RCODE , 3 ) ; jsonObj4 . put ( IPS , new ArrayList < > ( Collections . singletonList ( "21.22.23.24" ) ) ) ; dataElementsJSON . add ( jsonObj4 ) ; JSONObject jsonObj5 = new JSONObject ( ) ; jsonObj5 . put ( DATE , "2016-02-20T23:29:09.000Z" ) ; jsonObj5 . put ( QNAME , "d.e.com" ) ; jsonObj5 . put ( SRCIP , "139.140.141.142" ) ; jsonObj5 . put ( DSTIP , "25.26.27.28" ) ; jsonObj5 . put ( QTYPE , new ArrayList < > ( Collections . singletonList ( ( short ) 1 ) ) ) ; jsonObj5 . put ( RCODE , 0 ) ; jsonObj5 . put ( IPS , new ArrayList < > ( Collections . singletonList ( "5.6.7.8" ) ) ) ; dataElementsJSON . add ( jsonObj5 ) ; JSONObject jsonObj6 = new JSONObject ( ) ; jsonObj6 . put ( DATE , "2016-02-20T23:29:10.000Z" ) ; jsonObj6 . put ( QNAME , "d.e.com" ) ; jsonObj6 . put ( SRCIP , "143.144.145.146" ) ; jsonObj6 . put ( DSTIP , "33.34.35.36" ) ; jsonObj6 . put ( QTYPE , new ArrayList < > ( Collections . singletonList ( ( short ) 1 ) ) ) ; jsonObj6 . put ( RCODE , 0 ) ; jsonObj6 . put ( IPS , new ArrayList < > ( Collections . singletonList ( "5.6.7.8" ) ) ) ; dataElementsJSON . add ( jsonObj6 ) ; JSONObject jsonObj7 = new JSONObject ( ) ; jsonObj7 . put ( DATE , "2016-02-20T23:29:11.000Z" ) ; jsonObj7 . put ( QNAME , "something.else" ) ; jsonObj7 . put ( SRCIP , "1.1.1.1" ) ; jsonObj7 . put ( DSTIP , "2.2.2.2" ) ; jsonObj7 . put ( QTYPE , new ArrayList < > ( Collections . singletonList ( ( short ) 1 ) ) ) ; jsonObj7 . put ( RCODE , 0 ) ; jsonObj7 . put ( IPS , new ArrayList < > ( Collections . singletonList ( "3.3.3.3" ) ) ) ; dataElementsJSON . add ( jsonObj7 ) ; JSONObject jsonObj8 = new JSONObject ( ) ; jsonObj8 . put ( DATE , "2016-02-20T23:29:12.000Z" ) ; jsonObj8 . put ( QNAME , "something.else2" ) ; jsonObj8 . put ( SRCIP , "5.6.7.8" ) ; jsonObj8 . put ( DSTIP , "2.2.2.22" ) ; jsonObj8 . put ( QTYPE , new ArrayList < > ( Collections . singletonList ( ( short ) 1 ) ) ) ; jsonObj8 . put ( RCODE , 0 ) ; jsonObj8 . put ( IPS , new ArrayList < > ( Collections . singletonList ( "3.3.3.132" ) ) ) ; dataElementsJSON . add ( jsonObj8 ) ; JSONObject jsonObj9 = new JSONObject ( ) ; jsonObj9 . put ( DATE , "2016-02-20T23:29:13.000Z" ) ; jsonObj9 . put ( QNAME , "something.else.on.stoplist" ) ; jsonObj9 . put ( SRCIP , "55.55.55.55" ) ; jsonObj9 . put ( DSTIP , "2.2.2.232" ) ; jsonObj9 . put ( QTYPE , new ArrayList < > ( Collections . singletonList ( ( short ) 1 ) ) ) ; jsonObj9 . put ( RCODE , 0 ) ; jsonObj9 . put ( IPS , new ArrayList < > ( Collections . singletonList ( "3.3.3.132" ) ) ) ; dataElementsJSON . add ( jsonObj9 ) ; return dataElementsJSON ; }
creates pir json input
