|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
accept
: returns boolean true if the filename
matches the regexp.
afpFilenameDTD
creates the bogus DTD from the AFP
filename by extracting the significant parts of the filename
and ignoring the event parts, and prepending the
AFP_DTD_PREFIX; note that the prefix is not required to end
with a file separator and none will be inserted.
asArrayList
: parses a string on the file separator
and returns an array list object that can be used with Velocity
foreach
BasicPageHandler
constructor
boottime
: variable
bufferStory
spools one document at a time for the
SportWire system to load into the doc queue for later
parsing/archiving or whatever else gets done to it.
bufferStory
method here.
bufferStory
for AFP must read in the XML and
inject a DOCTYPE derived from the message filename attribute.
bufferStory
spools one document at a time for the
SportWire system to load into the doc queue for later
parsing/archiving or whatever else gets done to it.
SAXBuilder
instance to use
bump
locks the object and does a notifyAll to
nudge any waiting data access methods
bump
: can be used to nudge any waiting access
methods.
capLast
: A utility function that capitalizes the
last token in a dot-seperated string of tokens.
clear
: returns the result from the
underlying representation
close
: does nothing
connect
: open the socket to TSN and do the login
sequence to get connected
containsKey
: returns the result from the
underlying representation
containsValue
: returns the result from the
underlying representation
countLines
: returns the number of newline chars in
the string; used to decide if a CDATA block is worth piping out
to the txt2html process.
DBCacheBean
instance with no values
set; could be used this way within JSP; the refreshing doesn't
start until you set the query.
DBCacheBean
constructor to set up the connection
from the server properties and also set the query to start the
fetch.
DBCacheBean
deluxe constructor constructor sets
the query, and sets the reload-period.
defaultPeriod
:
DocQueue
constructor sets the default number of
worker threads as specified by DOCWORKERS_PROPERTY
DocQueue
constructor sets the run-flag to true and
fires up the worker threads.
dom
: Returns the DOM object from pathlist; this is
used in SportPage to get a DOM from the remainder of the
path_info (not yet implemented for the SQL case)
dom
: Returns the DOM object from pathlist; this is
used in SportPage to get a DOM from the remainder of the
path_info
dom
: Returns the DOM object from a pathlist
dom
returns the DOM object according to a possibly
custom DOM class specified by a dom.data.class
property.
dom
returns the DOM object according to a possibly
custom DOM class specified by a dom.data.class
property.
dom
returns the DOM object according to a possibly
custom DOM class specified by property.
$xml
variable into the context; this provides access
to a DOM built from the remainder of the pathinfo
.$xml
variable into the context; this provides access
to a DOM built from the string parameter.$xml
variable into the context; this provides access
to a DOM built from the remainder of the pathinfo
.doms
: like the singular version, but this one
returns a list of files matching the perl-regex base filename
(XML path and default extensions will be added to this
regex).
entrySet
: returns the result from the
underlying representation
error
: Currently minimcally implemented to avoid
ugly Velocity stack-trace screens; should be expanded later to
provide a more graceful reaction to different classes of
critical template errors.
SocketPipeReader
:ESPNXMLFeed
constructor
exec
:
filter
: apply various fixups to the line-by-line
feed; also watches for the DOCTYPE to trap the doctag value.
find
returns the filename is searched for in the
templates.home
directories; if the file is not
found, a null is returned and the trouble logged.
findFile
: Given a list of search paths and a list
of optional extensions, search for the base filename.
findFile
: if either of the search lists is null or
empty, take the default as a comma-delimited string; this is
used to check the lists coming from the property file, using
the hard-coded defaults if the property was not defined.
findFiles
: returns a list of files matching the
perl-like regexp; searches the paths/exts until it finds at
least one match, then ceases to search other paths.
findFiles
: Expanded form allowing property defaults.
getHandler
: Takes the propsective fully qualified
Java class name and tries to load that class as a
PageHandler
; if the load fails, the last token is
stripped off, the new last token capitalized, and the method
calls itself recursively.
findRelative
: Like findFile except that only the
file extension is resolved.
findXmlFile
: try the xml.home paths and
xml.extensions and default to the webapp home as the file
doc-root and .xml
findXmlFiles
: Similar to the singular version, but
this one will return a list of File objects instead of filename
strings.
findXslFile
: try the xsl.home paths and
xml.extensions and default to the webapp home as the file
doc-root and .xsl
fixupXml
: Sportsticker XML contains errors that
will not parse with standard XML tools like Xerces.
fixupXml
: Sportsticker XML contains errors that
will not parse with standard XML tools like Xerces.
generateKey
: returns the current ms timer.
get
: overrides base method to add bounds checking;
returns a null for out of bounds requests.
get
: returns the result from the
underlying representation
get
: returns the result from the underlying
representation and resets the TTL field to the default
getBean
: For SportPage beans that depend on the
page context, attempts a getInstance(Context) before falling
back to the no-context case.
getBean
: For SportPage beans that depend only on
the system config properties, attempts a
getInstance(ExtendedProperties) before falling back to the
no-context case.
getBean
: no context method for non-SportPage
beans, tries for a getInstance() and the a null constructor.
getCached
:
getCategory
:
getConfig
: Access the properties list.
getDepth
: lets Velocity use
$path.depth
to get the array size
getIn
: returns the current input stream reader
getInstance
returns the singleton instance; if you
ever need a Sportwire with multiple queues, you'll need to
modify/override this method.
getInstance
: returns the singleton -- each
page handler subclass must implement this
getInstance
: return the generator instance,
synchronized to protect against concurrent calls.
getInstance
:
getInstance
: returns the Singleton instance for
this category, fetching it from the map or creating a new one
as needed
getInstance
attempts to fetch the matching
instance via the Velocity Context $globals
link to the TTL cache.
getInstance
: Creates a JDOMFile object with no
document defined; does not cache the object.
getInstance
attempts to fetch the matching
instance via the Velocity Context $globals
link to the TTL cache.
getInstance
: an instance for the category
getInstance
gets the app config and also sets the
query in motion.
getInstance
: Extracts the global properties from
the context and calls that getInstance method.
getInstance
: Extracts the global properties from
the context and calls that getInstance method.
getInstance
gets the app config and also sets the
query in motion.
getInstance
returns the Singleton, synchronized to
protect against concurrent invocations.
getInstance
returns the Singleton, synchronized to
protect against concurrent invocations.
getInstance
returns the Singleton, synchronized to
protect against concurrent invocations.
getInstance
returns the Singleton, synchronized to
protect against concurrent invocations.
getInstance
:
getInstance
: calls the (sc,file) version with a
null filename)
getInstance
: calls the (sc,file) version with a
null filename)
getInstance
: returns a factory for use in a
template
getInstance
: BeanFactory can be used as class
methods, or used within a Velocity template as a singleton
variable value (ie $javabeans)
getInstance
: returns a factory for use in a
template
getInstance
using the application properties
(needed for the JDBC and cache periodicity settings.
getInstance
: returns a factory for use in a
template
getInstance
returns the singleton connection
pool.
getInstance
:
getInstance
is the same as the version using the
Velocity page config, but gets the app config directly.
getInstance
: Returns the JDOM object if the
filename is null, otherwise attempts to find a cached JDOM
object in the TTL cache or creates a new one, loads the
Document and then stashes the new object in the TTL.
getInstance
: Returns the JDOM object if the
filename is null, otherwise attempts to find a cached JDOM
object in the MRU cache or creates a new one, loads the
Document and then stashes the new object in the TTL.
getInstance
is the same as the version using the
Velocity page config, but gets the app config directly.
getLastTag
returns a meaningful name of the last
story read through the Reader
getLastTag
: holds the tag id value from the last
item read; used by the WireParser to filter unwanted messages
getLevel
: returns the element of the path in a
one-based sense, and returns an empty string if your request is
out of bounds.
getLevel
: returns the element of the path passed
through the given perl substitution pattern (using JORO).
getLineup
: this is the method used by the Velocity
pages as $news.lineup
to insert a pre-formatted
block of HTML containing the full lineup.
getMap
:
getMap
: lookup the SystemID
string
and return the corresponding Map file.
getQueue
: access the document queue.
getReloadPeriod
computes the refresh period from
the properties, or sets it to the default
DB_CACHE_DEFAULT_PERIOD
getReloadPeriod
computes the refresh period from
the properties, or sets it to the default
DB_CACHE_DEFAULT_PERIOD
getResults
will wait for an initial ResultSet and
then return the cached list of columns and a list of value
lists (rows of columns of Object elements) -- if you
need the column labels, they are in the getColumns().
getRootElement
: Convenience method to get the
first element of the embedded DOM document.
getServletInfo
: Returns the version ID of this
file
getStatus
: return a status string reporting on the
state of the feed parser; used by the XMLRPC status monitor
category
and is
intended for setting the lineup category.
getTTL
:
getXml
: returns the object as an XML string; used
in velocity as $dom.xml
getXml
: write the xml to a specific writer
getXsl
: lookup the SystemID
string
and return the corresponding Xsl file.
topic
: variable
handleRequest
: Velocity main request method.
handleStaticRequest
: For the time being, we have a
problem where static files referenced in the templates cannot
be handled by Apache because the root /sports
in
the URL causes Apache to hand it over (JkMount) to tomcat, and
tomcat hands it back to this servlet (because of the '/'
url-pattern.
initialize
: does nothing
isEmpty
: returns the result from the
underlying representation
JDOMDB
constructor extracts the global properties
from a Velocity page Context.
JDOMDB
constructor to set up the connection
from the server properties and also set the query to start the
fetch.
JDOMToFile
is used by the DocQueue to process
JDOM items on the queue.JDOMToFile
constructor stores the config so
we can get at connection details later
JDOMToXMLDBMS
is used by the DocQueue to process
JDOM items on the queue.JDOMToXMLDBMS
constructor stores the config so
we can get at connection details later
keySet
: returns the result from the
underlying representation
lineup.refresh=
seconds
Lineup
null constructor does nothing.
Lineup
category constructor sets the topic and
starts the refresh thread.
Lineup
constructor
listOrDefault
will return the list if it has
elements, otherwise it parses the comma-delimited string into
elements and returns that list.
loadConfiguration
: fetch the properties in the
file specified by sportpage.servlet.conf
(in
WEB-INF/web.xml) and add them to the ServletContext, and load
up the Velocity configuration (which can be specified
seperately as a "properties" web.xml init-param value.
loadDom
: fetches the SQL as a DOMFile, based on the
dom.db.class
property setting for the type of DOM object
loadDom
: loads the file as a DOMFile, based on the
property setting for the type of DOM object
loadIgnoreList
: Loads in and pre-compiles a list
of perl expressions that specify document tags to ignore.
login
: dead stupid login chat
startLog
loads filters and appenders from the
property file specified by sportpage.log4j.conf.
logLine
: add a blank line to the log
logLine
: add the message to the spool log; this
lets us record the pre-processed (ie fixed) XML received over
the socket.
mergeTemplate
: Overriding this method allows us to
trap errors in the execution of the templates and shunt the
page off to a standard site error page instead of returning the
default stacktrace error page.
packageOf
: mungs a normal file page into a java
package-like dot-delimited string that is used to find
properties in the config file
layout
template.pathinfo
(requestURI) string by breaking the string on
file.separator
.PathList
constructor sets the initial array size
to 3
PathList
constructor takes the URI and uses this
to build an internal array list of the parts (excluding null
strings).
PeriodicData
base constructor does nothing.
PeriodicData
constructor accepting the interval as
an integer seconds value
PeriodicData
constructor requires the string
representation of the refresh rate; the refresh rate is
typically provided by calling this constructor from a subclass
with the refresh taken from a properties object such as
super( properties.getProperty("refresh.sec",
"30")
.
PerlFileFilter
constructor
pipe
: variable
process
: if there is a pattern/replacement indexed
by the key, the pair is applied to the source string.
processDocument
: called by the DocQueue on each
object in the queue; this must be a thread-safe process that
will already know what type to expect from the doc parameter.
processDocument
: handler for the DocQueue, this
method parses the doc.toString()
through Xerces to
create a DOM, then selected the Map appropriate to the DocType
and stuffs the DOM in the database using that O:R Map.
processDocument
: handler for the DocQueue, this
method parses the doc.toString()
through Xerces to
create a DOM, then selected the Map appropriate to the DocType
and stuffs the DOM in the database using that O:R Map.
processDocument
: handler for the DocQueue, this
method parses the doc.toString()
through Xerces to
create a DOM, then selected the Map appropriate to the DocType
and stuffs the DOM in the database using that O:R Map.
processDocument
: handler for the DocQueue, this
method parses the doc.toString()
through Xerces to
create a DOM, then selected the Map appropriate to the DocType
and stuffs the DOM in the database using that O:R Map.
publicToMapFile
: translate the fully qualified
publicID into a MapFile path; for the present purposes, the
publidID is a local file path ending in .dtd
and
are mapped to the same location with the suffix
.map
publicToXslFile
: translate the fully qualified
publicID into a XslFile path; for the present purposes, the
publidID is a local file path ending in .dtd
and
are mapped to the same location with the suffix
.xsl
put
: enters the item with a default expire TTL.
put
:
putAll
: returns the result from the
underlying representation
queueDoc
adds an object to the end of the queue
and notifies any waiting worker threads.
readFeed
rips through the continuous stream of
input until the read function starts returning consecutive
nulls, which probably means we are out of input; when input
runs out, we flag the workers to exit and return to await job
completion.
readPrompt
: reads in characters looking for the
end of the prompt (new line or colon)
refresh
:
refresh
is the PeriodicData method called by the
timer thread.
refresh
: abstract method invoked by the timer.
refresh
: PeriodicData method called by the
concurrent timer thread; prunes out the expired items.
key,pattern,replacement
to
produce a map of key values to Perl5 pattern/replacement pairs
(remember that the commas must be escaped in the property file!)
RegexMap
constructor requires a list of tuple
strings of the form key,pattern,replacement
remove
: returns the result from the
underlying representation
run
implements a worker thread to process
QueueElement objects off the queue; we'll throw a cast
exception if the item is not a queue element.
run
: when running in socket mode, this will ensure
the connection stays alive and has workers reading it.
run
:
run
: when running in socket mode, this will ensure
the connection stays alive and has workers reading it.
run
is the Thread method to parse the file and
create the document.
run
is the Thread method to parse the text and
create the document.
run
implements the refresh timer; if the running
flag is true, the refresh is run, then the thread pauses for
interval seconds.
run
implements the refresh timer; if the running
flag is true, the refresh is run, then the thread pauses for
interval seconds.
running
: returns true while the socket reader
thread is active
runstate
: set the run state indicator
sc
: holds the webapp configuration; set when the
first instance is created.
sc
: holds the webapp configuration; set when the
first instance is created.
ScriptLineup
protected constructor used by the
singleton getInstance interface.
ScriptLineup
public constructor to create a unique
Lineup object with a custom script.
DOCHANDLER_PROPERTY
.
setDocHandler
: set the handler to a class from the
class name.
setDocument
: Tests for the existence and
permissions of the file before spawning the thread to read it.
setDocument
: spawns the thread to convert the
"filename" String into HTML and from there into JDOM
FEEDCLASS_PROPERTY
setFeed
: set the feed by name, invoking the
getInstance (the class is assumed to be a Singleton pattern)
setIn
: sets the current input stream and wraps it
in a buffered reader with a buffer of 256k
setInterval
: set the refresh interval for the
periodic data item.
setLineup
: protected method called by the interval
timer to refresh the internal state of the Lineup object.
setLogging
loads filters and appenders from the
property file specified by wirefeeder.log4j.conf.
setLogging
loads filters and appenders from the
property file specified by wirefeeder.log4j.conf.
setPath
: builds the path array from a string using
the local O/S file separator.
setPathProperties
: stuffs the context with
variables based on the URI: requestURI
is
the full URI of this webapp path
is the path
after this webapp as a
ca.cbc.sportpage.servlet.data.PathBean
object.
setProperties
adds the values for the
topic.*
properties; these should define the
"layout" template and its components, for example:
layout=default/layout.vm
banner=default/banner.vm
altheader=default/altheader.vm
page=default/news.vm
sidebar=default/side.vm
missingpage=default/side.vm
errorpage=default/side.vm
The 404 and 500 properties are used in the SportPageServlet
to set the template layout file when the template fails to
parse due to file-not-found or other server error.
setProxyCaching
: inserts cache-busting headers
compatible with a wide range of proxy servers; must be used
before any out.println statements - not used by the
DefaultPageHandler, but available for any subclasses to use.
setProxyCaching
:
running
: can be set to false to terminate the
refresh thread.
setRunning
: can be set to
false to terminate the thread.
setTopic
: loads the properties for
default.*
and then loads the properties for the
topic.*
moving up the pathinfo so that
deeper topics can subclass.
setTTL
:
setTTL
:
setupPage
: -- NOTE: This means a
PageHandler class extending a class extending this one cannot
get at the property changes made by the middle class! This
was done because DOMPageHandler had to set the
$page
to $index
, so the
BioPageHandler could not then set it's own default page
template after the super.setupPage
; alternative
implementations are welcome.
setupPage
: This is called by the SportPageServlet
after the handler is retrieved and just before searching for
the layout template.
size
: returns the current size of the underlying
queue container.
size
: returns the result from the
underlying representation
url-pattern
"/" (see
src/sportpage.xml).startLog
: if tsn.log appears in the config file,
it defines a filename that will receive everything the wire
receives (after the cleanup of bad XML).
startLog
: if espn.log appears in the config file,
it defines a filename that will receive everything the wire
receives (after the cleanup of bad XML).
startSession
: tests the config parameters and
starts up the wire service reader thread
status
: XMLRPC method to report on the system
status; called as sportwire.status
from
localhost:8484/
, this returns a few uptime
diagnostics useful for ensuring the system is still alive.
stop
: override ESPN method to avoid system exit
stop
:
stop
: override TSN method to avoid system exit
SystemCall
: Utility function to perform a unix
exec function similar to the Perl form of the command.TestDBCacheBean.java
is automaticaly generated by
'unittestsgen' application.TestDocQueue.java
is automaticaly generated by
'unittestsgen' application.TestDocumentFile.java
is automaticaly generated by
'unittestsgen' application.TestESPNFeed.java
is automaticaly generated by
'unittestsgen' application.TestESPNKeyGenerator.java
is automaticaly generated by
'unittestsgen' application.TestJdbcConnections.java
is automaticaly generated by
'unittestsgen' application.TestJDOMFile.java
is automaticaly generated by
'unittestsgen' application.TestMapServer.java
is automaticaly generated by
'unittestsgen' application.TestPageHandlerFactory.java
is automaticaly generated by
'unittestsgen' application.TestPathList.java
is automaticaly generated by
'unittestsgen' application.TestPathUtil.java
is automaticaly generated by
'unittestsgen' application.TestScriptLineup.java
is automaticaly generated by
'unittestsgen' application.TestSportPageServlet.java
is automaticaly generated by
'unittestsgen' application.TestSportwireConfig.java
is automaticaly generated by
'unittestsgen' application.TestSystemCall.java
is automaticaly generated by
'unittestsgen' application.TestTemplateLineup.java
is automaticaly generated by
'unittestsgen' application.TestText2XML.java
is automaticaly generated by
'unittestsgen' application.TestTTLCacheMap.java
is automaticaly generated by
'unittestsgen' application.TestVelocityCalendar.java
is automaticaly generated by
'unittestsgen' application.TestWireFeeder.java
is automaticaly generated by
'unittestsgen' application.TestXMLDBMSDocHandler.java
is automaticaly generated by
'unittestsgen' application.toHtml
: if the string is longer than 3 lines of
text, it gets piped out to an external process to be translated
to HTML.
ToNewsMLFilter
is used by the DocQueue to
pre-process non-NewsML items into NewsML by searching for a XSL
transform matching the system ID.ToNewsMLFilter
constructor stores the config so
we can get at connection details later
toString
: returns the pathinfo so that Velocity
$path
returns the actual path.
transform
: If all goes well, this will either
find a previous request for this transform and return that
object from the cache, or it will transform this object
according to the supplied XSL File and return and cache that.
transform
will search for the XSL file according
to the properties (XSL_PATHS_PROPERTY) and extensions
(XSL_EXTS_PROPERTY) and then apply the transform creating a
new JDOMFile object.
trapDirectories
: detect directory pathinfo and if so,
set the INDEX_INDICATOR true and set the index page template
TSNFeed
constructor
TTLEntry
:TTLEntry
constructor
TTLCacheMap
null constructor
TTLCacheMap
constructor
TTLCacheMap
constructor
TTLCacheMap
constructor allows setting the
periodicity of the expiry sweep; it is important to realize
that items expire no sooner than the expiry, but may
linger until the next sweep.
usage
: print the command line options to stderr
values
: returns the result from the
underlying representation
verified
:
verified
:
WireFeeder
instance.
WireFeeder
constructor accepts a config filename.
XMLDBMSDocHandler
is used by the DocQueue to
process items on the backlog queue.XMLDBMSDocHandler
constructor stores the config so
we can get at connection details later
xpath
implements the Jaxen XPath extension to
JDOM; XPath support is apparently not perfect, but it's
probably suitable for our purposes, and the interface is so
simple, each upgrade to Jaxen will automatically upgrade all
templates using XPath methods.
xpath
: apply the xpath to the specified
node.
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Javadocs generated Tue Apr 23 01:08:36 EDT 2002 by garym@maya.dyndns.org
Copyright © 2002 Canadian Broadcasting Corp