ca.cbc.sportwire.feed
Class ESPNFeed

java.lang.Object
  |
  +--ca.cbc.sportwire.feed.ESPNFeed
All Implemented Interfaces:
ESPNFeedProperties, SportwireFeed

Deprecated. use the new ESPNXMLFeed for Sportsticker

public class ESPNFeed
extends java.lang.Object
implements SportwireFeed, ESPNFeedProperties

ESPNFeed.java Read the Compat ESPN stream format into a buffer and provide a string reader over the spooled story. This is a singleton class that reads from stdin, breaking the input at ^V^V^A sequences.

Created: Mon Nov 12 16:14:22 2001

Version:
$Id: ESPNFeed.java,v 1.11 2002/04/19 20:38:04 garym Exp $
Author:
Gary Lawrence Murphy

Field Summary
(package private) static org.apache.log4j.Category cat
          Deprecated.  
private  org.apache.commons.collections.ExtendedProperties config
          Deprecated.  
(package private) static org.apache.oro.text.regex.Pattern datepattern
          Deprecated.  
(package private) static org.apache.oro.text.regex.Substitution datesub
          Deprecated.  
private static ESPNFeed feeder
          Deprecated. singleton constructor
private  java.io.BufferedReader in
          Deprecated.  
private  java.lang.String lastTag
          Deprecated.  
private  java.lang.StringBuffer storybuffer
          Deprecated.  
(package private) static org.apache.oro.text.regex.Pattern tagpattern
          Deprecated.  
 
Fields inherited from interface ca.cbc.sportwire.feed.ESPNFeedProperties
CTRLA, CTRLB, CTRLD, CTRLH, CTRLK, CTRLL, ESPN_AUTHHOST_PROPERTY, ESPN_AUTHKEY_PROPERTY, ESPN_AUTHPORT_PROPERTY, ESPN_AUTHUSER_PROPERTY, ESPN_HOST_PROPERTY, ESPN_IDLE_DEFAULT, ESPN_IDLE_PROPERTY, ESPN_SOURCE_DEFAULT, ESPN_SOURCE_PROPERTY, ESPN_SPOOL_PROPERTY, PAGEBREAK
 
Constructor Summary
protected ESPNFeed(org.apache.commons.collections.ExtendedProperties sc)
          Deprecated.  
 
Method Summary
protected  int bufferStory()
          Deprecated. Describe bufferStory method here.
protected  java.lang.String fixupXml(java.lang.String line)
          Deprecated. fixupXml: Sportsticker XML contains errors that will not parse with standard XML tools like Xerces.
protected  org.apache.commons.collections.ExtendedProperties getConfig()
          Deprecated. Get the value of config.
static SportwireFeed getInstance(org.apache.commons.collections.ExtendedProperties sc)
          Deprecated. getInstance returns the Singleton, synchronized to protect against concurrent invocations.
 java.lang.String getLastTag()
          Deprecated. getLastTag returns a meaningful name of the last story read through the Reader
 java.lang.String getStatus()
          Deprecated. getStatus: return a status string reporting on the state of the feed parser; used by the XMLRPC status monitor
private  java.lang.StringBuffer getStorybuffer()
          Deprecated.  
 void skipToNext()
          Deprecated.  
 java.io.Reader storyReader()
          Deprecated. Method: 'storyReader' provides a StringReader over the internal story buffer.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

cat

static org.apache.log4j.Category cat
Deprecated. 

config

private org.apache.commons.collections.ExtendedProperties config
Deprecated. 

lastTag

private java.lang.String lastTag
Deprecated. 

in

private java.io.BufferedReader in
Deprecated. 

storybuffer

private java.lang.StringBuffer storybuffer
Deprecated. 

feeder

private static ESPNFeed feeder
Deprecated. 
singleton constructor

tagpattern

static org.apache.oro.text.regex.Pattern tagpattern
Deprecated. 

datepattern

static org.apache.oro.text.regex.Pattern datepattern
Deprecated. 

datesub

static org.apache.oro.text.regex.Substitution datesub
Deprecated. 
Constructor Detail

ESPNFeed

protected ESPNFeed(org.apache.commons.collections.ExtendedProperties sc)
Deprecated. 
Method Detail

getConfig

protected org.apache.commons.collections.ExtendedProperties getConfig()
Deprecated. 
Get the value of config.
Returns:
ExtendedProperties value of config.

getStatus

public java.lang.String getStatus()
Deprecated. 
Description copied from interface: SportwireFeed
getStatus: return a status string reporting on the state of the feed parser; used by the XMLRPC status monitor
Specified by:
getStatus in interface SportwireFeed
Following copied from interface: ca.cbc.sportwire.feed.SportwireFeed
Returns:
a String value

getLastTag

public java.lang.String getLastTag()
Deprecated. 
Description copied from interface: SportwireFeed
getLastTag returns a meaningful name of the last story read through the Reader
Specified by:
getLastTag in interface SportwireFeed
Following copied from interface: ca.cbc.sportwire.feed.SportwireFeed
Returns:
a String value

getStorybuffer

private java.lang.StringBuffer getStorybuffer()
Deprecated. 

getInstance

public static SportwireFeed getInstance(org.apache.commons.collections.ExtendedProperties sc)
Deprecated. 
getInstance returns the Singleton, synchronized to protect against concurrent invocations.
Returns:
a SportwireFeed value

fixupXml

protected java.lang.String fixupXml(java.lang.String line)
Deprecated. 
fixupXml: Sportsticker XML contains errors that will not parse with standard XML tools like Xerces. As each line is read, it passes through this method where ampersands and other illegal chars are replaced and the strange ESPN date format is re-arranged into something more friendly to Java and RDBMS. As time goes on, there are likely to be more patches tucked into this method. This method also picks out the lastTag.
Parameters:
line - a String value
Returns:
a String value

skipToNext

public void skipToNext()
                throws java.io.IOException
Deprecated.  

Method: 'skipToNext' syncs the ticker to the next complete story; if it was already at the top of a story, this scraps that one and moves on to the next.
Specified by:
skipToNext in interface SportwireFeed
Throws:
java.io.IOException - if a read error occurs

bufferStory

protected int bufferStory()
                   throws java.io.IOException
Deprecated. 
Describe bufferStory method here.
Returns:
int count of lines in this story
Throws:
java.io.IOException - if an error occurs

storyReader

public java.io.Reader storyReader()
                           throws java.io.IOException
Deprecated. 
Method: 'storyReader' provides a StringReader over the internal story buffer. The storybuffer is replaced with each call to skipToNext.
Specified by:
storyReader in interface SportwireFeed
Returns:
'Reader' value
Throws:
java.io.IOException - if an error occurs