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.
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: |
Value to be assumed if none sent in data. |
Functions |
Signature |
Meaning |
1..1 |
default_value (): |
Generate a default value from this constraint object. |
1..1 |
has_assumed_value (): |
True if there is an assumed value. |
1..1 |
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|
Invariants |
Assumed_value_valid: |
|
| C_PRIMITIVE (abstract) | |
|---|---|
Parent of types representing constraints on primitive types. |
|
Attributes |
|
assumed_value: |
Value to be assumed if none sent in data. |
Functions |
|
(abstract) default_value (): |
Generate a default value from this constraint object. |
(abstract) has_assumed_value (): |
True if there is an assumed value. |
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|
Invariants |
|
Assumed_value_valid: |
|
{
"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)"
}
}
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 |
||
Attributes |
Signature |
Meaning |
1..1 |
true_valid: |
True if the value True is allowed. |
1..1 |
false_valid: |
True if the value False is allowed. |
0..1 |
assumed_value: |
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: |
The value to assume if this item is not included in data, due to being part of an optional structure. |
true_valid: |
True if the value True is allowed. |
false_valid: |
True if the value False is allowed. |
Functions |
|
(abstract) default_value (): |
Generate a default value from this constraint object. |
(abstract) has_assumed_value (): |
True if there is an assumed value. |
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|
Invariants |
|
Assumed_value_valid: |
|
{
"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"
}
}
}
C_STRING Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_STRING |
|
|---|---|---|
Description |
Constraint on instances of STRING. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
pattern: |
Regular expression pattern for proposed instances of String to match. |
0..1 |
Set of Strings specifying constraint. |
|
1..1 |
list_open: |
True if the list is being used to specify the constraint but is not considered exhaustive. |
0..1 |
assumed_value: |
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 |
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: |
The value to assume if this item is not included in data, due to being part of an optional structure. |
pattern: |
Regular expression pattern for proposed instances of String to match. |
Set of Strings specifying constraint. |
|
list_open: |
True if the list is being used to specify the constraint but is not considered exhaustive. |
Functions |
|
(abstract) default_value (): |
Generate a default value from this constraint object. |
(abstract) has_assumed_value (): |
True if there is an assumed value. |
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|
Invariants |
|
Assumed_value_valid: |
|
{
"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"
}
}
}
}
C_INTEGER Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_INTEGER |
|
|---|---|---|
Description |
Constraint on instances of Integer. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
Set of Integers specifying constraint. |
|
0..1 |
Range of Integers specifying constraint. |
|
0..1 |
assumed_value: |
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: |
The value to assume if this item is not included in data, due to being part of an optional structure. |
Set of Integers specifying constraint. |
|
Range of Integers specifying constraint. |
|
Functions |
|
(abstract) default_value (): |
Generate a default value from this constraint object. |
(abstract) has_assumed_value (): |
True if there is an assumed value. |
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|
Invariants |
|
Assumed_value_valid: |
|
{
"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"
}
}
}
C_REAL Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_REAL |
|
|---|---|---|
Description |
Constraint on instances of Real. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
Set of Reals specifying constraint. |
|
0..1 |
Range of Real specifying constraint. |
|
0..1 |
assumed_value: |
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: |
The value to assume if this item is not included in data, due to being part of an optional structure. |
Set of Reals specifying constraint. |
|
Range of Real specifying constraint. |
|
Functions |
|
(abstract) default_value (): |
Generate a default value from this constraint object. |
(abstract) has_assumed_value (): |
True if there is an assumed value. |
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|
Invariants |
|
Assumed_value_valid: |
|
{
"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"
}
}
}
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 |
||
Attributes |
Signature |
Meaning |
0..1 |
day_validity: |
Validity of day in constrained date. |
0..1 |
month_validity: |
Validity of month in constrained date. |
0..1 |
range: |
Interval of Dates specifying constraint. |
0..1 |
assumed_value: |
The value to assume if this item is not included in data, due to being part of an optional structure. |
Invariants |
Pattern_validity: |
|
Month_validity_optional: |
||
Month_validity_disallowed: |
||
Validity_is_range: |
||
| 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: |
The value to assume if this item is not included in data, due to being part of an optional structure. |
day_validity: |
Validity of day in constrained date. |
month_validity: |
Validity of month in constrained date. |
range: |
Interval of Dates specifying constraint. |
Functions |
|
(abstract) default_value (): |
Generate a default value from this constraint object. |
(abstract) has_assumed_value (): |
True if there is an assumed value. |
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|
Invariants |
|
Assumed_value_valid: |
|
Pattern_validity: |
|
Month_validity_optional: |
|
Month_validity_disallowed: |
|
Validity_is_range: |
|
{
"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)"
}
}
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 |
||
Attributes |
Signature |
Meaning |
0..1 |
minute_validity: |
Validity of minute in constrained time. |
0..1 |
second_validity: |
Validity of second in constrained time. |
0..1 |
millisecond_validity: |
Validity of millisecond in constrained time. |
0..1 |
timezone_validity: |
Validity of timezone in constrained date. |
0..1 |
range: |
Interval of Times specifying constraint. |
0..1 |
assumed_value: |
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 (): |
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: |
|
Minute_validity_optional: |
||
Minute_validity_disallowed: |
||
Second_validity_optional: |
||
Second_validity_disallowed: |
||
| 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: |
The value to assume if this item is not included in data, due to being part of an optional structure. |
minute_validity: |
Validity of minute in constrained time. |
second_validity: |
Validity of second in constrained time. |
millisecond_validity: |
Validity of millisecond in constrained time. |
timezone_validity: |
Validity of timezone in constrained date. |
range: |
Interval of Times specifying constraint. |
Functions |
|
(abstract) default_value (): |
Generate a default value from this constraint object. |
(abstract) has_assumed_value (): |
True if there is an assumed value. |
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|
validity_is_range (): |
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: |
|
Pattern_validity: |
|
Minute_validity_optional: |
|
Minute_validity_disallowed: |
|
Second_validity_optional: |
|
Second_validity_disallowed: |
|
{
"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)"
}
}
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 |
||
Attributes |
Signature |
Meaning |
0..1 |
month_validity: |
Validity of month in constrained date. |
0..1 |
day_validity: |
Validity of day in constrained date. |
0..1 |
hour_validity: |
Validity of hour in constrained time. |
0..1 |
minute_validity: |
Validity of minute in constrained time. |
0..1 |
second_validity: |
Validity of second in constrained time. |
0..1 |
millisecond_validity: |
Validity of millisecond in constrained time. |
0..1 |
timezone_validity: |
Validity of timezone in constrained date. |
0..1 |
range: |
Range of Date_times specifying constraint. |
0..1 |
assumed_value: |
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 (): |
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: |
|
Month_validity_optional:: |
||
Month_validity_disallowed: |
||
Day_validity_optional: |
||
Day_validity_disallowed: |
||
Hour_validity_optional: |
||
Hour_validity_disallowed: |
||
Minute_validity_optional: |
||
Minute_validity_disallowed: |
||
Second_validity_optional: |
||
Second_validity_disallowed: |
||
Validity_is_range: |
||
| 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: |
The value to assume if this item is not included in data, due to being part of an optional structure. |
month_validity: |
Validity of month in constrained date. |
day_validity: |
Validity of day in constrained date. |
hour_validity: |
Validity of hour in constrained time. |
minute_validity: |
Validity of minute in constrained time. |
second_validity: |
Validity of second in constrained time. |
millisecond_validity: |
Validity of millisecond in constrained time. |
timezone_validity: |
Validity of timezone in constrained date. |
range: |
Range of Date_times specifying constraint. |
Functions |
|
(abstract) default_value (): |
Generate a default value from this constraint object. |
(abstract) has_assumed_value (): |
True if there is an assumed value. |
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|
validity_is_range (): |
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: |
|
Pattern_validity: |
|
Month_validity_optional:: |
|
Month_validity_disallowed: |
|
Day_validity_optional: |
|
Day_validity_disallowed: |
|
Hour_validity_optional: |
|
Hour_validity_disallowed: |
|
Minute_validity_optional: |
|
Minute_validity_disallowed: |
|
Second_validity_optional: |
|
Second_validity_disallowed: |
|
Validity_is_range: |
|
{
"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)"
}
}
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 As for all of openEHR, two ISO 8601 exceptions are allowed:
|
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
years_allowed: |
|
0..1 |
months_allowed: |
True if months are allowed in the constrained Duration. |
0..1 |
weeks_allowed: |
|
0..1 |
days_allowed: |
True if days are allowed in the constrained Duration. |
0..1 |
hours_allowed: |
True if hours are allowed in the constrained Duration. |
0..1 |
minutes_allowed: |
True if minutes are allowed in the constrained Duration. |
0..1 |
seconds_allowed: |
|
0..1 |
fractional_seconds_allowed: |
True if fractional seconds are allowed in the constrained Duration. |
0..1 |
range: |
Range of Durations specifying constraint. |
0..1 |
assumed_value: |
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 As for all of openEHR, two ISO 8601 exceptions are allowed:
|
|
Inherits: C_PRIMITIVE |
|
Attributes |
|
assumed_value: |
The value to assume if this item is not included in data, due to being part of an optional structure. |
years_allowed: |
|
months_allowed: |
True if months are allowed in the constrained Duration. |
weeks_allowed: |
|
days_allowed: |
True if days are allowed in the constrained Duration. |
hours_allowed: |
True if hours are allowed in the constrained Duration. |
minutes_allowed: |
True if minutes are allowed in the constrained Duration. |
seconds_allowed: |
|
fractional_seconds_allowed: |
True if fractional seconds are allowed in the constrained Duration. |
range: |
Range of Durations specifying constraint. |
Functions |
|
(abstract) default_value (): |
Generate a default value from this constraint object. |
(abstract) has_assumed_value (): |
True if there is an assumed value. |
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|
Invariants |
|
Assumed_value_valid: |
|
{
"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"
}
}
}