za.org.coefficient.statistics.data
Class ProjectStatistics

java.lang.Object
  extended by za.org.coefficient.statistics.data.ProjectStatistics
All Implemented Interfaces:
java.io.Serializable

public class ProjectStatistics
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
private  java.util.Map archive
           
private  ProjectStatisticsData currentData
           
static java.text.SimpleDateFormat DATE_FORMAT
           
private  java.lang.Long id
           
private  java.util.Map moduleStatistics
           
private  java.lang.Long projectId
           
private  java.util.Date statsDate
           
 
Constructor Summary
ProjectStatistics()
           
 
Method Summary
 void addModuleStatistics(ModuleStatistics ms)
           
 boolean archiveStats()
           
 void calculateRank()
           
private  long calculateStats()
           
 void deleteModuleStatistics(ModuleStatistics ms)
           
 java.util.Map getArchive()
          Gets the value of archive
 ProjectStatisticsData getCurrentData()
          Gets the value of currentData
 java.util.Map getDownloadActivityForNumberOfDaysIncludingToday(int days)
          This method will get the download activity for each day up to the number of specified days from today.
 long getDownloadActivityTotalForNumberOfDaysIncludingToday(int days)
          This method will get the download activity for each day up to the number of specified days from today.
 long getDownloadStatsForDate(java.util.Date date)
           
 java.lang.Long getId()
          Gets the value of id
 java.util.Date getLatestModifiedDate()
           
 java.util.Map getModuleStatistics()
          Gets the value of moduleStatistics
 java.lang.Long getProjectId()
          Gets the value of projectId
 long getRankForNumberOfDaysIncludingToday(int days)
           
 java.util.Date getStatsDate()
          Gets the value of statsDate
 java.util.Map getTotalActivityForNumberOfDaysIncludingToday(int days)
          This method will get the total activity for each day up to the number of specified days from today.
 java.util.Map getViewActivityForNumberOfDaysIncludingToday(int days)
          This method will get the view activity for each day up to the number of specified days from today.
 long getViewActivityTotalForNumberOfDaysIncludingToday(int days)
          This method will get the view activity for each day up to the number of specified days from today.
 long getViewStatsForDate(java.util.Date date)
           
 void setArchive(java.util.Map argArchive)
          Sets the value of archive
 void setCurrentData(ProjectStatisticsData argCurrentData)
          Sets the value of currentData
 void setId(java.lang.Long argId)
          Sets the value of id
 void setModuleStatistics(java.util.Map argModuleStatistics)
          Sets the value of moduleStatistics
 void setProjectId(java.lang.Long argProjectId)
          Sets the value of projectId
 void setStatsDate(java.util.Date argStatsDate)
          Sets the value of statsDate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE_FORMAT

public static final java.text.SimpleDateFormat DATE_FORMAT

statsDate

private java.util.Date statsDate

id

private java.lang.Long id

projectId

private java.lang.Long projectId

moduleStatistics

private java.util.Map moduleStatistics

archive

private java.util.Map archive

currentData

private ProjectStatisticsData currentData
Constructor Detail

ProjectStatistics

public ProjectStatistics()
Method Detail

archiveStats

public boolean archiveStats()

setId

public void setId(java.lang.Long argId)
Sets the value of id

Parameters:
argId - Value to assign to this.id

getId

public java.lang.Long getId()
Gets the value of id

Returns:
the value of id

getLatestModifiedDate

public java.util.Date getLatestModifiedDate()

setModuleStatistics

public void setModuleStatistics(java.util.Map argModuleStatistics)
Sets the value of moduleStatistics

Parameters:
argModuleStatistics - Value to assign to this.moduleStatistics

getModuleStatistics

public java.util.Map getModuleStatistics()
Gets the value of moduleStatistics

Returns:
the value of moduleStatistics

setProjectId

public void setProjectId(java.lang.Long argProjectId)
Sets the value of projectId

Parameters:
argProjectId - Value to assign to this.projectId

getProjectId

public java.lang.Long getProjectId()
Gets the value of projectId

Returns:
the value of projectId

setStatsDate

public void setStatsDate(java.util.Date argStatsDate)
Sets the value of statsDate

Parameters:
argStatsDate - Value to assign to this.statsDate

getStatsDate

public java.util.Date getStatsDate()
Gets the value of statsDate

Returns:
the value of statsDate

addModuleStatistics

public void addModuleStatistics(ModuleStatistics ms)

calculateRank

public void calculateRank()

deleteModuleStatistics

public void deleteModuleStatistics(ModuleStatistics ms)

getArchive

public java.util.Map getArchive()
Gets the value of archive

Returns:
the value of archive

setArchive

public void setArchive(java.util.Map argArchive)
Sets the value of archive

Parameters:
argArchive - Value to assign to this.archive

getCurrentData

public ProjectStatisticsData getCurrentData()
Gets the value of currentData

Returns:
the value of currentData

setCurrentData

public void setCurrentData(ProjectStatisticsData argCurrentData)
Sets the value of currentData

Parameters:
argCurrentData - Value to assign to this.currentData

getTotalActivityForNumberOfDaysIncludingToday

public java.util.Map getTotalActivityForNumberOfDaysIncludingToday(int days)
This method will get the total activity for each day up to the number of specified days from today. For example if daysAgo is 7 the returned map will return the total activity for the last 7 days including today.

Parameters:
days - indicates how many days including today to report back on. If there is no data for a day then the activity result will be 0.
Returns:
Map is a map keyed by a java.util.Date object containing the java.lang.Long value that is the total activity for the day.

getViewStatsForDate

public long getViewStatsForDate(java.util.Date date)

getDownloadStatsForDate

public long getDownloadStatsForDate(java.util.Date date)

getViewActivityForNumberOfDaysIncludingToday

public java.util.Map getViewActivityForNumberOfDaysIncludingToday(int days)
This method will get the view activity for each day up to the number of specified days from today. For example if daysAgo is 7 the returned map will return the view activity for the last 7 days including today.

Parameters:
days - indicates how many days including today to report back on. If there is no data for a day then the activity result will be 0.
Returns:
Map is a map keyed by a java.util.Date object containing the java.lang.Long value that is the view activity for the day.

getViewActivityTotalForNumberOfDaysIncludingToday

public long getViewActivityTotalForNumberOfDaysIncludingToday(int days)
This method will get the view activity for each day up to the number of specified days from today.

Parameters:
days - indicates how many days including today to report back on. If there is no data for a day then the activity result will be 0.
Returns:
long is the total for the date range

getDownloadActivityForNumberOfDaysIncludingToday

public java.util.Map getDownloadActivityForNumberOfDaysIncludingToday(int days)
This method will get the download activity for each day up to the number of specified days from today.

Parameters:
days - indicates how many days including today to report back on. If there is no data for a day then the activity result will be 0.
Returns:
Map is a map keyed by a java.util.Date object containing the java.lang.Long value that is the download activity for the day.

getDownloadActivityTotalForNumberOfDaysIncludingToday

public long getDownloadActivityTotalForNumberOfDaysIncludingToday(int days)
This method will get the download activity for each day up to the number of specified days from today.

Parameters:
days - indicates how many days including today to report back on. If there is no data for a day then the activity result will be 0.
Returns:
long is the total for the date range

getRankForNumberOfDaysIncludingToday

public long getRankForNumberOfDaysIncludingToday(int days)

calculateStats

private long calculateStats()


Copyright CSIR. All Rights Reserved.