ca.cbc.sportwire.dochandler
Class ToNewsMLFilter
java.lang.Object
|
+--ca.cbc.sportwire.dochandler.ToNewsMLFilter
- All Implemented Interfaces:
- DocHandler, WireFeederProperties
- public class ToNewsMLFilter
- extends java.lang.Object
- implements DocHandler, WireFeederProperties
ToNewsMLFilter
is used by the DocQueue to
pre-process non-NewsML items into NewsML by searching for a XSL
transform matching the system ID. Transformed documents are then
replaced on the queue (as JDOM objects) and set for processing with
the XMLDBMSDocHandler.
This class is not currently being used.
Created: Wed Nov 14 15:04:36 2001
- Version:
- $Id: ToNewsMLFilter.java,v 1.5 2002/04/23 04:55:51 garym Exp $
- Author:
- Gary Lawrence Murphy
Field Summary |
(package private) static org.apache.log4j.Category |
cat
Set up a reporting category in Log4J |
private org.apache.commons.collections.ExtendedProperties |
config
|
(package private) static org.apache.log4j.Category |
dump
|
Fields inherited from interface ca.cbc.sportwire.WireFeederProperties |
CONFIGFILE_DEFAULT, CONFIGFILE_PROPERTY, DEFAULT_FILENAME_XPATH, DEFAULT_SAX_DRIVER_CLASS, DEFAULT_XML_PATH, DEFAULT_XMLRPC_PORT, DOCHANDLER_DEFAULT, DOCHANDLER_PROPERTY, DOCWORKERS_DEFAULT, DOCWORKERS_PROPERTY, DTD_PATH_PROPERTY, FEED_REGEX_PROPERTY, FEEDCLASS_DEFAULT, FEEDCLASS_PROPERTY, FEEDFILTER_DEFAULT, FEEDFILTER_PROPERTY, FILENAME_XPATH_PROPERTY, IGNOREFILE_PROPERTY, LOGFILE_DEFAULT, LOGFILE_PROPERTY, MAP_PATH_PROPERTY, SAX_CLASS_PROPERTY, WATCHDOG_IDLE_DEFAULT, WATCHDOG_IDLE_PROPERTY, XML_PATH_PROPERTY, XMLRPC_PORT_PROPERTY, XSL_PATH_PROPERTY |
Constructor Summary |
ToNewsMLFilter(org.apache.commons.collections.ExtendedProperties config)
ToNewsMLFilter constructor stores the config so
we can get at connection details later |
Method Summary |
org.apache.commons.collections.ExtendedProperties |
getConfig()
Get the value of config. |
private java.lang.String |
getSaxClass()
|
java.lang.Object |
processDocument(java.lang.Object d)
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. |
void |
setConfig(org.apache.commons.collections.ExtendedProperties v)
Set the value of config. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
cat
static org.apache.log4j.Category cat
- Set up a reporting category in Log4J
dump
static org.apache.log4j.Category dump
config
private org.apache.commons.collections.ExtendedProperties config
ToNewsMLFilter
public ToNewsMLFilter(org.apache.commons.collections.ExtendedProperties config)
ToNewsMLFilter
constructor stores the config so
we can get at connection details later
- Parameters:
config
- an ExtendedProperties
value
getConfig
public org.apache.commons.collections.ExtendedProperties getConfig()
- Get the value of config.
- Returns:
- ExtendedProperties value of config.
setConfig
public void setConfig(org.apache.commons.collections.ExtendedProperties v)
- Set the value of config.
- Parameters:
v
- Value to assign to config.
getSaxClass
private java.lang.String getSaxClass()
processDocument
public java.lang.Object processDocument(java.lang.Object d)
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. If any
of the inserts fail, the transaction is rolled back and the
document ignored.
- Specified by:
processDocument
in interface DocHandler
- Parameters:
doc
- any Object
where the string form is XML