public class CandidateElementManager extends Object implements ExtractorManager
| Constructor and Description |
|---|
CandidateElementManager(EventableConditionChecker eventableConditionChecker,
ConditionTypeChecker<CrawlCondition> crawlConditionChecker)
Create a new CandidateElementManager.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkCrawlCondition(EmbeddedBrowser browser)
Check if one or more CrawlConditions matches the current state in the browser.
|
EventableConditionChecker |
getEventableConditionChecker()
Retrieve the eventable condition checker.
|
void |
increaseElementsCounter()
increase the number of checked elements, as a statistics measure to know how many elements
were actually examined.
|
boolean |
isChecked(String element)
Check if a given element is already checked, preventing duplicate work.
|
boolean |
markChecked(CandidateElement element)
Mark a given element as checked to prevent duplicate work.
|
int |
numberOfExaminedElements()
Return internal counter for the examined elements.
|
@Inject public CandidateElementManager(EventableConditionChecker eventableConditionChecker, ConditionTypeChecker<CrawlCondition> crawlConditionChecker)
eventableConditionChecker - the EventableConditionChecker to usecrawlConditionChecker - the CrawlConditionChecker to usepublic void increaseElementsCounter()
increaseElementsCounter in interface ExtractorManagerAtomicIntegerpublic boolean isChecked(String element)
isChecked in interface ExtractorManagerelement - the to search for if its already checkedpublic boolean markChecked(CandidateElement element)
markChecked in interface ExtractorManagerelement - the element that is checkedpublic int numberOfExaminedElements()
numberOfExaminedElements in interface ExtractorManagerpublic EventableConditionChecker getEventableConditionChecker()
ExtractorManagergetEventableConditionChecker in interface ExtractorManagerpublic boolean checkCrawlCondition(EmbeddedBrowser browser)
checkCrawlCondition in interface ExtractorManagerbrowser - the browser to execute in the CrawlConditions.Copyright © 2007-2013. All Rights Reserved.