Class AggregateBuilder

java.lang.Object
org.apache.uima.fit.factory.AggregateBuilder

public class AggregateBuilder extends Object
This builder makes it easier to create an aggregate analysis engine. A typical use-case would involve initializing this builder with your preferred type system and type priorities (the latter may be null). This is followed by adding analysis engine descriptions one at a time until done. This makes it easy to have runtime decisions determine how the aggregate engine should be built. Finally, one of the create methods are called and an AnalysisEngine or AnalysisEngineDescription is returned.

This is an example taken from our test cases:

 
 import static org.apache.uima.fit.factory.AnalysisEngineFactory.createPrimitiveDescription;
 
 AggregateBuilder builder = new AggregateBuilder();
 builder.add(createPrimitiveDescription(Annotator1.class, typeSystemDescription),
     ViewNames.PARENTHESES_VIEW, "A");
 builder.add(createPrimitiveDescription(Annotator2.class, typeSystemDescription),
     ViewNames.SORTED_VIEW, "B",
     ViewNames.SORTED_PARENTHESES_VIEW, "C",
     ViewNames.PARENTHESES_VIEW, "A");
 builder.add(createPrimitiveDescription(Annotator3.class, typeSystemDescription),
     ViewNames.INITIAL_VIEW, "B");
 AnalysisEngine aggregateEngine = builder.createAggregate();