org.hackystat.projectbrowser.page.dailyprojectdata.coverage
Class CoverageDataModel

java.lang.Object
  extended by org.hackystat.projectbrowser.page.dailyprojectdata.coverage.CoverageDataModel
All Implemented Interfaces:
java.io.Serializable

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

The data model for Coverage DPD display. This data model accommodates multiple Projects. For each project, the data model indicates the number of classes whose method-level percentage falls into each of five buckets, from 0-20% to 80-100%.

Author:
Philip Johnson, Shaoxuan Zhang
See Also:
Serialized Form

Constructor Summary
CoverageDataModel()
          The default CoverageDataModel, which contains no coverage information.
 
Method Summary
 void clear()
          Sets this model to its empty state.
 CoverageData getCoverageData(org.hackystat.sensorbase.resource.projects.jaxb.Project project)
          Return the CoverageData instance associated with the specified project.
 java.util.List<CoverageData> getCoverageDataList()
          Returns the list of CoverageData instances, needed for markup.
 boolean isEmpty()
          Returns true if this data model contains no information.
 void update()
          Updates this data model to reflect the coverage information associated with the selected projects and granularity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoverageDataModel

public CoverageDataModel()
The default CoverageDataModel, which contains no coverage information.

Method Detail

update

public void update()
Updates this data model to reflect the coverage information associated with the selected projects and granularity.


clear

public void clear()
Sets this model to its empty state.


isEmpty

public boolean isEmpty()
Returns true if this data model contains no information. Used to figure out if the associated panel should be visible.

Returns:
True if the data model is empty.

getCoverageData

public CoverageData getCoverageData(org.hackystat.sensorbase.resource.projects.jaxb.Project project)
Return the CoverageData instance associated with the specified project. Creates and returns a new CoverageData instance if one is not yet present.

Parameters:
project - The project.
Returns:
The CoverageData instance for this project.

getCoverageDataList

public java.util.List<CoverageData> getCoverageDataList()
Returns the list of CoverageData instances, needed for markup.

Returns:
The list of CoverageData instances.