Primitive Package

Overview

Ultimately any archetype definition will devolve down to leaf node constraints on instances of primitive types. The primitive package, illustrated in the following figure, defines the semantics of constraint on such types.

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

Most of the types provide at least two alternative ways to represent the constraint; for example the C_DATE type allows the constraint to be expressed in the form of a pattern (defined in the ADL specification) or an Interval<Date>. Note that the interval form of dates is probably only useful for historical date checking (e.g. the date of an antique or a particular batch of vaccine), rather than constraints on future date/times.

Class Descriptions

C_PRIMITIVE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_PRIMITIVE (abstract)

Description

Parent of types representing constraints on primitive types.

Attributes

Signature

Meaning

0..1

assumed_value: Any

Value to be assumed if none sent in data.

Functions

Signature

Meaning

1..1
(abstract)

default_value (): Any

Generate a default value from this constraint object.

1..1
(abstract)

has_assumed_value (): Boolean

True if there is an assumed value.

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.

Invariants

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)

C_PRIMITIVE (abstract)

Parent of types representing constraints on primitive types.

Attributes

assumed_value: Any [0..1]

Value to be assumed if none sent in data.

Functions

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

Generate a default value from this constraint object.

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

True if there is an assumed value.

(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.

Invariants

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)

{
    "name": "C_PRIMITIVE",
    "documentation": "Parent of types representing constraints on primitive types.",
    "is_abstract": true,
    "properties": {
        "assumed_value": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "assumed_value",
            "documentation": "Value to be assumed if none sent in data.",
            "type": "Any"
        }
    },
    "functions": {
        "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"
            }
        },
        "has_assumed_value": {
            "name": "has_assumed_value",
            "documentation": "True if there is an assumed value.",
            "is_abstract": true,
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        },
        "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"
            }
        }
    },
    "invariants": {
        "Assumed_value_valid": "has_assumed_value implies valid_value(assumed_value)"
    }
}
aom14.c primitive

C_BOOLEAN Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_BOOLEAN

Description

Constraint on instances of Boolean. Both attributes cannot be set to False, since this would mean that the Boolean value being constrained cannot be True or False.

Inherit

C_PRIMITIVE

Attributes

Signature

Meaning

1..1

true_valid: Boolean

True if the value True is allowed.

1..1

false_valid: Boolean

True if the value False is allowed.

0..1
(redefined)

assumed_value: Boolean

The value to assume if this item is not included in data, due to being part of an optional structure.

C_BOOLEAN

Constraint on instances of Boolean. Both attributes cannot be set to False, since this would mean that the Boolean value being constrained cannot be True or False.

Inherits: C_PRIMITIVE

Attributes

assumed_value: Boolean [0..1]

The value to assume if this item is not included in data, due to being part of an optional structure.

true_valid: Boolean [1..1]

True if the value True is allowed.

false_valid: Boolean [1..1]

True if the value False is allowed.

Functions

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

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

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

True if there is an assumed value.
Inherited from C_PRIMITIVE

(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_PRIMITIVE

Invariants

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)
Inherited from C_PRIMITIVE

{
    "name": "C_BOOLEAN",
    "documentation": "Constraint on instances of Boolean. Both attributes cannot be set to False, since this would mean that the Boolean value being constrained cannot be True or False.",
    "ancestors": [
        "C_PRIMITIVE"
    ],
    "properties": {
        "true_valid": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "true_valid",
            "documentation": "True if the value True is allowed.",
            "is_mandatory": true,
            "type": "Boolean"
        },
        "false_valid": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "false_valid",
            "documentation": "True if the value False is allowed.",
            "is_mandatory": true,
            "type": "Boolean"
        },
        "assumed_value": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "assumed_value",
            "documentation": "The value to assume if this item is not included in data, due to being part of an optional structure.",
            "type": "Boolean"
        }
    }
}
aom14.c boolean

C_STRING Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_STRING

Description

Constraint on instances of STRING.

Inherit

C_PRIMITIVE

Attributes

Signature

Meaning

0..1

pattern: String

Regular expression pattern for proposed instances of String to match.

0..1

list: List<String>

Set of Strings specifying constraint.

1..1

list_open: Boolean

True if the list is being used to specify the constraint but is not considered exhaustive.

0..1
(redefined)

assumed_value: String

The value to assume if this item is not included in data, due to being part of an optional structure.

Functions

Signature

Meaning

1..1
(effected)

valid_value (
a_value: String[1]
): Boolean

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

C_STRING

Constraint on instances of STRING.

Inherits: C_PRIMITIVE

Attributes

assumed_value: String [0..1]

The value to assume if this item is not included in data, due to being part of an optional structure.

