cdx.scorebot.app.reporter
Class TeamScoringInfo

java.lang.Object
  extended by cdx.scorebot.app.reporter.TeamScoringInfo
All Implemented Interfaces:
java.lang.Comparable<TeamScoringInfo>

public class TeamScoringInfo
extends java.lang.Object
implements java.lang.Comparable<TeamScoringInfo>

contains all the scoring/reporting information for a particular team

Author:
David Underhill

Field Summary
 java.util.HashMap<Service,java.util.Vector<TestSuite>> assocTS
           
 TeamReportingInfo basicInfo
          basic information about the team this is for
 int initScore
           
 java.util.Vector<ManualScoreEvent> manualScoreEvents
          all manual score events in the order they occurred
 int mseTotalScore
          total score for manual score events
 java.util.Vector<ScoringRule> rules
          all scoring rules (from ntp)
 java.util.Vector<Service> services
          all services
 java.util.Vector<TestSuite> suites
          all suites (from ntp)
 java.util.Vector<java.util.Vector<TestScoreEvent>> suiteScoreEv
           
 java.util.Vector<java.lang.Integer> suiteScores
           
 int teamTotalScore
          total score for the team
 java.util.Vector<TestEvent> testEvents
          all test events in the order they occurred
 java.util.Vector<TestItem> testItems
          all test items in the order they are defined within suites (from ntp)
 java.util.Vector<java.lang.Integer> testNumRuns
           
 java.util.Vector<Test> tests
          all tests
 java.util.Vector<java.lang.Integer> testScore
           
 java.util.Vector<TestScoreEvent> testScoreEvents
          all test score events in the order they occurred
 java.util.Vector<java.lang.Integer> tiNumRuns
           
 java.util.Vector<java.lang.Integer> tiScore
           
 java.util.Vector<java.util.Vector<TestScoreEvent>> tiTestScoreEvents
          temporary computed values stored here
 
Constructor Summary
TeamScoringInfo(TeamReportingInfo teamInfo, int initPts, boolean hideUnreportedInfo)
          Initializes a TeamScoringInfo to hold scoring statistics regarding the specified team
 
Method Summary
 void clean()
          removes most computed information
 int compareTo(TeamScoringInfo t)
          highest score first
protected  java.lang.Integer getIndex(ManualScoreEvent mse)
           
protected  java.lang.Integer getIndex(ScoringRule rule)
           
protected  java.lang.Integer getIndex(Service s)
           
protected  java.lang.Integer getIndex(Test t)
           
protected  java.lang.Integer getIndex(TestEvent te)
           
protected  java.lang.Integer getIndex(TestItem ti)
           
protected  java.lang.Integer getIndex(TestScoreEvent tse)
           
protected  java.lang.Integer getIndex(TestSuite ts)
           
protected  int getTestIndex(Test t)
           
protected  int getTINumRuns(TestItem ti)
           
protected  int getTIScore(TestItem ti)
           
protected  TestSuite getTSfromTI(TestItem ti)
          find the suite a test item belongs to
protected  TestSuite getTSfromTSE(TestScoreEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

basicInfo

public final TeamReportingInfo basicInfo
basic information about the team this is for


testEvents

public final java.util.Vector<TestEvent> testEvents
all test events in the order they occurred


manualScoreEvents

public final java.util.Vector<ManualScoreEvent> manualScoreEvents
all manual score events in the order they occurred


testScoreEvents

public final java.util.Vector<TestScoreEvent> testScoreEvents
all test score events in the order they occurred


initScore

public final int initScore

teamTotalScore

public int teamTotalScore
total score for the team


mseTotalScore

public int mseTotalScore
total score for manual score events


services

public final java.util.Vector<Service> services
all services


assocTS

public final java.util.HashMap<Service,java.util.Vector<TestSuite>> assocTS

tests

public final java.util.Vector<Test> tests
all tests


testNumRuns

public final java.util.Vector<java.lang.Integer> testNumRuns

testScore

public final java.util.Vector<java.lang.Integer> testScore

suites

public final java.util.Vector<TestSuite> suites
all suites (from ntp)


suiteScores

public final java.util.Vector<java.lang.Integer> suiteScores

suiteScoreEv

public final java.util.Vector<java.util.Vector<TestScoreEvent>> suiteScoreEv

testItems

public final java.util.Vector<TestItem> testItems
all test items in the order they are defined within suites (from ntp)


rules

public final java.util.Vector<ScoringRule> rules
all scoring rules (from ntp)


tiNumRuns

public final java.util.Vector<java.lang.Integer> tiNumRuns

tiScore

public final java.util.Vector<java.lang.Integer> tiScore

tiTestScoreEvents

public final java.util.Vector<java.util.Vector<TestScoreEvent>> tiTestScoreEvents
temporary computed values stored here

Constructor Detail

TeamScoringInfo

public TeamScoringInfo(TeamReportingInfo teamInfo,
                       int initPts,
                       boolean hideUnreportedInfo)
                throws java.io.FileNotFoundException,
                       LogicException,
                       ParseException,
                       TokenMgrError
Initializes a TeamScoringInfo to hold scoring statistics regarding the specified team

Parameters:
teamInfo - basic information about the team to gather statistics on
initPts - the initial number of points the team starts with
hideUnreportedInfo - whether or not to take unreported info into account (true => complete info)
Throws:
BaseException - if the object cannot be deserialized
FileNotFoundException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
LogicException - if the scoring language in a file is invalid
ParseException - if the scoring language in a file is invalid
TokenMgrError - if there is a problem parsing the code
Method Detail

clean

public void clean()
removes most computed information


compareTo

public int compareTo(TeamScoringInfo t)
highest score first

Specified by:
compareTo in interface java.lang.Comparable<TeamScoringInfo>

getIndex

protected java.lang.Integer getIndex(TestSuite ts)

getIndex

protected java.lang.Integer getIndex(TestItem ti)

getIndex

protected java.lang.Integer getIndex(ScoringRule rule)

getIndex

protected java.lang.Integer getIndex(Test t)

getIndex

protected java.lang.Integer getIndex(Service s)

getIndex

protected java.lang.Integer getIndex(TestEvent te)

getIndex

protected java.lang.Integer getIndex(ManualScoreEvent mse)

getIndex

protected java.lang.Integer getIndex(TestScoreEvent tse)

getTSfromTSE

protected TestSuite getTSfromTSE(TestScoreEvent e)

getTSfromTI

protected TestSuite getTSfromTI(TestItem ti)
find the suite a test item belongs to


getTestIndex

protected int getTestIndex(Test t)

getTINumRuns

protected int getTINumRuns(TestItem ti)

getTIScore

protected int getTIScore(TestItem ti)