Package org.archive.modules.deciderules
Class TooManyPathSegmentsDecideRule
java.lang.Object
org.archive.modules.deciderules.DecideRule
org.archive.modules.deciderules.PredicatedDecideRule
org.archive.modules.deciderules.TooManyPathSegmentsDecideRule
- All Implemented Interfaces:
Serializable
,org.archive.spring.HasKeyedProperties
public class TooManyPathSegmentsDecideRule extends PredicatedDecideRule
Rule REJECTs any CrawlURIs whose total number of path-segments (as
indicated by the count of '/' characters not including the first '//')
is over a given threshold.
- Author:
- gojomo
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class org.archive.modules.deciderules.DecideRule
comment, kp
-
Constructor Summary
Constructors Constructor Description TooManyPathSegmentsDecideRule()
Usual constructor. -
Method Summary
Modifier and Type Method Description protected boolean
evaluate(CrawlURI curi)
Evaluate whether given object is over the threshold number of path-segments.int
getMaxPathDepth()
void
setMaxPathDepth(int maxPathDepth)
Methods inherited from class org.archive.modules.deciderules.PredicatedDecideRule
getDecision, innerDecide, onlyDecision, setDecision
Methods inherited from class org.archive.modules.deciderules.DecideRule
accepts, decisionFor, getComment, getEnabled, getKeyedProperties, setComment, setEnabled
-
Constructor Details
-
TooManyPathSegmentsDecideRule
public TooManyPathSegmentsDecideRule()Usual constructor.
-
-
Method Details
-
getMaxPathDepth
public int getMaxPathDepth() -
setMaxPathDepth
public void setMaxPathDepth(int maxPathDepth) -
evaluate
Evaluate whether given object is over the threshold number of path-segments.- Specified by:
evaluate
in classPredicatedDecideRule
- Parameters:
curi
-- Returns:
- true if the path-segments is exceeded
-