pattern: String [0..1]

Regular expression pattern for proposed instances of String to match.

list: List<String> [0..1]

Set of Strings specifying constraint.

list_open: Boolean [1..1]

True if the list is being used to specify the constraint but is not considered exhaustive.

Functions

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

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

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

True if there is an assumed value.
Inherited from C_PRIMITIVE

valid_value (
a_value: String[1]
): Boolean [1..1]

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

Invariants

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)
Inherited from C_PRIMITIVE

{
    "name": "C_STRING",
    "documentation": "Constraint on instances of STRING. ",
    "ancestors": [
        "C_PRIMITIVE"
    ],
    "properties": {
        "pattern": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "pattern",
            "documentation": "Regular expression pattern for proposed instances of String to match.",
            "type": "String"
        },
        "list": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "list",
            "documentation": "Set of Strings specifying constraint.",
            "type_def": {
                "container_type": "List",
                "type": "String"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "list_open": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "list_open",
            "documentation": "True if the list is being used to specify the constraint but is not considered exhaustive.",
            "is_mandatory": true,
            "type": "Boolean"
        },
        "assumed_value": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "assumed_value",
            "documentation": "The value to assume if this item is not included in data, due to being part of an optional structure.",
            "type": "String"
        }
    },
    "functions": {
        "valid_value": {
            "name": "valid_value",
            "documentation": "True if a_value is valid with respect to constraint expressed in concrete instance of this type. ",
            "parameters": {
                "a_value": {
                    "_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
                    "name": "a_value",
                    "type": "String"
                }
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        }
    }
}
aom14.c string

C_INTEGER Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_INTEGER

Description

Constraint on instances of Integer.

Inherit

C_PRIMITIVE

Attributes

Signature

Meaning

0..1

list: List<Integer>

Set of Integers specifying constraint.

0..1

range: Interval<Integer>

Range of Integers specifying constraint.

0..1
(redefined)

assumed_value: Integer

The value to assume if this item is not included in data, due to being part of an optional structure.

C_INTEGER

Constraint on instances of Integer.

Inherits: C_PRIMITIVE

Attributes

assumed_value: Integer [0..1]

The value to assume if this item is not included in data, due to being part of an optional structure.

list: List<Integer> [0..1]

Set of Integers specifying constraint.

range: Interval<Integer> [0..1]

Range of Integers specifying constraint.

Functions

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

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

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

True if there is an assumed value.
Inherited from C_PRIMITIVE

(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_PRIMITIVE

Invariants

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)
Inherited from C_PRIMITIVE

{
    "name": "C_INTEGER",
    "documentation": "Constraint on instances of Integer.",
    "ancestors": [
        "C_PRIMITIVE"
    ],
    "properties": {
        "list": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "list",
            "documentation": "Set of Integers specifying constraint.",
            "type_def": {
                "container_type": "List",
                "type": "Integer"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "range": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "range",
            "documentation": "Range of Integers specifying constraint.",
            "type_def": {
                "root_type": "Interval",
                "generic_parameters": [
                    "Integer"
                ]
            }
        },
        "assumed_value": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "assumed_value",
            "documentation": "The value to assume if this item is not included in data, due to being part of an optional structure.",
            "type": "Integer"
        }
    }
}
aom14.c integer

C_REAL Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_REAL

Description

Constraint on instances of Real.

Inherit

C_PRIMITIVE

Attributes

Signature

Meaning

0..1

list: List<Real>

Set of Reals specifying constraint.

0..1

range: Interval<Real>

Range of Real specifying constraint.

0..1
(redefined)

assumed_value: Real

The value to assume if this item is not included in data, due to being part of an optional structure.

C_REAL

Constraint on instances of Real.

Inherits: C_PRIMITIVE

Attributes

assumed_value: Real [0..1]

The value to assume if this item is not included in data, due to being part of an optional structure.

list: List<Real> [0..1]

Set of Reals specifying constraint.

range: Interval<Real> [0..1]

Range of Real specifying constraint.

Functions

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

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

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

True if there is an assumed value.
Inherited from C_PRIMITIVE

(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_PRIMITIVE

Invariants

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)
Inherited from C_PRIMITIVE

{
    "name": "C_REAL",
    "documentation": "Constraint on instances of Real.",
    "ancestors": [
        "C_PRIMITIVE"
    ],
    "properties": {
        "list": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "list",
            "documentation": "Set of Reals specifying constraint.",
            "type_def": {
                "container_type": "List",
                "type": "Real"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "range": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "range",
            "documentation": "Range of Real specifying constraint.",
            "type_def": {
                "root_type": "Interval",
                "generic_parameters": [
                    "Real"
                ]
            }
        },
        "assumed_value": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "assumed_value",
            "documentation": "The value to assume if this item is not included in data, due to being part of an optional structure.",
            "type": "Real"
        }
    }
}
aom14.c real

