|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdip.judge.parser.JudgeParser
First stage of Judge output parsing. Looks for the "::" line, determines game name, judge name, and variant type.
Then, looks to see (if present) the list of players and their email addresses.
Then, determines if input is a game listing or a game history. Sets flags, and if it is a game listing, returns the rest of the text. Determines if it is a game history by looking for a consecutive Date: / Subject: line pair
Parses the rest of the file into a String for sub-parsing.
Field Summary | |
static java.lang.String |
JP_TYPE_GAMESTART
|
static java.lang.String |
JP_TYPE_HISTORY
|
static java.lang.String |
JP_TYPE_LISTING
|
static java.lang.String |
JP_TYPE_RESULTS
|
static java.lang.String |
JP_TYPE_UNDEFINED
|
Constructor Summary | |
JudgeParser(OrderFactory orderFactory,
java.io.Reader r)
Create a JudgeParser, and start parsing. |
Method Summary | |
java.lang.String |
getGameName()
Get the name of the Game |
java.lang.String |
getInitialText()
For Listings, this is null. |
java.lang.String |
getJudgeName()
Get the name of the Judge |
Phase |
getPhase()
Get the phase of the game |
java.lang.String[] |
getPlayerEmails()
Returns the email address for each player in the game, or a zero-length array |
java.lang.String[] |
getPlayerPowerNames()
Returns the list of players in the game, or a zero-length-array |
java.lang.String |
getText()
Returns the rest of the text for further parsing. |
java.lang.String |
getType()
Returns the type of this input |
java.lang.String |
getVariantName()
Get the name of the Variant |
java.lang.String |
prependText(java.lang.String s)
Prepend the given string in front of the stored text |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String JP_TYPE_LISTING
public static final java.lang.String JP_TYPE_HISTORY
public static final java.lang.String JP_TYPE_RESULTS
public static final java.lang.String JP_TYPE_GAMESTART
public static final java.lang.String JP_TYPE_UNDEFINED
Constructor Detail |
public JudgeParser(OrderFactory orderFactory, java.io.Reader r) throws java.io.IOException, java.util.regex.PatternSyntaxException
Method Detail |
public java.lang.String getJudgeName()
public java.lang.String getVariantName()
public java.lang.String getGameName()
public Phase getPhase()
public java.lang.String[] getPlayerPowerNames()
public java.lang.String[] getPlayerEmails()
public java.lang.String getType()
public java.lang.String getText()
This the "rest" of the text after parsing judge/player info;
if it is a history, it is every line INCLUDING and AFTER the first Date: line.
public java.lang.String prependText(java.lang.String s)
public java.lang.String getInitialText()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |