Constraint Model Package

Overview

The figure below illustrates the class model of an archetype definition. This model is completely generic, and is designed to express the semantics of constraints on instances of classes which are themselves described in UML (or a similar object-oriented meta-model). Accordingly, the major abstractions in this model correspond to major abstractions in object-oriented formalisms, including several variations of the notion of 'object' and the notion of 'attribute'. The notion of 'object' rather than 'class' or 'type' is used because archetypes are about constraints on data (i.e. 'instances', or 'objects') rather than models, which are constructed from 'classes'.

An informal way of understanding the model is as follows. An archetype definition is an instance of a C_COMPLEX_OBJECT, which can be thought of as expressing constraints on an object that is of some particular reference model type (recorded in the attribute rm_type_name), and which is larger than a simple instance of a primitive type such as String or Integer. The constraints define what configurations of reference model class instances are considered to conform to the archetype. For example, certain configurations of the classes PARTY, ADDRESS, CLUSTER and ELEMENT might be defined by a Person archetype as allowable structures for 'people with identity, contacts, and addresses'. Because the constraints allow optionality, cardinality and other choices, a given archetype usually corresponds to a set of similar configurations of objects. At the leaf nodes of an archetype definition are C_PRIMITIVE_OBJECT nodes, defining the constraints on leaf values of objects, i.e. Integers, Strings etc.

AM aom14.archetype.constraint model
Figure 1. aom14.archetype.constraint_model Package

Semantics

The effect of the model is to create archetype description structures that are a hierarchical alternation of object and attribute constraints, as shown in [archetype_parsing_process]. This structure can be seen by inspecting an ADL archetype, or by viewing an archetype in openEHR ADL Workbench, and is a direct consequence of the object-oriented principle that classes consist of properties, which in turn have types that are classes. (To be completely correct, types do not always correspond to classes in an object model, but it does not make any difference here). The repeated object/attribute hierarchical structure of an archetype provides the basis for using paths to reference any node in an archetype. Archetype paths follow a syntax that is a subset of the W3C Xpath syntax.

All Node Types

A small number of properties are defined for all node types. The path feature computes the path to the current node from the root of the archetype, while the has_path function indicates whether a given path can be found in an archetype. The is_valid function indicates whether the current node and all sub-nodes are internally valid according to the semantics of this archetype model. The is_subset_of function is used for comparison between corresponding nodes from different archetypes, in order to asert specialisation.

Attribute Node Types

Constraints on attributes are represented by instances of the two subtypes of C_ATTRIBUTE: C_SINGLE_ATTRIBUTE and C_MULTIPLE_ATTRIBUTE. For both subtypes, the common constraint is whether the corresponding instance (defined by the rm_attribute_name attribute) must exist. Both subtypes have a list of children, representing constraints on the object value(s) of the attribute.

Single-valued attributes (such as Person.date_of_birth: Date) are constrained by instances of the type C_SINGLE_ATTRIBUTE, which uses the children to represent multiple alternative object constraints for the attribute value.

Multiply-valued attributes (such as Person.contacts: List<Contact>) are constrained by an instance of C_MULTIPLE_ATTRIBUTE, which allows multiple co-existing member objects of the container value of the attribute to be constrained, along with a cardinality constraint, describing ordering and uniqueness of the container. The following figure illustrates the two possibilities.

c attributes single multiple
Figure 2. Single and Multiple-valued C_ATTRIBUTEs

The need for both existence and cardinality constraints in the C_MULTIPLE_ATTRIBUTE class deserves some explanation, especially as the meanings of these notions are often confused in object-oriented literature. An existence constraint indicates whether an object will be found in a given attribute field, while a cardinality constraint indicates what the valid membership of a container object is. Cardinality is only required for container objects such as List<T>, Set<T> and so on, whereas existence is always required. If both are used, the meaning is as follows: the existence constraint says whether the container object will be there (at all), while the cardinality constraint says how many items must be in the container, and whether it acts logically as a list, set or bag.

Object Node Types

Node_id and Paths

The node_id attribute in the class C_OBJECT, inherited by all subtypes, is of great importance in the archetype constraint model. It has two functions:

  • it allows archetype object constraint nodes to be individually identified, and in particular, guarantees sibling node unique identification;

  • it is the main link between the archetype definition (i.e. the constraints) and the archetype ontology, because each node_id is a 'term code' in the ontology section.

The existence of node_ids in an archetype allows archetype paths to be created, which refer to each node. Not every node in the archetype needs a node_id, if it does not need to be addressed using a path; any leaf or near-leaf node which has no sibling nodes from the same attribute can safely have no node_id.

Defined Object Nodes (C_DEFINED_OBJECT)

The C_DEFINED_OBJECT subtype corresponds to the category of C_OBJECTs that are defined in an archetype by value, i.e. by inline definition. Four properties characterise C_DEFINED_OBJECTs as follows.

Any_allowed

The any_allowed function of a node indicates that any value permitted by the reference model for the attribute or type in question is allowed by the archetype; its use permits the logical idea of a completely "open" constraint to be simply expressed, avoiding the need for any further substructure. Any_allowed is effected in subtypes to indicate in concrete terms when it is True, usually related to Void attribute values.

Assumed_value

When archetypes are defined to have optional parts, an ability to define 'assumed' values is useful. For example, an archetype for the concept 'blood pressure measurement' might contain an optional protocol section describing the patient position, with choices 'lying', 'sitting' and 'standing'. Since the section is optional, data could be created according to the archetype which does not contain the protocol section. However, a blood pressure cannot be taken without the patient in some position, so clearly there could be an implied value for patient position. Amongst clinicians, basic assumptions are nearly always made for such things: in general practice, the position could always safely be assumed to be "sitting" if not otherwise stated; in the hospital setting, "lying" would be the normal assumption. The assumed values feature of archetypes allows such assumptions to be explicitly stated so that all users/systems know what value to assume when optional items are not included in the data. Assumed values are definable at the leaf level only, which appears to be adequate for all purposes described to date; accordingly, they appear in descendants of C_PRIMITIVE and also C_DOMAIN_TYPE.

The notion of assumed values is distinct from that of 'default values'. The latter is a local requirement, and as such is stated in templates; default values do appear in data, while assumed values don’t.

Valid_value

The valid_value function tests a reference model object for conformance to the archetype. It is designed for recursive implementation in which a call to the function at the top of the archetype definition would cause a cascade of calls down the tree. This function is the key function of an 'archetype-enabled kernel' component that can perform runtime data validation based on an archetype definition.

Default_value