C_DATE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_DATE

Description

ISO 8601-compatible constraint on instances of Date in the form either of a set of validity values, or an actual date range. There is no validity flag for ‘year’, since it must always be by definition mandatory in order to have a sensible date at all. Syntax expressions of instances of this class include “YYYY-??-??” (date with optional month and day).

Inherit

C_PRIMITIVE

Attributes

Signature

Meaning

0..1

day_validity: VALIDITY_KIND

Validity of day in constrained date.

0..1

month_validity: VALIDITY_KIND

Validity of month in constrained date.

0..1

range: Interval<Iso8601_date>

Interval of Dates specifying constraint.

0..1
(redefined)

assumed_value: Iso8601_date

The value to assume if this item is not included in data, due to being part of an optional structure.

Invariants

Pattern_validity: pattern /= Void implies valid_iso8601_date_constraint_pattern(pattern)

Month_validity_optional: month_validity = {VALIDITY_KIND}.optional implies (day_validity = {VALIDITY_KIND}.optional or day_validity = {VALIDITY_KIND}.disallowed)

Month_validity_disallowed: month_validity = {VALIDITY_KIND}.disallowed implies day_validity = {VALIDITY_KIND}.disallowed

Validity_is_range: validity_is_range = (range /= Void)

C_DATE

ISO 8601-compatible constraint on instances of Date in the form either of a set of validity values, or an actual date range. There is no validity flag for ‘year’, since it must always be by definition mandatory in order to have a sensible date at all. Syntax expressions of instances of this class include “YYYY-??-??” (date with optional month and day).

Inherits: C_PRIMITIVE

Attributes

assumed_value: Iso8601_date [0..1]

The value to assume if this item is not included in data, due to being part of an optional structure.

day_validity: VALIDITY_KIND [0..1]

Validity of day in constrained date.

month_validity: VALIDITY_KIND [0..1]

Validity of month in constrained date.

range: Interval<Iso8601_date> [0..1]

Interval of Dates specifying constraint.

Functions

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

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

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

True if there is an assumed value.
Inherited from C_PRIMITIVE

(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_PRIMITIVE

Invariants

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)
Inherited from C_PRIMITIVE

Pattern_validity: pattern /= Void implies valid_iso8601_date_constraint_pattern(pattern)

Month_validity_optional: month_validity = {VALIDITY_KIND}.optional implies (day_validity = {VALIDITY_KIND}.optional or day_validity = {VALIDITY_KIND}.disallowed)

Month_validity_disallowed: month_validity = {VALIDITY_KIND}.disallowed implies day_validity = {VALIDITY_KIND}.disallowed

Validity_is_range: validity_is_range = (range /= Void)

{
    "name": "C_DATE",
    "documentation": "ISO 8601-compatible constraint on instances of Date in the form either of a set of validity values, or an actual date range. There is no validity flag for ‘year’, since it must always be by definition mandatory in order to have a sensible date at all. Syntax expressions of instances of this class include “YYYY-??-??” (date with optional month and day).",
    "ancestors": [
        "C_PRIMITIVE"
    ],
    "properties": {
        "day_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "day_validity",
            "documentation": "Validity of day in constrained date.",
            "type": "VALIDITY_KIND"
        },
        "month_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "month_validity",
            "documentation": "Validity of month in constrained date.",
            "type": "VALIDITY_KIND"
        },
        "range": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "range",
            "documentation": "Interval of Dates specifying constraint.",
            "type_def": {
                "root_type": "Interval",
                "generic_parameters": [
                    "Iso8601_date"
                ]
            }
        },
        "assumed_value": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "assumed_value",
            "documentation": "The value to assume if this item is not included in data, due to being part of an optional structure.",
            "type": "Iso8601_date"
        }
    },
    "invariants": {
        "Pattern_validity": "pattern /= Void implies valid_iso8601_date_constraint_pattern(pattern)",
        "Month_validity_optional": "month_validity = {VALIDITY_KIND}.optional implies (day_validity = {VALIDITY_KIND}.optional or day_validity = {VALIDITY_KIND}.disallowed)",
        "Month_validity_disallowed": "month_validity = {VALIDITY_KIND}.disallowed implies day_validity = {VALIDITY_KIND}.disallowed",
        "Validity_is_range": "validity_is_range = (range /= Void)"
    }
}
aom14.c date

C_TIME Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_TIME

Description

