Interface UimaContextAdmin

    • Method Detail

      • initializeRoot

        void initializeRoot​(Logger aLogger,
                            ResourceManager aResourceManager,
                            ConfigurationManager aConfigurationManager)
        Initializes a root UimaContext.
        Parameters:
        aLogger - the logger that will be returned by this UimaContext's UimaContext.getLogger() method.
        aResourceManager - the ResourceManager that will be used by this UimaContext to locate and access external resource.
        aConfigurationManager - the ConfigurationManager that will be used by this UimaContext to access its configuration parameter settings.
      • createChild

        UimaContextAdmin createChild​(String aContextName,
                                     Map<String,​String> aSofaMappings)
        Creates a UimaContext that is a child of this UimaContext.
        Parameters:
        aContextName - a name for the new context, which must be unique with respect to all children of the parent context.
        aSofaMappings - mappings from child's sofa name to parent's sofa name. May be null.
        Returns:
        the Administrative interface to the UIMA Context
      • setLogger

        void setLogger​(Logger aLogger)
        Sets the Logger for this UimaContext. If this method is not called, the default logger (UIMAFramework.getLogger()) will be used.
        Parameters:
        aLogger - the logger that will be returned by this UimaContext's UimaContext.getLogger() method.
      • setProcessTrace

        void setProcessTrace​(ProcessTrace aProcessTrace)
        Sets the current ProcessTrace object, which will receive trace events generated by the InstrumentationFacility.
        Parameters:
        aProcessTrace - the ProcessTrace object to receive trace events
      • getResourceManager

        ResourceManager getResourceManager()
        Gets the ResourceManager instance used by this UimaContext to resolve external resource accesses.
        Returns:
        the ResourceManager instance for this UimaContext
      • getConfigurationManager

        ConfigurationManager getConfigurationManager()
        Gets the ConfigurationManager instance used by this UimaContext to resolve configuration parameter resource accesses.
        Returns:
        the ConfigurationManager instance for this UimaContext
      • getQualifiedContextName

        String getQualifiedContextName()
        Gets the fully-qualified name of this context. This is a slash-separated name consisting of each containing context name back to the root. It always begins and ends with a slash. For example, the context name for an annotator nested within two AnalysisEngines might look like: /MyTopLevelAnalysisEngine/MyComponentAnalysisEngine/MyAnnotator/.
        Returns:
        the qualified context name
      • setSession

        void setSession​(Session aSession)
        Sets the current session object. A default Session object is created when the UimaContext is created. In a multi-client deployment, the deployment wrapper is responsible for ensuring that an appropriate Session object is installed here prior to invoking components that use this UimaContext.
        Parameters:
        aSession - the session object
      • getRootContext

        UimaContextAdmin getRootContext()
        Gets the Root Context for this Resource. This is the top-level context for the outermost aggregate component (AnalysisEngine or CollectionProcessingEngine).
        Returns:
        root context
      • defineCasPool

        void defineCasPool​(int aSize,
                           Properties aPerformanceTuningSettings,
                           boolean aSofaAware)
                    throws ResourceInitializationException
        Defines the CAS pool that this UimaContext must support. This method must be called before UimaContext.getEmptyCas(Class) may be called.
        Parameters:
        aSize - the minimum CAS pool size required
        aPerformanceTuningSettings - settings, including initial CAS heap size, for the AE
        aSofaAware - whether the component that will receive these CASes is sofa aware. This is needed to determine which view to get. Sofa-aware components get the base view; sofa-unaware components get the default text sofa view (or whatever is mapped to it).
        Throws:
        ResourceInitializationException - if a CAS could not be created.
      • getManagementInterface

        AnalysisEngineManagement getManagementInterface()
        Gets an object that can be used to do monitoring or management of this AnalysisEngine.
        Returns:
        an object exposing a management interface to this AE
      • getSofaMap

        Map<String,​String> getSofaMap()
        Gets an unmodifiable Map containing the mapping of component sofa name to absolute sofa ID.
        Returns:
        the Sofa map for this component
      • returnedCAS

        void returnedCAS​(AbstractCas aCAS)
        Called internally by the framework whenever the AnalysisComponent returns a CAS from its next() method or calls cas.release(). Used to monitor the number of CASes that the AnalysisComponent is using at any one time.
        Parameters:
        aCAS - the CAS that was returned or released
      • getUniqueName

        String getUniqueName()
        Returns a UUID-like unique name of this component.
        Returns:
        - unique name of this component
      • getExternalOverrides

        Settings getExternalOverrides()
        Gets the settings to be used for external parameter overrides
        Specified by:
        getExternalOverrides in interface UimaContext
        Returns:
        the Settings object
      • setExternalOverrides

        void setExternalOverrides​(Settings externalOverrides)
        Sets the Settings for external parameter overrides
        Parameters:
        externalOverrides - the external overrides settings