|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.droids.norobots.NoRobotClient
public class NoRobotClient
A Client which may be used to decide which urls on a website may be looked at, according to the norobots specification located at: http://www.robotstxt.org/wc/norobots-rfc.html
| Constructor Summary | |
|---|---|
NoRobotClient(ContentLoader contentLoader,
java.lang.String userAgent)
Create a Client for a particular user-agent name and the given ContentLoader. |
|
NoRobotClient(java.lang.String userAgent)
Create a Client for a particular user-agent name. |
|
| Method Summary | |
|---|---|
boolean |
isUrlAllowed(java.net.URI uri)
Decide if the parsed website will allow this URL to be be seen. |
static java.util.Map<java.lang.String,org.apache.droids.norobots.RulesEngine> |
parse(java.io.InputStream instream)
|
void |
parse(java.net.URI baseUri)
Head to a website and suck in their robots.txt file. |
void |
parseText(java.io.InputStream instream)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NoRobotClient(ContentLoader contentLoader,
java.lang.String userAgent)
ContentLoader.
userAgent - name for the robotpublic NoRobotClient(java.lang.String userAgent)
userAgent - name for the robot| Method Detail |
|---|
public void parse(java.net.URI baseUri)
throws java.io.IOException,
NoRobotException
baseUrl - of the site
java.io.IOException
NoRobotException
public void parseText(java.io.InputStream instream)
throws java.io.IOException,
NoRobotException
java.io.IOException
NoRobotException
public static java.util.Map<java.lang.String,org.apache.droids.norobots.RulesEngine> parse(java.io.InputStream instream)
throws java.io.IOException
java.io.IOException
public boolean isUrlAllowed(java.net.URI uri)
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException
url - in question
java.lang.IllegalStateException - when parse has not been called
java.lang.IllegalArgumentException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||