Class EventableConditionChecker
- java.lang.Object
-
- com.crawljax.condition.eventablecondition.EventableConditionChecker
-
public class EventableConditionChecker extends Object
Check whether the conditions of an eventable are satisfied.
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.ImmutableList<EventableCondition>eventableConditionsprivate static org.slf4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description EventableConditionChecker(CrawlRules config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckXpathStartsWithXpathEventableCondition(Document dom, EventableCondition eventableCondition, String xpath)Checks whether an XPath expression starts with an XPath eventable condition.booleancheckXPathUnderXPaths(String xpath, List<String> xpathsList)EventableConditiongetEventableCondition(String id)
-
-
-
Field Detail
-
LOG
private static final org.slf4j.Logger LOG
-
eventableConditions
private final com.google.common.collect.ImmutableList<EventableCondition> eventableConditions
-
-
Constructor Detail
-
EventableConditionChecker
@Inject public EventableConditionChecker(CrawlRules config)
-
-
Method Detail
-
getEventableCondition
public EventableCondition getEventableCondition(String id)
- Parameters:
id- Identifier of theEventableCondition.- Returns:
- EventableCondition or
null
-
checkXpathStartsWithXpathEventableCondition
public boolean checkXpathStartsWithXpathEventableCondition(Document dom, EventableCondition eventableCondition, String xpath) throws XPathExpressionException
Checks whether an XPath expression starts with an XPath eventable condition.- Parameters:
dom- The DOM String.eventableCondition- The eventable condition.xpath- The XPath.- Returns:
- boolean whether xpath starts with xpath location of eventable condition xpath condition
- Throws:
XPathExpressionExceptionCrawljaxException- when eventableCondition is null or its inXPath has not been set
-
-