|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.nutch.protocol.http.api.RobotRulesParser.RobotRuleSet
public static class RobotRulesParser.RobotRuleSet
This class holds the rules which were parsed from a robots.txt file, and can test paths against those rules.
| Constructor Summary | |
|---|---|
RobotRulesParser.RobotRuleSet()
|
|
| Method Summary | |
|---|---|
long |
getCrawlDelay()
Get Crawl-Delay, in milliseconds. |
long |
getExpireTime()
Get expire time |
boolean |
isAllowed(String path)
Returns false if the robots.txt file
prohibits us from accessing the given path, or
true otherwise. |
boolean |
isAllowed(URL url)
Returns false if the robots.txt file
prohibits us from accessing the given url, or
true otherwise. |
void |
setCrawlDelay(long crawlDelay)
Set Crawl-Delay, in milliseconds |
void |
setExpireTime(long expireTime)
Change when the ruleset goes stale. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RobotRulesParser.RobotRuleSet()
| Method Detail |
|---|
public void setExpireTime(long expireTime)
public long getExpireTime()
getExpireTime in interface RobotRulespublic long getCrawlDelay()
getCrawlDelay in interface RobotRulespublic void setCrawlDelay(long crawlDelay)
public boolean isAllowed(URL url)
false if the robots.txt file
prohibits us from accessing the given url, or
true otherwise.
isAllowed in interface RobotRulespublic boolean isAllowed(String path)
false if the robots.txt file
prohibits us from accessing the given path, or
true otherwise.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||