The Term class

 

Overview

class Term extends DictionaryElement;

 

Dictionary term definition. The Definition attribute is used to store the term definition. A term belongs to a Dictionary.

 

Like Requirements and RequirementContainers, a Term is typed if its owner Dictionary is typed. In this case, the Term has the same type as the Dictionary. A typed Term has a PropertyValueSet that stores its property values.

 

Detailed class diagram for Term

 

See also:  Dictionary, DictionaryElement, PropertySet, PropertyValueSet

 

 

Term properties

The class has the following association:

·         Properties:PropertyValueSet: Property values for this term.

 

The class owns the following attribute:

·         Definition: Complete term definition.

 

 

Term consistency rules

Composition:

·         A Term belongs to a Dictionary, and its Name must respect unicity rules in the dictionary.

 

Properties:

·         The Term must have a PropertyValueSet if the owner Dictionary is typed.

·         The Term must NOT have a PropertyValueSet if the owner Dictionary is not typed.

·         The PropertyValueSet type must be the same as the Dictionary type.

 

 

Term methods

 

Term methods

 

 

PropertyValue getPropertyValue(in string key)

This returns the PropertyValue that values the key named Property (see PropertyValue).

 

 

boolean setPropertValue(in string key, in string value)

This changes a property value. The corresponding PropertyValue must already exist in the owned PropertyValueSet.  In this case, the method returns true, otherwise it returns false.

 

 

updatePropertValues()

This creates, destroys or updates the PropertyValueSet, in order to make it consistent with the owner type. All Dictionary missing PropertyValues are created and defined using the Dictionary’s default values.