Skip to content

Tagged values

Tobias Spears edited this page Mar 24, 2020 · 10 revisions

Home Modelling


What tagged values are

Stereotypes and tagged values extend existing UML model elements to adapt them for different purposes. A tagged value is a tag value pair that can be used to add properties to model elements in UML. In UML 2 tagged values can only be applied to model elements that use a stereotype with a tag definition. Tagged values are shown in the form tag = value where tag is the tag name and value is a literal value. Tagged values are especially relevant for code generation or configuration management.

EXAMPLE A tagged value attached to a classifier can be defined as follows: {author = “Joe Smith”, deadline = 31 March 1997, status = analysis}.

Tagged values are defined as attributes for the stereotypes, for instance attribute 'codeList' of stereotype CodeList which represents a URI referencing the original code list maintained by e.g. some authority.

Tagged values from iso/tc211-standards

From 19103

Stereotype Tagged value Description
CodeList codeList A persistent URI references the actual external code list

From 19109

Stereotype Tagged value Description
ApplicationSchema version The application schema version
ApplicationSchema description Secondary descriptions and informative notes
ApplicationSchema catalogue-entry The reference to a catalogue the element is implemented from
ApplicationSchema language The primary language used for names and definitions in the application schema. Shall use a value taken from IETF RFC 5646.
ApplicationSchema designation The name of the package in an alternative language to the primary language. Shall be formatted according to the pattern:"{Name}"@{language}. May be repeated for several languages
FeatureType designation The name of the feature type or property type in an alternative language to the primary language. Shall be formatted according to the pattern:"{Name}"@{language}. May be repeated for several languages
FeatureType description Secondary descriptions and informative notes
FeatureType definition Textual definition in an alternative language to the primary language. May be repeated for several languages

From 19136 (Annex E)

UML model element Tagged value Description
Package documentation Definition ("Notes" field in EA)
Package xsdDocument Filename for the XML Schema document, used if a package shall be mapped to its own XML Schema document. Mandatory for packages with stereotype ApplicationSchema
Package targetNamespace (only stereotype ApplicationSchema) The target namespace URI for the application schema
Package xmlns (only stereotype ApplicationSchema) The xml namespace abbreviation
Package version (only stereotype ApplicationSchema)
Package gmlProfileSchema (only stereotype ApplicationSchema) Possibly associated GML profile
Class documentation Definition ("Notes" field in EA)
Class noPropertyType Set to "true" if a named complex type shall not be created
Class byValuePropertyType A named complex type shall be created for these classes (carrying the name of the class with a "PropertyByValueType" suffix), if the class carries a tagged value "byValuePropertyType" with the value "true".
Class isCollection If the class has a single association which is an aggregation or composition of a target class, the association role is converted to a property element, and the class carries a tagged value "isCollection" with the value "true", the attribute group gml:AggregationAttributeGroup is added to the complex type of the feature type.
Class asDictionary (only stereotype CodeList) If the class carries a tagged value "asDictionary" with the value "true", an external gml:Dictionary shall be used to represent a code list.
Class xmlSchemaType (only stereotype Type) The XML Schema typename corresponding to the data type
Attribute and Association end documentation Definition ("Notes" field in EA)
Attribute and Association end sequenceNumber Support the consistent ordering of the properties from the UML model in the conversion to XML Schema
Attribute and Association end inlineOrByReference For feature and object types the representation may be restricted to inline or by-reference using a tagged value "inlineOrByReference" with the values "inline" or "byReference" respectively. If the tagged value is missing or its value is "inlineOrByReference" the default encoding shall be used.
Attribute and Association end isMetadata Set to "true" if an attribute or association role is a metadata property