Interface TwoStepsExecutingExtractionComponent

All Superinterfaces:
ExtractionComponent
All Known Implementing Classes:
CountExtractionComponent, QueryExtractionComponent

ExtractionComponent whose execution sometimes needs to be done in two times (in order to avoid calling execute n times for performance reasons):
  1. by computeFirstLevelResults(ExtractionExecutionContext) for returning all the first level content results;
  2. by executeFor(ContentHandler, Iterable, ExtractionExecutionContext) for SAXing with the given ContentHandler and the given iterable on contents, subset of the one returned by the first method.
Thus, instead of calling execute n times, computeFirstLevelResults is called one time and executeFor is called n times with a different handler and iterable.

Important: The implementations must ensure that calling execute is equivalent to successively call computeFirstLevelResults and then executeFor with that result.