This function is used to generate a reasonable default value of the reference object being constrained by a given node. This allows archetype-based software to build a 'prototype' object from an archetype which can serve as the initial version of the object being constrained, assuming it is being created new by user activity (e.g. via a GUI application). Implementation of this function will usually involve use of reflection libraries or similar.

Complex Objects (C_COMPLEX_OBJECT)

Along with C_ATTRIBUTE, C_COMPLEX_OBJECT is the key structuring type of the constraint_model package, and consists of attributes of type C_ATTRIBUTE, which are constraints on the attributes (i.e. any property, including relationships) of the reference model type. Accordingly, each C_ATTRIBUTE records the name of the constrained attribute (in rm_attr_name), the existence and cardinality expressed by the constraint (depending on whether the attribute it constrains is a multiple or single relationship), and the constraint on the object to which this C_ATTRIBUTE refers via its children attribute (according to its reference model) in the form of further C_OBJECTs.

Primitive Types

Constraints on primitive types are defined by the classes inheriting from C_PRIMITIVE, namely C_STRING, C_INTEGER and so on. These types do not inherit from ARCHETYPE_CONSTRAINT, but rather are related by association, in order to allow them to have the simplest possible definitions, independent even from the rest of ADL, in the hope of acceptance in heath standardisation organisations. Technically, avoiding inheritance from ARCHETYPE_CONSTRAINT / C_PRIMITIVE_OBJECT into these base types (in other words, coalescing the classes C_PRIMITIVE_OBJECT and C_PRIMITIVE) does not pose a problem, but could be effected at a later date if desired.

Domain-specific Extensions (C_DOMAIN_TYPE)

The main part of the archetype constraint model allows any type in a reference model to be archetyped - i.e. constrained - in a standard way, which is to say, by a regular cascade of C_COMPLEX_OBJECT / C_ATTRIBUTE / C_PRIMITIVE_OBJECT objects. This generally works well, especially for 'outer' container types in models. However, it occurs reasonably often that lower level logical 'leaf' types need special constraint semantics that are not conveniently achieved with the standard approach. To enable such classes to be integrated into the generic constraint model, the class C_DOMAIN_TYPE is included. This enables the creation of specific C_ classes, inheriting from C_DOMAIN_TYPE, which represent custom semantics for particular reference model types. For example, a class called C_QUANTITY might be created which has different constraint semantics from the default effect of a C_COMPLEX_OBJECT / C_ATTRIBUTE cascade representing such constraints in the generic way (i.e. systematically based on the reference model). An example of domain-specific extension classes is shown in the section [Domain-specific Extension Example].

Reference Objects (C_REFERENCE_OBJECT)

The subtypes of C_REFERENCE_OBJECT, namely, ARCHETYPE_SLOT, ARCHETYPE_INTERNAL_REF and CONSTRAINT_REF are used to express, respectively, a 'slot' where further archetypes can be used to continue describing constraints; a reference to a part of the current archetype that expresses exactly the same constraints needed at another point; and a reference to a constraint on a constraint defined in the archetype ontology, which in turn points to an external knowledge resource, such as a terminology.

A CONSTRAINT_REF is really a proxy for a set of constraints on an object that would normally occur at a particular point in the archetype as a C_COMPLEX_OBJECT, but where the actual definition of the constraints is outside the archetype definition proper, and is instead expressed in the binding of the constraint reference (e.g. 'ac0004') to a query or expression into an external service (e.g. a terminology service). The result of the query could be something like:

  • a set of allowed CODED_TERMs e.g. the types of hepatitis

  • an INTERVAL<QUANTITY> forming a reference range

  • a set of units or properties or other numerical item

See Placeholder constraints in the ADL specification for a fuller explanation.

Assertions

The C_ATTRIBUTE and subtypes of C_OBJECT enable constraints to be expressed in a structural fashion such that any constraint concerning a single attribute may be expressed, including recursively. In addition to this, any instance of a C_COMPLEX_OBJECT may include one or more invariants. Invariants are statements in a form of predicate logic, which can also be used to state constraints on parts of an object. They are not needed to constrain single attributes (since this can be done with an appropriate C_ATTRIBUTE), but are necessary for constraints referring to more than one attribute, such as a constraint that 'systolic pressure should be >= diastolic pressure' in a blood pressure measurement archetype. Invariants are expressed using a syntax derived from the OMG’s OCL syntax (adapted for use with objects rather than classes).

Assertions are also used in ARCHETYPE_SLOTs, in order to express the 'included' and 'excluded' archetypes for the slot. In this case, each assertion is an expression that refers to parts of other archetypes, such as its identifier (e.g. 'include archetypes with short_concept_name matching xxxx'). Assertions are modelled here as a generic expression tree of unary prefix and binary infix operators. Examples of archetype slots in ADL syntax are given in the openEHR ADL document.

Class Definitions

ARCHETYPE_CONSTRAINT Class

  • Definition

  • Effective

  • BMM

  • UML

Class

ARCHETYPE_CONSTRAINT (abstract)

Description

Archetype equivalent to LOCATABLE class in openEHR Common reference model. Defines common constraints for any inheritor of LOCATABLE in any reference model.

Functions

Signature

Meaning

1..1
(abstract)

is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.

1..1
(abstract)

is_valid (): Boolean

1..1

path (): String

Path of this node relative to root of archetype.

1..1

has_path (
a_path: String[1]
): Boolean

True if the relative path a_path exists at this node.

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void

Path_exists: path /= Void

ARCHETYPE_CONSTRAINT (abstract)

Archetype equivalent to LOCATABLE class in openEHR Common reference model. Defines common constraints for any inheritor of LOCATABLE in any reference model.

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.

(abstract) is_valid (): Boolean [1..1]

path (): String [1..1]

Path of this node relative to root of archetype.

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void

Path_exists: path /= Void

