Jacson

de.spieleck.app.turn
Class Run

java.lang.Object
  extended by de.spieleck.app.turn.Run
Direct Known Subclasses:
Simulator

public class Run
extends java.lang.Object

Simple facade driver for the tournament system. The main() method commandline enables this facade.
Note that this implementation implies a lot of (simple but useful) implications on how data is stored:

It is thought that future Desktop or Webguis should keep this filesystem layout, thus allowing to switch between verious ways to interact with the internal datastorage.

$URL: https://svn.sourceforge.net/svnroot/jtourney/src/de/spieleck/app/turn/Run.java $

Version:
$Revision: 2 $ $Date: 2006-03-20 14:33:27 +0100 (Mo, 20 Mrz 2006) $ $Author: nestefan $
Author:
Frank S. Nestel, $Author: nestefan $

Field Summary
static java.lang.String BP
           
protected  FileProxy fileProx
          Proxy class for ad hoc file serialization.
static java.lang.String PAIRING
           
static java.lang.String PLAYERS
           
protected  PlayerRegistry pRegistry
          Central repository for all players.
static java.lang.String RENDERING
           
protected  RenderMode renderMode
          Method of rendering data for nice output.
protected  java.io.File root
          Base directory for the tournament.
protected  int round
          Current round.
static java.lang.String ROUND
           
static java.lang.String SCORING
           
protected  ScoringMode scoringMode
          Scoring mode applied for the tournament.
protected  boolean setupComplete
          Hold info, if setup information was complete
static java.lang.String SPLITTING
           
protected  SplittingMode splittingMode
          Method of dividing the players into tables/boards/matches.
protected  long totalLastModified
          Accumulated modification date of the whole data.
 
Constructor Summary
Run()
           
 
Method Summary
 boolean check4setup(java.lang.String rName)
           
 void finish()
           
protected  boolean grokRound(int round, boolean check)
           
 void init(java.io.File root)
           
 LineSourceInited initedInstance(java.lang.String rName)
           
static java.lang.Object instance(java.lang.String name, java.lang.String defaultPackage)
           
static void main(java.lang.String[] args)
           
 int pairing(java.lang.String[] args, int start)
           
 java.io.PrintWriter writer(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BP

public static final java.lang.String BP
See Also:
Constant Field Values

PLAYERS

public static final java.lang.String PLAYERS
See Also:
Constant Field Values

PAIRING

public static final java.lang.String PAIRING
See Also:
Constant Field Values

SCORING

public static final java.lang.String SCORING
See Also:
Constant Field Values

SPLITTING

public static final java.lang.String SPLITTING
See Also:
Constant Field Values

RENDERING

public static final java.lang.String RENDERING
See Also:
Constant Field Values

ROUND

public static final java.lang.String ROUND
See Also:
Constant Field Values

root

protected java.io.File root
Base directory for the tournament.


scoringMode

protected ScoringMode scoringMode
Scoring mode applied for the tournament.


splittingMode

protected SplittingMode splittingMode
Method of dividing the players into tables/boards/matches.


renderMode

protected RenderMode renderMode
Method of rendering data for nice output.


pRegistry

protected PlayerRegistry pRegistry
Central repository for all players.


round

protected int round
Current round.


totalLastModified

protected long totalLastModified
Accumulated modification date of the whole data.


fileProx

protected FileProxy fileProx
Proxy class for ad hoc file serialization.


setupComplete

protected boolean setupComplete
Hold info, if setup information was complete

Constructor Detail

Run

public Run()
Method Detail

main

public static void main(java.lang.String[] args)

init

public void init(java.io.File root)
          throws java.lang.Exception
Throws:
java.lang.Exception

grokRound

protected boolean grokRound(int round,
                            boolean check)
                     throws java.lang.Exception
Throws:
java.lang.Exception

pairing

public int pairing(java.lang.String[] args,
                   int start)
            throws java.lang.Exception
Throws:
java.lang.Exception

finish

public void finish()
            throws java.io.IOException
Throws:
java.io.IOException

instance

public static java.lang.Object instance(java.lang.String name,
                                        java.lang.String defaultPackage)

initedInstance

public LineSourceInited initedInstance(java.lang.String rName)
                                throws java.io.IOException
Throws:
java.io.IOException

check4setup

public boolean check4setup(java.lang.String rName)
                    throws java.io.IOException
Throws:
java.io.IOException

writer

public java.io.PrintWriter writer(java.lang.String name)
                           throws java.io.IOException
Throws:
java.io.IOException

spieleck.de