FantasySportsModule 0.0.2-dev

org.fanfoot.scoring
Class EventParserConfiguration

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

public class EventParserConfiguration
extends java.lang.Object

Reads an XML configuration file and builds a set of Regular Expressions that are used to extract information from a commentary/statistics resource.

Author:
rgardler

Constructor Summary
EventParserConfiguration(java.lang.String strURL)
          Creates a new instance of EventParserConfiguration using the indicated configuration file
 
Method Summary
 java.util.Iterator getDuplicateDetectionParts(java.lang.String strType)
          Get an Iterator of part names that are used to identify duplicate events of the given type.
 EventPattern getEventsUIDPattern(java.lang.String strSourceType)
          Get the pattern for extracting the UID of the Events group this configuration file is for.
 java.util.ArrayList getPatternsForType(java.lang.String strSourceType)
          Get all patterns in the config file for a source of the indicated type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventParserConfiguration

public EventParserConfiguration(java.lang.String strURL)
                         throws EventParserConfigurationException
Creates a new instance of EventParserConfiguration using the indicated configuration file

Parameters:
strURL - the URL of the configuration file to use
Throws:
EventParserConfigurationException - Description of the Exception
Method Detail

getPatternsForType

public java.util.ArrayList getPatternsForType(java.lang.String strSourceType)
Get all patterns in the config file for a source of the indicated type.

Parameters:
strSourceType - Description of the Parameter
Returns:
an arraylist of the patterns. Patterns are represented as java.util.regex.Patterns

getDuplicateDetectionParts

public java.util.Iterator getDuplicateDetectionParts(java.lang.String strType)
Get an Iterator of part names that are used to identify duplicate events of the given type. If no duplicateDetection element exists then an empty iterator will be returned.

Parameters:
strType - the type we are considering
Returns:
The duplicateDetectionParts value

getEventsUIDPattern

public EventPattern getEventsUIDPattern(java.lang.String strSourceType)
                                 throws EventParserConfigurationException
Get the pattern for extracting the UID of the Events group this configuration file is for.

Parameters:
strSourceType - the source type we want to use
Returns:
the event pattern for the UID
Throws:
EventParserConfigurationException - if unable to build the UID pattern

FantasySportsModule 0.0.2-dev

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