The RM Overlay Package

Overview

Classes in the aom2.rm_overlay package are used to support definition of settings relating to unconstrained RM attributes of constrained object nodes (including the top-level object) within the archetype. The UML model is shown below.

AM aom2.rm overlay
Figure 1. am.aom2.rm_overlay package

Semantics

RM Attribute Visibility

Currently, the only RM overlay settings are for RM attribute visibility, which relates to RM attributes within the context of an archetype. This is described in more detail in the ADL2 specification.

The visibility settings consist of a list of per-RM attribute settings, in the form of instances of the class RM_ATTRIBUTE_VISIBILITY, each keyed by the RM path to the node(s) to which they apply. The path is formed of an object node path within the archetype followed by a path to an RM attribute, which may be on an already-constrained path, or may be a path not already included in the archetype structure. The former part is one of:

  • the root path, /;

  • an object path within the archetyped structure e.g. /items[at0019] (/items[id20]).

The latter part is a path containing no object identifiers (at-codes / id-codes), of one or mode RM attribute names from the Reference Model. The terminal attribute name will almost always be a single-valued attribute, since the visibility of container attributes will almost always be defined in terms of specifically constrained child objects, i.e. part of the archetyped structure.

Two types of RM visibility can be specified. First, in terms of attribute visibility within modelling tools, using the values show and hide. A non-archetyped RM attribute is by default not visible within an archetype modelling tool visualisation, since it is not part of the archetyped structure. Without visibility settings, the only means of displaying such an attribute is to display all non-archetyped RM attributes in some generic fashion. Setting the visibility on a particular RM attribute path to show indicates to the tool that this RM attribute should be displayed, along with the archetyped structure - preferably in a visually distinct way. This enables modellers to see specific model attributes that are built into the RM, and do not need to be modelled as archetype objects.

The hide setting is to allow two possibilities:

  • to reverse the show setting for an attribute’s visibility in a specialisation parent in the current archetype; and

  • to hide an already-archetyped RM attribute in a specialisation child archetype.

The visibility setting for an RM attribute with respect to the specialisation lineage (aka inheritance hierarchy) is just the most recent setting, i.e. the setting from the deepest child.

A second visibility setting is an optional alias, which is specified in the form of an at-code whose definition is found in the terminology section of the archetype, in the usual fashion. An alias can be associated with any RM path in the archetype, including non-archetyped RM attributes reachable from the root RM type of the archetype. Definition of an alias enables an RM attribute node to be multi-lingually renamed from its default RM name.

Validity

The RM overlay validity rules are as follows:

VRMVP: RM-visibility path validity. The path stated in an rm_visbility entry must be valid, meaning it must be valid against the RM, and if it references archetype-specific nodes, be valid against the archetype as well.

VRMVAV: RM-visibility alias validity. If the alias attribute is set, it must refer to an at-code defined in the terminology.

Class Descriptions

RM_OVERLAY Class

  • Definition

  • Effective

  • BMM

  • UML

Class

RM_OVERLAY

Description

Container object for archetype statements relating to RM attributes, which may be directly on objects constrained within the archetype, or at deeper non-constrained RM paths from an object or the root.

Attributes

Signature

Meaning

0..1

rm_visibility: Hash<String,RM_ATTRIBUTE_VISIBILITY>

Optional structure in which visibility and aliasing of reference model elements can be specified. Key is path to an RM attribute, which is typically formed from a path to an archetyped node concatenated with a further pure RM attribute path; may also refer to a non-archetyped attribute.

RM_OVERLAY

Container object for archetype statements relating to RM attributes, which may be directly on objects constrained within the archetype, or at deeper non-constrained RM paths from an object or the root.

Attributes

rm_visibility: Hash<String,RM_ATTRIBUTE_VISIBILITY> [0..1]

Optional structure in which visibility and aliasing of reference model elements can be specified. Key is path to an RM attribute, which is typically formed from a path to an archetyped node concatenated with a further pure RM attribute path; may also refer to a non-archetyped attribute.

{
    "name": "RM_OVERLAY",
    "documentation": "Container object for archetype statements relating to RM attributes, which may be directly on objects constrained within the archetype, or at deeper non-constrained RM paths from an object or the root.",
    "properties": {
        "rm_visibility": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "rm_visibility",
            "documentation": "Optional structure in which visibility and aliasing of reference model elements can be specified. Key is path to an RM attribute, which is typically formed from a path to an archetyped node concatenated with a further pure RM attribute path; may also refer to a non-archetyped attribute.",
            "type_def": {
                "root_type": "Hash",
                "generic_parameters": [
                    "String",
                    "RM_ATTRIBUTE_VISIBILITY"
                ]
            }
        }
    }
}
RM_OVERLAY

