net.sf.regain.crawler.document
Class PluggableFactory
java.lang.Object
net.sf.regain.crawler.document.PluggableFactory
- Direct Known Subclasses:
- CrawlerPluginFactory, PreparatorFactory
public abstract class PluggableFactory
- extends Object
Loads and initializes the preparators.
- Author:
- Tilman Schneider, STZ-IDA an der FH Karlsruhe
Field Summary |
protected static org.apache.log4j.Logger |
mLog
The logger for this class |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mLog
protected static org.apache.log4j.Logger mLog
- The logger for this class
PluggableFactory
protected PluggableFactory()
createPluggables
public List<Pluggable> createPluggables(PreparatorSettings[] preparatorSettingsArr)
throws RegainException
- Throws:
RegainException
getPluggableDir
protected abstract File getPluggableDir()
throws RegainException
- Throws:
RegainException
pluggableAfterInit
protected abstract void pluggableAfterInit(Pluggable pluggable,
PreparatorSettings preparatorSettings)
throws RegainException
- Throws:
RegainException
loadPreparatorJar
private void loadPreparatorJar(File file,
HashMap<String,Pluggable> preparatorHash,
PreparatorSettings[] preparatorSettingsArr)
throws RegainException
- Loads a preparator jar.
- Parameters:
file
- The preparator jar to load.preparatorHash
- The hash where to add all loaded preparators.preparatorSettingsArr
- The preparator settings. Used to determine
whether a preparator is enabled.
- Throws:
RegainException
- If loading the jar failed.
getDefaultPackage
protected abstract String getDefaultPackage()
getClassNames
protected abstract String[] getClassNames(File pluggableFile,
Attributes attributes)
throws RegainException
- Throws:
RegainException
isPreparatorEnabled
private boolean isPreparatorEnabled(String className,
PreparatorSettings[] preparatorSettingsArr)
- Checks whether a preparator is enabled.
- Parameters:
className
- The class name of the preparator to check.preparatorSettingsArr
- The preparator settings to use to determine
whether a preparator is enabled.
- Returns:
- Whether the preparator is enabled.
Regain 2.1.0-STABLE, Copyright (C) 2004-2010 Til Schneider, www.murfman.de, Thomas Tesche, www.clustersystems.info