Overview   Class List   Class Hierarchy   Class Members   Functions & Constants   Defines   Header Files  

uima::AnalysisEngineMetaData Class Reference

Inherits uima::MetaDataObject.

List of all members.


Detailed Description

Contains the MetaDataObjects that are defined for both delegate and aggregate TextAnalysisEngines, for example the description of the types used and the capabilities of the TAE.

Normally, applications and annotators don't deal with the AnalysisEngineMetaData directly. They should use the methods on the AnnotatorContext.

See also:
AnalysisEngineDescription

Public Types

enum  EnSearchStrategy { NONE, DEFAULT_FALLBACK, LANGUAGE_FALLBACK }
typedef std::vector< Capability * > TyVecpCapabilities
typedef std::vector
< FSIndexDescription * > 
TyVecpFSIndexDescriptions
typedef std::vector
< TypePriority * > 
TyVecpTypePriorities
typedef std::vector
< ImportDescription * > 
TyVecpFSIndexImportDescriptions
typedef std::vector
< ImportDescription * > 
TyVecpTypePriorityImportDescriptions
typedef std::map
< icu::UnicodeString,
ConfigurationGroup
TyConfigGroup
typedef std::map
< icu::UnicodeString,
SettingsForGroup
TyConfigSettings

Public Member Functions

 AnalysisEngineMetaData ()
 ~AnalysisEngineMetaData ()
void validate ()
void commit ()
 When this method is called on a MetaDataObject# that must not be reconfigured after the engine is created, isModifiable()# will return false and all subsequent calls to setter methods will return UIMA_ERR_CONFIG_OBJECT_COMMITED#.
TyErrorId setFlowConstraints (FlowConstraints *flow)
 NOTE: This object will assume memory ownership of flowConstraint, i.e.
FlowConstraintsgetFlowConstraints ()
FlowConstraints const * getFlowConstraints () const
FlowConstraints::EnFlowType const & getFlowConstraintsType ()
TyErrorId setName (const icu::UnicodeString &name)
const icu::UnicodeString & getName () const
TyErrorId setDescription (const icu::UnicodeString &desc)
const icu::UnicodeString & getDescription () const
TyErrorId setVersion (const icu::UnicodeString &version)
const icu::UnicodeString & getVersion () const
TyErrorId setVendor (const icu::UnicodeString &vendor)
const icu::UnicodeString & getVendor () const
TyErrorId setDefaultGroupName (const icu::UnicodeString &groupName)
 Side effect: creates a configuration group groupName, if it doesn't exist already.
bool hasDefaultGroup () const
bool hasGroups () const
TyErrorId setSearchStrategy (EnSearchStrategy strategy)
EnSearchStrategy getSearchStrategy () const
TyErrorId setTypeSystemDescription (TypeSystemDescription *desc)
 NOTE: This object will assume memory ownership of desc, i.e.
TypeSystemDescriptiongetTypeSystemDescription ()
TypeSystemDescription const * getTypeSystemDescription () const
TyErrorId addTypePriority (TypePriority *prio)
 NOTE: This object will assume memory ownership of prio, i.e.
const TyVecpTypePrioritiesgetTypePriorities () const
const icu::UnicodeString & getGroupNameWhenNotSpec () const
NameValuePairgetNameValuePair (const icu::UnicodeString &paramName, const icu::UnicodeString &ancKey="")
 return a reference to the NameValuePair whose name is paramName iff a) there are no configuration groups defined or there is a default group defined.
NameValuePairgetNameValuePair (const icu::UnicodeString &groupName, const icu::UnicodeString &paramName, EnSearchStrategy strategy, const icu::UnicodeString &ancKey="")
 returns a reference to the NameValuePair whose name is paramName iff a) there are configuration groups defined b) a NameValuePair with the name exists in the configuration settings of the 'appropriate' group.
TyErrorId setNameValuePair (const NameValuePair &nvPair)
 TyErrorId == UIMA_ERR_NONE iff a) there are groups: the name of nvPair is a configuration parameter defined in the common parameters or in the default group b) there are no groups: the name of nvPair is a configuration parameter If above conditions hold true, nvPair will be added to a) the settings of the default group b) the configuration settings.