{
    "name": "ARCHETYPE_CONSTRAINT",
    "documentation": "Archetype equivalent to LOCATABLE class in openEHR Common reference model. Defines common constraints for any inheritor of LOCATABLE in any reference model. ",
    "is_abstract": true,
    "functions": {
        "is_subset_of": {
            "name": "is_subset_of",
            "documentation": "True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. \nTypically used during validation of special-ised archetype nodes.",
            "is_abstract": true,
            "parameters": {
                "other": {
                    "_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
                    "name": "other",
                    "type": "ARCHETYPE_CONSTRAINT"
                }
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        },
        "is_valid": {
            "name": "is_valid",
            "is_abstract": true,
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        },
        "path": {
            "name": "path",
            "documentation": "Path of this node relative to root of archetype.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "String"
            }
        },
        "has_path": {
            "name": "has_path",
            "documentation": "True if the relative path a_path exists at this node.",
            "parameters": {
                "a_path": {
                    "_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
                    "name": "a_path",
                    "type": "String"
                }
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        }
    },
    "invariants": {
        "Post": "Result = soc_parent /= Void or parent.soc_parent /= Void",
        "Path_exists": "path /= Void"
    }
}
aom14.archetype constraint

C_ATTRIBUTE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_ATTRIBUTE (abstract)

Description

Abstract model of constraint on any kind of attribute node.

Inherit

ARCHETYPE_CONSTRAINT

Attributes

Signature

Meaning

1..1

rm_attribute_name: String

Reference model attribute within the enclosing type represented by a C_OBJECT.

1..1

existence: Interval<Integer>

Constraint on every attribute, regardless of whether it is singular or of a container type, which indicates whether its target object exists or not (i.e. is mandatory or not).

0..1

children: List<C_OBJECT>

Child C_OBJECT nodes. Each such node represents a constraint on the type of this attribute in its reference model. Multiples occur both for multiple items in the case of container attributes, and alternatives in the case of singular attributes.

Functions

Signature

Meaning

1..1

any_allowed (): Boolean

Post: Result := children = Void or else children.is_empty

True if any value (i.e. instance) of the reference model attribute represented by this C_ATTIRBUTE is allowed.

Invariants

Rm_attribute_name_valid: not rm_attribute_name.is_empty

Existence_set: existence.lower >= 0 and existence.upper <= 1

Children_validity: any_allowed xor children /= Void

C_ATTRIBUTE (abstract)

Abstract model of constraint on any kind of attribute node.

Inherits: ARCHETYPE_CONSTRAINT

Attributes

rm_attribute_name: String [1..1]

Reference model attribute within the enclosing type represented by a C_OBJECT.

existence: Interval<Integer> [1..1]

Constraint on every attribute, regardless of whether it is singular or of a container type, which indicates whether its target object exists or not (i.e. is mandatory or not).

children: List<C_OBJECT> [0..1]

Child C_OBJECT nodes. Each such node represents a constraint on the type of this attribute in its reference model. Multiples occur both for multiple items in the case of container attributes, and alternatives in the case of singular attributes.

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

any_allowed (): Boolean

Post: Result := children = Void or else children.is_empty [1..1]

True if any value (i.e. instance) of the reference model attribute represented by this C_ATTIRBUTE is allowed.

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

Rm_attribute_name_valid: not rm_attribute_name.is_empty

Existence_set: existence.lower >= 0 and existence.upper <= 1

Children_validity: any_allowed xor children /= Void

{
    "name": "C_ATTRIBUTE",
    "documentation": "Abstract model of constraint on any kind of attribute node.",
    "is_abstract": true,
    "ancestors": [
        "ARCHETYPE_CONSTRAINT"
    ],
    "properties": {
        "rm_attribute_name": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "rm_attribute_name",
            "documentation": "Reference model attribute within the enclosing type represented by a C_OBJECT.",
            "is_mandatory": true,
            "type": "String"
        },
        "existence": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "existence",
            "documentation": "Constraint on every attribute, regardless of whether it is singular or of a container type, which indicates whether its target object exists or not (i.e. is mandatory or not).",
            "is_mandatory": true,
            "type_def": {
                "root_type": "Interval",
                "generic_parameters": [
                    "Integer"
                ]
            }
        },
        "children": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "children",
            "documentation": "Child C_OBJECT nodes. Each such node represents a constraint on the type of this attribute in its reference model. Multiples occur both for multiple items in the case of container attributes, and alternatives in the case of singular attributes. ",
            "type_def": {
                "container_type": "List",
                "type": "C_OBJECT"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        }
    },
    "functions": {
        "any_allowed": {
            "name": "any_allowed",
            "documentation": "True if any value (i.e. instance) of the reference model attribute represented by this C_ATTIRBUTE is allowed.",
            "post_conditions": {
                "Post": "Result := children = Void or else children.is_empty"
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        }
    },
    "invariants": {
        "Rm_attribute_name_valid": "not rm_attribute_name.is_empty",
        "Existence_set": "existence.lower >= 0 and existence.upper <= 1",
        "Children_validity": "any_allowed xor children /= Void"
    }
}
aom14.c attribute

C_SINGLE_ATTRIBUTE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_SINGLE_ATTRIBUTE

Description

Concrete model of constraint on a single-valued attribute node. The meaning of the inherited children attribute is that they are alternatives.

Inherit

C_ATTRIBUTE

Functions

Signature

Meaning

0..1

alternatives (): List<C_OBJECT>

List of alternative constraints for the single child of this attribute within the data.

Invariants

Members_valid: alternatives /= Void and then alternatives.for_all(co: C_OBJECT | co.occurrences.upper <= 1)

C_SINGLE_ATTRIBUTE

Concrete model of constraint on a single-valued attribute node. The meaning of the inherited children attribute is that they are alternatives.

Inherits: ARCHETYPE_CONSTRAINT, C_ATTRIBUTE

Attributes

rm_attribute_name: String [1..1]

Reference model attribute within the enclosing type represented by a C_OBJECT.
Inherited from C_ATTRIBUTE

existence: Interval<Integer> [1..1]

Constraint on every attribute, regardless of whether it is singular or of a container type, which indicates whether its target object exists or not (i.e. is mandatory or not).
Inherited from C_ATTRIBUTE

children: List<C_OBJECT> [0..1]

Child C_OBJECT nodes. Each such node represents a constraint on the type of this attribute in its reference model. Multiples occur both for multiple items in the case of container attributes, and alternatives in the case of singular attributes.
Inherited from C_ATTRIBUTE

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

any_allowed (): Boolean

Post: Result := children = Void or else children.is_empty [1..1]

True if any value (i.e. instance) of the reference model attribute represented by this C_ATTIRBUTE is allowed.
Inherited from C_ATTRIBUTE

alternatives (): List<C_OBJECT> [0..1]

List of alternative constraints for the single child of this attribute within the data.

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

Rm_attribute_name_valid: not rm_attribute_name.is_empty
Inherited from C_ATTRIBUTE

Existence_set: existence.lower >= 0 and existence.upper <= 1
Inherited from C_ATTRIBUTE

Children_validity: any_allowed xor children /= Void
Inherited from C_ATTRIBUTE

Members_valid: alternatives /= Void and then alternatives.for_all(co: C_OBJECT | co.occurrences.upper <= 1)

