Class AggregateAnalysisEngine_impl

    • Constructor Detail

      • AggregateAnalysisEngine_impl

        public AggregateAnalysisEngine_impl()
    • Method Detail

      • initialize

        public boolean initialize​(ResourceSpecifier aSpecifier,
                                  Map<String,​Object> aAdditionalParams)
                           throws ResourceInitializationException
        Description copied from interface: Resource
        Initializes this Resource from a ResourceSpecifier. Applications do not need to call this method. It is called automatically by the ResourceFactory and cannot be called a second time.
        Specified by:
        initialize in interface AnalysisEngine
        Specified by:
        initialize in interface Resource
        Overrides:
        initialize in class AnalysisEngineImplBase
        Parameters:
        aSpecifier - specifies how to create a resource or locate an existing resource service.
        aAdditionalParams - a Map containing additional parameters. May be null if there are no parameters. Each class that implements this interface can decide what additional parameters it supports.
        Returns:
        true if and only if initialization completed successfully. Reutrns false if the given ResourceSpecifier is not of an appropriate type for this Resource. If the ResourceSpecifier is of an appropriate type but is invalid or if some other failure occurs, an exception should be thrown.
        Throws:
        ResourceInitializationException - if a failure occurs during initialization.
        See Also:
        Resource.initialize(ResourceSpecifier, Map)
      • setResultSpecification

        public void setResultSpecification​(ResultSpecification aResultSpec)
        Description copied from interface: AnalysisEngine
        Sets the list of output types and features that the application wants this AnalysisEngine to produce. This is only a guideline. Annotators may use this information to avoid doing unnecessary work, but they are not required to do so.
        Specified by:
        setResultSpecification in interface AnalysisEngine
        Overrides:
        setResultSpecification in class AnalysisEngineImplBase
        Parameters:
        aResultSpec - specifies the list of output types and features that the application is interested in.
      • collectionProcessComplete

        public void collectionProcessComplete()
                                       throws AnalysisEngineProcessException
        Description copied from interface: AnalysisEngine
        Notifies this AnalysisEngine that processing of an entire collection has completed. It is up to the caller to determine when this has occurred. Components (particularly CAS Consumers) inside this Analysis Engine may respond to this event, for example by writing data to the disk.

        If this AnalysisEngine is an aggregate, this method will call the collectionProcessComplete method of all components of that aggregate. If the aggregate descriptor declares a fixedFlow or capabilityLanguageFlow, then the components' collectionProcessComplete methods will be called in the order specified by that flow element. Once all components in the flow have been called, any components not declared in the flow will be called, in arbitrary order. If there is no fixedFlow or capabilityLanguageFlow, then all components in the aggregate will be called in arbitrary order.

        Specified by:
        collectionProcessComplete in interface AnalysisEngine
        Overrides:
        collectionProcessComplete in class AnalysisEngineImplBase
        Throws:
        AnalysisEngineProcessException - if an exception occurs during processing
      • initializeAggregateAnalysisEngine

        protected void initializeAggregateAnalysisEngine​(AnalysisEngineDescription aDescription,
                                                         Map<String,​Object> aAdditionalParams)
                                                  throws ResourceInitializationException
        A utility method that performs initialization logic for a aggregate AnalysisEngine.
        Parameters:
        aDescription - the AnalysisEngine description for this AnalysisEngine
        aAdditionalParams - additional parameters that were passed to this AnalysisEngine's initialize method.
        Throws:
        ResourceInitializationException - if an initialization failure occurs
      • initASB

        protected void initASB​(AnalysisEngineDescription aAnalysisEngineDescription,
                               Map<String,​Object> aAdditionalParams)
                        throws ResourceInitializationException
        A utility method that creates and configures the ASB component. The ASB will create and initialize the delegate AnalysisEngines. This method also retrieves delegate AnalysisEngine metadata from the ASB and provides access to that method via the _getComponentMetaData() method.
        Parameters:
        aAnalysisEngineDescription - the AnalysisEngine description for this AnalysisEngine
        aAdditionalParams - parameters that will be passed to the ASB's initialize method.
        Throws:
        ResourceInitializationException - if the ASB or a delegate AnalysisEngine could not be created.
      • processDelegateAnalysisEngineMetaData

        protected void processDelegateAnalysisEngineMetaData()
                                                      throws ResourceInitializationException
        Does processing using the delegate AnalysisEngine metadata once it becomes available.

        Specifically, sets this aggregate AE's Type System, Type Priorities, and FS Index Descriptions equal to the result of merging the information from its delegate AEs.

        Throws:
        ResourceInitializationException - if an error occurs
      • validateOperationalProperties

        protected void validateOperationalProperties()
                                              throws ResourceInitializationException
        Checks operational properties in an aggregate to ensure they are not inconsistent with operational properties of the components. For example, an aggregate cannot have multipleDeploymentAlloiwed == true if it contains a component with multipleDeploymentAllowed == false.
        Throws:
        ResourceInitializationException - if there is an invalid parameter override declaration
      • getDefaultFlowControllerDeclaration

        protected FlowControllerDeclaration getDefaultFlowControllerDeclaration()
        Returns:
        the default FlowController declaration to be used if the aggregate AE descriptor does not specify one.
      • _getASB

        protected ASB _getASB()
        For an aggregate AnalysisEngine only, gets the ASB component.
        Returns:
        the ASB
      • _getComponentMetaData

        protected Map<String,​ProcessingResourceMetaData> _getComponentMetaData()
        For an aggregate AnalysisEngine only, gets a Map from each component's key to ProcessingResourceMetaData for that component. This includes component AEs as well as the FlowController.
        Returns:
        a Map from String keys to ProcessingResourceMetaData objects.
      • _getComponentCasProcessorSpecifierMap

        protected Map<String,​ResourceSpecifier> _getComponentCasProcessorSpecifierMap()
        For an aggregate AnalysisEngine only, gets a Map from each component's key to the specifier for that component.
        Returns:
        a Map with String keys and ResourceSpecifier values
      • buildProcessTraceFromMBeanStats

        protected void buildProcessTraceFromMBeanStats​(ProcessTrace trace)
        Construct a ProcessTrace object that represents the last execution of this AnalysisEngine. This is used so that we can return a ProcessTrace object from each process() call for backwards compatibility with version 1.x.
        Overrides:
        buildProcessTraceFromMBeanStats in class AnalysisEngineImplBase
        Parameters:
        trace - -