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):
 - by 
computeFirstLevelResults(ExtractionExecutionContext)for returning all the first level content results; - by 
executeFor(ContentHandler, Iterable, ExtractionExecutionContext)for SAXing with the givenContentHandlerand 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.
 Important: The implementations must ensure that calling
execute is equivalent to successively call computeFirstLevelResults and then executeFor with that result.- 
Method Summary
Modifier and TypeMethodDescriptionComputes first level results for preparing multiple extraction executionsdefault voidexecute(ContentHandler contentHandler, ExtractionExecutionContext context) Execute the extraction of the componentvoidexecuteFor(ContentHandler contentHandler, Iterable<Content> subsetResults, ExtractionExecutionContext context) Execute the extraction of the component for the given first level resultsMethods inherited from interface org.ametys.plugins.extraction.component.ExtractionComponent
addSubComponent, getComponentDetailsForTree, getContentTypes, getSubComponents, prepareComponentExecution 
- 
Method Details
- 
computeFirstLevelResults
Computes first level results for preparing multiple extraction executions- Parameters:
 context- context of the extraction component- Returns:
 - The first level content results
 - Throws:
 Exception- if an error occurs
 - 
executeFor
void executeFor(ContentHandler contentHandler, Iterable<Content> subsetResults, ExtractionExecutionContext context) throws Exception Execute the extraction of the component for the given first level results- Parameters:
 contentHandler- result documentsubsetResults- A subset of the first level content results previously returned bycomputeFirstLevelResults(ExtractionExecutionContext)context- context of the extraction component- Throws:
 Exception- if an error occurs
 - 
execute
default void execute(ContentHandler contentHandler, ExtractionExecutionContext context) throws Exception Description copied from interface:ExtractionComponentExecute the extraction of the component- Specified by:
 executein interfaceExtractionComponent- Parameters:
 contentHandler- result documentcontext- context of the extraction component- Throws:
 Exception- if an error occurs
 
 -