ISO 8601-compatible constraint on instances of Time. There is no validity flag for ‘hour’, since it must always be by definition mandatory in order to have a sensible time at all. Syntax expressions of instances of this class include “HH:??:xx” (time with optional minutes and seconds not allowed).

Inherit

C_PRIMITIVE

Attributes

Signature

Meaning

0..1

minute_validity: VALIDITY_KIND

Validity of minute in constrained time.

0..1

second_validity: VALIDITY_KIND

Validity of second in constrained time.

0..1

millisecond_validity: VALIDITY_KIND

Validity of millisecond in constrained time.

0..1

timezone_validity: VALIDITY_KIND

Validity of timezone in constrained date.

0..1

range: Interval<Iso8601_time>

Interval of Times specifying constraint.

0..1
(redefined)

assumed_value: Iso8601_time

The value to assume if this item is not included in data, due to being part of an optional structure.

Functions

Signature

Meaning

1..1

validity_is_range (): Boolean

True if validity is in the form of a range; useful for developers to check which kind of constraint has been set.

Invariants

Pattern_validity: pattern /= Void implies valid_iso8601_time_constraint_pattern (pattern)

Minute_validity_optional: minute_validity = {VALIDITY_KIND}.optional implies (second_validity = {VALIDITY_KIND}.optional or second_validity = {VALIDITY_KIND}.disallowed)

Minute_validity_disallowed: minute_validity = {VALIDITY_KIND}.disallowed implies second_validity = {VALIDITY_KIND}.disallowed

Second_validity_optional: second_validity = {VALIDITY_KIND}.optional implies (millisecond_validity = {VALIDITY_KIND}.optional or millisecond_validity = {VALIDITY_KIND}.disallowed)

Second_validity_disallowed: second_validity = {VALIDITY_KIND}.disallowed implies millisecond_validity = {VALIDITY_KIND}.disallowed Validity_is_range: validity_is_range = (range /= Void)

C_TIME

ISO 8601-compatible constraint on instances of Time. There is no validity flag for ‘hour’, since it must always be by definition mandatory in order to have a sensible time at all. Syntax expressions of instances of this class include “HH:??:xx” (time with optional minutes and seconds not allowed).

Inherits: C_PRIMITIVE

Attributes

assumed_value: Iso8601_time [0..1]

The value to assume if this item is not included in data, due to being part of an optional structure.

minute_validity: VALIDITY_KIND [0..1]

Validity of minute in constrained time.

second_validity: VALIDITY_KIND [0..1]

Validity of second in constrained time.

millisecond_validity: VALIDITY_KIND [0..1]

Validity of millisecond in constrained time.

timezone_validity: VALIDITY_KIND [0..1]

Validity of timezone in constrained date.

range: Interval<Iso8601_time> [0..1]

Interval of Times specifying constraint.

Functions

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

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

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

True if there is an assumed value.
Inherited from C_PRIMITIVE

(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_PRIMITIVE

validity_is_range (): Boolean [1..1]

True if validity is in the form of a range; useful for developers to check which kind of constraint has been set.

Invariants

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)
Inherited from C_PRIMITIVE

Pattern_validity: pattern /= Void implies valid_iso8601_time_constraint_pattern (pattern)

Minute_validity_optional: minute_validity = {VALIDITY_KIND}.optional implies (second_validity = {VALIDITY_KIND}.optional or second_validity = {VALIDITY_KIND}.disallowed)

Minute_validity_disallowed: minute_validity = {VALIDITY_KIND}.disallowed implies second_validity = {VALIDITY_KIND}.disallowed

Second_validity_optional: second_validity = {VALIDITY_KIND}.optional implies (millisecond_validity = {VALIDITY_KIND}.optional or millisecond_validity = {VALIDITY_KIND}.disallowed)

Second_validity_disallowed: second_validity = {VALIDITY_KIND}.disallowed implies millisecond_validity = {VALIDITY_KIND}.disallowed Validity_is_range: validity_is_range = (range /= Void)