{
    "name": "C_SINGLE_ATTRIBUTE",
    "documentation": "Concrete model of constraint on a single-valued attribute node. The meaning of the inherited children attribute is that they are alternatives.",
    "ancestors": [
        "C_ATTRIBUTE"
    ],
    "functions": {
        "alternatives": {
            "name": "alternatives",
            "documentation": "List of alternative constraints for the single child of this attribute within the data.",
            "result": {
                "_type": "P_BMM_CONTAINER_TYPE",
                "container_type": "List",
                "type": "C_OBJECT"
            },
            "is_nullable": true
        }
    },
    "invariants": {
        "Members_valid": "alternatives /= Void and then alternatives.for_all(co: C_OBJECT | co.occurrences.upper <= 1)"
    }
}
aom14.c single attribute

C_MULTIPLE_ATTRIBUTE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_MULTIPLE_ATTRIBUTE

Description

Concrete model of constraint on multiply-valued (ie. container) attribute node.

Inherit

C_ATTRIBUTE

Attributes

Signature

Meaning

1..1

cardinality: CARDINALITY

Cardinality of this attribute constraint, if it constraints a container attribute.

Functions

Signature

Meaning

0..1

members (): List<C_OBJECT>

List of constraints representing members of the container value of this attribute within the data. Semantics of the uniqueness and ordering of items in the container are given by the cardinality.

C_MULTIPLE_ATTRIBUTE

Concrete model of constraint on multiply-valued (ie. container) attribute node.

Inherits: ARCHETYPE_CONSTRAINT, C_ATTRIBUTE

Attributes

rm_attribute_name: String [1..1]

Reference model attribute within the enclosing type represented by a C_OBJECT.
Inherited from C_ATTRIBUTE

existence: Interval<Integer> [1..1]

Constraint on every attribute, regardless of whether it is singular or of a container type, which indicates whether its target object exists or not (i.e. is mandatory or not).
Inherited from C_ATTRIBUTE

children: List<C_OBJECT> [0..1]

Child C_OBJECT nodes. Each such node represents a constraint on the type of this attribute in its reference model. Multiples occur both for multiple items in the case of container attributes, and alternatives in the case of singular attributes.
Inherited from C_ATTRIBUTE

cardinality: CARDINALITY [1..1]

Cardinality of this attribute constraint, if it constraints a container attribute.

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

any_allowed (): Boolean

Post: Result := children = Void or else children.is_empty [1..1]

True if any value (i.e. instance) of the reference model attribute represented by this C_ATTIRBUTE is allowed.
Inherited from C_ATTRIBUTE

members (): List<C_OBJECT> [0..1]

List of constraints representing members of the container value of this attribute within the data. Semantics of the uniqueness and ordering of items in the container are given by the cardinality.

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

Rm_attribute_name_valid: not rm_attribute_name.is_empty
Inherited from C_ATTRIBUTE

Existence_set: existence.lower >= 0 and existence.upper <= 1
Inherited from C_ATTRIBUTE

Children_validity: any_allowed xor children /= Void
Inherited from C_ATTRIBUTE

{
    "name": "C_MULTIPLE_ATTRIBUTE",
    "documentation": "Concrete model of constraint on multiply-valued (ie. container) attribute node.",
    "ancestors": [
        "C_ATTRIBUTE"
    ],
    "properties": {
        "cardinality": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "cardinality",
            "documentation": "Cardinality of this attribute constraint, if it constraints a container attribute.",
            "is_mandatory": true,
            "type": "CARDINALITY"
        }
    },
    "functions": {
        "members": {
            "name": "members",
            "documentation": "List of constraints representing members of the container value of this attribute within the data. Semantics of the uniqueness and ordering of items in the container are given by the cardinality.",
            "result": {
                "_type": "P_BMM_CONTAINER_TYPE",
                "container_type": "List",
                "type": "C_OBJECT"
            },
            "is_nullable": true
        }
    }
}
aom14.c multiple attribute

CARDINALITY Class

  • Definition

  • Effective

  • BMM

  • UML

Class

CARDINALITY

Description

Express constraints on the cardinality of container objects which are the values of multiply-valued attributes, including uniqueness and ordering, providing the means to state that a container acts like a logical list, set or bag. The cardinality cannot contradict the cardinality of the corresponding attribute within the relevant reference model.

Attributes

Signature

Meaning

1..1

interval: Interval<Integer>

The interval of this cardinality.

1..1

is_ordered: Boolean

True if the members of the container attribute to which this cardinality refers are ordered.

1..1

is_unique: Boolean

True if the members of the container attribute to which this cardinality refers are unique.

Functions

Signature

Meaning

1..1

is_bag (): Boolean

True if the semantics of this cardinality represent a bag, i.e. unordered, non-unique membership.

1..1

is_list (): Boolean

True if the semantics of this cardinality represent a list, i.e. ordered, non-unique membership.

1..1

is_set (): Boolean

True if the semantics of this cardinality represent a bag, i.e. unordered, non-unique membership.

CARDINALITY

Express constraints on the cardinality of container objects which are the values of multiply-valued attributes, including uniqueness and ordering, providing the means to state that a container acts like a logical list, set or bag. The cardinality cannot contradict the cardinality of the corresponding attribute within the relevant reference model.

Attributes

interval: Interval<Integer> [1..1]

The interval of this cardinality.

is_ordered: Boolean [1..1]

True if the members of the container attribute to which this cardinality refers are ordered.

is_unique: Boolean [1..1]

True if the members of the container attribute to which this cardinality refers are unique.

Functions

is_bag (): Boolean [1..1]

True if the semantics of this cardinality represent a bag, i.e. unordered, non-unique membership.

is_list (): Boolean [1..1]

True if the semantics of this cardinality represent a list, i.e. ordered, non-unique membership.

is_set (): Boolean [1..1]

True if the semantics of this cardinality represent a bag, i.e. unordered, non-unique membership.

