Class Robots.Record
- java.lang.Object
-
- org.apache.manifoldcf.crawler.connectors.rss.Robots.Record
-
- Enclosing class:
- Robots
protected static class Robots.Record extends java.lang.ObjectThis class represents a record in a robots.txt file. It contains one or more user-agents, and one or more disallows.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayListallowsprotected java.util.ArrayListdisallowsprotected java.util.ArrayListuserAgents
-
Constructor Summary
Constructors Constructor Description Record()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAgent(java.lang.String agentName)Add a user-agent.voidaddAllow(java.lang.String allowPath)Add an allow.voidaddDisallow(java.lang.String disallowPath)Add a disallow.booleanisAgentMatch(java.lang.String agentNameUpper, boolean exactMatch)See if user-agent matches.booleanisAllowed(java.lang.String path)See if path is allowed.booleanisDisallowed(java.lang.String path)See if path is disallowed.
-
-
-
Method Detail
-
addAgent
public void addAgent(java.lang.String agentName)
Add a user-agent.
-
addDisallow
public void addDisallow(java.lang.String disallowPath)
Add a disallow.
-
addAllow
public void addAllow(java.lang.String allowPath)
Add an allow.
-
isAgentMatch
public boolean isAgentMatch(java.lang.String agentNameUpper, boolean exactMatch)See if user-agent matches.
-
isDisallowed
public boolean isDisallowed(java.lang.String path)
See if path is disallowed. Only called if user-agent has already matched. (This checks if there's an explicit match with one of the Disallows clauses.)
-
isAllowed
public boolean isAllowed(java.lang.String path)
See if path is allowed. Only called if user-agent has already matched. (This checks if there's an explicit match with one of the Allows clauses).
-
-