{
    "name": "C_TIME",
    "documentation": "ISO 8601-compatible constraint on instances of Time. There is no validity flag for ‘hour’, since it must always be by definition mandatory in order to have a sensible time at all. Syntax expressions of instances of this class include “HH:??:xx” (time with optional minutes and seconds not allowed).",
    "ancestors": [
        "C_PRIMITIVE"
    ],
    "properties": {
        "minute_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "minute_validity",
            "documentation": "Validity of minute in constrained time.",
            "type": "VALIDITY_KIND"
        },
        "second_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "second_validity",
            "documentation": "Validity of second in constrained time.",
            "type": "VALIDITY_KIND"
        },
        "millisecond_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "millisecond_validity",
            "documentation": "Validity of millisecond in constrained time.",
            "type": "VALIDITY_KIND"
        },
        "timezone_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "timezone_validity",
            "documentation": "Validity of timezone in constrained date.",
            "type": "VALIDITY_KIND"
        },
        "range": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "range",
            "documentation": "Interval of Times specifying constraint.",
            "type_def": {
                "root_type": "Interval",
                "generic_parameters": [
                    "Iso8601_time"
                ]
            }
        },
        "assumed_value": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "assumed_value",
            "documentation": "The value to assume if this item is not included in data, due to being part of an optional structure.",
            "type": "Iso8601_time"
        }
    },
    "functions": {
        "validity_is_range": {
            "name": "validity_is_range",
            "documentation": "True if validity is in the form of a range; useful for developers to check which kind of constraint has been set.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        }
    },
    "invariants": {
        "Pattern_validity": "pattern /= Void implies valid_iso8601_time_constraint_pattern (pattern)",
        "Minute_validity_optional": "minute_validity = {VALIDITY_KIND}.optional implies (second_validity = {VALIDITY_KIND}.optional or second_validity = {VALIDITY_KIND}.disallowed)",
        "Minute_validity_disallowed": "minute_validity = {VALIDITY_KIND}.disallowed implies second_validity = {VALIDITY_KIND}.disallowed",
        "Second_validity_optional": "second_validity = {VALIDITY_KIND}.optional implies (millisecond_validity = {VALIDITY_KIND}.optional or millisecond_validity = {VALIDITY_KIND}.disallowed)",
        "Second_validity_disallowed": "second_validity = {VALIDITY_KIND}.disallowed implies millisecond_validity = {VALIDITY_KIND}.disallowed Validity_is_range: validity_is_range = (range /= Void)"
    }
}
aom14.c time

C_DATE_TIME Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_DATE_TIME

Description

ISO 8601-compatible constraint on instances of Date_Time. There is no validity flag for ‘year’, since it must always be by definition mandatory in order to have a sensible date/time at all. Syntax expressions of instances of this class include “YYYY-MM-DDT??:??:??” (date/time with optional time) and “YYYY-MMDDTHH:MM:xx” (date/time, seconds not allowed).

Inherit

C_PRIMITIVE

Attributes

Signature

Meaning

0..1

month_validity: VALIDITY_KIND

Validity of month in constrained date.

0..1

day_validity: VALIDITY_KIND

Validity of day in constrained date.

0..1

hour_validity: VALIDITY_KIND

Validity of hour in constrained time.

0..1

minute_validity: VALIDITY_KIND

Validity of minute in constrained time.

0..1

second_validity: VALIDITY_KIND

Validity of second in constrained time.

0..1

millisecond_validity: VALIDITY_KIND

Validity of millisecond in constrained time.

0..1

timezone_validity: VALIDITY_KIND

Validity of timezone in constrained date.

0..1

range: Interval<Iso8601_date_time>

Range of Date_times specifying constraint.

0..1
(redefined)

assumed_value: Iso8601_date_time

The value to assume if this item is not included in data, due to being part of an optional structure.

Functions

Signature

Meaning

1..1

validity_is_range (): Boolean

True if validity is in the form of a range; useful for developers to check which kind of constraint has been set.

Invariants

Pattern_validity: pattern /= Void implies valid_iso8601_date_time_constraint_pattern(pattern)

Month_validity_optional:: month_validity = {VALIDITY_KIND}.optional implies (day_validity = {VALIDITY_KIND}.optional or day_validity = {VALIDITY_KIND}.disallowed)

Month_validity_disallowed: month_validity = {VALIDITY_KIND}.disallowed implies day_validity = {VALIDITY_KIND}.disallowed

Day_validity_optional: day_validity = {VALIDITY_KIND}.optional implies (hour_validity = {VALIDITY_KIND}.optional or hour_validity = {VALIDITY_KIND}.disallowed)

Day_validity_disallowed: day_validity = {VALIDITY_KIND}.disallowed implies hour_validity = {VALIDITY_KIND}.disallowed

Hour_validity_optional: hour_validity = {VALIDITY_KIND}.optional implies (minute_validity = {VALIDITY_KIND}.optional or minute_validity = {VALIDITY_KIND}.disallowed)

Hour_validity_disallowed: hour_validity = {VALIDITY_KIND}.disallowed implies minute_validity = {VALIDITY_KIND}.disallowed

Minute_validity_optional: minute_validity = {VALIDITY_KIND}.optional implies (second_validity = {VALIDITY_KIND}.optional or second_validity = {VALIDITY_KIND}.disallowed)