{
    "name": "CARDINALITY",
    "documentation": "Express constraints on the cardinality of container objects which are the values of multiply-valued attributes, including uniqueness and ordering, providing the means to state that a container acts like a logical list, set or bag. The cardinality cannot contradict the cardinality of the corresponding attribute within the relevant reference model.",
    "properties": {
        "interval": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "interval",
            "documentation": "The interval of this cardinality. ",
            "is_mandatory": true,
            "type_def": {
                "root_type": "Interval",
                "generic_parameters": [
                    "Integer"
                ]
            }
        },
        "is_ordered": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "is_ordered",
            "documentation": "True if the members of the container attribute to which this cardinality refers are ordered. ",
            "is_mandatory": true,
            "type": "Boolean"
        },
        "is_unique": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "is_unique",
            "documentation": "True if the members of the container attribute to which this cardinality refers are unique.",
            "is_mandatory": true,
            "type": "Boolean"
        }
    },
    "functions": {
        "is_bag": {
            "name": "is_bag",
            "documentation": "True if the semantics of this cardinality represent a bag, i.e. unordered, non-unique membership.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        },
        "is_list": {
            "name": "is_list",
            "documentation": "True if the semantics of this cardinality represent a list, i.e. ordered, non-unique membership.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        },
        "is_set": {
            "name": "is_set",
            "documentation": "True if the semantics of this cardinality represent a bag, i.e. unordered, non-unique membership.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        }
    }
}
aom14.cardinality

C_OBJECT Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_OBJECT (abstract)

Description

Abstract model of constraint on any kind of object node.

Inherit

ARCHETYPE_CONSTRAINT

Attributes

Signature

Meaning

1..1

rm_type_name: String

Reference model type that this node corresponds to.

1..1

occurrences: Interval<Integer>

Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1).

1..1

node_id: String

Semantic identifier of this node, used to distinguish sibling nodes. All nodes must have a node_id; for nodes under a container C_ATTRIBUTE, the id must be an id-code must be defined in the archetype terminology. For valid structures, all node ids are at-codes. For C_PRIMITIVE_OBJECTs, it will have the special value Primitive_node_id.

C_OBJECT (abstract)

Abstract model of constraint on any kind of object node.

Inherits: ARCHETYPE_CONSTRAINT

Attributes

rm_type_name: String [1..1]

Reference model type that this node corresponds to.

occurrences: Interval<Integer> [1..1]

Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1).

node_id: String [1..1]

Semantic identifier of this node, used to distinguish sibling nodes. All nodes must have a node_id; for nodes under a container C_ATTRIBUTE, the id must be an id-code must be defined in the archetype terminology. For valid structures, all node ids are at-codes. For C_PRIMITIVE_OBJECTs, it will have the special value Primitive_node_id.

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

{
    "name": "C_OBJECT",
    "documentation": "Abstract model of constraint on any kind of object node. ",
    "is_abstract": true,
    "ancestors": [
        "ARCHETYPE_CONSTRAINT"
    ],
    "properties": {
        "rm_type_name": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "rm_type_name",
            "documentation": "Reference model type that this node corresponds to. ",
            "is_mandatory": true,
            "type": "String"
        },
        "occurrences": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "occurrences",
            "documentation": "Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1).",
            "is_mandatory": true,
            "type_def": {
                "root_type": "Interval",
                "generic_parameters": [
                    "Integer"
                ]
            }
        },
        "node_id": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "node_id",
            "documentation": "Semantic identifier of this node, used to distinguish sibling nodes. All nodes must have a node_id; for nodes under a container C_ATTRIBUTE, the id must be an id-code must be defined in the archetype terminology. For valid structures, all node ids are at-codes.\nFor C_PRIMITIVE_OBJECTs, it will have the special value Primitive_node_id.",
            "is_mandatory": true,
            "type": "String"
        }
    }
}
aom14.c object

C_DEFINED_OBJECT Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_DEFINED_OBJECT (abstract)

Description

Abstract parent type of C_OBJECT subtypes that are defined by value, i.e. whose definitions are actually in the archetype rather than being by reference.

Inherit

C_OBJECT

Attributes

Signature

Meaning

0..1

assumed_value: Any

Value to be assumed if none sent in data.

Functions

Signature

Meaning

1..1
(abstract)

valid_value (
a_value: Any[1]
): Boolean

True if a_value is valid with respect to constraint expressed in concrete instance of this type.

1..1
(abstract)

prototype_value (): Any

Generate a prototype value from this constraint object.

1..1

has_assumed_value (): Boolean

True if there is an assumed value.

0..1
(abstract)

default_value (): Any

Generate a default value from this constraint object.

1..1
(abstract)

any_allowed (): Boolean

Post: Result = attributes.is_empty

True if any value of the reference model type being constrained is allowed. Redefine in descendants.

Invariants

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)

C_DEFINED_OBJECT (abstract)

Abstract parent type of C_OBJECT subtypes that are defined by value, i.e. whose definitions are actually in the archetype rather than being by reference.

Inherits: ARCHETYPE_CONSTRAINT, C_OBJECT

Attributes

rm_type_name: String [1..1]

Reference model type that this node corresponds to.
Inherited from C_OBJECT

occurrences: Interval<Integer> [1..1]

Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1).
Inherited from C_OBJECT

node_id: String [1..1]

Semantic identifier of this node, used to distinguish sibling nodes. All nodes must have a node_id; for nodes under a container C_ATTRIBUTE, the id must be an id-code must be defined in the archetype terminology. For valid structures, all node ids are at-codes. For C_PRIMITIVE_OBJECTs, it will have the special value Primitive_node_id.
Inherited from C_OBJECT

assumed_value: Any [0..1]

Value to be assumed if none sent in data.

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) valid_value (
a_value: Any[1]
): Boolean [1..1]

True if a_value is valid with respect to constraint expressed in concrete instance of this type.

(abstract) prototype_value (): Any [1..1]

Generate a prototype value from this constraint object.

has_assumed_value (): Boolean [1..1]

True if there is an assumed value.

(abstract) default_value (): Any [0..1]

Generate a default value from this constraint object.

(abstract) any_allowed (): Boolean

Post: Result = attributes.is_empty [1..1]

True if any value of the reference model type being constrained is allowed. Redefine in descendants.

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)

{
    "name": "C_DEFINED_OBJECT",
    "documentation": "Abstract parent type of C_OBJECT subtypes that are defined by value, i.e. whose definitions are actually in the archetype rather than being by reference. ",
    "is_abstract": true,
    "ancestors": [
        "C_OBJECT"
    ],
    "properties": {
        "assumed_value": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "assumed_value",
            "documentation": "Value to be assumed if none sent in data.",
            "type": "Any"
        }
    },
    "functions": {
        "valid_value": {
            "name": "valid_value",
            "documentation": "True if a_value is valid with respect to constraint expressed in concrete instance of this type.",
            "is_abstract": true,
            "parameters": {
                "a_value": {
                    "_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
                    "name": "a_value",
                    "type": "Any"
                }
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        },
        "prototype_value": {
            "name": "prototype_value",
            "documentation": "Generate a prototype value from this constraint object.",
            "is_abstract": true,
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Any"
            }
        },
        "has_assumed_value": {
            "name": "has_assumed_value",
            "documentation": "True if there is an assumed value.\n",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        },
        "default_value": {
            "name": "default_value",
            "documentation": "Generate a default value from this constraint object.",
            "is_abstract": true,
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Any"
            },
            "is_nullable": true
        },
        "any_allowed": {
            "name": "any_allowed",
            "documentation": "True if any value of the reference model type being constrained is allowed. Redefine in descendants.",
            "is_abstract": true,
            "post_conditions": {
                "Post": "Result = attributes.is_empty"
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        }
    },
    "invariants": {
        "Assumed_value_valid": "has_assumed_value implies valid_value(assumed_value)"
    }
}
aom14.c defined object

C_COMPLEX_OBJECT Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_COMPLEX_OBJECT

Description

Constraint on complex objects, i.e. any object that consists of other object constraints.

Inherit

C_DEFINED_OBJECT

Attributes

Signature

Meaning

0..1

attributes: List<C_ATTRIBUTE>

List of constraints on attributes of the reference model type represented by this object.

Functions

Signature

Meaning

1..1
(effected)

any_allowed (): Boolean

Post: Result = attributes.is_empty

True if any value of the reference model type being constrained is allowed.

Invariants

Attributes_valid: any_allowed xor (attributes /= Void and not attributes.is_empty)

C_COMPLEX_OBJECT

Constraint on complex objects, i.e. any object that consists of other object constraints.

Inherits: ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT

Attributes

rm_type_name: String [1..1]

Reference model type that this node corresponds to.
Inherited from C_OBJECT

occurrences: Interval<Integer> [1..1]

Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1).
Inherited from C_OBJECT

node_id: String [1..1]

Semantic identifier of this node, used to distinguish sibling nodes. All nodes must have a node_id; for nodes under a container C_ATTRIBUTE, the id must be an id-code must be defined in the archetype terminology. For valid structures, all node ids are at-codes. For C_PRIMITIVE_OBJECTs, it will have the special value Primitive_node_id.
Inherited from C_OBJECT

assumed_value: Any [0..1]

Value to be assumed if none sent in data.
Inherited from C_DEFINED_OBJECT

attributes: List<C_ATTRIBUTE> [0..1]

List of constraints on attributes of the reference model type represented by this object.

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) valid_value (
a_value: Any[1]
): Boolean [1..1]

True if a_value is valid with respect to constraint expressed in concrete instance of this type.
Inherited from C_DEFINED_OBJECT

(abstract) prototype_value (): Any [1..1]

Generate a prototype value from this constraint object.
Inherited from C_DEFINED_OBJECT

has_assumed_value (): Boolean [1..1]

True if there is an assumed value.
Inherited from C_DEFINED_OBJECT

(abstract) default_value (): Any [0..1]

Generate a default value from this constraint object.
Inherited from C_DEFINED_OBJECT

any_allowed (): Boolean

Post: Result = attributes.is_empty [1..1]

True if any value of the reference model type being constrained is allowed.

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)
Inherited from C_DEFINED_OBJECT

Attributes_valid: any_allowed xor (attributes /= Void and not attributes.is_empty)

{
    "name": "C_COMPLEX_OBJECT",
    "documentation": "Constraint on complex objects, i.e. any object that consists of other object constraints.",
    "ancestors": [
        "C_DEFINED_OBJECT"
    ],
    "properties": {
        "attributes": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "attributes",
            "documentation": "List of constraints on attributes of the reference model type represented by this object.",
            "type_def": {
                "container_type": "List",
                "type": "C_ATTRIBUTE"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        }
    },
    "functions": {
        "any_allowed": {
            "name": "any_allowed",
            "documentation": "True if any value of the reference model type being constrained is allowed.",
            "post_conditions": {
                "Post": "Result = attributes.is_empty"
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        }
    },
    "invariants": {
        "Attributes_valid": " any_allowed xor (attributes /= Void and not attributes.is_empty)"
    }
}
aom14.c complex object

C_PRIMITIVE_OBJECT Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_PRIMITIVE_OBJECT

Description

Constraint on a primitive type.

Inherit

C_DEFINED_OBJECT

Attributes

Signature

Meaning

1..1

item: C_PRIMITIVE

Object actually defining the constraint.

Functions

Signature

Meaning

1..1
(effected)

any_allowed (): Boolean

Post: Result = item = Void

True if any value of the type being constrained in item is allowed.

Invariants

Item_valid: any_allowed xor item /= Void

C_PRIMITIVE_OBJECT

Constraint on a primitive type.

Inherits: ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT

Attributes

rm_type_name: String [1..1]

Reference model type that this node corresponds to.
Inherited from C_OBJECT

occurrences: Interval<Integer> [1..1]

Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1).
Inherited from C_OBJECT

node_id: String [1..1]

Semantic identifier of this node, used to distinguish sibling nodes. All nodes must have a node_id; for nodes under a container C_ATTRIBUTE, the id must be an id-code must be defined in the archetype terminology. For valid structures, all node ids are at-codes. For C_PRIMITIVE_OBJECTs, it will have the special value Primitive_node_id.
Inherited from C_OBJECT

assumed_value: Any [0..1]

Value to be assumed if none sent in data.
Inherited from C_DEFINED_OBJECT

item: C_PRIMITIVE [1..1]

Object actually defining the constraint.

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) valid_value (
a_value: Any[1]
): Boolean [1..1]

True if a_value is valid with respect to constraint expressed in concrete instance of this type.
Inherited from C_DEFINED_OBJECT

(abstract) prototype_value (): Any [1..1]

Generate a prototype value from this constraint object.
Inherited from C_DEFINED_OBJECT

has_assumed_value (): Boolean [1..1]

True if there is an assumed value.
Inherited from C_DEFINED_OBJECT

(abstract) default_value (): Any [0..1]

Generate a default value from this constraint object.
Inherited from C_DEFINED_OBJECT

any_allowed (): Boolean

Post: Result = item = Void [1..1]

True if any value of the type being constrained in item is allowed.

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)
Inherited from C_DEFINED_OBJECT

Item_valid: any_allowed xor item /= Void

{
    "name": "C_PRIMITIVE_OBJECT",
    "documentation": "Constraint on a primitive type.",
    "ancestors": [
        "C_DEFINED_OBJECT"
    ],
    "properties": {
        "item": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "item",
            "documentation": "Object actually defining the constraint.",
            "is_mandatory": true,
            "type": "C_PRIMITIVE"
        }
    },
    "functions": {
        "any_allowed": {
            "name": "any_allowed",
            "documentation": "True if any value of the type being constrained in item is allowed.",
            "post_conditions": {
                "Post": "Result = item = Void"
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        }
    },
    "invariants": {
        "Item_valid": "any_allowed xor item /= Void"
    }
}
aom14.c primitive object

