public class AnalysisComponentAdapterFactory extends Object
AnalysisComponent
instances from AnalysisEngineDescription,
CasConsumerDescription, or CollectionReaderDescription objects.Modifier and Type | Field and Description |
---|---|
protected static String |
LOG_RESOURCE_BUNDLE
resource bundle for log messages
|
Constructor and Description |
---|
AnalysisComponentAdapterFactory() |
Modifier and Type | Method and Description |
---|---|
static AnalysisComponent |
createAdapter(Object aAdaptee,
AnalysisEngineMetaData aMetaData,
Map<String,Object> aAdditionalParams)
Creates an adapter that allows the given object to implement the
AnalysisComponent
interface. |
static boolean |
isAdaptable(Class<?> cls)
Determines whether this factory is capable of producing an adapter that adapts the given class
to the AnalysisComponent interface.
|
protected static final String LOG_RESOURCE_BUNDLE
public static AnalysisComponent createAdapter(Object aAdaptee, AnalysisEngineMetaData aMetaData, Map<String,Object> aAdditionalParams) throws ResourceInitializationException
AnalysisComponent
interface. This is needed because UIMA has distinct interfaces that are implemented by
different types of components, e.g. Annotator, CAS Consumer, CollectionReader, but the UIMA
framework itself simplifies things by interacting with all of them through a single, common
AnalysisComponent interface.aAdaptee
- Object to adapet to the AnalysisComponent interfaceaMetaData
- metadata for the AnalysisEngine containing this componentaAdditionalParams
- parameters passed to AE's initialize methodaAdaptee
and implements the
AnalysisComponent> interface.
ResourceInitializationException
- if passed an adaptee which is not an analysis componentpublic static boolean isAdaptable(Class<?> cls)
cls
- the adaptee classcls
to AnalysisComponent
.Copyright © 2014. All rights reserved.