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
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionshortTo be implemented by subclasses; this should return the build revision number of this implementation.protected PropertiesTo be implemented by subclasses; this should return a Properties object representing the default performance tuning settings for the framework.protected LoggerTo be implemented by subclasses; this should return a reference to the UIMALoggerused by this implementation.protected Logger_getLogger(Class component) To be implemented by subclasses; this should return a reference to the UIMALoggerof the specified source class.shortTo be implemented by subclasses; this should return the major version number of this implementation.shortTo be implemented by subclasses; this should return the minor version number of this implementation.protected CompositeResourceFactoryRetrieves a reference to theResourceFactoryused by the UIMA reference implementation.protected ResourceSpecifierFactoryTo be implemented by subclasses; this should return a reference to theResourceSpecifierFactoryused by this implementation.protected XMLParserTo be implemented by subclasses; this should return a reference to the UIMAXMLParserused by this implementation.protected voidTo 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 ConfigurationManagerTo be implemented by subclasses; this should return a new instance of theConfigurationManagerused by this implementation.protected ResourceManagerTo be implemented by subclasses; this should return a new instance of the defaultResourceManagerused by this implementation.protected ResourceManagerTo be implemented by subclasses; this should return a new instance of the defaultResourceManagerused by this implementation.protected LoggerTo be implemented by subclasses; this should return a new UIMALoggerinstance.protected UimaTimerTo be implemented by subclasses; this should return a new UIMAUimaTimerinstance.protected UimaContextAdminTo be implemented by subclasses; this should return a new instance of the defaultUimaContextAdminused by this implementation.protected CollectionProcessingEngine_produceCollectionProcessingEngine(CpeDescription aCpeDescription, Map<String, Object> aAdditionalParams) To be implemented by subclasses; this should produce aCollectionProcessingEngineinstance from acpeDescription.protected voidParses 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:UIMAFrameworkTo 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:
_initializein classUIMAFramework- Throws:
Exception- if initialization fails- See Also:
-
_getMajorVersion
public short _getMajorVersion()Description copied from class:UIMAFrameworkTo be implemented by subclasses; this should return the major version number of this implementation.- Specified by:
_getMajorVersionin classUIMAFramework- Returns:
- the major version number
- See Also:
-
_getMinorVersion
public short _getMinorVersion()Description copied from class:UIMAFrameworkTo be implemented by subclasses; this should return the minor version number of this implementation.- Specified by:
_getMinorVersionin classUIMAFramework- Returns:
- the minor version number
- See Also:
-
_getBuildRevision
public short _getBuildRevision()Description copied from class:UIMAFrameworkTo be implemented by subclasses; this should return the build revision number of this implementation.- Specified by:
_getBuildRevisionin classUIMAFramework- Returns:
- the build revision number
- See Also:
-
_getResourceFactory
Retrieves a reference to theResourceFactoryused by the UIMA reference implementation.- Specified by:
_getResourceFactoryin classUIMAFramework- Returns:
- the
ResourceFactoryto be used by the application
-
_getResourceSpecifierFactory
To be implemented by subclasses; this should return a reference to theResourceSpecifierFactoryused by this implementation.- Specified by:
_getResourceSpecifierFactoryin classUIMAFramework- Returns:
- the
ResourceSpecifierFactoryto be used by the application.
-
_getXMLParser
To be implemented by subclasses; this should return a reference to the UIMAXMLParserused by this implementation.- Specified by:
_getXMLParserin classUIMAFramework- Returns:
- the
XMLParserto be used by the application.
-
_newCollectionProcessingManager
protected CollectionProcessingManager _newCollectionProcessingManager(ResourceManager aResourceManager) Description copied from class:UIMAFrameworkTo be implemented by subclasses; this should create a new instance of a class implementingCollectionProcessingManager.- Specified by:
_newCollectionProcessingManagerin classUIMAFramework- Parameters:
aResourceManager- the ResourceManager to be used by the CPM- Returns:
- a new
CollectionProcessingManagerto be used by the application. - See Also:
-
_getLogger
To be implemented by subclasses; this should return a reference to the UIMALoggerused by this implementation.- Specified by:
_getLoggerin classUIMAFramework- Returns:
- the
Loggerto be used by the application.
-
_getLogger
To be implemented by subclasses; this should return a reference to the UIMALoggerof the specified source class.- Specified by:
_getLoggerin classUIMAFramework- Parameters:
component- the class to get the logger for- Returns:
- the
Loggerof the specified source class
-
_newLogger
Description copied from class:UIMAFrameworkTo be implemented by subclasses; this should return a new UIMALoggerinstance.- Specified by:
_newLoggerin classUIMAFramework- Returns:
- a new
Loggerinstance - See Also:
-
_newDefaultResourceManager
To be implemented by subclasses; this should return a new instance of the defaultResourceManagerused by this implementation.- Specified by:
_newDefaultResourceManagerin classUIMAFramework- Returns:
- a new
ResourceManagerto be used by the application.
-
_newDefaultResourceManagerPearWrapper
To be implemented by subclasses; this should return a new instance of the defaultResourceManagerused by this implementation.- Specified by:
_newDefaultResourceManagerPearWrapperin classUIMAFramework- Returns:
- a new
ResourceManagerto be used by the application.
-
_newConfigurationManager
To be implemented by subclasses; this should return a new instance of theConfigurationManagerused by this implementation.- Specified by:
_newConfigurationManagerin classUIMAFramework- Returns:
- a new
ConfigurationManagerto be used by the application.
-
_newUimaContext
Description copied from class:UIMAFrameworkTo be implemented by subclasses; this should return a new instance of the defaultUimaContextAdminused by this implementation.- Specified by:
_newUimaContextin classUIMAFramework- Returns:
- a new
UimaContextAdminto be used by the application. - See Also:
-
_newTimer
Description copied from class:UIMAFrameworkTo be implemented by subclasses; this should return a new UIMAUimaTimerinstance.- Specified by:
_newTimerin classUIMAFramework- Returns:
- a new
Timerinstance - See Also:
-
_produceCollectionProcessingEngine
protected CollectionProcessingEngine _produceCollectionProcessingEngine(CpeDescription aCpeDescription, Map<String, Object> aAdditionalParams) throws ResourceInitializationExceptionDescription copied from class:UIMAFrameworkTo be implemented by subclasses; this should produce aCollectionProcessingEngineinstance from acpeDescription.- Specified by:
_produceCollectionProcessingEnginein 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 benullif there are no parameters. Parameter names are defined as constants on theAnalysisEngine, andResource. Furthermore, the entry under the keyResource.PARAM_PERFORMANCE_TUNING_SETTINGSis a map which may contain settings with keys defined as constants hereUIMAFrameworkinterfaces. For example this can be used to set performance-tuning settings as described inUIMAFramework.getDefaultPerformanceTuningProperties().- Returns:
- a
CollectionProcessingEngineinstance. - Throws:
ResourceInitializationException- if a failure occurred during production of the CPE.
-
_getDefaultPerformanceTuningProperties
Description copied from class:UIMAFrameworkTo 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:
_getDefaultPerformanceTuningPropertiesin 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- -
-