FantasySportsModule 0.0.2-dev

org.fanfoot.scoring
Class Event

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

public class Event
extends java.lang.Object

An event in a live game that may have an impact on the fantasy game

Author:
rgardler

Constructor Summary
Event(java.lang.String strType)
          Creates a new instance of Event of the type indicated
 
Method Summary
 void appendXMLTo(org.w3c.dom.Document doc)
          Append this event as a DOM node to the supplied XMl Docmuent.
 java.lang.String getPart(java.lang.String strPart)
          Get the part of the event named.
 java.util.Enumeration getPartNames()
          Get all part names for this event.
 java.util.Hashtable getParts()
          Get all the parts for this event.
protected  org.w3c.dom.Element getSourceElement(org.w3c.dom.Document doc)
          Get the source XML ELement
 java.lang.String getSrc()
          Getter for property src.
 java.lang.String getType()
          Getter for property type.
protected  org.w3c.dom.Element getTypeElement(org.w3c.dom.Document doc)
          Get the type XML ELement
 java.lang.String getUID()
          Getter for property UID.
protected  org.w3c.dom.Element getUIDElement(org.w3c.dom.Document doc)
          Get the UID XML ELement
 void putPart(java.lang.String strName, java.lang.String strValue)
          Add the named part and value to the collection of parts.
 void setSrc(java.lang.String src)
          Setter for property src.
 void setType(java.lang.String type)
          Setter for property type.
 void setUID(java.lang.String uid)
          Setter for property UID.
 org.w3c.dom.Document toXMLDoc()
          Return an XML DOM representation of this event
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Event

public Event(java.lang.String strType)
Creates a new instance of Event of the type indicated

Parameters:
strType - the type of this event this event belongs to. From this a unique event identifier will be created.
Method Detail

getSrc

public java.lang.String getSrc()
Getter for property src.

Returns:
Value of property src.

setSrc

public void setSrc(java.lang.String src)
Setter for property src.

Parameters:
src - New value of property src.

getType

public java.lang.String getType()
Getter for property type.

Returns:
Value of property type.

setType

public void setType(java.lang.String type)
Setter for property type.

Parameters:
type - New value of property type.

getPart

public java.lang.String getPart(java.lang.String strPart)
Get the part of the event named.

Parameters:
strPart - name of the part required
Returns:
value of the part requested

putPart

public void putPart(java.lang.String strName,
                    java.lang.String strValue)
Add the named part and value to the collection of parts.

Parameters:
strName - name of the part, nulls are converted to an empty string
strValue - value of the part

getParts

public java.util.Hashtable getParts()
Get all the parts for this event.

Returns:
Hashtable containing all the parts, indexed by part name

getPartNames

public java.util.Enumeration getPartNames()
Get all part names for this event.

Returns:
the part names present in this event

toXMLDoc

public org.w3c.dom.Document toXMLDoc()
                              throws javax.xml.parsers.ParserConfigurationException
Return an XML DOM representation of this event

Returns:
Document XML DOM representation of this event
Throws:
javax.xml.parsers.ParserConfigurationException - if there is a problem with the XML Parser

appendXMLTo

public void appendXMLTo(org.w3c.dom.Document doc)
Append this event as a DOM node to the supplied XMl Docmuent.

Parameters:
doc - the document to append to

getUIDElement

protected org.w3c.dom.Element getUIDElement(org.w3c.dom.Document doc)
Get the UID XML ELement

Parameters:
doc - the document this element will be a part of
Returns:
Element representing the UID of this event

getTypeElement

protected org.w3c.dom.Element getTypeElement(org.w3c.dom.Document doc)
Get the type XML ELement

Parameters:
doc - the document this element will be a part of
Returns:
Element representing the type of this event

getSourceElement

protected org.w3c.dom.Element getSourceElement(org.w3c.dom.Document doc)
Get the source XML ELement

Parameters:
doc - the document this element will be a part of
Returns:
Element representing the source of this event

getUID

public java.lang.String getUID()
Getter for property UID.

Returns:
Value of property UID.

setUID

public void setUID(java.lang.String uid)
Setter for property UID.

Parameters:
uid - New value of property UID.

FantasySportsModule 0.0.2-dev

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