C_DOMAIN_TYPE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_DOMAIN_TYPE (abstract)

Description

Abstract parent type of domain-specific constrainer types, to be defined in external packages.

Inherit

C_DEFINED_OBJECT

Functions

Signature

Meaning

1..1
(abstract)

standard_equivalent (): C_COMPLEX_OBJECT

Standard (i.e. C_OBJECT) form of constraint.

C_DOMAIN_TYPE (abstract)

Abstract parent type of domain-specific constrainer types, to be defined in external packages.

Inherits: ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT

Attributes

rm_type_name: String [1..1]

Reference model type that this node corresponds to.
Inherited from C_OBJECT

occurrences: Interval<Integer> [1..1]

Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1).
Inherited from C_OBJECT

node_id: String [1..1]

Semantic identifier of this node, used to distinguish sibling nodes. All nodes must have a node_id; for nodes under a container C_ATTRIBUTE, the id must be an id-code must be defined in the archetype terminology. For valid structures, all node ids are at-codes. For C_PRIMITIVE_OBJECTs, it will have the special value Primitive_node_id.
Inherited from C_OBJECT

assumed_value: Any [0..1]

Value to be assumed if none sent in data.
Inherited from C_DEFINED_OBJECT

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) valid_value (
a_value: Any[1]
): Boolean [1..1]

True if a_value is valid with respect to constraint expressed in concrete instance of this type.
Inherited from C_DEFINED_OBJECT

(abstract) prototype_value (): Any [1..1]

Generate a prototype value from this constraint object.
Inherited from C_DEFINED_OBJECT

has_assumed_value (): Boolean [1..1]

True if there is an assumed value.
Inherited from C_DEFINED_OBJECT

(abstract) default_value (): Any [0..1]

Generate a default value from this constraint object.
Inherited from C_DEFINED_OBJECT

(abstract) any_allowed (): Boolean

Post: Result = attributes.is_empty [1..1]

True if any value of the reference model type being constrained is allowed. Redefine in descendants.
Inherited from C_DEFINED_OBJECT

(abstract) standard_equivalent (): C_COMPLEX_OBJECT [1..1]

Standard (i.e. C_OBJECT) form of constraint.

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)
Inherited from C_DEFINED_OBJECT

{
    "name": "C_DOMAIN_TYPE",
    "documentation": "Abstract parent type of domain-specific constrainer types, to be defined in external packages.",
    "is_abstract": true,
    "ancestors": [
        "C_DEFINED_OBJECT"
    ],
    "functions": {
        "standard_equivalent": {
            "name": "standard_equivalent",
            "documentation": "Standard (i.e. C_OBJECT) form of constraint.",
            "is_abstract": true,
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "C_COMPLEX_OBJECT"
            }
        }
    }
}
aom14.c domain type

C_REFERENCE_OBJECT Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_REFERENCE_OBJECT (abstract)

Description

Abstract parent type of C_OBJECT subtypes that are defined by reference.

Inherit

C_OBJECT

C_REFERENCE_OBJECT (abstract)

Abstract parent type of C_OBJECT subtypes that are defined by reference.

Inherits: ARCHETYPE_CONSTRAINT, C_OBJECT

Attributes

rm_type_name: String [1..1]

Reference model type that this node corresponds to.
Inherited from C_OBJECT

occurrences: Interval<Integer> [1..1]

Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1).
Inherited from C_OBJECT

node_id: String [1..1]

Semantic identifier of this node, used to distinguish sibling nodes. All nodes must have a node_id; for nodes under a container C_ATTRIBUTE, the id must be an id-code must be defined in the archetype terminology. For valid structures, all node ids are at-codes. For C_PRIMITIVE_OBJECTs, it will have the special value Primitive_node_id.
Inherited from C_OBJECT

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

{
    "name": "C_REFERENCE_OBJECT",
    "documentation": "Abstract parent type of C_OBJECT subtypes that are defined by reference.",
    "is_abstract": true,
    "ancestors": [
        "C_OBJECT"
    ]
}
aom14.c reference object

ARCHETYPE_SLOT Class

  • Definition

  • Effective

  • BMM

  • UML

Class

ARCHETYPE_SLOT

Description

Constraint describing a slot' where another archetype can occur.

Inherit

C_REFERENCE_OBJECT

Attributes

Signature

Meaning

0..1

includes: List<ASSERTION>

List of constraints defining other archetypes that could be included at this point.

0..1

excludes: List<ASSERTION>

List of constraints defining other archetypes that cannot be included at this point.

Invariants

Includes_valid: includes /= Void implies not includes.is_empty

Excludes_valid: excludes /= Void implies not excludes.is_empty

Validity: any_allowed xor (includes /= Void or excludes /= Void)

ARCHETYPE_SLOT

Constraint describing a slot' where another archetype can occur.

Inherits: ARCHETYPE_CONSTRAINT, C_OBJECT, C_REFERENCE_OBJECT

Attributes

rm_type_name: String [1..1]

Reference model type that this node corresponds to.
Inherited from C_OBJECT

occurrences: Interval<Integer> [1..1]

Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1).
Inherited from C_OBJECT

node_id: String [1..1]

Semantic identifier of this node, used to distinguish sibling nodes. All nodes must have a node_id; for nodes under a container C_ATTRIBUTE, the id must be an id-code must be defined in the archetype terminology. For valid structures, all node ids are at-codes. For C_PRIMITIVE_OBJECTs, it will have the special value Primitive_node_id.
Inherited from C_OBJECT

includes: List<ASSERTION> [0..1]

List of constraints defining other archetypes that could be included at this point.

excludes: List<ASSERTION> [0..1]

List of constraints defining other archetypes that cannot be included at this point.

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

Includes_valid: includes /= Void implies not includes.is_empty

Excludes_valid: excludes /= Void implies not excludes.is_empty

Validity: any_allowed xor (includes /= Void or excludes /= Void)