Minute_validity_disallowed: minute_validity = {VALIDITY_KIND}.disallowed implies second_validity = {VALIDITY_KIND}.disallowed

Second_validity_optional: second_validity = {VALIDITY_KIND}.optional implies (millisecond_validity = {VALIDITY_KIND}.optional or millisecond_validity = {VALIDITY_KIND}.disallowed)

Second_validity_disallowed: second_validity = {VALIDITY_KIND}.disallowed implies millisecond_validity = {VALIDITY_KIND}.disallowed

Validity_is_range: validity_is_range = (range /= Void)

C_DATE_TIME

ISO 8601-compatible constraint on instances of Date_Time. There is no validity flag for ‘year’, since it must always be by definition mandatory in order to have a sensible date/time at all. Syntax expressions of instances of this class include “YYYY-MM-DDT??:??:??” (date/time with optional time) and “YYYY-MMDDTHH:MM:xx” (date/time, seconds not allowed).

Inherits: C_PRIMITIVE

Attributes

assumed_value: Iso8601_date_time [0..1]

The value to assume if this item is not included in data, due to being part of an optional structure.

month_validity: VALIDITY_KIND [0..1]

Validity of month in constrained date.

day_validity: VALIDITY_KIND [0..1]

Validity of day in constrained date.

hour_validity: VALIDITY_KIND [0..1]

Validity of hour in constrained time.

minute_validity: VALIDITY_KIND [0..1]

Validity of minute in constrained time.

second_validity: VALIDITY_KIND [0..1]

Validity of second in constrained time.

millisecond_validity: VALIDITY_KIND [0..1]

Validity of millisecond in constrained time.

timezone_validity: VALIDITY_KIND [0..1]

Validity of timezone in constrained date.

range: Interval<Iso8601_date_time> [0..1]

Range of Date_times specifying constraint.

Functions

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

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

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

True if there is an assumed value.
Inherited from C_PRIMITIVE

(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_PRIMITIVE

validity_is_range (): Boolean [1..1]

True if validity is in the form of a range; useful for developers to check which kind of constraint has been set.

Invariants

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)
Inherited from C_PRIMITIVE

Pattern_validity: pattern /= Void implies valid_iso8601_date_time_constraint_pattern(pattern)

Month_validity_optional:: month_validity = {VALIDITY_KIND}.optional implies (day_validity = {VALIDITY_KIND}.optional or day_validity = {VALIDITY_KIND}.disallowed)

Month_validity_disallowed: month_validity = {VALIDITY_KIND}.disallowed implies day_validity = {VALIDITY_KIND}.disallowed

Day_validity_optional: day_validity = {VALIDITY_KIND}.optional implies (hour_validity = {VALIDITY_KIND}.optional or hour_validity = {VALIDITY_KIND}.disallowed)

Day_validity_disallowed: day_validity = {VALIDITY_KIND}.disallowed implies hour_validity = {VALIDITY_KIND}.disallowed

Hour_validity_optional: hour_validity = {VALIDITY_KIND}.optional implies (minute_validity = {VALIDITY_KIND}.optional or minute_validity = {VALIDITY_KIND}.disallowed)

Hour_validity_disallowed: hour_validity = {VALIDITY_KIND}.disallowed implies minute_validity = {VALIDITY_KIND}.disallowed

Minute_validity_optional: minute_validity = {VALIDITY_KIND}.optional implies (second_validity = {VALIDITY_KIND}.optional or second_validity = {VALIDITY_KIND}.disallowed)

Minute_validity_disallowed: minute_validity = {VALIDITY_KIND}.disallowed implies second_validity = {VALIDITY_KIND}.disallowed

Second_validity_optional: second_validity = {VALIDITY_KIND}.optional implies (millisecond_validity = {VALIDITY_KIND}.optional or millisecond_validity = {VALIDITY_KIND}.disallowed)

Second_validity_disallowed: second_validity = {VALIDITY_KIND}.disallowed implies millisecond_validity = {VALIDITY_KIND}.disallowed

Validity_is_range: validity_is_range = (range /= Void)

