Bundt Scripting Reference · Bundt Scripting Language version 1.0.1.0

create association statement

Creates a new association and puts it in context.

The primary semi-association, as well as the class owning it, are also put in context.

Syntax

create association Name:
    Cardinality [^] [role Role] (OppositeClass | symmetric)
    [[!] whole] [[!] strong] [( AspectList )]
    [of Owner]
    [
      inverse InverseName:
      InverseCardinality [^] [role InverseRole]
      [[!] whole] [[!] strong] [( InverseAspectList )]
    ]

Element Type Optionality Notes
Name Expression<Identifier> or Expression<Dictionary<Identifier>> Mandatory. Specifies the name of the new primary semi-association, either as an identifier or in multilingual dictionary format.
Cardinality Cardinality Mandatory. Specifies the cardinality of the new primary semi-association.
^ Optional. If omitted, the new primary semi-association is not made sorted. Specifies whether the new primary semi-association must be sorted.
Role Expression<Identifier> or Expression<Dictionary<Identifier>> Optional. Specifies the role of the new primary semi-association, either as an identifier or in multilingual dictionary format.
OppositeClass Class name Optional. If this is specified, then symmetric cannot be specified, and the inverse clause must be specified. Specifies the opposite class for the new primary semi-association.
symmetric Optional. If this is specified, then OppositeClass and the inverse clause cannot be specified. Specifies whether the new association is symmetric.
whole Optional. If omitted or preceded by !, the new primary semi-association is not made whole. Specifies whether the new primary semi-association must be whole.
strong Optional. If omitted or preceded by !, the new primary semi-association is not made strong. Specifies whether the new primary semi-association must be strong.
AspectList Marker list Optional. Specifies the aspects used by the the new primary semi-association. Accepted markers are S for subjective, K for constant, and T for temporal.
Owner Class name Optional. If no owner is specified, the class in context will be used.
If no class is in context, an error occurs.
Specifies the class that will own the new primary semi-association.
InverseName Expression<Identifier> or Expression<Dictionary<Identifier>> Optional. Specifies the name of the new secondary semi-association, either as an identifier or in multilingual dictionary format.
InverseCardinality Cardinality Optional. Specifies the cardinality of the new secondary semi-association.
^ Optional. If omitted, the new secondary semi-association is not made sorted. Specifies whether the new secondary semi-association must be sorted.
InverseRole Expression<Identifier> or Expression<Dictionary<Identifier>> Optional. Specifies the role of the new secondary semi-association, either as an identifier or in multilingual dictionary format.
whole Optional. If omitted or preceded by !, the new secondary semi-association is not made whole. Specifies whether the new secondary semi-association must be whole.
strong Optional. If omitted or preceded by !, the new secondary semi-association is not made strong. Specifies whether the new secondary semi-association must be strong.
InverseAspectList Marker list Optional. Specifies the aspects used by the the new secondary semi-association. Accepted markers are S for subjective, K for constant, and T for temporal.

Returns

The association just created.

Examples

Intent Code
Create a new association in the context class create association IsLocatedIn: 0..1 Place inverse Contains 0..*;
Create a new association in an explicit class create association IsLocatedIn: 0..1 Place of Building inverse Contains 0..*;
Create a new whole/part association create association IsMadeOf: 0..* Building whole of City inverse BelongsTo 0..1;
Create a new whole/part association with primary temporal semantics and a secondary role and strong semantics create association IsMadeOf: 0..* Building whole (T) of City inverse BelongsTo 0..1 role Owner strong;
Create a new symmetric self-association create association Knows: 0..* role Acquaintance symmetric of Person;

See Also


Contents distributed under a Creative Commons Attribution 4.0 International License · About · Terms of Use · Contact Us · last updated on 08 October 2020