|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object xsmeral.semnet.crawler.model.HostDescriptor
@XStreamConverter(value=HostDescConverter.class) public class HostDescriptor
The main configuration element of HTMLCrawler
.
Contains:
EntityDescriptor
s
Constructor Summary | |
---|---|
HostDescriptor()
Creates empty source URL map and entity descriptor collection |
|
HostDescriptor(String baseURL,
String name,
String charset,
Integer crawlDelay,
Boolean sourceFirst,
Map<Pattern,Integer> sourceURLPatterns,
Collection<EntityDescriptor> entityDescriptors)
Initializes all fields |
Method Summary | |
---|---|
void |
addEntityDescriptor(EntityDescriptor entityDescriptor)
|
void |
addSourceURLPattern(Pattern pattern,
int updateFreq)
|
boolean |
equals(Object obj)
|
String |
getBaseURL()
Returns base URL of this host - the root level for crawling. |
Integer |
getCrawlDelay()
Returns the crawl delay. |
Collection<EntityDescriptor> |
getEntityDescriptors()
Returns EntityDescriptors which represent entities in this host (pages that will be scraped) |
String |
getCharset()
Returns the (user-defined) charset used by this host. |
String |
getName()
Returns (arbitrary, user-assigned) name of this host. |
Map<Pattern,Integer> |
getSourceURLPatterns()
Returns patterns of source URLs mapped to corresponding update frequencies. |
int |
hashCode()
|
boolean |
isSourceFirst()
Indicates whether source URLs should be crawled first |
void |
setBaseURL(String baseURL)
|
void |
setCrawlDelay(Integer crawlDelay)
|
void |
setEntityDescriptors(Collection<EntityDescriptor> entityDescriptors)
|
void |
setCharset(String charset)
|
void |
setName(String name)
|
void |
setSourceFirst(boolean sourceFirst)
|
void |
setSourceURLPatterns(Map<Pattern,Integer> sourceURLPatterns)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HostDescriptor()
public HostDescriptor(String baseURL, String name, String charset, Integer crawlDelay, Boolean sourceFirst, Map<Pattern,Integer> sourceURLPatterns, Collection<EntityDescriptor> entityDescriptors)
Method Detail |
---|
public String getBaseURL()
public void setBaseURL(String baseURL)
public Collection<EntityDescriptor> getEntityDescriptors()
public void setEntityDescriptors(Collection<EntityDescriptor> entityDescriptors)
public void addEntityDescriptor(EntityDescriptor entityDescriptor)
public String getName()
public void setName(String name)
public Map<Pattern,Integer> getSourceURLPatterns()
public void setSourceURLPatterns(Map<Pattern,Integer> sourceURLPatterns)
public void addSourceURLPattern(Pattern pattern, int updateFreq)
public String getCharset()
public void setCharset(String charset)
public Integer getCrawlDelay()
public void setCrawlDelay(Integer crawlDelay)
public boolean isSourceFirst()
public void setSourceFirst(boolean sourceFirst)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |