Package org.apache.uima.impl
Class UIMAFramework_impl
java.lang.Object
org.apache.uima.UIMAFramework
org.apache.uima.impl.UIMAFramework_impl
This is the main interface point to the UIMA reference implemention. Applications cannot use this
class directly. Use the static methods on
UIMAFramework
instead.
This class is a singleton which will be accessed by many threads simulatenously. It must be threadsafe.
-
Field Summary
Fields inherited from class org.apache.uima.UIMAFramework
CAS_INITIAL_HEAP_SIZE, JCAS_CACHE_ENABLED, newContextConfigManager, newContextResourceManager, PROCESS_TRACE_ENABLED, SKIP_USER_JCAS_LOADING, SOCKET_KEEPALIVE_ENABLED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionshort
To be implemented by subclasses; this should return the build revision number of this implementation.protected Properties
To be implemented by subclasses; this should return a Properties object representing the default performance tuning settings for the framework.protected Logger
To be implemented by subclasses; this should return a reference to the UIMALogger
used by this implementation.protected Logger
_getLogger
(Class component) To be implemented by subclasses; this should return a reference to the UIMALogger
of the specified source class.short
To be implemented by subclasses; this should return the major version number of this implementation.short
To be implemented by subclasses; this should return the minor version number of this implementation.protected CompositeResourceFactory
Retrieves a reference to theResourceFactory
used by the UIMA reference implementation.protected ResourceSpecifierFactory
To be implemented by subclasses; this should return a reference to theResourceSpecifierFactory
used by this implementation.protected XMLParser
To be implemented by subclasses; this should return a reference to the UIMAXMLParser
used by this implementation.protected void
To be implemented by subclasses; called from this class's static initializer to complete initialization of the singleton instance.protected CollectionProcessingManager
_newCollectionProcessingManager
(ResourceManager aResourceManager) To be implemented by subclasses; this should create a new instance of a class implementingCollectionProcessingManager
.protected ConfigurationManager
To be implemented by subclasses; this should return a new instance of theConfigurationManager
used by this implementation.protected ResourceManager
To be implemented by subclasses; this should return a new instance of the defaultResourceManager
used by this implementation.protected ResourceManager
To be implemented by subclasses; this should return a new instance of the defaultResourceManager
used by this implementation.protected Logger
To be implemented by subclasses; this should return a new UIMALogger
instance.protected UimaTimer
To be implemented by subclasses; this should return a new UIMAUimaTimer
instance.protected UimaContextAdmin
To be implemented by subclasses; this should return a new instance of the defaultUimaContextAdmin
used by this implementation.protected CollectionProcessingEngine
_produceCollectionProcessingEngine
(CpeDescription aCpeDescription, Map<String, Object> aAdditionalParams) To be implemented by subclasses; this should produce aCollectionProcessingEngine
instance from acpeDescription
.protected void
Parses the factoryConfig.xml file and sets up the ResourceFactory, ResourceSpecifierFactory, and XMLParser.Methods inherited from class org.apache.uima.UIMAFramework
getBuildRevision, getDefaultPerformanceTuningProperties, getInstance, getLogger, getLogger, getMajorVersion, getMinorVersion, getResourceFactory, getResourceSpecifierFactory, getVersionString, getXMLParser, newCollectionProcessingManager, newCollectionProcessingManager, newConfigurationManager, newDefaultResourceManager, newDefaultResourceManagerPearWrapper, newLogger, newTimer, newUimaContext, produceAnalysisEngine, produceAnalysisEngine, produceAnalysisEngine, produceAnalysisEngine, produceCasConsumer, produceCasConsumer, produceCasConsumer, produceCasInitializer, produceCasInitializer, produceCasInitializer, produceCollectionProcessingEngine, produceCollectionProcessingEngine, produceCollectionProcessingEngine, produceCollectionReader, produceCollectionReader, produceCollectionReader, produceResource, produceResource, produceResource, produceTAE, produceTAE, produceTAE, produceTAE
-
Field Details
-
debug
public static final boolean debug- See Also:
-
-
Constructor Details
-
UIMAFramework_impl
public UIMAFramework_impl()Creates a new UIMAFramework_impl.
-
-
Method Details
-
_initialize
Description copied from class:UIMAFramework
To be implemented by subclasses; called from this class's static initializer to complete initialization of the singleton instance. This initialization is done outside the constructor so that theUIMAFramework.getInstance()
method can be used during initialization.- Specified by:
_initialize
in classUIMAFramework
- Throws:
Exception
- if initialization fails- See Also:
-
_getMajorVersion
public short _getMajorVersion()Description copied from class:UIMAFramework
To be implemented by subclasses; this should return the major version number of this implementation.- Specified by:
_getMajorVersion
in classUIMAFramework
- Returns:
- the major version number
- See Also:
-
_getMinorVersion
public short _getMinorVersion()Description copied from class:UIMAFramework
To be implemented by subclasses; this should return the minor version number of this implementation.- Specified by:
_getMinorVersion
in classUIMAFramework
- Returns:
- the minor version number
- See Also:
-
_getBuildRevision
public short _getBuildRevision()Description copied from class:UIMAFramework
To be implemented by subclasses; this should return the build revision number of this implementation.- Specified by:
_getBuildRevision
in classUIMAFramework
- Returns:
- the build revision number
- See Also:
-
_getResourceFactory
Retrieves a reference to theResourceFactory
used by the UIMA reference implementation.- Specified by:
_getResourceFactory
in classUIMAFramework
- Returns:
- the
ResourceFactory
to be used by the application
-
_getResourceSpecifierFactory
To be implemented by subclasses; this should return a reference to theResourceSpecifierFactory
used by this implementation.- Specified by:
_getResourceSpecifierFactory
in classUIMAFramework
- Returns:
- the
ResourceSpecifierFactory
to be used by the application.
-
_getXMLParser
To be implemented by subclasses; this should return a reference to the UIMAXMLParser
used by this implementation.- Specified by:
_getXMLParser
in classUIMAFramework
- Returns:
- the
XMLParser
to be used by the application.
-
_newCollectionProcessingManager
protected CollectionProcessingManager _newCollectionProcessingManager(ResourceManager aResourceManager) Description copied from class:UIMAFramework
To be implemented by subclasses; this should create a new instance of a class implementingCollectionProcessingManager
.- Specified by:
_newCollectionProcessingManager
in classUIMAFramework
- Parameters:
aResourceManager
- the ResourceManager to be used by the CPM- Returns:
- a new
CollectionProcessingManager
to be used by the application. - See Also:
-
_getLogger
To be implemented by subclasses; this should return a reference to the UIMALogger
used by this implementation.- Specified by:
_getLogger
in classUIMAFramework
- Returns:
- the
Logger
to be used by the application.
-
_getLogger
To be implemented by subclasses; this should return a reference to the UIMALogger
of the specified source class.- Specified by:
_getLogger
in classUIMAFramework
- Parameters:
component
- the class to get the logger for- Returns:
- the
Logger
of the specified source class
-
_newLogger
Description copied from class:UIMAFramework
To be implemented by subclasses; this should return a new UIMALogger
instance.- Specified by:
_newLogger
in classUIMAFramework
- Returns:
- a new
Logger
instance - See Also:
-
_newDefaultResourceManager
To be implemented by subclasses; this should return a new instance of the defaultResourceManager
used by this implementation.- Specified by:
_newDefaultResourceManager
in classUIMAFramework
- Returns:
- a new
ResourceManager
to be used by the application.
-
_newDefaultResourceManagerPearWrapper
To be implemented by subclasses; this should return a new instance of the defaultResourceManager
used by this implementation.- Specified by:
_newDefaultResourceManagerPearWrapper
in classUIMAFramework
- Returns:
- a new
ResourceManager
to be used by the application.
-
_newConfigurationManager
To be implemented by subclasses; this should return a new instance of theConfigurationManager
used by this implementation.- Specified by:
_newConfigurationManager
in classUIMAFramework
- Returns:
- a new
ConfigurationManager
to be used by the application.
-
_newUimaContext
Description copied from class:UIMAFramework
To be implemented by subclasses; this should return a new instance of the defaultUimaContextAdmin
used by this implementation.- Specified by:
_newUimaContext
in classUIMAFramework
- Returns:
- a new
UimaContextAdmin
to be used by the application. - See Also:
-
_newTimer
Description copied from class:UIMAFramework
To be implemented by subclasses; this should return a new UIMAUimaTimer
instance.- Specified by:
_newTimer
in classUIMAFramework
- Returns:
- a new
Timer
instance - See Also:
-
_produceCollectionProcessingEngine
protected CollectionProcessingEngine _produceCollectionProcessingEngine(CpeDescription aCpeDescription, Map<String, Object> aAdditionalParams) throws ResourceInitializationExceptionDescription copied from class:UIMAFramework
To be implemented by subclasses; this should produce aCollectionProcessingEngine
instance from acpeDescription
.- Specified by:
_produceCollectionProcessingEngine
in classUIMAFramework
- Parameters:
aCpeDescription
- an object that specifies how to create an instance of aCollectionProcessingEngine
.aAdditionalParams
- a Map containing additional parameters to pass to theCollectionProcessingEngine.initialize(CpeDescription,Map)
method. May benull
if there are no parameters. Parameter names are defined as constants on theAnalysisEngine
, andResource
. Furthermore, the entry under the keyResource.PARAM_PERFORMANCE_TUNING_SETTINGS
is a map which may contain settings with keys defined as constants hereUIMAFramework
interfaces. For example this can be used to set performance-tuning settings as described inUIMAFramework.getDefaultPerformanceTuningProperties()
.- Returns:
- a
CollectionProcessingEngine
instance. - Throws:
ResourceInitializationException
- if a failure occurred during production of the CPE.
-
_getDefaultPerformanceTuningProperties
Description copied from class:UIMAFramework
To be implemented by subclasses; this should return a Properties object representing the default performance tuning settings for the framework. It must return a new Properties object each time it is called.- Specified by:
_getDefaultPerformanceTuningProperties
in classUIMAFramework
- Returns:
- default performance tuning properties
-
parseFactoryConfig
protected void parseFactoryConfig() throws ParserConfigurationException, SAXException, IOException, ClassNotFoundException, InstantiationException, IllegalAccessExceptionParses the factoryConfig.xml file and sets up the ResourceFactory, ResourceSpecifierFactory, and XMLParser.- Throws:
ParserConfigurationException
- if the XML parser could not be configuredSAXException
- if factoryConfig.xml could not be parsedClassNotFoundException
- -IllegalAccessException
- -InstantiationException
- -IOException
- -
-