{
    "name": "C_DATE_TIME",
    "documentation": "ISO 8601-compatible constraint on instances of Date_Time. There is no validity flag for ‘year’, since it must always be by definition mandatory in order to have a sensible date/time at all. Syntax expressions of instances of this class include “YYYY-MM-DDT??:??:??” (date/time with optional time) and “YYYY-MMDDTHH:MM:xx” (date/time, seconds not allowed).",
    "ancestors": [
        "C_PRIMITIVE"
    ],
    "properties": {
        "month_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "month_validity",
            "documentation": "Validity of month in constrained date.",
            "type": "VALIDITY_KIND"
        },
        "day_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "day_validity",
            "documentation": "Validity of day in constrained date.",
            "type": "VALIDITY_KIND"
        },
        "hour_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "hour_validity",
            "documentation": "Validity of hour in constrained time.",
            "type": "VALIDITY_KIND"
        },
        "minute_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "minute_validity",
            "documentation": "Validity of minute in constrained time.",
            "type": "VALIDITY_KIND"
        },
        "second_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "second_validity",
            "documentation": "Validity of second in constrained time.",
            "type": "VALIDITY_KIND"
        },
        "millisecond_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "millisecond_validity",
            "documentation": "Validity of millisecond in constrained time.",
            "type": "VALIDITY_KIND"
        },
        "timezone_validity": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "timezone_validity",
            "documentation": "Validity of timezone in constrained date.",
            "type": "VALIDITY_KIND"
        },
        "range": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "range",
            "documentation": "Range of Date_times specifying constraint.",
            "type_def": {
                "root_type": "Interval",
                "generic_parameters": [
                    "Iso8601_date_time"
                ]
            }
        },
        "assumed_value": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "assumed_value",
            "documentation": "The value to assume if this item is not included in data, due to being part of an optional structure.",
            "type": "Iso8601_date_time"
        }
    },
    "functions": {
        "validity_is_range": {
            "name": "validity_is_range",
            "documentation": "True if validity is in the form of a range; useful for developers to check which kind of constraint has been set.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        }
    },
    "invariants": {
        "Pattern_validity": "pattern /= Void implies valid_iso8601_date_time_constraint_pattern(pattern)",
        "Month_validity_optional:": "month_validity = {VALIDITY_KIND}.optional implies (day_validity = {VALIDITY_KIND}.optional or day_validity = {VALIDITY_KIND}.disallowed)",
        "Month_validity_disallowed": "month_validity = {VALIDITY_KIND}.disallowed implies day_validity = {VALIDITY_KIND}.disallowed",
        "Day_validity_optional": "day_validity = {VALIDITY_KIND}.optional implies (hour_validity = {VALIDITY_KIND}.optional or hour_validity = {VALIDITY_KIND}.disallowed)",
        "Day_validity_disallowed": "day_validity = {VALIDITY_KIND}.disallowed implies hour_validity = {VALIDITY_KIND}.disallowed",
        "Hour_validity_optional": "hour_validity = {VALIDITY_KIND}.optional implies (minute_validity = {VALIDITY_KIND}.optional or minute_validity = {VALIDITY_KIND}.disallowed)",
        "Hour_validity_disallowed": "hour_validity = {VALIDITY_KIND}.disallowed implies minute_validity = {VALIDITY_KIND}.disallowed",
        "Minute_validity_optional": "minute_validity = {VALIDITY_KIND}.optional implies (second_validity = {VALIDITY_KIND}.optional or second_validity = {VALIDITY_KIND}.disallowed)",
        "Minute_validity_disallowed": "minute_validity = {VALIDITY_KIND}.disallowed implies second_validity = {VALIDITY_KIND}.disallowed",
        "Second_validity_optional": "second_validity = {VALIDITY_KIND}.optional implies (millisecond_validity = {VALIDITY_KIND}.optional or millisecond_validity = {VALIDITY_KIND}.disallowed)",
        "Second_validity_disallowed": "second_validity = {VALIDITY_KIND}.disallowed implies millisecond_validity = {VALIDITY_KIND}.disallowed",
        "Validity_is_range": "validity_is_range = (range /= Void)"
    }
}
aom14.c date time

C_DURATION Class

  • Definition

  • Effective

  • BMM

  • UML

Class

C_DURATION

Description

ISO 8601-compatible constraint on instances of Duration. In ISO 8601 terms, constraints might are of the form “PWD” (weeks and/or days), “PDTHMS” (days, hours, minutes, seconds) and so on.

Both range and the constraint pattern can be set at the same time, corresponding to the ADL constraint "PWD/|P0W..P50W|".

As for all of openEHR, two ISO 8601 exceptions are allowed:

  • the ‘W’ (week) designator can be mixed in - the allowed patterns are: P[Y|y][M|m][D|d][T[H|h][M|m][S|s]] and P[W|w];

  • the values used in an interval constraint may be negated, i.e. a leading minus ('-') sign may be used.

Inherit

C_PRIMITIVE

Attributes

Signature

Meaning

0..1

years_allowed: Boolean

0..1

months_allowed: Boolean

True if months are allowed in the constrained Duration.

0..1

weeks_allowed: Boolean

0..1

days_allowed: Boolean

