|
FantasySportsModule 0.0.2-dev | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.fanfoot.scoring.EventParser
Parsers a file looking for events that may be important in a fantasy game. Creates a set of Event objects from a given commentary/statistics file.
| Constructor Summary | |
EventParser()
Creates a new instance of EventParser |
|
EventParser(java.lang.String strURL)
Creates a new instance of EventParser |
|
| Method Summary | |
void |
addListener(EventParserListener epl)
Add a listener to this parser |
java.lang.String |
getCommentarySource()
Return the source code of the currently loaded commentary. |
EventParserConfiguration |
getConfiguration()
Getter for property conf. |
void |
loadConfiguration(java.lang.String strConf)
Load the configuration file indicated. |
protected void |
notifyRetrievedCommentary()
Notify all listeners when the commentary has been retrieved |
Events |
parse(java.io.File file,
java.lang.String strType)
Parse the supplied file |
Events |
parse(java.lang.String strURL,
java.lang.String strType)
Parse the supplied resource |
Events |
parse(java.net.URL url,
java.lang.String strType)
Parse the supplied resource |
java.lang.String |
parseEventsUID(java.lang.String strData,
java.lang.String strType)
Create a Unique Identifier for a set of Events held in the supplied game data string. |
void |
removeListener(EventParserListener epl)
Remove a listener to this parser |
void |
setConfiguration(EventParserConfiguration conf)
Setter for property conf. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EventParser()
public EventParser(java.lang.String strURL)
throws EventParserConfigurationException
strURL - the url of the configuration file for this parser
EventParserConfigurationException - Description of the
Exception
EventParserConfigurationException| Method Detail |
public Events parse(java.lang.String strURL,
java.lang.String strType)
throws java.net.MalformedURLException,
java.io.IOException,
EventParserConfigurationException
strURL - the URL of the resource to parsestrType - the type of resource this is (this corresponds to
the sourceType element of the matcher element in the config
file
java.net.MalformedURLException - Description of the Exception
java.io.IOException - Description of the Exception
EventParserConfigurationException - Description of the
Exception
public Events parse(java.io.File file,
java.lang.String strType)
throws java.io.IOException,
EventParserConfigurationException
file - the file to parsestrType - the type of resource this is (this corresponds to
the sourceType element of the matcher element in the config
file
java.io.IOException - Description of the Exception
EventParserConfigurationException - Description of the
Exception
public Events parse(java.net.URL url,
java.lang.String strType)
throws java.net.MalformedURLException,
java.io.IOException,
EventParserConfigurationException
url - the URL of the resource to parsestrType - the type of resource this is (this corresponds to
the sourceType element of the matcher element in the config
file
java.net.MalformedURLException - Description of the Exception
java.io.IOException - Description of the Exception
EventParserConfigurationException - Description of the
Exception
public java.lang.String parseEventsUID(java.lang.String strData,
java.lang.String strType)
throws EventParserConfigurationException
strData - the game datastrType - the type of data supplied
EventParserConfigurationException - when the event UDI
cannot be generatedpublic EventParserConfiguration getConfiguration()
public void setConfiguration(EventParserConfiguration conf)
conf - New value of property conf.
public void loadConfiguration(java.lang.String strConf)
throws EventParserConfigurationException
strConf - URL from which to load configuration file
EventParserConfigurationException - Description of the
Exceptionpublic void addListener(EventParserListener epl)
epl - the listener to addpublic void removeListener(EventParserListener epl)
epl - the listener to removeprotected void notifyRetrievedCommentary()
public java.lang.String getCommentarySource()
|
FantasySportsModule 0.0.2-dev | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||