{
    "name": "ARCHETYPE_SLOT",
    "documentation": "Constraint describing a  slot' where another archetype can occur. ",
    "ancestors": [
        "C_REFERENCE_OBJECT"
    ],
    "properties": {
        "includes": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "includes",
            "documentation": "List of constraints defining other archetypes that could be included at this point. ",
            "type_def": {
                "container_type": "List",
                "type": "ASSERTION"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "excludes": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "excludes",
            "documentation": "List of constraints defining other archetypes that cannot be included at this point. ",
            "type_def": {
                "container_type": "List",
                "type": "ASSERTION"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        }
    },
    "invariants": {
        "Includes_valid": "includes /= Void implies not includes.is_empty",
        "Excludes_valid": "excludes /= Void implies not excludes.is_empty",
        "Validity": "any_allowed xor (includes /= Void or excludes /= Void)"
    }
}
aom14.archetype slot

ARCHETYPE_INTERNAL_REF Class

  • Definition

  • Effective

  • BMM

  • UML

Class

ARCHETYPE_INTERNAL_REF

Description

A constraint defined by proxy, using a reference to an object constraint defined elsewhere in the same archetype.

Note that since this object refers to another node, there are two objects with available occurrences values. The local occurrences value on an ARCHETYPE_INTERNAL_REF should always be used; when setting this from a serialised form, if no occurrences is mentioned, the target occurrences should be used (not the standard default of \{1..1}); otherwise the locally specified occurrences should be used as normal. When serialising out, if the occurrences is the same as that of the target, it can be left out.

Inherit

C_REFERENCE_OBJECT

Attributes

Signature

Meaning

1..1

target_path: String

Reference to an object node using archetype path notation.

Invariants

Consistency: not any_allowed

Target_path_valid: target_path /= Void and then not target_path.is_empty

ARCHETYPE_INTERNAL_REF

A constraint defined by proxy, using a reference to an object constraint defined elsewhere in the same archetype.

Note that since this object refers to another node, there are two objects with available occurrences values. The local occurrences value on an ARCHETYPE_INTERNAL_REF should always be used; when setting this from a serialised form, if no occurrences is mentioned, the target occurrences should be used (not the standard default of \{1..1}); otherwise the locally specified occurrences should be used as normal. When serialising out, if the occurrences is the same as that of the target, it can be left out.

Inherits: ARCHETYPE_CONSTRAINT, C_OBJECT, C_REFERENCE_OBJECT

Attributes

rm_type_name: String [1..1]

Reference model type that this node corresponds to.
Inherited from C_OBJECT

occurrences: Interval<Integer> [1..1]

Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1).
Inherited from C_OBJECT

node_id: String [1..1]

Semantic identifier of this node, used to distinguish sibling nodes. All nodes must have a node_id; for nodes under a container C_ATTRIBUTE, the id must be an id-code must be defined in the archetype terminology. For valid structures, all node ids are at-codes. For C_PRIMITIVE_OBJECTs, it will have the special value Primitive_node_id.
Inherited from C_OBJECT

target_path: String [1..1]

Reference to an object node using archetype path notation.

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

Consistency: not any_allowed

Target_path_valid: target_path /= Void and then not target_path.is_empty

{
    "name": "ARCHETYPE_INTERNAL_REF",
    "documentation": "A constraint defined by proxy, using a reference to an object constraint defined elsewhere in the same\narchetype.\n\nNote that since this object refers to another node, there are two objects with available occurrences values. The local occurrences value on an ARCHETYPE_INTERNAL_REF should always be used; when setting this from a serialised form, if no occurrences is mentioned, the target occurrences should be used (not the standard default of {1..1}); otherwise the locally specified occurrences should be used as normal. When serialising out, if the occurrences is the same as that of the target, it can be left out.",
    "ancestors": [
        "C_REFERENCE_OBJECT"
    ],
    "properties": {
        "target_path": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "target_path",
            "documentation": "Reference to an object node using archetype path notation.",
            "is_mandatory": true,
            "type": "String"
        }
    },
    "invariants": {
        "Consistency": "not any_allowed",
        "Target_path_valid": "target_path /= Void and then not target_path.is_empty"
    }
}
aom14.archetype internal ref

CONSTRAINT_REF Class

  • Definition

  • Effective

  • BMM

  • UML

Class

CONSTRAINT_REF

Description

Reference to a constraint described in the same archetype, but outside the main constraint structure. This is used to refer to constraints expressed in terms of external resources, such as constraints on terminology value sets.

Inherit

C_REFERENCE_OBJECT

Attributes

Signature

Meaning

1..1

reference: String

Reference to a constraint in the archetype local ontology.

Invariants

Consistency: not any_allowed

CONSTRAINT_REF

Reference to a constraint described in the same archetype, but outside the main constraint structure. This is used to refer to constraints expressed in terms of external resources, such as constraints on terminology value sets.

Inherits: ARCHETYPE_CONSTRAINT, C_OBJECT, C_REFERENCE_OBJECT

Attributes

rm_type_name: String [1..1]

Reference model type that this node corresponds to.
Inherited from C_OBJECT

occurrences: Interval<Integer> [1..1]

Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1).
Inherited from C_OBJECT

node_id: String [1..1]

Semantic identifier of this node, used to distinguish sibling nodes. All nodes must have a node_id; for nodes under a container C_ATTRIBUTE, the id must be an id-code must be defined in the archetype terminology. For valid structures, all node ids are at-codes. For C_PRIMITIVE_OBJECTs, it will have the special value Primitive_node_id.
Inherited from C_OBJECT

reference: String [1..1]

Reference to a constraint in the archetype local ontology.

Functions

(abstract) is_subset_of (
other: ARCHETYPE_CONSTRAINT[1]
): Boolean [1..1]

True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of special-ised archetype nodes.
Inherited from ARCHETYPE_CONSTRAINT

(abstract) is_valid (): Boolean [1..1]

+ Inherited from ARCHETYPE_CONSTRAINT

path (): String [1..1]

Path of this node relative to root of archetype.
Inherited from ARCHETYPE_CONSTRAINT

has_path (
a_path: String[1]
): Boolean [1..1]

True if the relative path a_path exists at this node.
Inherited from ARCHETYPE_CONSTRAINT

Invariants

Post: Result = soc_parent /= Void or parent.soc_parent /= Void
Inherited from ARCHETYPE_CONSTRAINT

Path_exists: path /= Void
Inherited from ARCHETYPE_CONSTRAINT

Consistency: not any_allowed

{
    "name": "CONSTRAINT_REF",
    "documentation": "Reference to a constraint described in the same archetype, but outside the main constraint structure. This is used to refer to constraints expressed in terms of external resources, such as constraints on terminology value sets.",
    "ancestors": [
        "C_REFERENCE_OBJECT"
    ],
    "properties": {
        "reference": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "reference",
            "documentation": "Reference to a constraint in the archetype local ontology.",
            "is_mandatory": true,
            "type": "String"
        }
    },
    "invariants": {
        "Consistency": "not any_allowed"
    }
}
aom14.constraint ref