True if days are allowed in the constrained Duration.

0..1

hours_allowed: Boolean

True if hours are allowed in the constrained Duration.

0..1

minutes_allowed: Boolean

True if minutes are allowed in the constrained Duration.

0..1

seconds_allowed: Boolean

0..1

fractional_seconds_allowed: Boolean

True if fractional seconds are allowed in the constrained Duration.

0..1

range: Interval<Iso8601_duration>

Range of Durations specifying constraint.

0..1
(redefined)

assumed_value: Iso8601_duration

The value to assume if this item is not included in data, due to being part of an optional structure.

C_DURATION

ISO 8601-compatible constraint on instances of Duration. In ISO 8601 terms, constraints might are of the form “PWD” (weeks and/or days), “PDTHMS” (days, hours, minutes, seconds) and so on.

Both range and the constraint pattern can be set at the same time, corresponding to the ADL constraint "PWD/|P0W..P50W|".

As for all of openEHR, two ISO 8601 exceptions are allowed:

  • the ‘W’ (week) designator can be mixed in - the allowed patterns are: P[Y|y][M|m][D|d][T[H|h][M|m][S|s]] and P[W|w];

  • the values used in an interval constraint may be negated, i.e. a leading minus ('-') sign may be used.

Inherits: C_PRIMITIVE

Attributes

assumed_value: Iso8601_duration [0..1]

The value to assume if this item is not included in data, due to being part of an optional structure.

years_allowed: Boolean [0..1]

months_allowed: Boolean [0..1]

True if months are allowed in the constrained Duration.

weeks_allowed: Boolean [0..1]

days_allowed: Boolean [0..1]

True if days are allowed in the constrained Duration.

hours_allowed: Boolean [0..1]

True if hours are allowed in the constrained Duration.

minutes_allowed: Boolean [0..1]

True if minutes are allowed in the constrained Duration.

seconds_allowed: Boolean [0..1]

fractional_seconds_allowed: Boolean [0..1]

True if fractional seconds are allowed in the constrained Duration.

range: Interval<Iso8601_duration> [0..1]

Range of Durations specifying constraint.

Functions

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

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

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

True if there is an assumed value.
Inherited from C_PRIMITIVE

(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_PRIMITIVE

Invariants

Assumed_value_valid: has_assumed_value implies valid_value(assumed_value)
Inherited from C_PRIMITIVE

{
    "name": "C_DURATION",
    "documentation": "ISO 8601-compatible constraint on instances of Duration. In ISO 8601 terms, constraints might are of the form “PWD” (weeks and/or days), “PDTHMS” (days, hours, minutes, seconds) and so on.\n\nBoth range and the constraint pattern can be set at the same time, corresponding to the ADL constraint `\"PWD/|P0W..P50W|\"`.\n\nAs for all of openEHR, two ISO 8601 exceptions are allowed: \n\n* the ‘W’ (week) designator can be mixed in - the allowed patterns are: `P[Y|y][M|m][D|d][T[H|h][M|m][S|s]]` and `P[W|w]`;\n* the values used in an interval constraint may be negated, i.e. a leading minus (`'-'`) sign may be used.\n",
    "ancestors": [
        "C_PRIMITIVE"
    ],
    "properties": {
        "years_allowed": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "years_allowed",
            "type": "Boolean"
        },
        "months_allowed": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "months_allowed",
            "documentation": "True if months are allowed in the constrained Duration.",
            "type": "Boolean"
        },
        "weeks_allowed": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "weeks_allowed",
            "type": "Boolean"
        },
        "days_allowed": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "days_allowed",
            "documentation": "True if days are allowed in the constrained Duration.",
            "type": "Boolean"
        },
        "hours_allowed": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "hours_allowed",
            "documentation": "True if hours are allowed in the constrained Duration.",
            "type": "Boolean"
        },
        "minutes_allowed": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "minutes_allowed",
            "documentation": "True if minutes are allowed in the constrained Duration.",
            "type": "Boolean"
        },
        "seconds_allowed": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "seconds_allowed",
            "type": "Boolean"
        },
        "fractional_seconds_allowed": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "fractional_seconds_allowed",
            "documentation": "True if fractional seconds are allowed in the constrained Duration.",
            "type": "Boolean"
        },
        "range": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "range",
            "documentation": "Range of Durations specifying constraint.",
            "type_def": {
                "root_type": "Interval",
                "generic_parameters": [
                    "Iso8601_duration"
                ]
            }
        },
        "assumed_value": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "assumed_value",
            "documentation": "The value to assume if this item is not included in data, due to being part of an optional structure.",
            "type": "Iso8601_duration"
        }
    }
}
aom14.c duration