public Map < String , Map < Date , Long > > getData ( final String collectorName ) { final Map < String , Map < Date , Long > > map = new HashMap <> ( ) ; final Testcases testcases = data . getTestcases ( ) ; for ( final TestcaseType tct : testcases . getTestcase ( ) ) { final Map < Date , Long > measures = new HashMap <> ( ) ; final List < Datacollector > collectorMap = tct . getDatacollector ( ) ; Datacollector collector = null ; for ( final Datacollector dc : collectorMap ) { if ( dc . getName ( ) . equals ( collectorName ) ) { collector = dc ; } } if ( collector == null ) { LOG . error ( "Achtung: Datenkollektor " + collectorName + " nicht vorhanden" ) ; } else { for ( final Result s : collector . getResult ( ) ) { measures . put ( new Date ( s . getDate ( ) ) , ( long ) s . getValue ( ) ) ; } map . put ( tct . getName ( ) , measures ) ; } } return map ; }
Returns a mapping from all testcases to their results for a certain collectorName .