|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.clapper.curn.plugins.AbstractXMLEditPlugIn
org.clapper.curn.plugins.CommonXMLFixupsPlugIn
public class CommonXMLFixupsPlugIn
The CommonXMLFixupsPlugIn attempts to fix some common errors in the downloaded, pre-parsed XML in any feed for which it is enabled. There is some XML badness that is surprisingly common across feeds, including (but not limited to):
This plug-in attempts to fix those problems.
This plug-in intercepts the following configuration parameters:
| Section | Parameter | Legal Values | Meaning |
|---|---|---|---|
| [curn] | CommonXMLFixups | true, false | The global setting, which can be used to enable or disable this plug-in for all feeds (though the plug-in can still be disabled or enabled on a per-feed basis). If not specified, this parameter defaults to false. |
| [Feedxxx] | CommonXMLFixups | true, false | Enables or disables this plug-in for a specific feed. If not specified, this parameter defaults to the global setting. |
| Constructor Summary | |
|---|---|
CommonXMLFixupsPlugIn()
Default constructor (required). |
|
| Method Summary | |
|---|---|
protected org.clapper.util.logging.Logger |
getLogger()
Get the Logger object created for this object. |
java.lang.String |
getPlugInName()
Get a displayable name for the plug-in. |
java.lang.String |
getPlugInSortKey()
Get the sort key for this plug-in. |
void |
initPlugIn()
Initialize the plug-in. |
boolean |
runFeedConfigItemPlugIn(java.lang.String sectionName,
java.lang.String paramName,
CurnConfig config,
FeedInfo feedInfo)
Called immediately after curn has read and processed a configuration item in a "feed" configuration section. |
void |
runMainConfigItemPlugIn(java.lang.String sectionName,
java.lang.String paramName,
CurnConfig config)
Called immediately after curn has read and processed a configuration item in the main [curn] configuration section. |
boolean |
runPostFeedDownloadPlugIn(FeedInfo feedInfo,
java.io.File feedDataFile,
java.lang.String encoding)
Called immediately after a feed is downloaded. |
| Methods inherited from class org.clapper.curn.plugins.AbstractXMLEditPlugIn |
|---|
editXML |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommonXMLFixupsPlugIn()
| Method Detail |
|---|
public java.lang.String getPlugInName()
getPlugInName in interface PlugInpublic java.lang.String getPlugInSortKey()
getPlugInSortKey in interface PlugIn
public void initPlugIn()
throws CurnException
initPlugIn in interface PlugInCurnException - on error
public void runMainConfigItemPlugIn(java.lang.String sectionName,
java.lang.String paramName,
CurnConfig config)
throws CurnException
runMainConfigItemPlugIn in interface MainConfigItemPlugInsectionName - the name of the configuration section where
the item was foundparamName - the name of the parameterconfig - the CurnConfig object
CurnException - on errorCurnConfig
public boolean runFeedConfigItemPlugIn(java.lang.String sectionName,
java.lang.String paramName,
CurnConfig config,
FeedInfo feedInfo)
throws CurnException
runFeedConfigItemPlugIn in interface FeedConfigItemPlugInsectionName - the name of the configuration section where
the item was foundparamName - the name of the parameterconfig - the active configurationfeedInfo - partially complete FeedInfo object
for the feed. The URL is guaranteed to be
present, but no other fields are.
CurnException - on errorCurnConfig,
FeedInfo,
FeedInfo.getURL()
public boolean runPostFeedDownloadPlugIn(FeedInfo feedInfo,
java.io.File feedDataFile,
java.lang.String encoding)
throws CurnException
runPostFeedDownloadPlugIn in interface PostFeedDownloadPlugInfeedInfo - the FeedInfo object for the feed that
has been downloadedfeedDataFile - the file containing the downloaded, unparsed feed
XML. curn may delete this file after all
plug-ins are notified!encoding - the encoding used to store the data in the file,
or null for the default
CurnException - on errorFeedInfoprotected org.clapper.util.logging.Logger getLogger()
AbstractXMLEditPlugIn
getLogger in class AbstractXMLEditPlugIn
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||