TyErrorId setNameValuePair (const icu::UnicodeString &groupName, const NameValuePair &nvPair)
 TyErrorId == UIMA_ERR_NONE iff a) there is a group groupName in the configuration parameters b) the name of nvPair is a configuration parameter defined in groupName.
bool isParameterDefined (const icu::UnicodeString &paramName, const icu::UnicodeString &ancKey) const
 Returns true iff the parameter paramName is defined.
bool isParameterDefined (const icu::UnicodeString &groupName, const icu::UnicodeString &paramName, const icu::UnicodeString &ancKey) const
 returns TRUE iff paramName is either defined for group groupName or in the commonParameter section
TyErrorId setFixedFlow (FixedFlow *flow)
 NOTE: This object will assume memory ownership of flow, i.e.
FixedFlowgetFixedFlow ()
FixedFlow const * getFixedFlow () const
TyErrorId addCapability (Capability *capability)
 NOTE: This object will assume memory ownership of capability, i.e.
const TyVecpCapabilitiesgetCapabilites () const
void setOperationalProperties (OperationalProperties *prop)
const OperationalPropertiesgetOperationalProperties () const
TyErrorId addFSIndexDescription (FSIndexDescription *indexDesc)
 NOTE: This object will assume memory ownership of indexDesc, i.e.
const TyVecpFSIndexDescriptionsgetFSIndexDescriptions () const
TyErrorId addFSIndexImportDescription (ImportDescription *importDesc, bool &takesMemoryOwnership)
 NOTE: This object will assume memory ownership of importDescription, i.e.
const
TyVecpFSIndexImportDescriptions
getFSIndexImportDescriptions () const
TyErrorId addTypePriorityImportDescription (ImportDescription *importDesc, bool &takesMemoryOwnership)
 NOTE: This object will assume memory ownership of importDescription, i.e.
const
TyVecpTypePriorityImportDescriptions
getTypePriorityDescriptions () const
const std::vector
< icu::UnicodeString > 
getGroupNamesForParameter (const icu::UnicodeString &paramName) const
bool isModifiable () const

Protected Attributes

bool iv_bIsModifiable

Member Typedef Documentation

typedef std::map<icu::UnicodeString, ConfigurationGroup> uima::AnalysisEngineMetaData::TyConfigGroup


Member Enumeration Documentation

Enumerator:
NONE 
DEFAULT_FALLBACK 
LANGUAGE_FALLBACK 


Constructor & Destructor Documentation

uima::AnalysisEngineMetaData::AnalysisEngineMetaData (  )  [inline]

uima::AnalysisEngineMetaData::~AnalysisEngineMetaData (  ) 


Member Function Documentation

void uima::AnalysisEngineMetaData::validate (  ) 

void uima::AnalysisEngineMetaData::commit (  )  [virtual]

When this method is called on a MetaDataObject# that must not be reconfigured after the engine is created, isModifiable()# will return false and all subsequent calls to setter methods will return UIMA_ERR_CONFIG_OBJECT_COMMITED#.

Subclasses of such MetaDataObjects must override this method to ensure that commit is propagated to its members. Note that configuration parameter values can be reconfigured after the engine is created. Hence, the extractValue# methods of the AnnotatorContext# can be called anytime.

Reimplemented from uima::MetaDataObject.

TyErrorId uima::AnalysisEngineMetaData::setFlowConstraints ( FlowConstraints flow  )  [inline]

NOTE: This object will assume memory ownership of flowConstraint, i.e.

it will be deleted when this object's destructor is called !

References UIMA_ERR_CONFIG_OBJECT_COMITTED, and UIMA_ERR_NONE.

FlowConstraints* uima::AnalysisEngineMetaData::getFlowConstraints (  )  [inline]

FlowConstraints const* uima::AnalysisEngineMetaData::getFlowConstraints (  )  const [inline]

FlowConstraints::EnFlowType const& uima::AnalysisEngineMetaData::getFlowConstraintsType (  )  [inline]

TyErrorId uima::AnalysisEngineMetaData::setName ( const icu::UnicodeString &  name  )  [inline]

const icu::UnicodeString& uima::AnalysisEngineMetaData::getName ( void   )  const [inline]

