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

uima::TypeDescription Class Reference

Inherits uima::MetaDataObject.

List of all members.


Detailed Description

Defines a type by its name and the name of its super type.

If a type defines features or can only assume values from a predefined set, the information is accessible via getFeatureDescriptions and getAllowedValues, resp. getDescription returns a textual description of the type.

Public Types

typedef std::vector
< FeatureDescription * > 
TyVecpFeatureDescriptions
typedef std::vector
< AllowedValue * > 
TyVecpAllowedValues

Public Member Functions

 TypeDescription ()
 TypeDescription (const TypeDescription &crOther)
 ~TypeDescription ()
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 setName (const icu::UnicodeString &name)
const icu::UnicodeString & getName () const
TyErrorId setSuperTypeName (const icu::UnicodeString &name)
const icu::UnicodeString & getSuperTypeName () const
TyErrorId setDescription (const icu::UnicodeString &desc)
const icu::UnicodeString & getDescription () const
TyErrorId addFeatureDescription (FeatureDescription *feature, bool &takesMemoryOwnership)
 NOTE: This object will assume memory ownership of feature, i.e.
TyErrorId addAllowedValue (AllowedValue *allowed, bool &takesMemoryOwnership)
 Adds an AllowedValue object to the list of AllowedValues NOTE: This object will assume memory ownership of AllowedValue, i.e.
void mergeFeatureDescriptions (const TyVecpFeatureDescriptions &descs)
 Adds all feature descriptions in descs to this TypeDescription.
void mergeAllowedValues (const TyVecpAllowedValues &descs)
const TyVecpFeatureDescriptionsgetFeatureDescriptions () const
const TyVecpAllowedValuesgetAllowedValues () const
FeatureDescriptiongetFeatureDescription (const icu::UnicodeString &featureName) const
 returns a FeatureDescription with name featureName or NULL, if no such feature can be found.
AllowedValuegetAllowedValue (const icu::UnicodeString &name) const
void validate ()
bool isModifiable () const

Protected Attributes

bool iv_bIsModifiable


Member Typedef Documentation


Constructor & Destructor Documentation

uima::TypeDescription::TypeDescription (  )  [inline]

uima::TypeDescription::TypeDescription ( const TypeDescription crOther  ) 

uima::TypeDescription::~TypeDescription (  )  [inline]


Member Function Documentation

void uima::TypeDescription::commit (  )  [inline, 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::TypeDescription::setName ( const icu::UnicodeString &  name  )  [inline]

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

TyErrorId uima::TypeDescription::setSuperTypeName ( const icu::UnicodeString &  name  )  [inline]

const icu::UnicodeString& uima::TypeDescription::getSuperTypeName (  )  const [inline]

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

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

TyErrorId uima::TypeDescription::addFeatureDescription ( FeatureDescription feature,
bool &  takesMemoryOwnership 
)

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

it will delete it when destroyed.

TyErrorId uima::TypeDescription::addAllowedValue ( AllowedValue allowed,
bool &  takesMemoryOwnership 
)

Adds an AllowedValue object to the list of AllowedValues NOTE: This object will assume memory ownership of AllowedValue, i.e.

it will delete it when destroyed.

void uima::TypeDescription::mergeFeatureDescriptions ( const TyVecpFeatureDescriptions descs  ) 

Adds all feature descriptions in descs to this TypeDescription.

If there are two features with the same name and rangetype, only one will be in this TypeDescription. However, if two features have the same name, but different rangetypes, the TypeDescription will contain both. The error will be identified when validating the TextAnalysisEngineSpecifier. FeatureDescription objects contained in descs will be copied, hence, the memory ownership of the objects in descs will remain with the caller of this method.

void uima::TypeDescription::mergeAllowedValues ( const TyVecpAllowedValues descs  ) 

const TyVecpFeatureDescriptions& uima::TypeDescription::getFeatureDescriptions (  )  const [inline]

const TyVecpAllowedValues& uima::TypeDescription::getAllowedValues (  )  const [inline]

FeatureDescription* uima::TypeDescription::getFeatureDescription ( const icu::UnicodeString &  featureName  )  const

returns a FeatureDescription with name featureName or NULL, if no such feature can be found.

AllowedValue* uima::TypeDescription::getAllowedValue ( const icu::UnicodeString &  name  )  const

void uima::TypeDescription::validate (  ) 

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:09 2012 for UIMACPP API by  doxygen 1.5.6