Package com.crawljax.core
Interface ExtractorManager
-
- All Known Implementing Classes:
CandidateElementManager
public interface ExtractorManagerThis interface denotes all the operations a CandidateExtractor can execute.- Author:
- Stefan Lenselink <S.R.Lenselink@student.tudelft.nl>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancheckCrawlCondition(EmbeddedBrowser browser)Check if one or more CrawlConditions matches the current state in the browser.EventableConditionCheckergetEventableConditionChecker()Retrieve the eventable condition checker.voidincreaseElementsCounter()increase the number of checked elements, as a statistics measure to know how many elements were actually examined.booleanisChecked(String element)Check if a given element is already checked, preventing duplicate work.booleanmarkChecked(CandidateElement candidateElement)Mark a given element as checked to prevent duplicate work.intnumberOfExaminedElements()Return internal counter for the examined elements.
-
-
-
Method Detail
-
isChecked
boolean isChecked(String element)
Check if a given element is already checked, preventing duplicate work.- Parameters:
element- the to search for if its already checked- Returns:
- true if the element is already checked
-
markChecked
boolean markChecked(CandidateElement candidateElement)
Mark a given element as checked to prevent duplicate work. A elements is only added when it is not already in the set of checked elements.- Parameters:
candidateElement- the element that is checked- Returns:
- true if !contains(candidateElement.uniqueString)
-
increaseElementsCounter
void increaseElementsCounter()
increase the number of checked elements, as a statistics measure to know how many elements were actually examined.
-
numberOfExaminedElements
int numberOfExaminedElements()
Return internal counter for the examined elements.- Returns:
- the number of ExaminedElements
-
getEventableConditionChecker
EventableConditionChecker getEventableConditionChecker()
Retrieve the eventable condition checker.- Returns:
- the eventableConditionChecker that should be used during the candidate extraction.
-
checkCrawlCondition
boolean checkCrawlCondition(EmbeddedBrowser browser)
Check if one or more CrawlConditions matches the current state in the browser.- Parameters:
browser- the browser to execute in the CrawlConditions.- Returns:
- true if one or more CrawlConditions stratifies or non is specified.
-
-