RM_ATTRIBUTE_VISIBILITY Class

  • Definition

  • Effective

  • BMM

  • UML

Class

RM_ATTRIBUTE_VISIBILITY

Description

Definition of visibility of an RM attribute within a larger archetype structure.

Attributes

Signature

Meaning

0..1

visibility: VISIBILITY_TYPE

Visibility setting of a non-archetyped RM attribute (RM attributes that are constrained or within the archetyped structure are visible by default).

0..1

alias: Terminology_code

Optional alias for the attribute referenced by the path.

Invariants

Inv_alias_validity: alias /= Void implies visibility /= Void

RM_ATTRIBUTE_VISIBILITY

Definition of visibility of an RM attribute within a larger archetype structure.

Attributes

visibility: VISIBILITY_TYPE [0..1]

Visibility setting of a non-archetyped RM attribute (RM attributes that are constrained or within the archetyped structure are visible by default).

alias: Terminology_code [0..1]

Optional alias for the attribute referenced by the path.

Invariants

Inv_alias_validity: alias /= Void implies visibility /= Void

{
    "name": "RM_ATTRIBUTE_VISIBILITY",
    "documentation": "Definition of visibility of an RM attribute within a larger archetype structure.",
    "properties": {
        "visibility": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "visibility",
            "documentation": "Visibility setting of a non-archetyped RM attribute (RM attributes that are constrained or within the archetyped structure are visible by default).",
            "type": "VISIBILITY_TYPE"
        },
        "alias": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "alias",
            "documentation": "Optional alias for the attribute referenced by the path.",
            "type": "Terminology_code"
        }
    },
    "invariants": {
        "Inv_alias_validity": "alias /= Void implies visibility /= Void"
    }
}
RM_ATTRIBUTE_VISIBILITY

VISIBILITY_TYPE Enumeration

  • Definition

  • Effective

  • BMM

  • UML

Enumeration

VISIBILITY_TYPE

Description

Enumeration of visibility settings for model elements.

Constants

Signature

Meaning

hide

Indicates to a tool to hide the model element to which this marker is attached.

show

Indicates to a tool to show the model element to which this marker is attached.

VISIBILITY_TYPE

Enumeration of visibility settings for model elements.

Inherits: Any, Ordered, String

Constants

hide

Indicates to a tool to hide the model element to which this marker is attached.

show

Indicates to a tool to show the model element to which this marker is attached.

Functions

Any.is_equal (
other: Any[1]
): Boolean [1..1]

Value equality: return True if this and other are attached to objects considered to be equal in value.

Any.equal alias "=", "==" (
other: Any[1]
): Boolean [1..1]

Reference equality for reference types, value equality for value types.

Any.instance_of (
a_type: String[1]
): Any [1..1]

Create new instance of a type.

Any.type_of (
an_object: Any[1]
): String [1..1]

Type name of an object as a string. May include generic parameters, as in "Interval<Time>".

Any.not_equal alias "!=", "≠" (
other: Ordered[1]
): Boolean [1..1]

True if current object not equal to other. Returns not equal().

String.less_than (
other: String[1]
): Boolean [1..1]

Lexical comparison of string content based on ordering in relevant character set.

Ordered.less_than_or_equal alias "⇐", "≤" (
other: Ordered[1]
): Boolean

Post_result: not (other < self) [1..1]

True if current object less than or equal to other.

Ordered.greater_than alias ">" (
other: Ordered[1]
): Boolean

Post_result: Result = (other < self) [1..1]

True if current object greater than other.

Ordered.greater_than_or_equal alias ">=", "≥" (
other: Ordered[1]
): Boolean

Post_result: Result = (other <= self) [1..1]

True if current object greater than or equal to other.

String.is_empty (): Boolean [1..1]

True if string is empty, i.e. equal to "".

String.is_integer (): Boolean [1..1]

True if string can be parsed as an integer.

String.as_integer (): Integer [1..1]

Return the integer corresponding to the integer value represented in this string.

String.append alias "+" (
other: String[1]
): String [1..1]

Concatenation operator - causes other to be appended to this string.

String.contains (
other: String[1]
): Boolean [1..1]

Return True if this String contains other (case-sensitive).

{
    "_type": "P_BMM_ENUMERATION_STRING",
    "name": "VISIBILITY_TYPE",
    "documentation": "Enumeration of visibility settings for model elements.",
    "ancestors": [
        "String"
    ],
    "item_names": [
        "hide",
        "show"
    ],
    "item_documentations": [
        "Indicates to a tool to hide the model element to which this marker is attached.",
        "Indicates to a tool to show the model element to which this marker is attached."
    ]
}
VISIBILITY_TYPE