FantasySportsModule 0.0.2-dev

org.fanfoot.scoring
Class Scores

java.lang.Object
  |
  +--org.fanfoot.scoring.Scores

public class Scores
extends java.lang.Object

Calculates the score for each Event in a given events collection.

Author:
rgardler

Constructor Summary
Scores(Events evts, ScoringConfiguration sc)
          Creates a new instance of calculator
Scores(Events evts, ScoringConfiguration sc, java.lang.String db)
          Creates a new instance of calculator
 
Method Summary
 org.w3c.dom.Document calculate()
          Calculate the scores.
 ScoringConfiguration getConfiguration()
          Getter for property conf.
 Events getEvents()
          Getter for property events.
 org.w3c.dom.Document getScoresDocument()
          Getter for property scoresDocument.
 void setConfiguration(ScoringConfiguration conf)
          Setter for property conf.
 void setEvents(Events events)
          Setter for property events.
 void setScoresDocument(org.w3c.dom.Document scoresDocument)
          Setter for property scoresDocument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scores

public Scores(Events evts,
              ScoringConfiguration sc)
       throws ScoringConfigurationException,
              DBException
Creates a new instance of calculator

Parameters:
evts - the events to calculate the score from
sc - Description of the Parameter
Throws:
ScoringConfigurationException - Description of the Exception
DBException - Description of the Exception
ScoringConfigurationException - if unable to calculate scores
DBEsception - if there is a problem connecting to the database

Scores

public Scores(Events evts,
              ScoringConfiguration sc,
              java.lang.String db)
       throws ScoringConfigurationException,
              DBException
Creates a new instance of calculator

Parameters:
evts - the events to calculate the score from
sc - Description of the Parameter
db - the URI of the DB to use for recording info
Throws:
ScoringConfigurationException - Description of the Exception
DBException - Description of the Exception
ScoringConfigurationException - if unable to calculate scores
DBEsception - if there is a problem connecting to the database
Method Detail

getEvents

public Events getEvents()
Getter for property events.

Returns:
Value of property events.

setEvents

public void setEvents(Events events)
Setter for property events.

Parameters:
events - New value of property events.

getConfiguration

public ScoringConfiguration getConfiguration()
Getter for property conf.

Returns:
Value of property conf.

setConfiguration

public void setConfiguration(ScoringConfiguration conf)
Setter for property conf.

Parameters:
conf - New value of property conf.

calculate

public org.w3c.dom.Document calculate()
                               throws ScoringConfigurationException
Calculate the scores.

Returns:
DOM document representing the scores
Throws:
ScoringConfigurationException - if unalb to calculate scores

getScoresDocument

public org.w3c.dom.Document getScoresDocument()
Getter for property scoresDocument.

Returns:
Value of property scoresDocument.

setScoresDocument

public void setScoresDocument(org.w3c.dom.Document scoresDocument)
Setter for property scoresDocument.

Parameters:
scoresDocument - New value of property scoresDocument.

FantasySportsModule 0.0.2-dev

Copyright © 2003 We know What you Want.net. All Rights Reserved.