Package org.apache.uima.impl
Class ChildUimaContext_impl
java.lang.Object
org.apache.uima.impl.UimaContext_ImplBase
org.apache.uima.impl.ChildUimaContext_impl
- All Implemented Interfaces:
UimaContext
,UimaContextAdmin
- Direct Known Subclasses:
FlowControllerContext_impl
Reference implementation of
AnnotatorContext
.-
Field Summary
Fields inherited from class org.apache.uima.impl.UimaContext_ImplBase
loggingThrottleLimit, mCasPoolSize, mMBean, mOutstandingCASes, mQualifiedContextName, mSofaMappings
-
Constructor Summary
ConstructorDescriptionChildUimaContext_impl
(UimaContextAdmin aParentContext, String aContextName, Map<String, String> aSofaMappings) -
Method Summary
Modifier and TypeMethodDescriptionGets the ConfigurationManager instance used by this UimaContext to resolve configuration parameter resource accesses.Gets the InstrumentationFacility to be used within this AnalysisEngine.Gets theLogger
to which log output will be sent.Gets the ResourceManager used by this UimaContext to locate and access external resourcesGet the Root ContextReturns the Session object, which can be used to store data that pertains to a particular client session.void
initializeRoot
(Logger aLogger, ResourceManager aResourceManager, ConfigurationManager aConfigurationManager) Initializes a root UimaContext.void
Sets the Logger for this UimaContext.void
setPearResourceManager
(ResourceManager resourceManager) Set the Pear resource manager, to be used instead of any containing Resource Manager.void
setProcessTrace
(ProcessTrace aProcessTrace) Sets the current ProcessTrace object, which will receive trace events generated by the InstrumentationFacility.void
setSession
(Session aSession) Sets the current session object.Methods inherited from class org.apache.uima.impl.UimaContext_ImplBase
combineSofaMappings, createChild, defineCasPool, getComponentInfo, getConfigParameterNames, getConfigParameterNames, getConfigParameterValue, getConfigParameterValue, getConfigurationGroupNames, getDataPath, getDataPathElements, getEmptyCas, getExternalOverrides, getManagementInterface, getMdcId, getQualifiedContextName, getResourceAsStream, getResourceAsStream, getResourceFilePath, getResourceFilePath, getResourceObject, getResourceObject, getResourceURI, getResourceURI, getResourceURL, getResourceURL, getSharedSettingArray, getSharedSettingNames, getSharedSettingValue, getSofaMap, getSofaMappings, getUniqueName, makeQualifiedName, mapSofaIDToComponentSofaName, mapToSofaID, maybeThrottleLogger, returnedCAS, setExternalOverrides, setLoggingThrottleLimit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.uima.UimaContext
getConfigParameterNames, getConfigParameterNames, getConfigParameterValue, getConfigParameterValue, getConfigurationGroupNames, getDataPath, getDataPathElements, getEmptyCas, getResourceAsStream, getResourceAsStream, getResourceFilePath, getResourceFilePath, getResourceObject, getResourceObject, getResourceURI, getResourceURI, getResourceURL, getResourceURL, getSharedSettingArray, getSharedSettingNames, getSharedSettingValue, getSofaMappings, mapSofaIDToComponentSofaName, mapToSofaID
Methods inherited from interface org.apache.uima.UimaContextAdmin
createChild, defineCasPool, getComponentInfo, getExternalOverrides, getManagementInterface, getQualifiedContextName, getSofaMap, getUniqueName, returnedCAS, setExternalOverrides
-
Constructor Details
-
ChildUimaContext_impl
public ChildUimaContext_impl(UimaContextAdmin aParentContext, String aContextName, Map<String, String> aSofaMappings)
-
-
Method Details
-
initializeRoot
public void initializeRoot(Logger aLogger, ResourceManager aResourceManager, ConfigurationManager aConfigurationManager) Description copied from interface:UimaContextAdmin
Initializes a root UimaContext.- Specified by:
initializeRoot
in interfaceUimaContextAdmin
- Parameters:
aLogger
- the logger that will be returned by this UimaContext'sUimaContext.getLogger()
method.aResourceManager
- Deprecated: this parameter is ignored! The ResourceManager that will be used by this UimaContext to locate and access external resource.aConfigurationManager
- Deprecated: this parameter is ignored! The ConfigurationManager that will be used by this UimaContext to access its configuration parameter settings.
-
getInstrumentationFacility
Gets the InstrumentationFacility to be used within this AnalysisEngine.- Specified by:
getInstrumentationFacility
in interfaceUimaContext
- Returns:
- the InstrumentationFacility to be used within this AnalysisEngine
-
setLogger
Description copied from interface:UimaContextAdmin
Sets the Logger for this UimaContext. If this method is not called, the default logger (UIMAFramework.getLogger()
) will be used.- Specified by:
setLogger
in interfaceUimaContextAdmin
- Parameters:
aLogger
- the logger that will be returned by this UimaContext'sUimaContext.getLogger()
method.
-
getResourceManager
Gets the ResourceManager used by this UimaContext to locate and access external resources- Specified by:
getResourceManager
in interfaceUimaContextAdmin
- Returns:
- the ResourceManager
-
setPearResourceManager
Set the Pear resource manager, to be used instead of any containing Resource Manager.- Parameters:
resourceManager
- -
-
getConfigurationManager
Description copied from interface:UimaContextAdmin
Gets the ConfigurationManager instance used by this UimaContext to resolve configuration parameter resource accesses.- Specified by:
getConfigurationManager
in interfaceUimaContextAdmin
- Returns:
- the ConfigurationManager instance for this UimaContext
-
setProcessTrace
Sets the current ProcessTrace object, which will receive trace events generated by the InstrumentationFacility.This method is to be called from the Analysis Engine, not the Annotator, so it is not part of the AnnotatorContext interface.
- Specified by:
setProcessTrace
in interfaceUimaContextAdmin
- Parameters:
aProcessTrace
- the ProcessTrace object to receive trace events
-
getRootContext
Get the Root Context- Specified by:
getRootContext
in interfaceUimaContextAdmin
- Returns:
- root context
-
getLogger
Description copied from interface:UimaContext
Gets theLogger
to which log output will be sent. UIMA components should use this facility rather than writing to their own log files (or to stdout).- Specified by:
getLogger
in interfaceUimaContext
- Returns:
- an instance of a logger for use by this annotator.
- See Also:
-
getSession
Description copied from interface:UimaContext
Returns the Session object, which can be used to store data that pertains to a particular client session. All data that must persist across requests must be stored in the Session object and NOT in component instance variables. In some service deployments, a single component instance may serve multiple clients. In that case, the service wrapper may provide a different Session object for each client, and this method would return the appropriate Session object for the component to use for the current call.Note that Session support is NOT implemented in any of the service wrappers (e.g. Vinci) currently provided in the UIMA SDK.
- Specified by:
getSession
in interfaceUimaContext
- Returns:
- the current Session object
-
setSession
Description copied from interface:UimaContextAdmin
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.- Specified by:
setSession
in interfaceUimaContextAdmin
- Parameters:
aSession
- the session object
-