public interface TwoStepsExecutingExtractionComponent extends ExtractionComponent
ExtractionComponent whose execution sometimes needs to be done in two times 
 (in order to avoid calling execute n times  for performance reasons):
 computeFirstLevelResults(ExtractionExecutionContext) for returning all the first level content results;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.execute n times,
 computeFirstLevelResults is called one time 
 and executeFor is called n times with a different handler and iterable.
 execute is equivalent to successively call computeFirstLevelResults and then executeFor with that result.| Modifier and Type | Method and Description | 
|---|---|
Iterable<Content> | 
computeFirstLevelResults(ExtractionExecutionContext context)
Computes first level results for preparing multiple extraction executions 
 | 
default void | 
execute(ContentHandler contentHandler,
       ExtractionExecutionContext context)
Execute the extraction of the component 
 | 
void | 
executeFor(ContentHandler contentHandler,
          Iterable<Content> subsetResults,
          ExtractionExecutionContext context)
Execute the extraction of the component for the given first level results 
 | 
addSubComponent, getComponentDetailsForTree, getContentTypes, getSubComponents, prepareComponentExecutionIterable<Content> computeFirstLevelResults(ExtractionExecutionContext context) throws Exception
context - context of the extraction componentException - if an error occursvoid executeFor(ContentHandler contentHandler, Iterable<Content> subsetResults, ExtractionExecutionContext context) throws Exception
contentHandler - result documentsubsetResults - A subset of the first level content results previously returned by computeFirstLevelResults(ExtractionExecutionContext)context - context of the extraction componentException - if an error occursdefault void execute(ContentHandler contentHandler, ExtractionExecutionContext context) throws Exception
ExtractionComponentexecute in interface ExtractionComponentcontentHandler - result documentcontext - context of the extraction componentException - if an error occurs