TyErrorId uima::AnalysisEngineMetaData::setDescription ( const icu::UnicodeString &  desc  )  [inline]

const icu::UnicodeString& uima::AnalysisEngineMetaData::getDescription (  )  const [inline]

TyErrorId uima::AnalysisEngineMetaData::setVersion ( const icu::UnicodeString &  version  )  [inline]

const icu::UnicodeString& uima::AnalysisEngineMetaData::getVersion (  )  const [inline]

TyErrorId uima::AnalysisEngineMetaData::setVendor ( const icu::UnicodeString &  vendor  )  [inline]

const icu::UnicodeString& uima::AnalysisEngineMetaData::getVendor (  )  const [inline]

TyErrorId uima::AnalysisEngineMetaData::setDefaultGroupName ( const icu::UnicodeString &  groupName  ) 

Side effect: creates a configuration group groupName, if it doesn't exist already.

Reason: otherwise, AnnotatorContext`s assignValue with two parameters will fail if the specifier defines all parameters in the commonParameters section and declares the default group only via the defaultGroup attribute of configurationParameters

bool uima::AnalysisEngineMetaData::hasDefaultGroup (  )  const [inline]

bool uima::AnalysisEngineMetaData::hasGroups (  )  const [inline]

TyErrorId uima::AnalysisEngineMetaData::setSearchStrategy ( EnSearchStrategy  strategy  )  [inline]

EnSearchStrategy uima::AnalysisEngineMetaData::getSearchStrategy (  )  const [inline]

TyErrorId uima::AnalysisEngineMetaData::setTypeSystemDescription ( TypeSystemDescription desc  )  [inline]

NOTE: This object will assume memory ownership of desc, i.e.

it will be deleted when this object's destructor is called !

References UIMA_ERR_CONFIG_OBJECT_COMITTED, and UIMA_ERR_NONE.

TypeSystemDescription* uima::AnalysisEngineMetaData::getTypeSystemDescription (  )  [inline]

TypeSystemDescription const* uima::AnalysisEngineMetaData::getTypeSystemDescription (  )  const [inline]

TyErrorId uima::AnalysisEngineMetaData::addTypePriority ( TypePriority prio  ) 

NOTE: This object will assume memory ownership of prio, i.e.

it will delete it when destroyed !

const TyVecpTypePriorities& uima::AnalysisEngineMetaData::getTypePriorities (  )  const [inline]

const icu::UnicodeString& uima::AnalysisEngineMetaData::getGroupNameWhenNotSpec (  )  const

Returns:
A group name g for which the following holds true: The behavior of getNameValuePair(param) and getNameValuePair(g, param, getSearchStrategy()) is the same. If a default group is defined, returns that group name. If no groups are defined, returns CONFIG_GROUP_NAME_WHEN_NO_GROUPS. If groups are defined, but no default group, throws an exception.

NameValuePair* uima::AnalysisEngineMetaData::getNameValuePair ( const icu::UnicodeString &  paramName,
const icu::UnicodeString &  ancKey = "" 
)

return a reference to the NameValuePair whose name is paramName iff a) there are no configuration groups defined or there is a default group defined.

b) a NameValuePair with the name exists in the configuration settings of this taespecifier

Otherwise, return NULL

NameValuePair* uima::AnalysisEngineMetaData::getNameValuePair ( const icu::UnicodeString &  groupName,
const icu::UnicodeString &  paramName,
EnSearchStrategy  strategy,
const icu::UnicodeString &  ancKey = "" 
)

returns a reference to the NameValuePair whose name is paramName iff a) there are configuration groups defined b) a NameValuePair with the name exists in the configuration settings of the 'appropriate' group.

This group may either be groupName or one of the fallback groups specified by the searchStrategy and defaultGroup

Otherwise, return NULL

TyErrorId uima::AnalysisEngineMetaData::setNameValuePair ( const NameValuePair nvPair  )  [inline]

TyErrorId == UIMA_ERR_NONE iff a) there are groups: the name of nvPair is a configuration parameter defined in the common parameters or in the default group b) there are no groups: the name of nvPair is a configuration parameter If above conditions hold true, nvPair will be added to a) the settings of the default group b) the configuration settings.

TyErrorId uima::AnalysisEngineMetaData::setNameValuePair ( const icu::UnicodeString &  groupName,
const NameValuePair nvPair 
)

TyErrorId == UIMA_ERR_NONE iff a) there is a group groupName in the configuration parameters b) the name of nvPair is a configuration parameter defined in groupName.

bool uima::AnalysisEngineMetaData::isParameterDefined ( const icu::UnicodeString &  paramName,
const icu::UnicodeString &  ancKey 
) const

Returns true iff the parameter paramName is defined.

bool uima::AnalysisEngineMetaData::isParameterDefined ( const icu::UnicodeString &  groupName,
const icu::UnicodeString &  paramName,
const icu::UnicodeString &  ancKey 
) const

returns TRUE iff paramName is either defined for group groupName or in the commonParameter section

TyErrorId uima::AnalysisEngineMetaData::setFixedFlow ( FixedFlow flow  )  [inline]

NOTE: This object will assume memory ownership of flow, i.e.

it will be deleted when this object's destructor is called !

References UIMA_ERR_CONFIG_OBJECT_COMITTED, and UIMA_ERR_NONE.

FixedFlow* uima::AnalysisEngineMetaData::getFixedFlow (  )  [inline]

FixedFlow const* uima::AnalysisEngineMetaData::getFixedFlow (  )  const [inline]

TyErrorId uima::AnalysisEngineMetaData::addCapability ( Capability capability  )  [inline]

NOTE: This object will assume memory ownership of capability, i.e.

it will be deleted when this object's destructor is called !

References UIMA_ERR_CONFIG_OBJECT_COMITTED, and UIMA_ERR_NONE.

const TyVecpCapabilities& uima::AnalysisEngineMetaData::getCapabilites (  )  const [inline]

void uima::AnalysisEngineMetaData::setOperationalProperties ( OperationalProperties prop  )  [inline]

const OperationalProperties* uima::AnalysisEngineMetaData::getOperationalProperties (  )  const [inline]

TyErrorId uima::AnalysisEngineMetaData::addFSIndexDescription ( FSIndexDescription indexDesc  )  [inline]

NOTE: This object will assume memory ownership of indexDesc, i.e.

it will be deleted when this object's destructor is called !

References UIMA_ERR_CONFIG_OBJECT_COMITTED, and UIMA_ERR_NONE.

const TyVecpFSIndexDescriptions& uima::AnalysisEngineMetaData::getFSIndexDescriptions (  )  const [inline]

TyErrorId uima::AnalysisEngineMetaData::addFSIndexImportDescription ( ImportDescription importDesc,
bool &  takesMemoryOwnership 
) [inline]

NOTE: This object will assume memory ownership of importDescription, i.e.

it will be deleted when this object's destructor is called !

References UIMA_ERR_CONFIG_OBJECT_COMITTED, and UIMA_ERR_NONE.

const TyVecpFSIndexImportDescriptions& uima::AnalysisEngineMetaData::getFSIndexImportDescriptions (  )  const [inline]

TyErrorId uima::AnalysisEngineMetaData::addTypePriorityImportDescription ( ImportDescription importDesc,
bool &  takesMemoryOwnership 
) [inline]

NOTE: This object will assume memory ownership of importDescription, i.e.

it will be deleted when this object's destructor is called !

References UIMA_ERR_CONFIG_OBJECT_COMITTED, and UIMA_ERR_NONE.

const TyVecpTypePriorityImportDescriptions& uima::AnalysisEngineMetaData::getTypePriorityDescriptions (  )  const [inline]

const std::vector< icu::UnicodeString > uima::AnalysisEngineMetaData::getGroupNamesForParameter ( const icu::UnicodeString &  paramName  )  const

Returns:
The names of all groups in this specifier that define paramName. May contain duplicate group names.

bool uima::MetaDataObject::isModifiable (  )  const [inline, inherited]


Member Data Documentation

bool uima::MetaDataObject::iv_bIsModifiable [protected, inherited]


The documentation for this class was generated from the following file:

Generated on Mon Oct 1 11:15:08 2012 for UIMACPP API by  doxygen 1.5.6