Class representing a settings file.
More precisely it represents a collection of settings valid in a particular
scope. The scope is either the global settings, or the settings to be used
for a particular domain or host. For scopes other than global, the instance
will only contain those settings that are different from the global.
In the default implementation this is a one to one mapping from a file to
an instance of this class, but in other implementations the information in
an instance of this class might be stored in a different way (for example
in a RDBMS).
author: John Erik Halse
Constructor Summary
public
CrawlerSettings(SettingsHandler handler, String scope) Constructs a new CrawlerSettings object.
Application code should not call the constructor directly, but use the
methods in SettingsHandler instead.
Parameters: handler - The SettingsHandler this object belongs to. Parameters: scope - The scope of this settings object (ie.
public
CrawlerSettings(SettingsHandler handler, String scope, String refinement) Constructs a new CrawlerSettings object which is a refinement of another
settings object.
Application code should not call the constructor directly, but use the
methods in SettingsHandler instead.
Parameters: handler - The SettingsHandler this object belongs to. Parameters: scope - The scope of this settings object (ie.
getLastSavedTime() Get the time when this CrawlerSettings was last saved to persistent
storage.
the time when this CrawlerSettings was last saved to persistentstorage.
getParent(UURI uri) Get the parent of this CrawlerSettings object.
This method passes around a URI so that refinements could be checked.
Parameters: uri - The uri for which parents of this object shoul be found.
refinementsIterator() Get an ListIterator over the refinements for this
settings object.
public boolean
removeRefinement(String reference) Remove a refinement from this settings object.
Parameters: reference - the reference (name) to the refinement to be removed.
public void
setAudience(String name) Set the recipient/customer for the crawl job product.
public void
setDescription(String string) Set the description of this CrawlerSettings object.
protected void
setLastSavedTime(Date lastSaved) Set the time when this CrawlerSettings was last saved to persistent
storage.
public void
setName(String string) Set the name of this CrawlerSettings object.
Constructs a new CrawlerSettings object.
Application code should not call the constructor directly, but use the
methods in SettingsHandler instead.
Parameters: handler - The SettingsHandler this object belongs to. Parameters: scope - The scope of this settings object (ie. host or domain). See Also:SettingsHandler.getSettings(String) See Also:SettingsHandler.getSettingsObject(String)
Constructs a new CrawlerSettings object which is a refinement of another
settings object.
Application code should not call the constructor directly, but use the
methods in SettingsHandler instead.
Parameters: handler - The SettingsHandler this object belongs to. Parameters: scope - The scope of this settings object (ie. host or domain). Parameters: refinement - the name or reference to the refinement. See Also:SettingsHandler.getSettings(String) See Also:SettingsHandler.getSettingsObject(String)
Get the audience/customer/recipient of the crawl job product from
this CrawlerSettings object.
the audience/customer/recipient of the crawl job product.
Get the time when this CrawlerSettings was last saved to persistent
storage.
the time when this CrawlerSettings was last saved to persistentstorage. Null if it has not been saved.
Get the parent of this CrawlerSettings object.
This method passes around a URI so that refinements could be checked.
Parameters: uri - The uri for which parents of this object shoul be found. the parent of this CrawlerSettings object.
Get a refinement with a given reference.
Parameters: reference - the reference (name) to the refinement to get. the refinement having the specified reference or null if norefinement matches it.
Get an ListIterator over the refinements for this
settings object.
Returns an iterator over the refinements.
removeRefinement
public boolean removeRefinement(String reference)(Code)
Remove a refinement from this settings object.
Parameters: reference - the reference (name) to the refinement to be removed. true if something was removed, false if the refinement was notfound.
Set the time when this CrawlerSettings was last saved to persistent
storage.
Parameters: lastSaved - the time when this CrawlerSettings was last saved topersistent storage.