org.clapper.curn.plugins
Class AbstractXMLEditPlugIn

java.lang.Object
  extended by org.clapper.curn.plugins.AbstractXMLEditPlugIn
Direct Known Subclasses:
CommonXMLFixupsPlugIn, RawFeedEditPlugIn

public abstract class AbstractXMLEditPlugIn
extends java.lang.Object

Useful common base class for plug-ins that perform regular expression-based edits on raw XML.

Version:
$Revision: 6456 $

Constructor Summary
protected AbstractXMLEditPlugIn()
          Default constructor (required).
 
Method Summary
protected  void editXML(FeedInfo feedInfo, java.io.File feedDataFile, java.lang.String encoding, java.util.List<java.lang.String> editCommands)
          Perform an edit on a feed, overwriting the data file at completion.
protected abstract  org.clapper.util.logging.Logger getLogger()
          Get the Logger object created for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractXMLEditPlugIn

protected AbstractXMLEditPlugIn()
Default constructor (required).

Method Detail

getLogger

protected abstract org.clapper.util.logging.Logger getLogger()
Get the Logger object created for this object.

Returns:
the Logger

editXML

protected void editXML(FeedInfo feedInfo,
                       java.io.File feedDataFile,
                       java.lang.String encoding,
                       java.util.List<java.lang.String> editCommands)
                throws CurnException
Perform an edit on a feed, overwriting the data file at completion.

Parameters:
feedInfo - the feed
feedDataFile - the downloaded feed XML
encoding - the encoding to use when reading/writing the XML
editCommands - list of 's///' edit commands, suitable for use with RegexUtil.substitute(java.lang.String, java.lang.String)
Throws:
CurnException - on error


Copyright © 2004-2006 Brian M. Clapper. All Rights Reserved.