Method Summary |
|
protected static Object | StringToType(String stringValue, String typeName) Convert a String object to an object of typeName .
Parameters: stringValue - string to convert. Parameters: typeName - type to convert to. |
public void | cleanup() |
public void | clearPerHostSettingsCache() Clear any per-host settings cached in memory; allows editting of
per-host settings files on disk, perhaps in bulk/automated fashion,
to take effect in running crawl. |
public void | deleteSettingsObject(CrawlerSettings settings) Delete a settings object from persistent storage. |
boolean | fireValueErrorHandlers(Constraint.FailedCheck error) Fire events on all registered
ValueErrorHandler .
Parameters: error - the failed constraints return value. |
protected static String | getClassName(String typeName) |
public ComplexType | getComplexTypeByAbsoluteName(CrawlerSettings settings, String absoluteName) Get a complex type by its absolute name.
The absolute name is the complex types name and the path leading to
it.
Parameters: settings - the settings object to query. Parameters: absoluteName - the absolute name of the complex type to get. |
abstract public Collection | getDomainOverrides(String rootDomain) Will return a Collection of strings with domains that contain 'per'
domain overrides (or their subdomains contain them). |
abstract public List | getListOfAllFiles() Creates and returns a List of all files comprising the current
settings framework. |
public ModuleType | getModule(String name) Get a module by name.
All modules in the order should have unique names. |
public CrawlerSettings | getOrCreateSettingsObject(String scope) Get or create CrawlerSettings object for a host or domain.
This method is similar to
SettingsHandler.getSettingsObject(String) except that
if there is no settings for this particular host or domain a new settings
object will be returned.
Parameters: scope - the host or domain to get or create the settings for. |
public CrawlerSettings | getOrCreateSettingsObject(String scope, String refinement) |
public CrawlOrder | getOrder() Get the CrawlOrder. |
protected String | getParentScope(String scope) Strip off the leftmost part of a domain name.
Parameters: scope - the domain name. |
abstract public File | getPathRelativeToWorkingDirectory(String path) Transforms a relative path so that it is relative to a location that is
regarded as a working dir for these settings. |
public CrawlerSettings | getSettings(String host) Get CrawlerSettings object in effect for a host or domain.
If there is no specific settings for the host/domain, it will recursively
go up the hierarchy to find the settings object that should be used for
this host/domain.
Parameters: host - the host or domain to get the settings for. |
public CrawlerSettings | getSettings(String host, UURI uuri) Get CrawlerSettings object in effect for a host or domain.
If there is no specific settings for the host/domain, it will recursively
go up the hierarchy to find the settings object that should be used for
this host/domain.
This method passes around a URI that refinement are checked against.
Parameters: host - the host or domain to get the settings for. Parameters: uuri - UURI for context. |
protected CrawlerSettings | getSettingsForHost(String host) |
public CrawlerSettings | getSettingsObject(String scope) Get CrawlerSettings object for a host or domain.
The difference between this method and the
getSettings(String host) is that this method will return
null if there is no settings for particular host or domain.
Parameters: scope - the host or domain to get the settings for. |
public CrawlerSettings | getSettingsObject(String scope, String refinement) Get CrawlerSettings object for a host/domain and a particular refinement.
Parameters: scope - the host or domain to get the settings for. Parameters: refinement - the refinement reference to get. |
protected static String | getTypeName(String className) |
public void | initialize() Initialize the SettingsHandler. |
public static ModuleType | instantiateModuleTypeFromClassName(String name, String className) Instatiate a new ModuleType given its name and className.
Parameters: name - the name for the new ComplexType. Parameters: className - the class name of the new ComplexType. |
abstract protected CrawlerSettings | readSettingsObject(CrawlerSettings settings) Read the CrawlerSettings object from persistent storage.
Parameters: settings - the settings object to be updated with data from thepersistent storage. |
public void | registerValueErrorHandler(ValueErrorHandler errorHandler) Register an instance of
ValueErrorHandler . |
public void | setErrorReportingLevel(Level level) Set the level for which notification of failed constraints will be fired. |
public void | unregisterValueErrorHandler(ValueErrorHandler errorHandler) Unregister an instance of
ValueErrorHandler . |
abstract public void | writeSettingsObject(CrawlerSettings settings) Write the CrawlerSettings object to persistent storage. |