|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.archive.crawler.settings.CrawlerSettings
public class CrawlerSettings
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).
Constructor Summary | |
---|---|
CrawlerSettings(SettingsHandler handler,
java.lang.String scope)
Constructs a new CrawlerSettings object. |
|
CrawlerSettings(SettingsHandler handler,
java.lang.String scope,
java.lang.String refinement)
Constructs a new CrawlerSettings object which is a refinement of another settings object. |
Method Summary | |
---|---|
protected DataContainer |
addComplexType(ComplexType type)
|
void |
addRefinement(Refinement refinement)
Add a refinement to this settings object. |
protected void |
addTopLevelModule(ModuleType module)
|
java.lang.String |
getAudience()
Get the audience/customer/recipient of the crawl job product from this CrawlerSettings object. |
protected DataContainer |
getData(ComplexType complex)
|
protected DataContainer |
getData(java.lang.String absoluteName)
|
java.lang.String |
getDescription()
Get the description of this CrawlerSettings object. |
java.util.Date |
getLastSavedTime()
Get the time when this CrawlerSettings was last saved to persistent storage. |
ModuleType |
getModule(java.lang.String name)
|
java.lang.String |
getName()
Get the name of this CrawlerSettings object. |
java.lang.String |
getOperator()
Get the name of operator of this crawl from this CrawlerSettings object. |
java.lang.String |
getOrganization()
Get the name of the organization running this crawl from this CrawlerSettings object. |
CrawlerSettings |
getParent()
Get the parent of this CrawlerSettings object. |
CrawlerSettings |
getParent(UURI uri)
Get the parent of this CrawlerSettings object. |
Refinement |
getRefinement(java.lang.String reference)
Get a refinement with a given reference. |
java.lang.String |
getScope()
Get the scope of this CrawlerSettings object. |
SettingsHandler |
getSettingsHandler()
Get the SettingHandler this CrawlerSettings object belongs to. |
protected ModuleType |
getTopLevelModule(java.lang.String name)
|
boolean |
hasRefinements()
Returns true if this settings object has refinements attached to it. |
boolean |
isRefinement()
Returns true if this settings object is a refinement. |
java.util.ListIterator |
refinementsIterator()
Get an ListIterator over the refinements for this
settings object. |
boolean |
removeRefinement(java.lang.String reference)
Remove a refinement from this settings object. |
void |
setAudience(java.lang.String name)
Set the recipient/customer for the crawl job product. |
void |
setDescription(java.lang.String string)
Set the description of this CrawlerSettings object. |
protected void |
setLastSavedTime(java.util.Date lastSaved)
Set the time when this CrawlerSettings was last saved to persistent storage. |
void |
setName(java.lang.String string)
Set the name of this CrawlerSettings object. |
void |
setOperator(java.lang.String name)
Set the operator of this crawl job. |
void |
setOrganization(java.lang.String name)
Set the name of the organization who is running this crawl. |
void |
setRefinement(boolean isRefinement)
Mark this settings object as an refinement. |
protected java.util.Iterator |
topLevelModules()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CrawlerSettings(SettingsHandler handler, java.lang.String scope)
handler
- The SettingsHandler this object belongs to.scope
- The scope of this settings object (ie. host or domain).SettingsHandler.getSettings(String)
,
SettingsHandler.getSettingsObject(String)
public CrawlerSettings(SettingsHandler handler, java.lang.String scope, java.lang.String refinement)
handler
- The SettingsHandler this object belongs to.scope
- The scope of this settings object (ie. host or domain).refinement
- the name or reference to the refinement.SettingsHandler.getSettings(String)
,
SettingsHandler.getSettingsObject(String)
Method Detail |
---|
public java.lang.String getDescription()
public java.lang.String getName()
public java.lang.String getOperator()
public java.lang.String getOrganization()
public java.lang.String getAudience()
public java.lang.String getScope()
public void setDescription(java.lang.String string)
string
- the description to be set for this CrawlerSettings object.public void setOperator(java.lang.String name)
name
- Operator running this crawl.public void setOrganization(java.lang.String name)
name
- Name of organization running this crawl.public void setAudience(java.lang.String name)
name
- Recipient of crawl job product.public void setName(java.lang.String string)
string
- the name to be set for this CrawlerSettings object.public java.util.Date getLastSavedTime()
protected void setLastSavedTime(java.util.Date lastSaved)
lastSaved
- the time when this CrawlerSettings was last saved to
persistent storage.protected void addTopLevelModule(ModuleType module)
protected DataContainer addComplexType(ComplexType type)
protected DataContainer getData(ComplexType complex)
protected DataContainer getData(java.lang.String absoluteName)
protected ModuleType getTopLevelModule(java.lang.String name)
public ModuleType getModule(java.lang.String name)
protected java.util.Iterator topLevelModules()
public CrawlerSettings getParent()
public CrawlerSettings getParent(UURI uri)
uri
- The uri for which parents of this object shoul be found.
public SettingsHandler getSettingsHandler()
public java.util.ListIterator refinementsIterator()
ListIterator
over the refinements for this
settings object.
public void addRefinement(Refinement refinement)
refinement
- The refinements to set.public boolean removeRefinement(java.lang.String reference)
reference
- the reference (name) to the refinement to be removed.
public Refinement getRefinement(java.lang.String reference)
reference
- the reference (name) to the refinement to get.
public boolean hasRefinements()
public boolean isRefinement()
public void setRefinement(boolean isRefinement)
isRefinement
- Set this to true if this settings object is a
refinement.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |