public interface Resource
Resource is the general term for all UIMA components that can be acquired and used
 by an application (or by other resources).
 
 Resources may be co-located with their client or distributed as services. This is
 made transparent to the client.
 
 A ResourceSpecifier contains information that can be used acquire a reference to a
 Resource, whether that is done by instantiating the resource locally or locating
 an existing resource available as a service.
 
 The ResourceFactory takes a ResourceSpecifier and returns
 an instance of the specified Resource. Again, this can be done by creating the
 instance or by locating an existing instance.
 
 Most applications will not need to deal with this abstract Resource interface.
 UIMA Developers who need to introduce new types of Resources, however, will need to implement
 this interface.
| Modifier and Type | Field and Description | 
|---|---|
| static String | PARAM_AGGREGATE_SOFA_MAPPINGSUsed to pass the sofa mappings to the ASB | 
| static String | PARAM_CONFIG_MANAGERKey to specify a pre-existing 
  ConfigurationManagerobject. | 
| static String | PARAM_CONFIG_PARAM_SETTINGSKey for the initialization parameter whose value is a
  ConfigurationParameterSettingsobject that holds
 configuration settings that will be used to configure this Resource, overriding any
 conflicting settings specified in this Resource's Descriptor. | 
| static String | PARAM_EXTERNAL_OVERRIDE_SETTINGSKey for the initialization parameter whose value is a  Settingsobject that holds the external override settings. | 
| static String | PARAM_PERFORMANCE_TUNING_SETTINGSKey for the initialization parameter whose value is a  Propertiesobject that
 holds settings that tune the performance of the framework. | 
| static String | PARAM_RESOURCE_MANAGERKey for the initialization parameter whose value is a reference to the  ResourceManagerthat this Resource should use to locate and access other Resources. | 
| static String | PARAM_UIMA_CONTEXTKey for the initialization parameter whose value is a reference to the  UimaContextthat
 is to be used by this Resource to access its external resource and configuration parameters. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | destroy()Releases all resources held by this  Resource. | 
| Logger | getLogger()Gets the Logger that this Resource is currently using. | 
| ResourceMetaData | getMetaData()Gets the metadata that describes this  Resource. | 
| ResourceManager | getResourceManager()Gets the  ResourceManagerthat this Resource uses to locate other Resources. | 
| UimaContext | getUimaContext()Gets the UIMA Context for this Resource. | 
| UimaContextAdmin | getUimaContextAdmin()Gets the Administrative interface to the UIMA Context. | 
| boolean | initialize(ResourceSpecifier aSpecifier,
          Map<String,Object> aAdditionalParams)Initializes this  Resourcefrom aResourceSpecifier. | 
| void | setLogger(Logger aLogger)Sets the Logger that this Resource will use. | 
static final String PARAM_UIMA_CONTEXT
UimaContext that
 is to be used by this Resource to access its external resource and configuration parameters.
 This value is used as a key in the aAdditionalParams Map that is passed to the
 initialize(ResourceSpecifier,Map) method.static final String PARAM_RESOURCE_MANAGER
ResourceManager
 that this Resource should use to locate and access other Resources. This value is used as a key
 in the aAdditionalParams Map that is passed to the
 initialize(ResourceSpecifier,Map) method.static final String PARAM_CONFIG_PARAM_SETTINGS
ConfigurationParameterSettings object that holds
 configuration settings that will be used to configure this Resource, overriding any
 conflicting settings specified in this Resource's Descriptor. This value is used as a key in
 the aAdditionalParams Map that is passed to the
 initialize(ResourceSpecifier,Map) method.static final String PARAM_EXTERNAL_OVERRIDE_SETTINGS
Settings
 object that holds the external override settings.  This will replace any prior settings.  
 If omitted the value in the parent UIMA Context is inherited.  If there is no parent (i.e. at 
 the root or top-level context) then the files in the system property UimaExternalOverrides are used.
 This value is used as a key in the aAdditionalParams Map that is passed to the
 initialize(ResourceSpecifier,Map) method.static final String PARAM_PERFORMANCE_TUNING_SETTINGS
Properties object that
 holds settings that tune the performance of the framework. This value is used as a key in the
 aAdditionalParams Map that is passed to the
 initialize(ResourceSpecifier,Map) method.static final String PARAM_AGGREGATE_SOFA_MAPPINGS
static final String PARAM_CONFIG_MANAGER
ConfigurationManager object.
 If specified, this object is used when initializing the UimaContext
 associated with this Resource, instead
 of creating a new instance.
 This value is used as a key in
 the aAdditionalParams Map that is passed to the
 initialize(ResourceSpecifier,Map) method.boolean initialize(ResourceSpecifier aSpecifier, Map<String,Object> aAdditionalParams) throws ResourceInitializationException
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.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.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.ResourceInitializationException - if a failure occurs during initialization.UIMA_IllegalStateException - if this method is called more than once on a single Resource instance.ResourceMetaData getMetaData()
Resource.ResourceManager getResourceManager()
ResourceManager that this Resource uses to locate other Resources.Logger getLogger()
void setLogger(Logger aLogger)
UIMAFramework.getLogger())
 will be used.aLogger - the logger for this Resource to usevoid destroy()
Resource.UimaContext getUimaContext()
UimaContextAdmin getUimaContextAdmin()
Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.