|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.uima.util.CasCreationUtils
public class CasCreationUtils
Utilities for creating and setting up CASes. Also includes utilities for merging CAS type systems.
Constructor Summary | |
---|---|
CasCreationUtils()
|
Method Summary | |
---|---|
static TypeSystemDescription |
convertData2TypeSystem(CasData aCasData)
Extracts a TypeSystem definition from a CasData. |
static CAS |
createCas(AnalysisEngineDescription aDescription)
Creates a new CAS instance for an Analysis Engine. |
static CAS |
createCas(AnalysisEngineDescription aDescription,
Properties aPerformanceTuningSettings)
Creates a new CAS instance for an Analysis Engine. |
static CAS |
createCas(AnalysisEngineMetaData aMetaData)
Creates a new CAS instance. |
static CAS |
createCas(CasDefinition casDef,
Properties performanceTuningSettings)
Create a CAS from a CAS Definition. |
static CAS |
createCas(CasDefinition casDef,
Properties performanceTuningSettings,
TypeSystem typeSystem)
Create a CAS from a CAS Definition, but reuse the provided TypeSystem object. |
static CAS |
createCas(Collection<? extends MetaDataObject> aComponentDescriptionsOrMetaData)
Creates a new CAS instance for a collection of CAS Processors. |
static CAS |
createCas(Collection<? extends MetaDataObject> aComponentDescriptionsOrMetaData,
Properties aPerformanceTuningSettings)
Creates a new CAS instance for a collection of CAS Processors. |
static CAS |
createCas(Collection<? extends MetaDataObject> aComponentDescriptionsOrMetaData,
Properties aPerformanceTuningSettings,
ResourceManager aResourceManager)
Creates a new CAS instance for a collection of CAS Processors. |
static CAS |
createCas(Collection<? extends MetaDataObject> aComponentDescriptionsOrMetaData,
TypeSystem aTypeSystem,
Properties aPerformanceTuningSettings)
Creates a new CAS instance for a collection of CAS Processors, which. |
static CAS |
createCas(Collection<? extends MetaDataObject> aComponentDescriptionsOrMetaData,
TypeSystem aTypeSystem,
Properties aPerformanceTuningSettings,
ResourceManager aResourceManager)
Creates a new CAS instance for a collection of CAS Processors, which. |
static CAS |
createCas(ProcessingResourceMetaData aMetaData)
Creates a new CAS instance. |
static CAS |
createCas(TypeSystemDescription aTypeSystem,
TypePriorities aTypePriorities,
FsIndexDescription[] aFsIndexes)
Creates a new CAS instance. |
static CAS |
createCas(TypeSystemDescription aTypeSystem,
TypePriorities aTypePriorities,
FsIndexDescription[] aFsIndexes,
Properties aPerformanceTuningSettings)
Creates a new CAS instance. |
static CAS |
createCas(TypeSystemDescription aTypeSystem,
TypePriorities aTypePriorities,
FsIndexDescription[] aFsIndexes,
Properties aPerformanceTuningSettings,
ResourceManager aResourceManager)
Creates a new CAS instance. |
static CAS |
createCas(TypeSystem aTypeSystem,
TypePriorities aTypePriorities,
FsIndexDescription[] aFsIndexes,
Properties aPerformanceTuningSettings)
Creates a new CAS instance that reuses an existing type system. |
static CAS |
createCas(TypeSystem aTypeSystem,
TypePriorities aTypePriorities,
FsIndexDescription[] aFsIndexes,
Properties aPerformanceTuningSettings,
ResourceManager aResourceManager)
Creates a new CAS instance that reuses an existing type system. |
static List<ProcessingResourceMetaData> |
getMetaDataList(Collection<? extends MetaDataObject> aComponentDescriptionOrMetaData,
ResourceManager aResourceManager)
Gets a list of ProcessingResourceMetadata objects from a list containing either ResourceSpecifiers, ProcessingResourceMetadata objects, or subparts of ProcessingResourceMetadata objects (type sypstems, indexes, or type priorities). |
static List<ProcessingResourceMetaData> |
getMetaDataList(Collection<? extends MetaDataObject> aComponentDescriptionOrMetaData,
ResourceManager aResourceManager,
Map<String,? super Exception> aOutputFailedRemotes)
Gets a list of ProcessingResourceMetadata objects from a list containing either ResourceSpecifiers, ProcessingResourceMetadata objects, or subparts of ProcessingResourceMetadata objects (type systems, indexes, or type priorities). |
static FsIndexCollection |
mergeDelegateAnalysisEngineFsIndexCollections(AnalysisEngineDescription aAggregateDescription)
Merges the FS Index Collections of each component within an aggregate Analysis Engine, producing a single combined FS Index Collection. |
static FsIndexCollection |
mergeDelegateAnalysisEngineFsIndexCollections(AnalysisEngineDescription aAggregateDescription,
ResourceManager aResourceManager)
Merges the FS Index Collections of each component within an aggregate Analysis Engine, producing a single combined FS Index Collection. |
static ProcessingResourceMetaData |
mergeDelegateAnalysisEngineMetaData(AnalysisEngineDescription aAggregateDescription,
ResourceManager aResourceManager,
Map<String,Set<String>> aOutputMergedTypes,
Map<String,? super Exception> aOutputFailedRemotes)
Merges the Type Systems, Type Priorities, and FS Indexes of each component within an aggregate Analysis Engine. |
static TypePriorities |
mergeDelegateAnalysisEngineTypePriorities(AnalysisEngineDescription aAggregateDescription)
Merges the Type Priorities of each component within an aggregate Analysis Engine, producing a single combined TypePriorities object. |
static TypePriorities |
mergeDelegateAnalysisEngineTypePriorities(AnalysisEngineDescription aAggregateDescription,
ResourceManager aResourceManager)
Merges the Type Priorities of each component within an aggregate Analysis Engine, producing a single combined TypePriorities object. |
static TypeSystemDescription |
mergeDelegateAnalysisEngineTypeSystems(AnalysisEngineDescription aAggregateDescription)
Merges the Type Systems of each component within an aggregate Analysis Engine, producing a single combined Type System. |
static TypeSystemDescription |
mergeDelegateAnalysisEngineTypeSystems(AnalysisEngineDescription aAggregateDescription,
ResourceManager aResourceManager)
Merges the Type Systems of each component within an aggregate Analysis Engine, producing a single combined Type System. |
static TypeSystemDescription |
mergeDelegateAnalysisEngineTypeSystems(AnalysisEngineDescription aAggregateDescription,
ResourceManager aResourceManager,
Map<String,Set<String>> aOutputMergedTypes)
Merges the Type Systems of each component within an aggregate Analysis Engine, producing a single combined Type System. |
protected static void |
mergeFeatures(TypeDescription aType,
FeatureDescription[] aFeatures)
Merges features into a TypeDescription. |
static FsIndexCollection |
mergeFsIndexes(List<? extends FsIndexCollection> aFsIndexCollections,
ResourceManager aResourceManager)
Merges a List of FsIndexCollections into a single FsIndexCollection object. |
static TypePriorities |
mergeTypePriorities(List<? extends TypePriorities> aTypePriorities,
ResourceManager aResourceManager)
Merges a List of TypePriorities into a single TypePriorities object. |
static TypeSystemDescription |
mergeTypeSystems(Collection<? extends TypeSystemDescription> aTypeSystems)
Merges several TypeSystemDescriptions into one. |
static TypeSystemDescription |
mergeTypeSystems(Collection<? extends TypeSystemDescription> aTypeSystems,
ResourceManager aResourceManager)
Merges several TypeSystemDescriptions into one. |
static TypeSystemDescription |
mergeTypeSystems(Collection<? extends TypeSystemDescription> aTypeSystems,
ResourceManager aResourceManager,
Map<String,Set<String>> aOutputMergedTypes)
Merges several TypeSystemDescriptions into one. |
static void |
setupIndexes(CASMgr aCASMgr,
FsIndexDescription[] aIndexes)
Adds FeatureStructure indexes to a CAS. |
static void |
setupTypePriorities(CASMgr aCASMgr,
TypePriorities aTypePriorities)
Adds TypePriorities to a CAS. |
static void |
setupTypeSystem(CASMgr aCASMgr,
TypeSystemDescription aTypeSystem)
Installs a TypeSystem in a CAS. |
protected static boolean |
subsumes(String aType1Name,
String aType2Name,
Map<String,? extends TypeDescription> aNameMap)
Determines whether one type subsumes another. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CasCreationUtils()
Method Detail |
---|
public static CAS createCas(AnalysisEngineMetaData aMetaData) throws ResourceInitializationException
createCas(AnalysisEngineDescription)
instead.
aMetaData
- metadata for the analysis engine that will process this CAS. This is used to set
up the CAS's type system and indexes.
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(ProcessingResourceMetaData aMetaData) throws ResourceInitializationException
aMetaData
- metadata for the resource that will process this CAS. This is used to set up the
CAS's type system and indexes.
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(AnalysisEngineDescription aDescription) throws ResourceInitializationException
aDescription
- description of the anlaysis engine that will process this CAS. This is used to
set up the CAS's type system and indexes.
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(AnalysisEngineDescription aDescription, Properties aPerformanceTuningSettings) throws ResourceInitializationException
aDescription
- description of the anlaysis engine that will process this CAS. This is used to
set up the CAS's type system and indexes.aPerformanceTuningSettings
- Properties object containing framework performance tuning settings using key
names defined on UIMAFramework
interface
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(Collection<? extends MetaDataObject> aComponentDescriptionsOrMetaData) throws ResourceInitializationException
If you pass this method objects of type AnalysisEngineDescription
,
CollectionReaderDescription
, CasInitializerDescription
, or
CasConsumerDescription
, it will not instantiate the components. It will just extract
the type system information from the descriptor. For any other kind of
ResourceSpecifier
, it will call
UIMAFramework.produceResource(org.apache.uima.resource.ResourceSpecifier, Map)
. For
example, if a URISpecifier
is passed, a remote connection will be established and the
service will be queries for its metadata. An exception will be thrown if the connection can not
be opened.
aComponentDescriptionsOrMetaData
- a collection of ResourceSpecifier
, ProcessingResourceMetaData
,
TypeSystemDescription
, FsIndexCollection
, or
TypePriorities
objects.
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(Collection<? extends MetaDataObject> aComponentDescriptionsOrMetaData, Properties aPerformanceTuningSettings) throws ResourceInitializationException
If you pass this method objects of type AnalysisEngineDescription
,
CollectionReaderDescription
, CasInitializerDescription
, or
CasConsumerDescription
, it will not instantiate the components. It will just extract
the type system information from the descriptor. For any other kind of
ResourceSpecifier
, it will call
UIMAFramework.produceResource(org.apache.uima.resource.ResourceSpecifier, Map)
. For
example, if a URISpecifier
is passed, a remote connection will be established and the
service will be queries for its metadata. An exception will be thrown if the connection can not
be opened.
aComponentDescriptionsOrMetaData
- a collection of ResourceSpecifier
, ProcessingResourceMetaData
,
TypeSystemDescription
, FsIndexCollection
, or
TypePriorities
objects.aPerformanceTuningSettings
- Properties object containing framework performance tuning settings using key
names defined on UIMAFramework
interface
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(Collection<? extends MetaDataObject> aComponentDescriptionsOrMetaData, Properties aPerformanceTuningSettings, ResourceManager aResourceManager) throws ResourceInitializationException
If you pass this method objects of type AnalysisEngineDescription
,
CollectionReaderDescription
, CasInitializerDescription
, or
CasConsumerDescription
, it will not instantiate the components. It will just extract
the type system information from the descriptor. For any other kind of
ResourceSpecifier
, it will call
UIMAFramework.produceResource(org.apache.uima.resource.ResourceSpecifier, Map)
. For
example, if a URISpecifier
is passed, a remote connection will be established and the
service will be queries for its metadata. An exception will be thrown if the connection can not
be opened.
aComponentDescriptionsOrMetaData
- a collection of ResourceSpecifier
, ProcessingResourceMetaData
,
TypeSystemDescription
, FsIndexCollection
, or
TypePriorities
objects.aPerformanceTuningSettings
- Properties object containing framework performance tuning settings using key
names defined on UIMAFramework
interfaceaResourceManager
- the resource manager to use to resolve import declarations within the metadata
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(TypeSystemDescription aTypeSystem, TypePriorities aTypePriorities, FsIndexDescription[] aFsIndexes) throws ResourceInitializationException
aTypeSystem
- type system to install in the CASaTypePriorities
- type priorities to install in the CASaFsIndexes
- indexes to install in the CAS
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(TypeSystemDescription aTypeSystem, TypePriorities aTypePriorities, FsIndexDescription[] aFsIndexes, Properties aPerformanceTuningSettings) throws ResourceInitializationException
aTypeSystem
- type system to install in the CASaTypePriorities
- type priorities to install in the CASaFsIndexes
- indexes to install in the CASaPerformanceTuningSettings
- Properties object containing framework performance tuning settings using key
names defined on UIMAFramework
interface
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(TypeSystemDescription aTypeSystem, TypePriorities aTypePriorities, FsIndexDescription[] aFsIndexes, Properties aPerformanceTuningSettings, ResourceManager aResourceManager) throws ResourceInitializationException
aTypeSystem
- type system to install in the CASaTypePriorities
- type priorities to install in the CASaFsIndexes
- indexes to install in the CASaPerformanceTuningSettings
- Properties object containing framework performance tuning settings using key
names defined on UIMAFramework
interface
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(Collection<? extends MetaDataObject> aComponentDescriptionsOrMetaData, TypeSystem aTypeSystem, Properties aPerformanceTuningSettings) throws ResourceInitializationException
If you pass this method objects of type AnalysisEngineDescription
,
CollectionReaderDescription
, CasInitializerDescription
, or
CasConsumerDescription
, it will not instantiate the components. It will just extract
the type system information from the descriptor. For any other kind of
ResourceSpecifier
, it will call
UIMAFramework.produceResource(org.apache.uima.resource.ResourceSpecifier, Map)
. For
example, if a URISpecifier
is passed, a remote connection will be established and the
service will be queries for its metadata. An exception will be thrown if the connection can not
be opened.
aComponentDescriptionsOrMetaData
- a collection of ResourceSpecifier
, ProcessingResourceMetaData
,
TypeSystemDescription
, FsIndexCollection
, or
TypePriorities
objects.aTypeSystem
- type system to install in the CAS, null if noneaPerformanceTuningSettings
- Properties object containing framework performance tuning settings using key
names defined on UIMAFramework
interface
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(Collection<? extends MetaDataObject> aComponentDescriptionsOrMetaData, TypeSystem aTypeSystem, Properties aPerformanceTuningSettings, ResourceManager aResourceManager) throws ResourceInitializationException
If you pass this method objects of type AnalysisEngineDescription
,
CollectionReaderDescription
, CasInitializerDescription
, or
CasConsumerDescription
, it will not instantiate the components. It will just extract
the type system information from the descriptor. For any other kind of
ResourceSpecifier
, it will call
UIMAFramework.produceResource(org.apache.uima.resource.ResourceSpecifier, Map)
. For
example, if a URISpecifier
is passed, a remote connection will be established and the
service will be queries for its metadata. An exception will be thrown if the connection can not
be opened.
aComponentDescriptionsOrMetaData
- a collection of ResourceSpecifier
, ProcessingResourceMetaData
,
TypeSystemDescription
, FsIndexCollection
, or
TypePriorities
objects.aTypeSystem
- type system to install in the CAS, null if noneaPerformanceTuningSettings
- Properties object containing framework performance tuning settings using key
names defined on UIMAFramework
interfaceaResourceManager
- the resource manager to use to resolve import declarations within the metadata,
and also to set the JCas ClassLoader for the new CAS
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(TypeSystem aTypeSystem, TypePriorities aTypePriorities, FsIndexDescription[] aFsIndexes, Properties aPerformanceTuningSettings) throws ResourceInitializationException
aTypeSystem
- type system to install in the CASaTypePriorities
- type priorities to install in the CASaFsIndexes
- indexes to install in the CAS
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(TypeSystem aTypeSystem, TypePriorities aTypePriorities, FsIndexDescription[] aFsIndexes, Properties aPerformanceTuningSettings, ResourceManager aResourceManager) throws ResourceInitializationException
aTypeSystem
- type system to install in the CASaTypePriorities
- type priorities to install in the CASaFsIndexes
- indexes to install in the CASaResourceManager
- resource manager, which is used to set the JCas ClassLoader for the new CAS
ResourceInitializationException
- if CAS creation failspublic static CAS createCas(CasDefinition casDef, Properties performanceTuningSettings) throws ResourceInitializationException
casDef
- completely describes the CAS to be createdperformanceTuningSettings
- Properties object containing framework performance tuning settings using key
names defined on UIMAFramework
interface
ResourceInitializationException
public static CAS createCas(CasDefinition casDef, Properties performanceTuningSettings, TypeSystem typeSystem) throws ResourceInitializationException
casDef
- completely describes the CAS to be createdperformanceTuningSettings
- Properties object containing framework performance tuning settings using key
names defined on UIMAFramework
interfacetypeSystem
- type system object to reuse
ResourceInitializationException
public static void setupTypeSystem(CASMgr aCASMgr, TypeSystemDescription aTypeSystem) throws ResourceInitializationException
aCASMgr
- the CASMgr
object whose type system is to be modified.aTypeSystem
- desription of type system to install
ResourceInitializationException
- if an error occurs during modification of the type systempublic static void setupTypePriorities(CASMgr aCASMgr, TypePriorities aTypePriorities) throws ResourceInitializationException
aCASMgr
- the CASMgr
object to be modifiedaTypePriorities
- description of the type priorities to add
CASException
- if an error occurs during type priority setup
ResourceInitializationException
public static void setupIndexes(CASMgr aCASMgr, FsIndexDescription[] aIndexes) throws ResourceInitializationException
aCASMgr
- the CASMgr
object to be modifiedaIndexes
- descriptions of the indexes to add
ResourceInitializationException
- if an error occurs during index creationpublic static TypeSystemDescription convertData2TypeSystem(CasData aCasData)
aCasData
- the CAS Data from which to extract the type system
public static TypeSystemDescription mergeTypeSystems(Collection<? extends TypeSystemDescription> aTypeSystems) throws ResourceInitializationException
aTypeSystems
- a collection of TypeSystems to be merged
ResourceInitializationException
- if an incompatibility exists or if an import could not be resolvedpublic static TypeSystemDescription mergeTypeSystems(Collection<? extends TypeSystemDescription> aTypeSystems, ResourceManager aResourceManager) throws ResourceInitializationException
aTypeSystems
- a collection of TypeSystems to be mergedaResourceManager
- Resource Manager to use to locate type systems imported by name
ResourceInitializationException
- if an incompatibiliy exists or if an import could not be resolvedpublic static TypeSystemDescription mergeTypeSystems(Collection<? extends TypeSystemDescription> aTypeSystems, ResourceManager aResourceManager, Map<String,Set<String>> aOutputMergedTypes) throws ResourceInitializationException
This version of this method takes an argument aOutputMergedTypes
, which this
method will populate with the names and descriptor locations of any types whose definitions
have been merged from multiple non-identical sources. That is, types that are declared more
than once, with different (but compatible) sets of features in each declaration, or with
different (but compatible) supertypes.
aTypeSystems
- a collection of TypeSystems to be mergedaResourceManager
- Resource Manager to use to locate type systems imported by nameaOutputMergedTypes
- A Map that this method will populate with information about the set of types
whose definitions were merged from multiple non-identical sources. The keys in
the Map will be the type names (Strings) and the values will be {link Set}s
containing Descriptor URLs (Strings) where those types are declared. You may
pass null if you are not interested in this information.
ResourceInitializationException
- if an incompatibility exists or if an import could not be resolvedpublic static TypeSystemDescription mergeDelegateAnalysisEngineTypeSystems(AnalysisEngineDescription aAggregateDescription) throws ResourceInitializationException
aAggregateDescription
- an aggregate Analysis Engine description
ResourceInitializationException
- if an incompatibility exists or if an import could not be resolvedpublic static TypeSystemDescription mergeDelegateAnalysisEngineTypeSystems(AnalysisEngineDescription aAggregateDescription, ResourceManager aResourceManager) throws ResourceInitializationException
This version of this method takes an argument aOutputMergedTypeNames
, to which
this method will add the names of any types whose definitions have been merged from multiple
non-identical sources. That is, types that are declared more than once, with different (but
compatible) sets of features in each declaration, or with different (but compatible)
supertypes.
aAggregateDescription
- an aggregate Analysis Engine descriptionaResourceManager
- ResourceManager instance used to resolve imports
ResourceInitializationException
- if an incompatibiliy exists or if an import could not be resolvedpublic static TypeSystemDescription mergeDelegateAnalysisEngineTypeSystems(AnalysisEngineDescription aAggregateDescription, ResourceManager aResourceManager, Map<String,Set<String>> aOutputMergedTypes) throws ResourceInitializationException
This version of this method takes an argument aOutputMergedTypes
, which this
method will populate with the names and descriptor locations of any types whose definitions
have been merged from multiple non-identical sources. That is, types that are declared more
than once, with different (but compatible) sets of features in each declaration, or with
different (but compatible) supertypes.
aAggregateDescription
- an aggregate Analysis Engine descriptionaResourceManager
- ResourceManager instance used to resolve importsaOutputMergedTypes
- A Map that this method will populate with information about the set of types
whose definitions were merged from multiple non-identical sources. The keys in
the Map will be the type names (Strings) and the values will be {link Set}s
containing Descriptor URLs (Strings) where those types are declared. You may
pass null if you are not interested in this information. *
ResourceInitializationException
- if an incompatibility exists or if an import could not be resolvedpublic static FsIndexCollection mergeFsIndexes(List<? extends FsIndexCollection> aFsIndexCollections, ResourceManager aResourceManager) throws ResourceInitializationException
aFsIndexCollections
- list of FsIndexCollection objectsaResourceManager
- ResourceManager instance to use to resolve imports
ResourceInitializationException
- if an incompatibility exists or if an import could not be resolvedpublic static FsIndexCollection mergeDelegateAnalysisEngineFsIndexCollections(AnalysisEngineDescription aAggregateDescription) throws ResourceInitializationException
aAggregateDescription
- an aggregate Analysis Engine description
ResourceInitializationException
- if an incompatibility exists or if an import could not be resolvedpublic static FsIndexCollection mergeDelegateAnalysisEngineFsIndexCollections(AnalysisEngineDescription aAggregateDescription, ResourceManager aResourceManager) throws ResourceInitializationException
aAggregateDescription
- an aggregate Analysis Engine descriptionaResourceManager
- ResourceManager instance used to resolve imports
ResourceInitializationException
- if an incompatibility exists or if an import could not be resolvedpublic static TypePriorities mergeTypePriorities(List<? extends TypePriorities> aTypePriorities, ResourceManager aResourceManager) throws ResourceInitializationException
aTypePriorities
- list of TypePriorities objectsaResourceManager
- ResourceManager instance to use to resolve imports
ResourceInitializationException
- if an import could not be resolvedpublic static TypePriorities mergeDelegateAnalysisEngineTypePriorities(AnalysisEngineDescription aAggregateDescription) throws ResourceInitializationException
aAggregateDescription
- an aggregate Analysis Engine description
ResourceInitializationException
- if an incompatibility existspublic static TypePriorities mergeDelegateAnalysisEngineTypePriorities(AnalysisEngineDescription aAggregateDescription, ResourceManager aResourceManager) throws ResourceInitializationException
aAggregateDescription
- an aggregate Analysis Engine descriptionaResourceManager
- ResourceManager instance used to resolve imports
ResourceInitializationException
- if an incompatibility existspublic static ProcessingResourceMetaData mergeDelegateAnalysisEngineMetaData(AnalysisEngineDescription aAggregateDescription, ResourceManager aResourceManager, Map<String,Set<String>> aOutputMergedTypes, Map<String,? super Exception> aOutputFailedRemotes) throws ResourceInitializationException
This version of this method takes an argument aOutputMergedTypes
, which this
method will populate with the names and descriptor locations of any types whose definitions
have been merged from multiple non-identical sources. That is, types that are declared more
than once, with different (but compatible) sets of features in each declaration, or with
different (but compatible) supertypes.
aAggregateDescription
- an aggregate Analysis Engine descriptionaResourceManager
- ResourceManager instance used to resolve importsaOutputMergedTypes
- A Map that this method will populate with information about the set of types
whose definitions were merged from multiple non-identical sources. That is,
types that are declared more than once, with different (but compatible) sets of
features in each declaration, or with different (but compatible) supertypes. The
keys in the Map will be the type names (Strings) and the values will be {link
Set}s containing Descriptor URLs (Strings) where those types are declared. You
may pass null if you are not interested in this information.aOutputFailedRemotes
- If this paramter is non-null, and if a remote AE could not be contacted, then an
entry will be added to this map. The key will be the context name (e.g.,
/myDelegate1/nestedRemoteDelegate) of the failed remote, and the value will be
the Exception that occurred. If this parameter is null, an exception will be
thrown if a remote AE could not be contacted.
ResourceInitializationException
- if an incompatibiliy exists or if an import could not be resolvedprotected static boolean subsumes(String aType1Name, String aType2Name, Map<String,? extends TypeDescription> aNameMap)
aType1Name
- name of first typeaType2Name
- name of second typeaNameMap
- Map from type names to TypeDescriptions
aType1Name
subsumes the type named
aType2Name
according to the information given in the
aNameMap
.protected static void mergeFeatures(TypeDescription aType, FeatureDescription[] aFeatures) throws ResourceInitializationException
aType
- TypeDescription into which to merge the featuresaFeatures
- array of features to merge
ResourceInitializationException
- if an incompatibility existspublic static List<ProcessingResourceMetaData> getMetaDataList(Collection<? extends MetaDataObject> aComponentDescriptionOrMetaData, ResourceManager aResourceManager, Map<String,? super Exception> aOutputFailedRemotes) throws ResourceInitializationException
If you pass this method objects of type AnalysisEngineDescription
,
CollectionReaderDescription
, CasInitializerDescription
, or
CasConsumerDescription
, it will not instantiate the components. It will just extract
the type system information from the descriptor. For any other kind of
ResourceSpecifier
, it will call
UIMAFramework.produceResource(org.apache.uima.resource.ResourceSpecifier, Map)
. For
example, if a URISpecifier
is passed, a remote connection will be established and the
service will be queries for its metadata. An exception will be thrown if the connection can not
be opened.
aComponentDescriptionsOrMetaData
- a collection of ResourceSpecifier
, ProcessingResourceMetaData
,
TypeSystemDescription
, FsIndexCollection
, or
TypePriorities
objects.aResourceManager
- used to resolve delegate analysis engine importsaOutputFailedRemotes
- If this parameter is non-null, and if a remote AE could not be contacted, then
the context name (e.g. /myDelegate1/nestedRemoteDelegate) of the failed remote
will be added to this collection. If this parameter is null, an exception will
be thrown if a remote AE could not be contacted.
aComponentDescriptionOrMetaData
(including all components of aggregate AnalysisEngines)
ResourceInitialziationException
- if a failure occurs because an import could not be resolved
ResourceInitializationException
public static List<ProcessingResourceMetaData> getMetaDataList(Collection<? extends MetaDataObject> aComponentDescriptionOrMetaData, ResourceManager aResourceManager) throws ResourceInitializationException
If you pass this method objects of type AnalysisEngineDescription
,
CollectionReaderDescription
, CasInitializerDescription
, or
CasConsumerDescription
, it will not instantiate the components. It will just extract
the type system information from the descriptor. For any other kind of
ResourceSpecifier
, it will call
UIMAFramework.produceResource(org.apache.uima.resource.ResourceSpecifier, Map)
. For
example, if a URISpecifier
is passed, a remote connection will be established and the
service will be queries for its metadata. An exception will be thrown if the connection can not
be opened.
aComponentDescriptionsOrMetaData
- a collection of ResourceSpecifier
, ProcessingResourceMetaData
,
TypeSystemDescription
, FsIndexCollection
, or
TypePriorities
objects.aResourceManager
- used to resolve delegate analysis engine imports
aComponentDescriptionOrMetaData
(including all components of aggregate AnalysisEngines)
ResourceInitialziationException
- if a failure occurs because an import could not be resolved
ResourceInitializationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |