Bundt Scripting Reference · Bundt Scripting Language version 1.0.1.0

alter attribute statement

Alters an existing attribute and puts it in context.

The class owning the attribute is also put in context.

Syntax

alter attribute [AttributeName] as
    [name Name]
    [: Cardinality [^] (BaseType | enum EnumType)]
    [( AspectList )]
    [definition Definition]
    [comments Comments]
    [tagged
      [without WithoutTagList]
      [with WithTagList]
    ]

Element Type Optionality Notes
AttributeName Attribute name Optional. If no attribute name is specified, the attribute in context is used. If no attribute is in context, an error occurs. Specifies the existing attribute to be altered.
Name Expression<Identifier> or Expression<Dictionary<Identifier>> Optional. If no name is specified, the current one is maintained. Specifies the new name of the attribute, either as an identifier or in multilingual dictionary format.
Cardinality Cardinality Optional. If no cardinality is specified, the current one is maintained. Specifies the new cardinality of the attribute.
^ Optional. If omitted, the current one is maintained. Specifies whether the attribute must be sorted.
BaseType Base type name Optional. If this is specified, then EnumType cannot be specified. Specifies the new base type for the attribute.
EnumType Enumerated type name Optional. If this is specified, then BaseType cannot be specified. Specifies the new enumerated type for the attribute.
AspectList Marker list Optional. Specifies the aspects used by the attribute. Accepted markers are S for subjective, K for constant, T for temporal, and L for multilingual, optionally prefixed by ! to negate them.
Definition Expression<Text> or Expression<Dictionary<Text>> Optional. If no definition is specified, the current one is maintained. Specifies the new definition of the attribute.
Comments Expression<Text> or Expression<Dictionary<Text>> Optional. If no commments are specified, the current ones are maintained. Specifies the new commments for the attribute.
WithoutTagList Element name list Optional. If no tags are specified, no tags are removed. Specifies the tags to remove from the attribute.
WithTagList Element name list Optional. If no tags are specified, no tags are added. Specifies the tags to add to the attribute.

Returns

The attribute just altered.

Examples

Intent Code
Alter an attribute to change its name alter attribute Building.Location as name Address;
Alter an attribute to change its cardinality and type alter attribute Building.Address as : 1..* Text;
Alter an attribute to make it temporal and not subjective alter attribute Building.Address as (!S, T);
Alter the context attribute to add a tag alter attribute as tagged with ToRevise;

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