org.eclipse.mylar.internal.monitor.reports.collectors
Class DataOverviewCollector

java.lang.Object
  extended by org.eclipse.mylar.internal.monitor.reports.collectors.DataOverviewCollector
All Implemented Interfaces:
IUsageCollector

public class DataOverviewCollector
extends java.lang.Object
implements IUsageCollector


Field Summary
private  int currentUser
           
private static int endDatePosition
           
private  java.lang.String filePrefix
           
private static long FIVEMININMS
           
private  java.util.Map<java.lang.Integer,java.lang.Long> interactionHistoryActiveDuration
           
private  java.util.Map<java.lang.Integer,java.util.List<java.util.Date>> interactionHistoryRanges
           
private  java.util.Map<java.lang.Integer,java.lang.Integer> interactionHistorySizes
           
private  org.eclipse.mylar.context.core.InteractionEvent lastUserEvent
           
private static int startDatePosition
           
 
Constructor Summary
DataOverviewCollector(java.lang.String prefix)
           
 
Method Summary
 void consumeEvent(org.eclipse.mylar.context.core.InteractionEvent event, int userId)
           
 void exportAsCSVFile(java.lang.String directory)
          Implementors will need to generate a unique filename given the directory in which to place the file
 long getActiveUseOfUser(int userid)
          For testing - return active use of a user
 long getDurationUseOfUser(int userid)
          For testing - return duration of use
 int getNumberOfUsers()
          For testing - return number of users
 java.util.List<java.lang.String> getReport()
          TODO: return report as HTML
 java.lang.String getReportTitle()
           
 int getSizeOfHistory(int userid)
          For testing - return size of interaction history
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIVEMININMS

private static long FIVEMININMS

interactionHistorySizes

private java.util.Map<java.lang.Integer,java.lang.Integer> interactionHistorySizes

interactionHistoryRanges

private java.util.Map<java.lang.Integer,java.util.List<java.util.Date>> interactionHistoryRanges

interactionHistoryActiveDuration

private java.util.Map<java.lang.Integer,java.lang.Long> interactionHistoryActiveDuration

currentUser

private int currentUser

lastUserEvent

private org.eclipse.mylar.context.core.InteractionEvent lastUserEvent

startDatePosition

private static int startDatePosition

endDatePosition

private static int endDatePosition

filePrefix

private java.lang.String filePrefix
Constructor Detail

DataOverviewCollector

public DataOverviewCollector(java.lang.String prefix)
Method Detail

getReportTitle

public java.lang.String getReportTitle()
Specified by:
getReportTitle in interface IUsageCollector

consumeEvent

public void consumeEvent(org.eclipse.mylar.context.core.InteractionEvent event,
                         int userId)
Specified by:
consumeEvent in interface IUsageCollector

getReport

public java.util.List<java.lang.String> getReport()
Description copied from interface: IUsageCollector
TODO: return report as HTML

Specified by:
getReport in interface IUsageCollector
Returns:
a list corresponding to all of the lines of the report

exportAsCSVFile

public void exportAsCSVFile(java.lang.String directory)
Description copied from interface: IUsageCollector
Implementors will need to generate a unique filename given the directory in which to place the file

Specified by:
exportAsCSVFile in interface IUsageCollector

getActiveUseOfUser

public long getActiveUseOfUser(int userid)
For testing - return active use of a user


getNumberOfUsers

public int getNumberOfUsers()
For testing - return number of users


getDurationUseOfUser

public long getDurationUseOfUser(int userid)
For testing - return duration of use


getSizeOfHistory

public int getSizeOfHistory(int userid)
For testing - return size of interaction history