|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.connectivity.framework.crawler.web.configuration.Configuration
public class Configuration
Class that handles all crawler configuration.
| Field Summary | |
|---|---|
static int |
MILLIS_PER_SECOND
The Constant MILLIS_PER_SECOND. |
| Constructor Summary | |
|---|---|
Configuration()
Creates a new Configuration with the default properties loaded from the properties file. |
|
Configuration(java.util.Properties defaultProperties)
Instantiates a new configuration. |
|
| Method Summary | |
|---|---|
java.lang.String |
get(java.lang.String key)
Returns a String property with the given key. |
java.lang.String |
get(java.lang.String key,
java.lang.String defaultValue)
Returns a String property with the given key or given defaultValue if property with such key wasn't found. |
Authentication |
getAuthentication()
Returns Authentication options for this crawl job. |
boolean |
getBoolean(java.lang.String key)
Returns a boolean property with the given key. |
boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
Returns a boolean property with the given key or given defaultValue if property with such key wasn't found. |
WorkTypeFiltersCollection |
getContentTypeFilters()
Returns content-type filters for this crawl job. |
CrawlScopeFilter |
getCrawlScopeFilter()
Returns CrawlScopeFilter for this crawl job. |
FollowLinksType |
getFollowLinks()
Returns a value of follow links policy. |
int |
getInt(java.lang.String key)
Returns a integer property with the given key. |
WorkTypeFiltersCollection |
getMetaTagFilters()
Returns metatag filters for this crawl job. |
java.lang.Object |
getObject(java.lang.String name)
Returns the value of the name property, or null if no such property exists. |
java.util.Set<Outlink> |
getSeeds()
Returns the set of seeds for this crawl job. |
WorkTypeFiltersCollection |
getUrlFilters()
Returns a set of URL filters for this crawl job. |
void |
loadConfiguration(WebSite webSite)
Create a crawler configuration. |
void |
setContentTypeFilters(WorkTypeFiltersCollection filters)
Assigns content-type filters for this crawl job. |
void |
setCrawlScopeFilter(CrawlScopeFilter scopeFilter)
Assigns CrawlScopeFilter for this crawl job. |
void |
setFollowLinks(FollowLinksType links)
Assigns a value for follow links policy. |
void |
setMetaTagFilters(WorkTypeFiltersCollection tagFilters)
Assigns meta tag filters for this crawl job. |
void |
setObject(java.lang.String name,
java.lang.Object value)
Sets the value of the name property. |
void |
setUrlFilters(WorkTypeFiltersCollection filters)
Assigns URL filters for this crawl job. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MILLIS_PER_SECOND
| Constructor Detail |
|---|
public Configuration()
throws java.io.IOException
java.io.IOException - if there was a problem while loading default configuration file.public Configuration(java.util.Properties defaultProperties)
defaultProperties - the default properties| Method Detail |
|---|
public void loadConfiguration(WebSite webSite)
throws java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
webSite - is the DWebSite whose parameters must override default configuration parameters.
java.lang.IllegalAccessException - .
java.lang.reflect.InvocationTargetException - .public java.lang.String get(java.lang.String key)
key - a property key
public java.lang.String get(java.lang.String key,
java.lang.String defaultValue)
key - a property keydefaultValue - default value to return if property wasn't set
public int getInt(java.lang.String key)
key - a property key
public boolean getBoolean(java.lang.String key)
key - a property key
public boolean getBoolean(java.lang.String key,
boolean defaultValue)
key - a property keydefaultValue - default value to return if property wasn't set
public java.lang.Object getObject(java.lang.String name)
name property, or null if no such property exists.
name - object name
public void setObject(java.lang.String name,
java.lang.Object value)
name property.
name - object namevalue - given objectpublic WorkTypeFiltersCollection getUrlFilters()
WorkTypeFiltersCollectionpublic void setUrlFilters(WorkTypeFiltersCollection filters)
filters - WorkTypeFiltersCollectionpublic FollowLinksType getFollowLinks()
FollowLinksTypepublic void setFollowLinks(FollowLinksType links)
links - FollowLinksTypepublic java.util.Set<Outlink> getSeeds()
Outlinkspublic CrawlScopeFilter getCrawlScopeFilter()
CrawlScopeFilter for this crawl job.
CrawlScopeFilterpublic void setCrawlScopeFilter(CrawlScopeFilter scopeFilter)
CrawlScopeFilter for this crawl job.
scopeFilter - CrawlScopeFilterpublic WorkTypeFiltersCollection getMetaTagFilters()
WorkTypeFiltersCollection meta tag filterspublic void setMetaTagFilters(WorkTypeFiltersCollection tagFilters)
tagFilters - WorkTypeFiltersCollection meta tag filterspublic WorkTypeFiltersCollection getContentTypeFilters()
WorkTypeFiltersCollection meta tag filterspublic void setContentTypeFilters(WorkTypeFiltersCollection filters)
filters - WorkTypeFiltersCollection meta tag filterspublic Authentication getAuthentication()
Authentication options for this crawl job.
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||