org.eclipse.mylar.internal.monitor.reports
Class ReportGenerator

java.lang.Object
  extended by org.eclipse.mylar.internal.monitor.reports.ReportGenerator

public class ReportGenerator
extends java.lang.Object

Author:
Mik Kersten

Nested Class Summary
(package private)  class ReportGenerator.GenerateStatisticsJob
           
 
Field Summary
private  java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.SortedSet<org.eclipse.mylar.context.core.InteractionEvent>>> allUserEvents
           
private  java.util.List<IUsageCollector> collectors
           
private  UsageStatisticsSummary lastParsedSummary
           
private  InteractionEventLogger logger
           
private  boolean saveAllUserEvents
           
private  java.util.List<IUsageScanner> scanners
           
static java.lang.String SUMMARY_SEPARATOR
           
private  java.util.Set<java.lang.Integer> userIds
           
 
Constructor Summary
ReportGenerator(InteractionEventLogger logger, IUsageCollector collector)
           
ReportGenerator(InteractionEventLogger logger, IUsageCollector collector, boolean saveAllUserEvents)
           
ReportGenerator(InteractionEventLogger logger, java.util.List<IUsageCollector> collectors)
           
ReportGenerator(InteractionEventLogger logger, java.util.List<IUsageCollector> collectors, boolean saveAllUserEvents)
           
ReportGenerator(InteractionEventLogger logger, java.util.List<IUsageCollector> collectors, java.util.List<IUsageScanner> scanners)
           
 
Method Summary
static java.lang.String formatPercentage(float percentage)
           
 java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.SortedSet<org.eclipse.mylar.context.core.InteractionEvent>>> getAllUsers()
           
static java.lang.String getCleanOriginId(org.eclipse.mylar.context.core.InteractionEvent event)
           
 java.util.List<IUsageCollector> getCollectors()
           
 UsageStatisticsSummary getLastParsedSummary()
           
private  java.lang.String getPhase(java.io.File source)
           
 UsageStatisticsSummary getStatisticsFromInteractionHistories(java.util.List<java.io.File> sources)
           
 UsageStatisticsSummary getStatisticsFromInteractionHistory(java.io.File source)
           
private  int getUserId(java.io.File source)
          Assuming the file naming convention of --usage--.zip
 void setScanners(java.util.List<IUsageScanner> scanners)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUMMARY_SEPARATOR

public static final java.lang.String SUMMARY_SEPARATOR
See Also:
Constant Field Values

logger

private InteractionEventLogger logger

lastParsedSummary

private UsageStatisticsSummary lastParsedSummary

userIds

private java.util.Set<java.lang.Integer> userIds

collectors

private java.util.List<IUsageCollector> collectors

scanners

private java.util.List<IUsageScanner> scanners

allUserEvents

private java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.SortedSet<org.eclipse.mylar.context.core.InteractionEvent>>> allUserEvents

saveAllUserEvents

private boolean saveAllUserEvents
Constructor Detail

ReportGenerator

public ReportGenerator(InteractionEventLogger logger,
                       IUsageCollector collector,
                       boolean saveAllUserEvents)

ReportGenerator

public ReportGenerator(InteractionEventLogger logger,
                       java.util.List<IUsageCollector> collectors,
                       boolean saveAllUserEvents)

ReportGenerator

public ReportGenerator(InteractionEventLogger logger,
                       IUsageCollector collector)

ReportGenerator

public ReportGenerator(InteractionEventLogger logger,
                       java.util.List<IUsageCollector> collectors)

ReportGenerator

public ReportGenerator(InteractionEventLogger logger,
                       java.util.List<IUsageCollector> collectors,
                       java.util.List<IUsageScanner> scanners)
Method Detail

setScanners

public void setScanners(java.util.List<IUsageScanner> scanners)

getStatisticsFromInteractionHistory

public UsageStatisticsSummary getStatisticsFromInteractionHistory(java.io.File source)

getStatisticsFromInteractionHistories

public UsageStatisticsSummary getStatisticsFromInteractionHistories(java.util.List<java.io.File> sources)

getLastParsedSummary

public UsageStatisticsSummary getLastParsedSummary()

getUserId

private int getUserId(java.io.File source)
Assuming the file naming convention of --usage--.zip


getPhase

private java.lang.String getPhase(java.io.File source)

getCleanOriginId

public static java.lang.String getCleanOriginId(org.eclipse.mylar.context.core.InteractionEvent event)

formatPercentage

public static java.lang.String formatPercentage(float percentage)

getCollectors

public java.util.List<IUsageCollector> getCollectors()

getAllUsers

public java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.SortedSet<org.eclipse.mylar.context.core.InteractionEvent>>> getAllUsers()