Class Definitions
ARCHETYPE_CONSTRAINT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
ARCHETYPE_CONSTRAINT (abstract) |
|||
|---|---|---|---|---|
Description |
Abstract parent of all constraint model types. Defines conformance and congruence function signatures. |
|||
Inherit |
||||
Attributes |
Signature |
Meaning |
||
0..1 |
parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
0..1 |
soc_parent: |
|||
Functions |
Signature |
Meaning |
||
1..1 |
is_prohibited (): |
True if this node is prohibited. Implemented in subtypes. |
||
1..1 |
True if the relative path |
|||
1..1 |
path (): |
Path of this node relative to root of archetype. |
||
1..1 |
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
1..1 |
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node other, with the exception of Typically used to test if an inherited node locally contains any constraints. |
||
1..1 |
is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
1..1 |
is_root (): |
True if this node is the root of the tree. |
||
1..1 |
is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Invariants |
Post: |
|||
| ARCHETYPE_CONSTRAINT (abstract) | |||
|---|---|---|---|
Abstract parent of all constraint model types. Defines conformance and congruence function signatures. |
|||
Inherits: ADL_CODE_DEFINITIONS |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
soc_parent: |
|||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
(abstract) is_prohibited (): |
True if this node is prohibited. Implemented in subtypes. |
||
True if the relative path |
|||
path (): |
Path of this node relative to root of archetype. |
||
(abstract) c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
(abstract) c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node other, with the exception of Typically used to test if an inherited node locally contains any constraints. |
||
is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
is_root (): |
True if this node is the root of the tree. |
||
is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Invariants |
|||
Post: |
|||
{
"name": "ARCHETYPE_CONSTRAINT",
"documentation": "Abstract parent of all constraint model types. Defines conformance and congruence function signatures. ",
"is_abstract": true,
"ancestors": [
"ADL_CODE_DEFINITIONS"
],
"properties": {
"parent": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "parent",
"documentation": "Parent node, except in the case of the top of a tree, i.e. root `C_COMPLEX_OBJECT` of an archetype definition.",
"type": "ARCHETYPE_CONSTRAINT"
},
"soc_parent": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "soc_parent",
"type": "C_SECOND_ORDER"
}
},
"functions": {
"is_prohibited": {
"name": "is_prohibited",
"documentation": "True if this node is prohibited. Implemented in subtypes.",
"is_abstract": true,
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"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"
}
},
"path": {
"name": "path",
"documentation": "Path of this node relative to root of archetype.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
}
},
"c_conforms_to": {
"name": "c_conforms_to",
"documentation": "True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. \nTypically used during validation of specialised archetype nodes.",
"is_abstract": true,
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "ARCHETYPE_CONSTRAINT"
},
"rmcc": {
"_type": "P_BMM_GENERIC_FUNCTION_PARAMETER",
"name": "rmcc",
"documentation": "RM conformance checker - a lambda (i.e. function object) that can compute conformance of type-names within the Reference Model on which the current archetype is based. The signature provides two arguments representing respectively, the `_rm_type_name_` of the current node and the `_rm_type_name_` of the node being redefined in a specialisation parent archetype.",
"type_def": {
"root_type": "FUNCTION"
}
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_congruent_to": {
"name": "c_congruent_to",
"documentation": "True if constraints represented by this node contain no further redefinitions with respect to the node other, with the exception of `_node_id_` redefinition in `C_OBJECT` nodes. \n\nTypically used to test if an inherited node locally contains any constraints.",
"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_second_order_constrained": {
"name": "is_second_order_constrained",
"documentation": "True if there is a second order constraint such as a tuple constraint on this node.",
"post_conditions": {
"Post": "soc_parent /= Void or else (parent /= Void and then parent.is_second_order_constrained)"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_root": {
"name": "is_root",
"documentation": "True if this node is the root of the tree.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_leaf": {
"name": "is_leaf",
"documentation": "True if this node is a terminal node in the tree structure, i.e. having no child nodes.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
},
"invariants": {
"Post": "Result = soc_parent /= Void or parent.soc_parent /= Void"
}
}
C_ATTRIBUTE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_ATTRIBUTE |
|
|---|---|---|
Description |
Abstract model of constraint on any kind of attribute in a class model. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
rm_attribute_name: |
Reference model attribute within the enclosing type represented by a |
0..1 |
existence: |
Constraint settable 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). Only set if it overrides the underlying reference model or parent archetype in the case of specialised archetypes. |
0..1 |
Child |
|
0..1 |
differential_path: |
Path to the parent object of this attribute (i.e. doesn’t include the name of this attribute). Used only for attributes in differential form, specialised archetypes. Enables only the re-defined parts of a specialised archetype to be expressed, at the path where they occur. |
0..1 |
cardinality: |
Cardinality constraint of attribute, if a container attribute. |
1..1 |
is_multiple: |
Flag indicating whether this attribute constraint is on a container (i.e. multiply-valued) attribute. |
Functions |
Signature |
Meaning |
1..1 |
any_allowed (): |
True if there is no effective constraint on the children of the RM attribute to which this |
1..1 |
is_mandatory (): |
True if this |
1..1 |
rm_attribute_path (): |
Path of this attribute with respect to owning |
1..1 |
is_single (): |
True if this node logically represents a single-valued attribute. Evaluated as not |
1..1 |
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node other, with the exception of Typically used to test if an inherited node locally contains any constraints. |
1..1 |
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. |
1..1 |
is_prohibited (): |
True if this |
| C_ATTRIBUTE | |
|---|---|
Abstract model of constraint on any kind of attribute in a class model. |
|
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT |
|
Constants |
|
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
Attributes |
|
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
ARCHETYPE_CONSTRAINT.soc_parent: |
|
rm_attribute_name: |
Reference model attribute within the enclosing type represented by a |
existence: |
Constraint settable 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). Only set if it overrides the underlying reference model or parent archetype in the case of specialised archetypes. |
Child |
|
differential_path: |
Path to the parent object of this attribute (i.e. doesn’t include the name of this attribute). Used only for attributes in differential form, specialised archetypes. Enables only the re-defined parts of a specialised archetype to be expressed, at the path where they occur. |
cardinality: |
Cardinality constraint of attribute, if a container attribute. |
is_multiple: |
Flag indicating whether this attribute constraint is on a container (i.e. multiply-valued) attribute. |
Functions |
|
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
is_prohibited (): |
True if this |
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. |
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node other, with the exception of Typically used to test if an inherited node locally contains any constraints. |
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
any_allowed (): |
True if there is no effective constraint on the children of the RM attribute to which this |
is_mandatory (): |
True if this |
rm_attribute_path (): |
Path of this attribute with respect to owning |
is_single (): |
True if this node logically represents a single-valued attribute. Evaluated as not |
Invariants |
|
ARCHETYPE_CONSTRAINT.Post: |
|
{
"name": "C_ATTRIBUTE",
"documentation": "Abstract model of constraint on any kind of attribute in a class model.",
"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_SINGLE_PROPERTY",
"name": "existence",
"documentation": "Constraint settable 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). Only set if it overrides the underlying reference model or parent archetype in the case of specialised archetypes.",
"type": "Multiplicity_interval"
},
"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
}
},
"differential_path": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "differential_path",
"documentation": "Path to the parent object of this attribute (i.e. doesn’t include the name of this attribute). Used only for attributes in differential form, specialised archetypes. Enables only the re-defined parts of a specialised archetype to be expressed, at the path where they occur.",
"type": "String"
},
"cardinality": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "cardinality",
"documentation": "Cardinality constraint of attribute, if a container attribute.",
"type": "Cardinality"
},
"is_multiple": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_multiple",
"documentation": "Flag indicating whether this attribute constraint is on a container (i.e. multiply-valued) attribute.",
"is_mandatory": true,
"type": "Boolean"
}
},
"functions": {
"any_allowed": {
"name": "any_allowed",
"documentation": "True if there is no effective constraint on the children of the RM attribute to which this `C_ATTRIBUTE` refers.",
"post_conditions": {
"Post": "Result := children.is_empty and not is_prohibited"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_mandatory": {
"name": "is_mandatory",
"documentation": "True if this `C_ATTRIBUTE` has an existence constraint of 1..1, i.e. mandation.",
"post_conditions": {
"Post": "Result = existence /= Void and then existence.is_mandatory"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"rm_attribute_path": {
"name": "rm_attribute_path",
"documentation": "Path of this attribute with respect to owning `C_OBJECT`, including differential path where applicable.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
}
},
"is_single": {
"name": "is_single",
"documentation": "True if this node logically represents a single-valued attribute. Evaluated as not `_is_multiple_`.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_congruent_to": {
"name": "c_congruent_to",
"documentation": "True if constraints represented by this node contain no further redefinitions with respect to the node other, with the exception of `_node_id_` redefinition in `C_OBJECT` nodes. \n\nTypically used to test if an inherited node locally contains any constraints.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "ARCHETYPE_CONSTRAINT"
}
},
"post_conditions": {
"Post": "Result = existence = Void and ((is_single and other.is_single) or (is_multiple and other.is_multiple and cardinality = Void))"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_conforms_to": {
"name": "c_conforms_to",
"documentation": "True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. \nTypically used during validation of specialised archetype nodes.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "ARCHETYPE_CONSTRAINT"
},
"rmcc": {
"_type": "P_BMM_GENERIC_FUNCTION_PARAMETER",
"name": "rmcc",
"type_def": {
"root_type": "FUNCTION"
}
}
},
"post_conditions": {
"Post": "Result = existence_conforms_to (other) and ((is_single and other.is_single) or else (is_multiple and cardinality_conforms_to (other)))"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_prohibited": {
"name": "is_prohibited",
"documentation": "True if this `C_ATTRIBUTE` has an existence constraint of `0..0`, i.e. prohibition.",
"post_conditions": {
"Post": "Result = existence /= Void and then existence.is_prohibited"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
Conformance Semantics: C_ATTRIBUTE
The following functions formally define the conformance interfaces of any ARCHETYPE_CONSTRAINT node in a specialised archetype to the corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path.
c_conforms_to (other: ARCHETYPE_CONSTRAINT; rmcc: FUNCTION<<a_type, other_type: String>, Boolean>): Boolean
-- True if this node on its own (ignoring any subparts) expresses the same or narrower
-- constraints as `other`.
-- Returns False if any of the following is incompatible:
-- * cardinality
-- * existence
require
other /= Void
rmcc /= Void
deferred
end
c_congruent_to (other: ARCHETYPE_CONSTRAINT): Boolean
-- True if this node on its own (ignoring any subparts) expresses no additional
-- constraints than `other`.
require
other /= Void
deferred
end
The following effected functions defined in C_ATTRIBUTE define the conformance of an attribute node in a specialised archetype to the corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path.
c_conforms_to (other: C_ATTRIBUTE; rmcc: FUNCTION<<a_type, other_type: String>, Boolean>): Boolean
-- True if this node on its own (ignoring any subparts) expresses the same or narrower
-- constraints as `other'.
-- Returns False if any of the following is incompatible:
-- * cardinality
-- * existence
do
Result := existence_conforms_to (other) and
((is_single and other.is_single) or else
(is_multiple and cardinality_conforms_to (other)))
end
c_congruent_to (other: C_ATTRIBUTE): Boolean
-- True if this node on its own (ignoring any subparts) expresses no additional
-- constraints than `other'.
do
Result := existence = Void and ((is_single and other.is_single) or
(is_multiple and other.is_multiple and cardinality = Void))
end
existence_conforms_to (other: C_ATTRIBUTE): Boolean
-- True if the existence of this node conforms to other.existence
require
other /= Void
do
if existence /= Void and other.existence /= Void then
Result := other.existence.contains (existence)
else
Result := True
end
end
cardinality_conforms_to (other: C_ATTRIBUTE): Boolean
-- True if the cardinality of this node conforms to other.cardinality, if it exists
require
other /= Void
do
if cardinality /= Void and other.cardinality /= Void then
Result := other.cardinality.contains (cardinality)
else
Result := True
end
end
collective_occurrences_of (parent_object: C_OBJECT;
rm_prop_mult: FUNCTION <<rm_type_name, rm_property_path: String>, Multiplicity_interval>): Multiplicity_interval
-- compute collective occurrences according to VSONCO, of all object nodes under this
-- attribute node that redefine `parent_object`, which is assumed to be an object node
-- within `other`, the specialisation parent of this C_ATTRIBUTE
require
parent_object /= Void
other.is_multiple
do
-- make a 0..0 interval
create Result.make_prohibited
children.do_all (
agent (child_co, parent_co: C_OBJECT;
rm_prop_mult: FUNCTION <<rm_type_name, rm_property_path: String>, Multiplicity_interval>;
interval: Multiplicity_interval)
local
child_occ: Multiplicity_interval
do
if child_co.node_id_conforms_to (parent_co) then
-- child object node may have no occurrences
child_occ := child_obj.effective_occurrences (rm_prop_mult)
interval.set_lower (interval.lower + child_occ.lower)
if child_occ.upper_unbounded then
interval.set_upper_unbounded
elseif not interval.upper_unbounded then
interval.set_upper (interval.upper + child_occ.upper)
end
end
end (?, a_parent_co, rm_prop_mult, Result)
)
if cardinality /= Void and then not cardinality.upper_unbounded then
Result.set_upper (if Result.upper_unbounded then cardinality.upper else Result.upper.min (cardinality.upper) end)
end
end
Validity Rules: C_ATTRIBUTE
The validity rules are as follows:
VCARM: attribute name reference model validity: an attribute name introducing an attribute constraint block must be defined in the underlying information model as an attribute (stored or computed) of the type which introduces the enclosing object block.
VCAEX: archetype attribute reference model existence conformance: the existence of an attribute, if set, must conform, i.e. be the same or narrower, to the existence of the corresponding attribute in the underlying information model.
VCAM: archetype attribute reference model multiplicity conformance: the multiplicity, i.e. whether an attribute is multiply- or single-valued, of an attribute must conform to that of the corresponding attribute in the underlying information model.
VDIFV: archetype attribute differential path validity: an archetype may only have a differential path if it is specialised..
The following validity rule applies to redefinition in a specialised archetype:
VDIFP: specialised archetype attribute differential path validity: if an attribute constraint has a differential path, the path must exist in the flat parent, and also be valid with respect to the reference model, i.e. in the sense that it corresponds to a legal potential construction of objects.
VSANCE: specialised archetype attribute node existence conformance: the existence of a redefined attribute node in a specialised archetype, if stated, must conform to the existence of the corresponding node in the flat parent archetype, by having an identical range, or a range wholly contained by the latter.
VSAM: specialised archetype attribute multiplicity conformance: the multiplicity, i.e. whether an attribute is multiply- or single-valued, of a redefined attribute must conform to that of the corresponding attribute in the parent archetype.
The following validity rules apply to single-valued attributes, i.e when C_ATTRIBUTE.is_multiple is False:
VACSO: single-valued attribute child object occurrences validity: the occurrences of a child object of a single-valued attribute cannot have an upper limit greater than 1.
The following validity rules apply to container attributes, i.e when C_ATTRIBUTE.is_multiple is True:
VACMCU: cardinality/occurrences upper bound validity: where a cardinality with a finite upper bound is stated on an attribute, for all immediate child objects for which an occurrences constraint is stated, the occurrences must either have an open upper bound (i.e. n..*) which is interpreted as the maximum value allowed within the cardinality, or else a finite upper bound which is <= the cardinality upper bound.
VACMCO: cardinality/occurrences orphans: it must be possible for at least one instance of one optional child object (i.e. an object for which the occurrences lower bound is 0) and one instance of every mandatory child object (i.e. object constraints for which the occurrences lower bound is >= 1) to be included within the cardinality range.
VCACA: archetype attribute reference model cardinality conformance: the cardinality of an attribute must conform, i.e. be the same or narrower, to the cardinality of the corresponding attribute in the underlying information model.
The following validity warnings apply to container attributes, i.e when C_ATTRIBUTE.is_multiple is True:
WACMCL: cardinality/occurrences lower bound validity: where a cardinality with a finite upper bound is stated on an attribute, for all immediate child objects for which an occurrences constraint is stated, the sum of occurrences lower bounds should be lower than the cardinality upper limit.
The following validity rule applies to cardinality redefinition in a specialised archetype:
VSANCC: specialised archetype attribute node cardinality conformance: the cardinality of a redefined (multiply-valued) attribute node in a specialised archetype, if stated, must conform to the cardinality of the corresponding node in the flat parent archetype by either being identical, or being wholly contained by the latter.
C_OBJECT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_OBJECT (abstract) |
|||
|---|---|---|---|---|
Description |
Abstract model of constraint on any kind of object node. |
|||
Inherit |
||||
Attributes |
Signature |
Meaning |
||
1..1 |
rm_type_name: |
Reference model type that this node corresponds to. |
||
0..1 |
occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
1..1 |
node_id: |
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
||
0..1 |
is_deprecated: |
True if this node and by implication all sub-nodes are deprecated for use. |
||
0..1 |
sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
Functions |
Signature |
Meaning |
||
1..1 |
specialisation_depth (): |
Level of specialisation of this archetype node, based on its |
||
1..1 |
effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
1..1 |
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
1..1 |
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
1..1 |
True if this node Parameters
|
|||
1..1 |
node_id_conforms_to ( |
True if this node id conforms to |
||
1..1 |
is_prohibited (): |
True if this |
||
| C_OBJECT (abstract) | |||
|---|---|---|---|
Abstract model of constraint on any kind of object node. |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
rm_type_name: |
Reference model type that this node corresponds to. |
||
occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
node_id: |
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
||
is_deprecated: |
True if this node and by implication all sub-nodes are deprecated for use. |
||
sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
specialisation_depth (): |
Level of specialisation of this archetype node, based on its |
||
effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
occurrences_conforms_to ( |
True if this node Parameters
|
||
node_id_conforms_to ( |
True if this node id conforms to |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
{
"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_SINGLE_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.\nOnly set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute.",
"type": "Multiplicity_interval"
},
"node_id": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "node_id",
"documentation": "Semantic identifier of this node, used to dis-tinguish 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 id-codes.\n\nFor `C_PRIMITIVE_OBJECTs` represented in ADL inline form, this attribute will have the special value `Primitive_node_id`; otherwise it will have the node id read during parsing.",
"is_mandatory": true,
"type": "String"
},
"is_deprecated": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_deprecated",
"documentation": "True if this node and by implication all sub-nodes are deprecated for use.",
"type": "Boolean"
},
"sibling_order": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "sibling_order",
"documentation": "Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a `C_OBJECT` within a `C_ATTRIBUTE` with `_is_multiple_ = True`.",
"type": "SIBLING_ORDER"
}
},
"functions": {
"specialisation_depth": {
"name": "specialisation_depth",
"documentation": "Level of specialisation of this archetype node, based on its `_node_id_`. The value 0 corresponds to non-specialised, 1 to first-level specialisation and so on. The level is the same as the number of ‘.’ characters in the node_id code. If `_node_id_` is not set, the return value is -1, signifying that the specialisation level should be determined from the nearest parent `C_OBJECT` node having a node_id.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Integer"
}
},
"effective_occurrences": {
"name": "effective_occurrences",
"documentation": "Compute effective occurrences, where no local occurrences constraint set. If the owning `C_ATTRIBUTE._cardinality_` is set, use its upper value, else use RM multiplicity of the owning attribute.\n\nIf local `occurrences` not set, always assume 0 as the lower bound.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Multiplicity_interval"
}
},
"c_conforms_to": {
"name": "c_conforms_to",
"documentation": "True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. \nTypically used during validation of specialised archetype nodes.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_OBJECT"
},
"rmcc": {
"_type": "P_BMM_GENERIC_FUNCTION_PARAMETER",
"name": "rmcc",
"documentation": "Reference Model conformance checker agent (lambda).",
"type_def": {
"root_type": "FUNCTION"
}
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_congruent_to": {
"name": "c_congruent_to",
"documentation": "True if constraints represented by this node contain no further redefinitions with respect to the node `_other_`, with the exception of `_node_id_` redefinition in `C_OBJECT` nodes. \n\nTypically used to test if an inherited node locally contains any constraints.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "ARCHETYPE_CONSTRAINT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"occurrences_conforms_to": {
"name": "occurrences_conforms_to",
"documentation": "True if this node `_occurrences_` conforms to `_other.occurrences_`; `other` is assumed to be in a flat archetype.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"documentation": "`C_OBJECT` from a flat parent archetype.",
"type": "C_OBJECT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"node_id_conforms_to": {
"name": "node_id_conforms_to",
"documentation": "True if this node id conforms to `_other.node_id_`, which includes the ids being identical; `_other_` is assumed to be in a flat archetype.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_OBJECT"
}
},
"post_conditions": {
"Post": "Result = codes_conformant (node_id, other.node_id)"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_prohibited": {
"name": "is_prohibited",
"documentation": "True if this `C_OBJECT` node is prohibited, i.e. if its `_occurrences_` is `0..0`.",
"post_conditions": {
"Post": "Result = occurrences /= Void and then occurrences.is_prohibited"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
SIBLING_ORDER Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
SIBLING_ORDER |
|
|---|---|---|
Description |
Defines the order indicator that can be used on a Misuse: This type cannot be used on a |
|
Attributes |
Signature |
Meaning |
1..1 |
is_before: |
True if the order relationship is ‘before’, if False, it is ‘after’. |
1..1 |
sibling_node_id: |
Node identifier of sibling before or after which this node should come. |
Functions |
Signature |
Meaning |
1..1 |
is_after (): |
True if the order relationship is |
| SIBLING_ORDER | |
|---|---|
Defines the order indicator that can be used on a Misuse: This type cannot be used on a |
|
Attributes |
|
is_before: |
True if the order relationship is ‘before’, if False, it is ‘after’. |
sibling_node_id: |
Node identifier of sibling before or after which this node should come. |
Functions |
|
is_after (): |
True if the order relationship is |
{
"name": "SIBLING_ORDER",
"documentation": "Defines the order indicator that can be used on a `C_OBJECT` within a container attribute in a specialised archetype to indicate its order with respect to a sibling defined in a higher specialisation level.\n\nMisuse: This type cannot be used on a `C_OBJECT` other than one within a container attribute in a specialised archetype.",
"properties": {
"is_before": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_before",
"documentation": "True if the order relationship is ‘before’, if False, it is ‘after’.",
"is_mandatory": true,
"type": "Boolean"
},
"sibling_node_id": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "sibling_node_id",
"documentation": "Node identifier of sibling before or after which this node should come.",
"is_mandatory": true,
"type": "String"
}
},
"functions": {
"is_after": {
"name": "is_after",
"documentation": "True if the order relationship is `_after_`, computed as the negation of `_is_before_`.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
Occurrences inferencing rules
The notion of 'occurrences' does not exist in an object model that might be used as the reference model on which archetypes are based, because it is a class model. However, archetypes commonly constrain the occurrences of object nodes under a container attribute, indicating how many objects conforming to a specific object constraint node might exist.
There are various circumstances where it is useful to know the effective occurrences of an archetype object node. One is in validation, in order to determine validity of occurrences constraints; another is in archetype editor tools. Similarly, in an Operational Template, an occurrences constraint is required on all child object nodes of container attributes. Most such constraints come from the source template(s) and archetypes, but often there will be nodes with no occurrences set. In these cases, the occurrences constraint is inferred from the archetype and the reference model according to the following algorithm, where c_object represents any object node in an archetype.
effective_occurrences (rm_prop_mult: FUNCTION <<rm_type_name, rm_property_path: String>, Multiplicity_interval>): Multiplicity_interval
-- Compute effective occurrences, where no local occurrences constraint set. If the owning
-- `C_ATTRIBUTE._cardinality_` is set, use its upper value, else use RM multiplicity of the
-- owning attribute.
-- `rm_attr_prop_mult` is a function that knows how to compute effective object multiplicity
-- by looking at the owning RM property.
-- If local `occurrences` not set, always assume 0 as the lower bound.
do
if occurrences /= Void then
Result := occurrences
elseif parent /= Void then
if parent.cardinality /= Void then
if parent.cardinality.interval.upper_unbounded then
create Result.make_open
else
create Result.make_bounded (0, parent.cardinality.interval.upper)
end
elseif parent.parent /= Void then
Result := rm_prop_mult (parent.parent.rm_type_name, parent.parent.rm_attribute_path)
Result.set_lower (0)
else
create Result.make_open
end
else
create Result.make_open
end
end
In the above, rm_prop_mult is a reference to a function within an RM schema representation, which has the following logic:
object_multiplicity (rm_type_name, rm_property_path: String): Multiplicity_interval
-- compute the effective object multiplicity of objects at rm_property_path within type rm_type_name
-- from the Reference Model
require
rm_type_name /= Void
rm_property_path /= Void
do
rm_property_def := get_rm_property_def (rm_type_name, rm_property_path)
if rm_property_def.is_container then
if rm_property_def.cardinality.upper_unbounded then
create Result.make_upper_unbounded (0)
else
create Result.make_bounded (0, rm_property_def.cardinality.upper)
end
else
Result := rm_property_def.existence
end
end
How this is concretely implemented depends on the modelling environment. One possible RM model implementation is described in the openEHR Basic meta-model (BMM) specification.
Conformance Semantics: C_OBJECT
The following functions, which implement the precursors from ARCHETYPE_CONSTRAINT formally define the conformance of a C_OBJECT node in a specialised archetype to the corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path. Note that the pre-conditions from the precursors are understood as inherited.
c_conforms_to (other: C_OBJECT; rmcc: FUNCTION<<a_type, other_type: String>, Boolean>): Boolean
-- True if this node on its own (ignoring any subparts) expresses strictly narrower constraints
-- as `other'.
-- `other' is typically from the flat parent archetype.
-- `rmcc' is an agent (lambda) that can test an RM type's conformance to another RM type
-- Returns True when the following is True:
-- * rm_type_name is the same or a subtype of rm_type_name of other;
-- * node_id is the same, or redefined to a legal code at the level of the owning archetype
-- * is_root or else
-- parent.is_multiple or else -- we do the real check from the parent C_ATTRIBUTE
-- parent.is_single and
-- occurrences is same (= Void) or a sub-interval
--
do
Result := node_id_conforms_to (other) and
(rm_type_name.is_case_insensitive_equal (other.rm_type_name) or else
rmcc (rm_type_name, other.rm_type_name)) and
(is_root or else parent.is_multiple or else parent.is_single and occurrences_conforms_to (other))
end
c_congruent_to (other: C_OBJECT): Boolean
-- True if this node on its own (ignoring any subparts) expresses no constraints in addition
-- to `other', other than possible redefinition of the node id, which doesn't matter, since
-- this won't get lost in a compressed path.
-- Current and `other' are typically from flat archetypes being compared to generate a diff.
-- Used to determine if path segments can be compressed.
-- Returns True if:
-- * rm_type_name is identical
-- * occurrences is Void or else identical to other.occurrences
-- * sibling_order is Void or else identical to other.sibling_order
-- * node_id is identical or else is the only child that overlays the parent node
do
Result := rm_type_name.is_case_insensitive_equal (other.rm_type_name) and
(occurrences = Void or else (other.occurrences /= Void and then
occurrences.is_equal (other.occurrences))) and
(sibling_order = Void or else (other.sibling_order /= Void and then
sibling_order.is_equal (other.sibling_order))) and
node_reuse_congruent (other)
end
occurrences_conforms_to (other: C_OBJECT): Boolean
-- True if this node's occurrences conforms to other.occurrences;
-- `other' is assumed to be in a flat archetype.
-- only redefinitions of single-occurrence nodes can be dealt with here;
-- redefinitions of multiply-occurrences nodes
-- must be evaluated at the owning attribute, according to VSONCO.
do
if occurrences /= Void and other.occurrences.upper = 1 then
Result := other.occurrences.contains (occurrences)
else
Result := True
end
end
node_id_conforms_to (other: C_OBJECT): Boolean
require
other /= Void
do
Result := codes_conformant (node_id, other.node_id)
end
node_reuse_congruent (other: C_OBJECT): Boolean
-- True if this node is the sole re-using node of the corresponding node in the flat
require
other /= Void
do
Result := node_id_conforms_to (other) and
(is_root or else
attached parent and then parent.child_reuse_count (other.node_id) = 1)
end
Validity Rules: C_OBJECT
The validity rules for all C_OBJECTs are as follows:
VCORM object constraint type name existence: a type name introducing an object constraint block must be defined in the underlying information model.
VCORMT object constraint type validity: a type name introducing an object constraint block must be the same as or conform to the type stated in the underlying information model of its owning attribute.
VCOCD object constraint definition validity: an object constraint block consists of one of the following (depending on subtype): an 'any' constraint; a reference; an inline definition of sub-constraints, or nothing, in the case where occurrences is set to {0}.
VCOID object node identifier validity: every object node must have a node identifier.
VCOSU object node identifier validity: every object node must be unique within the archetype.
The following validity rules govern C_OBJECTs in specialised archetypes.
VSONT specialised archetype object node meta-type conformance: the meta-type of a redefined object node (i.e. the AOM node type such as C_COMPLEX_OBJECT etc) in a specialised archetype must be the same as that of the corresponding node in the flat parent, with the following exceptions: a C_COMPLEX_OBJECT with no child attributes may be redefined by a node of any AOM type except C_PRIMITIVE_OBJECT; a C_COMPLEX_OBJECT_PROXY, may be redefined by a C_COMPLEX_OBJECT; an ARCHETYPE_SLOT may be redefined by C_ARCHETYPE_ROOT (i.e. 'slot-filling'). See also validity rules VDSSID and VARXID.
VSONCT specialised archetype object node reference type conformance: the reference model type of a redefined object node in a specialised archetype must conform to the reference model type in the corresponding node in the flat parent archetype by either being identical, or conforming via an inheritance relationship in the relevant reference model.
Deprecated: VSONIR specialised archetype redefined object node identifier condition: the node identifier of an object node in a specialised archetype that is a redefinition of a node in the flat parent must be redefined if any of reference model type, node identifier definition in the terminology, or occurrences of the immediate object constraint is redefined, with the exception of occurrences being redefined to {0}, i.e. exclusion.
Deprecated: VSONI specialised archetype redefined object node identifier validity: if an object node in a specialised archetype is a redefinition of a node in the flat parent according to VSONIR, and the parent node carries a node identifier, it must carry a node identifier specialised at the level of the child archetype. Otherwise it must carry the same node identifier (or none) as the corresponding parent node.
VSONIN specialised archetype new object node identifier validity: if an object node in a specialised archetype is a new node with respect to the flat parent, and it carries a node identifier, the identifier must be a 'new' node identifier, specialised at the level of the child archetype.
VSONIF specialised archetype object node identifier validity in flat siblings: the identification (or not) of an object node in a specialised archetype must be valid with respect to any sibling object nodes in the flattened parent (see VACMI).
VSONCO specialised archetype object node occurrences redefinition validity:
For object node(s) redefining a single-occurrences node in the specialisation flat parent (i.e. a node having occurrences upper bound = 1), the child node(s) occurrences interval(s) must be wholly contained within that of the parent, i.e. narrower. If there are multiple such nodes, each is an alternative, and only one can be applied at runtime.
For nodes specialising a multiple-occurrences parent node (which will always be within a container attribute), any or all such nodes might apply to data at runtime. Consequently, it is the collective occurrences of all such nodes, that must be compared to the occurrences of the parent - no assumption is made that the occurrences of any specific redefining node on its own need conform to that of the redefined node.
Formally, the collective occurrences interval of all nodes in a specialised node set must intersect with the flattened occurrences interval of the corresponding parent node, for each object in the set to be valid. If there is no intersection, the occurrences of all members of the set is considered invalid.
A specialised node set is the set of nodes in a flat child archetype that specializes a multiple-occurrences parent node, which may include the parent node itself if it appears in the flattened archetype.
The collective occurrences of a specialised node set is computed as the interval consisting of:
-
lower bound = the sum of the lower bounds of the occurrences of the members of the specialised node set;
-
upper bound = minimum of:
-
sum of upper bounds of the occurrences of the members of the specialised node set; where any of the upper bounds is unbounded, the sum is unbounded;
-
upper bound of the flattened cardinality of the containing attribute.
-
For any member of the specialised node set that does not have a local occurrences override, the occurrences is that of the redefined parent node.
A consequence of the intersection rule and the priority of the cardinality of the owning attribute is that the occurrences of any node in a specialisation set may have an unbounded upper limit (i.e. *) even if the upper bound of the cardinality of the owning attribute is finite.
VSONPT specialised archetype prohibited object node AOM type validity: the occurrences of a redefined object node in a specialised archetype, may only be prohibited (i.e. {0}) if the matching node in the parent is of the same AOM type.
VSONPI specialised archetype prohibited object node AOM node id validity: a redefined object node in a specialised archetype with occurrences matching {0} must have exactly the same node_id as the node in the flat parent being redefined.
VSONPO specialised archetype object node prohibited occurrences validity: the occurrences of a new (i.e. having no corresponding node in the parent flat) object node in a specialised archetype, if stated, may not be 'prohibited', i.e. {0}, since prohibition only makes sense for an existing node.
VSSM specialised archetype sibling order validity: the sibling order node id-code used in a sibling marker in a specialised archetype must refer to a node found within the same container in the flat parent archetype, or a specialised version of any such node, redefined in the current archetype.
C_DEFINED_OBJECT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_DEFINED_OBJECT (abstract) |
|
|---|---|---|
Description |
Abstract parent type of |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
Functions |
Signature |
Meaning |
1..1 |
any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
1..1 |
True if |
|
1..1 |
prototype_value (): |
Generate a prototype value from this constraint object. |
1..1 |
has_default_value (): |
True if there is an assumed value. |
Invariants |
Inv_valid_default_value: |
|
| C_DEFINED_OBJECT (abstract) | |||
|---|---|---|---|
Abstract parent type of |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
(abstract) any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
True if |
|||
(abstract) prototype_value (): |
Generate a prototype value from this constraint object. |
||
has_default_value (): |
True if there is an assumed value. |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
Inv_valid_default_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": {
"default_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "default_value",
"documentation": "Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes.",
"type": "Any"
}
},
"functions": {
"any_allowed": {
"name": "any_allowed",
"documentation": "True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants.",
"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"
}
},
"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_default_value": {
"name": "has_default_value",
"documentation": "True if there is an assumed value.\n",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
},
"invariants": {
"Inv_valid_default_value": "valid_value (default_value)"
}
}
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 |
||||
Attributes |
Signature |
Meaning |
||
0..1 |
attributes: |
List of constraints on attributes of the reference model type represented by this object. |
||
0..1 |
attribute_tuples: |
List of attribute tuple constraints under this object constraint, if any. |
||
Functions |
Signature |
Meaning |
||
1..1 |
any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
1..1 |
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
1..1 |
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
| C_COMPLEX_OBJECT | |||
|---|---|---|---|
Constraint on complex objects, i.e. any object that consists of other object constraints. |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
C_DEFINED_OBJECT.default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
attributes: |
List of constraints on attributes of the reference model type represented by this object. |
||
attribute_tuples: |
List of attribute tuple constraints under this object constraint, if any. |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
(abstract) C_DEFINED_OBJECT.prototype_value (): |
Generate a prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
{
"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
}
},
"attribute_tuples": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "attribute_tuples",
"documentation": "List of attribute tuple constraints under this object constraint, if any.",
"type_def": {
"container_type": "List",
"type": "C_ATTRIBUTE_TUPLE"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"any_allowed": {
"name": "any_allowed",
"documentation": "True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants.",
"post_conditions": {
"Post": "Result = attributes.is_empty and not is_prohibited"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_conforms_to": {
"name": "c_conforms_to",
"documentation": "True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. \nTypically used during validation of specialised archetype nodes.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_COMPLEX_OBJECT"
},
"rmcc": {
"_type": "P_BMM_GENERIC_FUNCTION_PARAMETER",
"name": "rmcc",
"documentation": "Reference Model conformance checker agent (lambda).",
"type_def": {
"root_type": "FUNCTION"
}
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_congruent_to": {
"name": "c_congruent_to",
"documentation": "True if constraints represented by this node contain no further redefinitions with respect to the node `_other_`, with the exception of `_node_id_` redefinition in `C_OBJECT` nodes. \n\nTypically used to test if an inherited node locally contains any constraints.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_COMPLEX_OBJECT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
Validity Rules: C_COMPLEX_OBJECT
The validity rules for C_COMPLEX_OBJECTs are as follows:
VCATU attribute uniqueness: sibling attributes occurring within an object node must be uniquely named with respect to each other, in the same way as for class definitions in an object reference model.
C_ARCHETYPE_ROOT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_ARCHETYPE_ROOT |
|
|---|---|---|
Description |
A specialisation of Used in two situations. The first is to represent an 'external reference' to an archetype from within another archetype or template. This supports re-use. The second use is within a template, where it is used as a slot-filler. For a new external reference, the For a slot-filler or a redefined external reference, the In all uses within source archetypes and templates, the In an operational template, the |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
archetype_ref: |
Reference to archetype is being used to fill a slot or redefine an external reference. Typically an 'interface' archetype id, i.e. identifier with partial version information. |
| C_ARCHETYPE_ROOT | |||
|---|---|---|---|
A specialisation of Used in two situations. The first is to represent an 'external reference' to an archetype from within another archetype or template. This supports re-use. The second use is within a template, where it is used as a slot-filler. For a new external reference, the For a slot-filler or a redefined external reference, the In all uses within source archetypes and templates, the In an operational template, the |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_COMPLEX_OBJECT |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
C_DEFINED_OBJECT.default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
C_COMPLEX_OBJECT.attributes: |
List of constraints on attributes of the reference model type represented by this object. |
||
C_COMPLEX_OBJECT.attribute_tuples: |
List of attribute tuple constraints under this object constraint, if any. |
||
archetype_ref: |
Reference to archetype is being used to fill a slot or redefine an external reference. Typically an 'interface' archetype id, i.e. identifier with partial version information. |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_COMPLEX_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_COMPLEX_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
C_COMPLEX_OBJECT.any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
(abstract) C_DEFINED_OBJECT.prototype_value (): |
Generate a prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
{
"name": "C_ARCHETYPE_ROOT",
"documentation": "A specialisation of `C_COMPLEX_OBJECT` whose node_id attribute is an archetype identifier rather than the normal internal node code (i.e. id-code).\n\nUsed in two situations. The first is to represent an 'external reference' to an archetype from within another archetype or template. This supports re-use. The second use is within a template, where it is used as a slot-filler. \n\nFor a new external reference, the `_node_id_` is set in the normal way, i.e. with a new code at the specialisation level of the archetype.\n\nFor a slot-filler or a redefined external reference, the `_node_id_` is set to a specialised version of the `_node_id_` of the node being specialised, allowing matching to occur during flattening.\n\nIn all uses within source archetypes and templates, the `_children_` attribute is `Void`.\n\nIn an operational template, the `_node_id_` is converted to the `_archetype_ref_`, and the structure contains the result of flattening any template overlay structure and the underlying flat archetype.\n",
"ancestors": [
"C_COMPLEX_OBJECT"
],
"properties": {
"archetype_ref": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "archetype_ref",
"documentation": "Reference to archetype is being used to fill a slot or redefine an external reference. Typically an 'interface' archetype id, i.e. identifier with partial version information.",
"is_mandatory": true,
"type": "String"
}
}
}
Validity Rules: C_ARCHETYPE_ROOT
The following validity rules apply to C_ARCHETYPE_ROOT objects:
VARXNC external reference node identifier validity: if the external reference object is a redefinition of either a slot node, or another external reference node, the node_id of the object must conform to (i.e. be the same or a child of) the node_id of the corresponding parent node.
VARXAV external reference node archetype reference validity: if the reference object is a redefinition of another external reference node, the archetype_ref of the object must match a real archetype that has as an ancestor the archetype matched by the archetype reference mentioned in the corresponding parent node.
VARXTV external reference type validity: the reference model type of the reference object archetype identifier must be identical, or conform to the type of the slot, if there is one, in the parent archetype, or else to the reference model type of the attribute in the flat parent under which the reference object appears in the child archetype.
VARXR external reference refers to resolvable artefact: the archetype reference must refer to an artefact that can be found in the current repository.
The following validity rules apply to a C_ARCHETYPE_ROOT that specialises a ARCHETYPE_SLOT in the flat parent archetype:
VARXS external reference slot conformance: where an archetype reference redefines an archetype slot in the flat parent, it must conform to the archetype slot node by being of a reference model type from the same reference model as the current archetype.
VARXID external reference slot filling id validity: an external reference node defined as a filler for a slot in the parent archetype must have a node id that is a specialisation of that of the slot.
ARCHETYPE_SLOT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
ARCHETYPE_SLOT |
|
|---|---|---|
Description |
Constraint describing a 'slot' where another archetype can occur. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
List of constraints defining other archetypes that could be included at this point. Represented as an |
|
0..1 |
List of constraints defining other archetypes that cannot be included at this point. Represented as an |
|
1..1 |
is_closed: |
True if this slot specification in this artefact is closed to further filling either in further specialisations or at runtime. Default value False, i.e. unless explicitly set, a slot remains open. |
Functions |
Signature |
Meaning |
1..1 |
any_allowed (): |
True if no constraints stated, and slot is not closed. |
| ARCHETYPE_SLOT | |||
|---|---|---|---|
Constraint describing a 'slot' where another archetype can occur. |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
List of constraints defining other archetypes that could be included at this point. Represented as an |
|||
List of constraints defining other archetypes that cannot be included at this point. Represented as an |
|||
is_closed: |
True if this slot specification in this artefact is closed to further filling either in further specialisations or at runtime. Default value False, i.e. unless explicitly set, a slot remains open. |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
any_allowed (): |
True if no constraints stated, and slot is not closed. |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
{
"name": "ARCHETYPE_SLOT",
"documentation": "Constraint describing a 'slot' where another archetype can occur. ",
"ancestors": [
"C_OBJECT"
],
"properties": {
"includes": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "includes",
"documentation": "List of constraints defining other archetypes that could be included at this point. Represented as an `ASSERTION` containing an expression of the form `EXPR_ARCHETYPE_REF matches EXPR_ARCHETYPE_ID_CONSTRAINT`.",
"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. Represented as an `ASSERTION` containing an expression of the form `EXPR_ARCHETYPE_REF matches EXPR_ARCHETYPE_ID_CONSTRAINT`.",
"type_def": {
"container_type": "List",
"type": "ASSERTION"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"is_closed": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_closed",
"documentation": "True if this slot specification in this artefact is closed to further filling either in further specialisations or at runtime. Default value False, i.e. unless explicitly set, a slot remains open.",
"is_mandatory": true,
"type": "Boolean"
}
},
"functions": {
"any_allowed": {
"name": "any_allowed",
"documentation": "True if no constraints stated, and slot is not closed.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
Validity Rules: ARCHETYPE_SLOT
The validity rules for ARCHETYPE_SLOTs are as follows:
VDFAI archetype identifier validity in definition. Any archetype identifier mentioned in an archetype slot in the definition section must conform to the published openEHR specification for archetype identifiers.
VDSIV archetype slot 'include' constraint validity. The 'include' constraint in an archetype slot must conform to the slot constraint validity rules.
VDSEV archetype slot 'exclude' constraint validity. The 'exclude' constraint in an archetype slot must conform to the slot constraint validity rules.
The slot constraint validity rules are as follows:
if includes not empty and = any then
not (excludes empty or /= any) ==> VDSEV Error
elseif includes not empty and /= any then
not (excludes empty or = any) ==> VDSEV Error
elseif excludes not empty and = any then
not (includes empty or /= any) ==> VDSIV Error
elseif excludes not empty and /= any then
not (includes empty or = any) ==> VDSIV Error
end
The following validity rules apply to ARCHETYPE_SLOTs defined as the specialisation of a slot in the parent archetype:
VDSSID slot redefinition child node id: a slot node in a specialised archetype that redefines a slot node in the flat parent must have an identical node id.
VDSSM specialised archetype slot definition match validity. The set of archetypes matched from a library of archetypes by a specialised archetype slot definition must be a proper subset of the set matched from the same library by the parent slot definition.
VDSSP specialised archetype slot definition parent validity. The flat parent of the specialisation of an archetype slot must be not be closed (is_closed = False).
VDSSC specialised archetype slot definition closed validity. In the specialisation of an archetype slot, either the slot can be specified to be closed (is_closed = True) or the slot can be narrowed, but not both.
C_COMPLEX_OBJECT_PROXY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_COMPLEX_OBJECT_PROXY |
|||
|---|---|---|---|---|
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 a |
|||
Inherit |
||||
Attributes |
Signature |
Meaning |
||
1..1 |
target_path: |
Reference to an object node using archetype path notation. |
||
Functions |
Signature |
Meaning |
||
1..1 |
use_target_occurrences (): |
True if target occurrences are to be used as the value of occurrences in this object; by the time of runtime use, the target occurrences value has to be set into this object. |
||
1..1 |
True if this node occurrences conforms to If Parameters
|
|||
| C_COMPLEX_OBJECT_PROXY | |||
|---|---|---|---|
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 a |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
target_path: |
Reference to an object node using archetype path notation. |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
occurrences_conforms_to ( |
True if this node occurrences conforms to If Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
use_target_occurrences (): |
True if target occurrences are to be used as the value of occurrences in this object; by the time of runtime use, the target occurrences value has to be set into this object. |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
{
"name": "C_COMPLEX_OBJECT_PROXY",
"documentation": "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 a `COMPLEX_OBJECT_PROXY` 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_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"
}
},
"functions": {
"use_target_occurrences": {
"name": "use_target_occurrences",
"documentation": "True if target occurrences are to be used as the value of occurrences in this object; by the time of runtime use, the target occurrences value has to be set into this object.",
"post_conditions": {
"Post": "Result = (occurrences = Void)"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"occurrences_conforms_to": {
"name": "occurrences_conforms_to",
"documentation": "True if this node occurrences conforms to `_other.occurrences_`; `_other_` is assumed to be in a flat archetype.\n\nIf `_other_` is a `C_COMPLEX_OBJECT`, then always `True`, since if occurrences defined on proxy node, it is an override of the occurrences on the target, and it doesn't have to conform to anything except the containing attribute's cardinality. However, if `_other_` is also a `C_COMPLEX_OBJECT` then the override is of another use_node, and normal occurrences apply\n",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"documentation": "`C_OBJECT` from a flat parent archetype.",
"type": "C_OBJECT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
Validity Rules: C_COMPLEX_OBJECT_PROXY
The following validity rules applies to internal references:
VUNT use_node reference model type validity: the reference model type mentioned in an C_COMPLEX_OBJECT_PROXY node must be the same as or a super-type (according to the reference model) of the reference model type of the node referred to.
VUNP use_node path validity: the path mentioned in a use_node statement must refer to an object node defined elsewhere in the same archetype or any of its specialisation parent archetypes, that is not itself an internal reference node, and which carries a node identifier if one is needed at the reference point.
The following validity rule applies to the redefinition of an internal reference in a specialised archetype:
VSUNT use_node specialisation parent validity: a C_COMPLEX_OBJECT_PROXY node may be redefined in a specialised archetype by another C_COMPLEX_OBJECT_PROXY (e.g. in order to redefine occurrences), or by a C_COMPLEX_OBJECT structure that legally redefines the target C_COMPLEX_OBJECT node referred to by the reference.
C_PRIMITIVE_OBJECT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_PRIMITIVE_OBJECT (abstract) |
|||
|---|---|---|---|---|
Description |
Parent of types representing constraints on primitive types. Instances of this type represented in ADL inline form, the |
|||
Inherit |
||||
Attributes |
Signature |
Meaning |
||
0..1 |
assumed_value: |
Value to be assumed if none sent in data. |
||
0..1 |
is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
1..1 |
constraint: |
Constraint represented by this object; redefine in descendants. |
||
Functions |
Signature |
Meaning |
||
1..1 |
has_assumed_value (): |
True if there is an assumed value. |
||
1..1 |
constrained_typename (): |
Generate name of native type that is constrained by this |
||
1..1 |
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
1..1 |
c_value_conforms_to ( |
True if this node expresses a value constraint that conforms to that of |
||
1..1 |
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
1..1 |
c_value_congruent_to ( |
True if this node expresses the same value constraint as |
||
Invariants |
Inv_valid_assumed_value: |
|||
| C_PRIMITIVE_OBJECT (abstract) | |||
|---|---|---|---|
Parent of types representing constraints on primitive types. Instances of this type represented in ADL inline form, the |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
C_DEFINED_OBJECT.default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
assumed_value: |
Value to be assumed if none sent in data. |
||
is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
constraint: |
Constraint represented by this object; redefine in descendants. |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
(abstract) C_DEFINED_OBJECT.any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
(abstract) C_DEFINED_OBJECT.prototype_value (): |
Generate a prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
has_assumed_value (): |
True if there is an assumed value. |
||
constrained_typename (): |
Generate name of native type that is constrained by this |
||
(abstract) c_value_conforms_to ( |
True if this node expresses a value constraint that conforms to that of |
||
(abstract) c_value_congruent_to ( |
True if this node expresses the same value constraint as |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
Inv_valid_assumed_value: |
|||
{
"name": "C_PRIMITIVE_OBJECT",
"documentation": "Parent of types representing constraints on primitive types.\n\nInstances of this type represented in ADL inline form, the `_node_id_` attribute will have the special value `Primitive_node_id`; otherwise it will have the node id read during parsing.",
"is_abstract": true,
"ancestors": [
"C_DEFINED_OBJECT"
],
"properties": {
"assumed_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "assumed_value",
"documentation": "Value to be assumed if none sent in data.",
"type": "Any"
},
"is_enumerated_type_constraint": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_enumerated_type_constraint",
"documentation": "True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String.",
"type": "Boolean"
},
"constraint": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "constraint",
"documentation": "Constraint represented by this object; redefine in descendants.",
"is_mandatory": true,
"type": "Any"
}
},
"functions": {
"has_assumed_value": {
"name": "has_assumed_value",
"documentation": "True if there is an assumed value.\n",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"constrained_typename": {
"name": "constrained_typename",
"documentation": "Generate name of native type that is constrained by this `C_XXX` type. For most types, it is the `C_XXX` typename without the `C_`, i.e. `XXX`. E.g. `C_INTEGER` -> `Integer`. For the date/time types the mapping is different.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
}
},
"c_conforms_to": {
"name": "c_conforms_to",
"documentation": "True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. \nTypically used during validation of specialised archetype nodes.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_PRIMITIVE_OBJECT"
},
"rmcc": {
"_type": "P_BMM_GENERIC_FUNCTION_PARAMETER",
"name": "rmcc",
"documentation": "Reference Model conformance checker lambda.",
"type_def": {
"root_type": "FUNCTION"
}
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_conforms_to": {
"name": "c_value_conforms_to",
"documentation": "True if this node expresses a value constraint that conforms to that of `other`. Effected in descendants.",
"is_abstract": true,
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_PRIMITIVE_OBJECT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_congruent_to": {
"name": "c_congruent_to",
"documentation": "True if constraints represented by this node contain no further redefinitions with respect to the node `_other_`, with the exception of `_node_id_` redefinition in `C_OBJECT` nodes. \n\nTypically used to test if an inherited node locally contains any constraints.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_PRIMITIVE_OBJECT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_congruent_to": {
"name": "c_value_congruent_to",
"documentation": "True if this node expresses the same value constraint as `other`. Effected in descendants.",
"is_abstract": true,
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_PRIMITIVE_OBJECT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
},
"invariants": {
"Inv_valid_assumed_value": "valid_value (assumed_value)"
}
}
Validity Rules: C_PRIMITIVE_OBJECT
Validity rules applying to all C_PRIMITIVE_OBJECT types are as follows:
VOBAV object node assumed value validity: the value of an assumed value must fall within the value space defined by the constraint to which it is attached.
Conformance Semantics: C_PRIMITIVE_OBJECT
The following functions redefine those of the same names from C_OBJECT, and formally define the conformance of a node of a C_PRIMITIVE_OBJECT descendant type in a specialised archetype to a corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path and of the same AOM type.
c_conforms_to (other: C_PRIMITIVE_OBJECT; rmcc: FUNCTION<<a_type, other_type: String>, Boolean>): Boolean
-- True if this node on its own (ignoring any subparts) expresses the same or narrower
-- constraints
-- as `other'. Returns True only when the following is True:
-- * occurrences conforms
-- * `rm_type_name' is identical to that in `other'
-- `rmcc' is an agent (lambda) that can test an RM type's conformance to another RM type
do
Result := precursor (other, rmcc) and c_value_conforms_to (other)
end
c_value_conforms_to (other: like Current): Boolean
-- True if this node expresses a value constraint that conforms to that of `other'
deferred
end
c_congruent_to (other: C_PRIMITIVE_OBJECT): Boolean
-- True if this node on its own (ignoring any subparts) expresses no constraints in
-- addition to `other'
do
Result := constrained_typename.is_case_insensitive_equal (other.constrained_typename) and
c_value_congruent_to (other)
end
c_value_congruent_to (other: C_PRIMITIVE_OBJECT): Boolean
-- True if this node's value constraint is the same as that of `other'
deferred
end
constrained_typename: String
-- the same as the C_XX clas name with the "C_" removed, but for some types e.g. Date/time types
-- it is not true.
do
Result := generating_type.name
Result.remove_head (2)
end
C_BOOLEAN Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_BOOLEAN |
|
|---|---|---|
Description |
Constraint on instances of |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
Boolean constraint - a list of Boolean values. |
|
0..1 |
assumed_value: |
Assumed Boolean value. |
0..1 |
default_value: |
Default Boolean value. |
Functions |
Signature |
Meaning |
1..1 |
prototype_value (): |
Prototype Boolean value. |
1..1 |
any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
1..1 |
True if |
|
1..1 |
True if the items in |
|
| C_BOOLEAN | |||
|---|---|---|---|
Constraint on instances of |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_PRIMITIVE_OBJECT |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
default_value: |
Default Boolean value. |
||
assumed_value: |
Assumed Boolean value. |
||
C_PRIMITIVE_OBJECT.is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
Boolean constraint - a list of Boolean values. |
|||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_PRIMITIVE_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_PRIMITIVE_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
prototype_value (): |
Prototype Boolean value. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.has_assumed_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.constrained_typename (): |
Generate name of native type that is constrained by this |
||
True if |
|||
c_value_congruent_to ( |
True if the items in |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
C_PRIMITIVE_OBJECT.Inv_valid_assumed_value: |
|||
{
"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_OBJECT"
],
"properties": {
"constraint": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "constraint",
"documentation": "Boolean constraint - a list of Boolean values.",
"type_def": {
"container_type": "List",
"type": "Boolean"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"assumed_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "assumed_value",
"documentation": "Assumed Boolean value.",
"type": "Boolean"
},
"default_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "default_value",
"documentation": "Default Boolean value.",
"type": "Boolean"
}
},
"functions": {
"prototype_value": {
"name": "prototype_value",
"documentation": "Prototype Boolean value.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"any_allowed": {
"name": "any_allowed",
"documentation": "True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants.",
"post_conditions": {
"Post": "Result = constraint.is_empty"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_conforms_to": {
"name": "c_value_conforms_to",
"documentation": "True if `_other.any_allowed_` or else every constraint in the `_constraint_` list exists in the `_other.constraint_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_BOOLEAN"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_congruent_to": {
"name": "c_value_congruent_to",
"documentation": "True if the items in `_constraint_` are equal in number and identical pair-wise with those in `_other.constraint_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_BOOLEAN"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
Conformance semantics: C_BOOLEAN
The following functions formally define the conformance of a C_BOOLEAN node in a specialised archetype to a corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path and of the same AOM type.
c_value_conforms_to (other: C_BOOLEAN): Boolean
-- True if this node is a strict subset of `other'
do
Result := other.any_allowed or
constraint.count < other.constraint.count and
for all c in constraint | other.constraint.has (c)
end
c_value_congruent_to (other: C_BOOLEAN): Boolean
-- True if this node's value constraint is the same as that of `other'
do
Result := constraint.count = other.constraint.count and
for all c in constraint | other.constraint.has (c)
end
C_STRING Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_STRING |
|
|---|---|---|
Description |
Constraint on instances of |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
String constraint - a list of literal strings and / or regular expression strings delimited by the ‘/’ character. To represent no constraint, use an empty list, or alternatively, a regex 'any' pattern, i.e. |
|
0..1 |
default_value: |
Default String value. |
0..1 |
assumed_value: |
Assumed String value. |
Functions |
Signature |
Meaning |
1..1 |
prototype_value (): |
|
1..1 |
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|
1..1 |
any_allowed (): |
True if |
1..1 |
True if |
|
1..1 |
True if the items in |
|
| C_STRING | |||
|---|---|---|---|
Constraint on instances of |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_PRIMITIVE_OBJECT |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
default_value: |
Default String value. |
||
assumed_value: |
Assumed String value. |
||
C_PRIMITIVE_OBJECT.is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
String constraint - a list of literal strings and / or regular expression strings delimited by the ‘/’ character. To represent no constraint, use an empty list, or alternatively, a regex 'any' pattern, i.e. |
|||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_PRIMITIVE_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_PRIMITIVE_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
any_allowed (): |
True if |
||
True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
|||
prototype_value (): |
|||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.has_assumed_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.constrained_typename (): |
Generate name of native type that is constrained by this |
||
True if |
|||
True if the items in |
|||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
C_PRIMITIVE_OBJECT.Inv_valid_assumed_value: |
|||
{
"name": "C_STRING",
"documentation": "Constraint on instances of `String`. ",
"ancestors": [
"C_PRIMITIVE_OBJECT"
],
"properties": {
"constraint": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "constraint",
"documentation": "String constraint - a list of literal strings and / or regular expression strings delimited by the ‘/’ character.\n\nTo represent no constraint, use an empty list, or alternatively, a regex 'any' pattern, i.e. `/.*/`.",
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"default_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "default_value",
"documentation": "Default String value.",
"type": "String"
},
"assumed_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "assumed_value",
"documentation": "Assumed String value.",
"type": "String"
}
},
"functions": {
"prototype_value": {
"name": "prototype_value",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
}
},
"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"
}
},
"any_allowed": {
"name": "any_allowed",
"documentation": "True if `_constraint_` is empty or else contains one String for the regex 'any' pattern.",
"post_conditions": {
"Post": "Result = constraint.is_empty or else constraint.count = 1 and constraint.first.is_equal (Regex_any_string)"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_conforms_to": {
"name": "c_value_conforms_to",
"documentation": "True if `_other.any_allowed_` or else every constraint in the `_constraint_` list exists in the `_other.constraint_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_STRING"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_congruent_to": {
"name": "c_value_congruent_to",
"documentation": "True if the items in `_constraint_` are equal in number and identical pair-wise with those in `_other.constraint_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_STRING"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
Conformance semantics: C_STRING
The following functions formally define the conformance of a C_STRING node in a specialised archetype to a corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path and of the same AOM type.
c_value_conforms_to (other: C_STRING): Boolean
-- True if `constraint' is a strict subset of other.constraint
do
Result := other.any_allowed or
constraint.count < other.constraint.count and
for all c in constraint | other.constraint.has (c)
end
c_value_congruent_to (other: C_STRING): Boolean
-- True if this node's value constraint is the same as that of `other'
do
Result := constraint.count = other.constraint.count and then
across constraint as str_csr all
other.constraint.i_th (str_csr.cursor_index).is_equal (str_csr.item)
end
end
C_ORDERED Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_ORDERED<T> (abstract) |
|
|---|---|---|
Description |
Abstract parent of primitive constrainer classes based on In its simplest form, the constraint accessor returns just a single point The next simplest form is a single proper |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
Constraint in the form of a List of Intervals of the parameter type T. Concrete types generated in descendants via template binding. |
|
0..1 |
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
0..1 |
assumed_value: |
Value to be assumed if none sent in data. |
Functions |
Signature |
Meaning |
1..1 |
any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
1..1 |
True if |
|
1..1 |
True if the items in |
|
| C_ORDERED<T> (abstract) | |||
|---|---|---|---|
Abstract parent of primitive constrainer classes based on In its simplest form, the constraint accessor returns just a single point The next simplest form is a single proper |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_PRIMITIVE_OBJECT |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
assumed_value: |
Value to be assumed if none sent in data. |
||
C_PRIMITIVE_OBJECT.is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
Constraint in the form of a List of Intervals of the parameter type T. Concrete types generated in descendants via template binding. |
|||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_PRIMITIVE_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_PRIMITIVE_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
(abstract) C_DEFINED_OBJECT.prototype_value (): |
Generate a prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.has_assumed_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.constrained_typename (): |
Generate name of native type that is constrained by this |
||
True if |
|||
c_value_congruent_to ( |
True if the items in |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
C_PRIMITIVE_OBJECT.Inv_valid_assumed_value: |
|||
{
"name": "C_ORDERED",
"documentation": "Abstract parent of primitive constrainer classes based on `Ordered` base types, i.e. types like `Integer`, `Real`, and the Date/Time types. The model constraint is a List of Intervals, which may include point Intervals, and acts as a efficient and formally tractable representation of any number of point values and/or contiguous intervals of an ordered value domain.\n\nIn its simplest form, the constraint accessor returns just a single point `Interval<T>` object, representing a single value.\n\nThe next simplest form is a single proper `Interval <T>` (i.e. normal two-sided or half-open interval). The most complex form is a list of any combination of point and proper intervals.",
"is_abstract": true,
"ancestors": [
"C_PRIMITIVE_OBJECT"
],
"generic_parameter_defs": {
"T": {
"name": "T",
"conforms_to_type": "Ordered"
}
},
"properties": {
"constraint": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "constraint",
"documentation": "Constraint in the form of a List of Intervals of the parameter type T. Concrete types generated in descendants via template binding.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "Interval",
"generic_parameters": [
"T"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"default_value": {
"_type": "P_BMM_SINGLE_PROPERTY_OPEN",
"name": "default_value",
"documentation": "Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes.",
"type": "T"
},
"assumed_value": {
"_type": "P_BMM_SINGLE_PROPERTY_OPEN",
"name": "assumed_value",
"documentation": "Value to be assumed if none sent in data.",
"type": "T"
}
},
"functions": {
"any_allowed": {
"name": "any_allowed",
"documentation": "True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants.",
"post_conditions": {
"Post": "Result = constraint.is_empty"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_conforms_to": {
"name": "c_value_conforms_to",
"documentation": "True if `_other.any_allowed_` or else for every constraint in the `_constraint_` list there is a constraint in `_other.constraint_` that contains it.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_ORDERED"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_congruent_to": {
"name": "c_value_congruent_to",
"documentation": "True if the items in `_constraint_` are equal in number and identical pair-wise with those in `_other.constraint_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_ORDERED"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
Conformance semantics: C_ORDERED
The following functions implement those of the same names in C_PRIMITIVE_OBJECT and formally define the conformance of a node of a C_ORDERED descendant type in a specialised archetype to a corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path and of the same AOM type.
c_value_conforms_to (other: C_ORDERED): Boolean
-- True if this node is a strict subset of `other`
do
Result := other.any_allowed or
for_all c:constraint |
there_exists oc:other.constraint | oc.contains (c)
end
end
c_value_congruent_to (C_ORDERED): Boolean
-- True if this node is the same as `other`
do
Result := constraint.count = other.constraint.count and
for_all c:constraint |
c.is_equal (other.constraint.i_th (constraint.index_of(c)))
end
end
C_INTEGER Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_INTEGER |
|
|---|---|---|
Description |
Constraint on instances of Integer. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
Formal constraint on To represent no constraint, use an empty list. |
|
0..1 |
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
0..1 |
assumed_value: |
Value to be assumed if none sent in data. |
| C_INTEGER | |||
|---|---|---|---|
Constraint on instances of Integer. |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_PRIMITIVE_OBJECT, C_ORDERED |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
assumed_value: |
Value to be assumed if none sent in data. |
||
C_PRIMITIVE_OBJECT.is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
Formal constraint on To represent no constraint, use an empty list. |
|||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_PRIMITIVE_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_PRIMITIVE_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
C_ORDERED.any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
(abstract) C_DEFINED_OBJECT.prototype_value (): |
Generate a prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.has_assumed_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.constrained_typename (): |
Generate name of native type that is constrained by this |
||
C_ORDERED.c_value_conforms_to ( |
True if |
||
C_ORDERED.c_value_congruent_to ( |
True if the items in |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
C_PRIMITIVE_OBJECT.Inv_valid_assumed_value: |
|||
{
"name": "C_INTEGER",
"documentation": "Constraint on instances of Integer.",
"ancestors": [
"C_ORDERED"
],
"properties": {
"constraint": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "constraint",
"documentation": "Formal constraint on `Integer`, in the form of one or more `Interval<Integer>`.\n\nTo represent no constraint, use an empty list.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "Interval",
"generic_parameters": [
"Integer"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"default_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "default_value",
"documentation": "Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes.",
"type": "Integer"
},
"assumed_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "assumed_value",
"documentation": "Value to be assumed if none sent in data.",
"type": "Real"
}
}
}
C_REAL Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_REAL |
|
|---|---|---|
Description |
Constraint on instances of Real. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
Formal constraint on To represent no constraint, use an empty list. |
|
0..1 |
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
0..1 |
assumed_value: |
Value to be assumed if none sent in data. |
| C_REAL | |||
|---|---|---|---|
Constraint on instances of Real. |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_PRIMITIVE_OBJECT, C_ORDERED |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
assumed_value: |
Value to be assumed if none sent in data. |
||
C_PRIMITIVE_OBJECT.is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
Formal constraint on To represent no constraint, use an empty list. |
|||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_PRIMITIVE_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_PRIMITIVE_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
C_ORDERED.any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
(abstract) C_DEFINED_OBJECT.prototype_value (): |
Generate a prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.has_assumed_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.constrained_typename (): |
Generate name of native type that is constrained by this |
||
C_ORDERED.c_value_conforms_to ( |
True if |
||
C_ORDERED.c_value_congruent_to ( |
True if the items in |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
C_PRIMITIVE_OBJECT.Inv_valid_assumed_value: |
|||
{
"name": "C_REAL",
"documentation": "Constraint on instances of Real.",
"ancestors": [
"C_ORDERED"
],
"properties": {
"constraint": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "constraint",
"documentation": "Formal constraint on `Real`, in the form of one or more `Interval<Real>`.\n\nTo represent no constraint, use an empty list.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "Interval",
"generic_parameters": [
"Real"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"default_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "default_value",
"documentation": "Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes.",
"type": "Real"
},
"assumed_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "assumed_value",
"documentation": "Value to be assumed if none sent in data.",
"type": "Real"
}
}
}
C_TEMPORAL Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_TEMPORAL<T> (abstract) |
|
|---|---|---|
Description |
Purpose Abstract parent of |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
pattern_constraint: |
Optional alternative constraint in the form of a pattern based on ISO8601. See descendants for details. |
Functions |
Signature |
Meaning |
1..1 |
True if |
|
1..1 |
valid_pattern_constraint_replacement ( |
Return True if |
1..1 |
any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
1..1 |
True if |
|
1..1 |
True if |
|
| C_TEMPORAL<T> (abstract) | |||
|---|---|---|---|
Purpose Abstract parent of |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_PRIMITIVE_OBJECT, C_ORDERED |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
C_ORDERED.default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
C_ORDERED.assumed_value: |
Value to be assumed if none sent in data. |
||
C_PRIMITIVE_OBJECT.is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
Constraint in the form of a List of Intervals of the parameter type T. Concrete types generated in descendants via template binding. |
|||
pattern_constraint: |
Optional alternative constraint in the form of a pattern based on ISO8601. See descendants for details. |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_PRIMITIVE_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_PRIMITIVE_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
(abstract) C_DEFINED_OBJECT.prototype_value (): |
Generate a prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.has_assumed_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.constrained_typename (): |
Generate name of native type that is constrained by this |
||
True if |
|||
c_value_congruent_to ( |
True if |
||
(abstract) valid_pattern_constraint ( |
True if |
||
(abstract) valid_pattern_constraint_replacement ( |
Return True if |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
C_PRIMITIVE_OBJECT.Inv_valid_assumed_value: |
|||
{
"name": "C_TEMPORAL",
"documentation": "Purpose Abstract parent of `C_ORDERED` types whose base type is an ISO date/time type.",
"is_abstract": true,
"ancestors": [
"C_ORDERED"
],
"generic_parameter_defs": {
"T": {
"name": "T",
"conforms_to_type": "Temporal"
}
},
"properties": {
"pattern_constraint": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "pattern_constraint",
"documentation": "Optional alternative constraint in the form of a pattern based on ISO8601. See descendants for details.",
"type": "String"
}
},
"functions": {
"valid_pattern_constraint": {
"name": "valid_pattern_constraint",
"documentation": "True if `_a_pattern_` is a valid constraint. Define in concrete descendants.",
"is_abstract": true,
"parameters": {
"a_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_pattern",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"valid_pattern_constraint_replacement": {
"name": "valid_pattern_constraint_replacement",
"documentation": "Return True if `_a_pattern_` can be replaced by `_an_other_pattern_` in a specialised constraint. Define in concrete subtypes.",
"is_abstract": true,
"parameters": {
"a_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_pattern",
"type": "String"
},
"an_other_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "an_other_pattern",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"any_allowed": {
"name": "any_allowed",
"documentation": "True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants.",
"post_conditions": {
"Post": "Result = precursor and pattern_constraint.is_empty"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_conforms_to": {
"name": "c_value_conforms_to",
"documentation": "True if `precursor()` or else `_other.pattern_constraint_` is empty, or else `_pattern_constraint_` is a valid (narrower) replacement for `_other.pattern_constraint_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_ORDERED"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_congruent_to": {
"name": "c_value_congruent_to",
"documentation": "True if `precursor (other)` and `_pattern_constraint_ ~ _other.pattern_constraint_`, i.e. either both `Void` or else both non-`Void` and identical.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_ORDERED"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
C_TEMPORAL_DEFINITIONS Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_TEMPORAL_DEFINITIONS |
|
|---|---|---|
Description |
Definitions related to |
|
Attributes |
Signature |
Meaning |
1..1 |
List of allowed date constraints. Contains the values:
|
|
1..1 |
valid_date_constraint_replacements: |
List of allowed date constraint replacements e.g. in specialised archetype. Contains the values: "YYYY-MM-DD": [],
"YYYY-MM-??": ["YYYY-MM-DD",
"YYYY-MM-XX"],
"YYYY-MM-XX": [],
"YYYY-??-??": ["YYYY-MM-??",
"YYYY-MM-DD",
"YYYY-MM-XX",
"YYYY-??-XX",
"YYYY-XX-XX"],
"YYYY-??-XX": ["YYYY-MM-XX",
"YYYY-XX-XX"],
"YYYY-XX-XX": []
In the above, an empty list value indicates no replacements possible. |
1..1 |
List of allowed time constraints. Contains the values:
|
|
1..1 |
valid_time_constraint_replacements: |
List of allowed time constraint replacements e.g. in specialised archetype. Contains the values: "HH:MM:SS": [],
"HH:MM:??": ["HH:MM:SS",
"HH:MM:XX"],
"HH:MM:XX": [],
"HH-??-??": ["HH:MM:??",
"HH:MM:SS",
"HH:MM:XX",
"HH:??:XX"],
"HH-??-XX": ["HH:MM:XX"]
In the above, an empty list value indicates no replacements possible. |
1..1 |
List of allowed date/time constraints. Contains the values:
|
|
1..1 |
valid_date_time_constraint_replacements: |
List of allowed date/time constraint replacements e.g. in specialised archetype. Contains the values: "YYYY-MM-DDTHH:MM:SS": [],
"YYYY-MM-DDTHH:MM:??": ["YYYY-MM-DDTHH:MM:SS",
"YYYY-MM-DDTHH:MM:XX"],
"YYYY-MM-DDTHH:MM:XX": [],
"YYYY-MM-DDTHH:??:??": ["YYYY-MM-DDTHH:??:XX",
"YYYY-MM-DDTHH:MM:SS",
"YYYY-MM-DDTHH:MM:??",
"YYYY-MM-DDTHH:MM:XX"],
"YYYY-MM-DDTHH:??:XX": ["YYYY-MM-DDTHH:MM:XX"],
"YYYY-??-??T??:??:??": ["YYYY-MM-DDTHH:MM:SS",
"YYYY-MM-DDTHH:MM:??",
"YYYY-MM-DDTHH:MM:XX",
"YYYY-MM-DDTHH:??:??",
"YYYY-MM-DDTHH:??:XX"]
|
Functions |
Signature |
Meaning |
1..1 |
valid_duration_constraint_replacement ( |
True if ISO8601 duration string |
1..1 |
valid_iso8601_date_constraint_pattern ( |
True if string literal like |
1..1 |
valid_iso8601_time_constraint_pattern ( |
True if string literal like |
1..1 |
valid_iso8601_date_time_constraint_pattern ( |
True if string literal in form |
1..1 |
valid_iso8601_duration_constraint_pattern ( |
True if string in form |
| C_TEMPORAL_DEFINITIONS | |
|---|---|
Definitions related to |
|
Attributes |
|
List of allowed date constraints. Contains the values:
|
|
valid_date_constraint_replacements: |
List of allowed date constraint replacements e.g. in specialised archetype. Contains the values: "YYYY-MM-DD": [],
"YYYY-MM-??": ["YYYY-MM-DD",
"YYYY-MM-XX"],
"YYYY-MM-XX": [],
"YYYY-??-??": ["YYYY-MM-??",
"YYYY-MM-DD",
"YYYY-MM-XX",
"YYYY-??-XX",
"YYYY-XX-XX"],
"YYYY-??-XX": ["YYYY-MM-XX",
"YYYY-XX-XX"],
"YYYY-XX-XX": []
In the above, an empty list value indicates no replacements possible. |
List of allowed time constraints. Contains the values:
|
|
valid_time_constraint_replacements: |
List of allowed time constraint replacements e.g. in specialised archetype. Contains the values: "HH:MM:SS": [],
"HH:MM:??": ["HH:MM:SS",
"HH:MM:XX"],
"HH:MM:XX": [],
"HH-??-??": ["HH:MM:??",
"HH:MM:SS",
"HH:MM:XX",
"HH:??:XX"],
"HH-??-XX": ["HH:MM:XX"]
In the above, an empty list value indicates no replacements possible. |
List of allowed date/time constraints. Contains the values:
|
|
valid_date_time_constraint_replacements: |
List of allowed date/time constraint replacements e.g. in specialised archetype. Contains the values: "YYYY-MM-DDTHH:MM:SS": [],
"YYYY-MM-DDTHH:MM:??": ["YYYY-MM-DDTHH:MM:SS",
"YYYY-MM-DDTHH:MM:XX"],
"YYYY-MM-DDTHH:MM:XX": [],
"YYYY-MM-DDTHH:??:??": ["YYYY-MM-DDTHH:??:XX",
"YYYY-MM-DDTHH:MM:SS",
"YYYY-MM-DDTHH:MM:??",
"YYYY-MM-DDTHH:MM:XX"],
"YYYY-MM-DDTHH:??:XX": ["YYYY-MM-DDTHH:MM:XX"],
"YYYY-??-??T??:??:??": ["YYYY-MM-DDTHH:MM:SS",
"YYYY-MM-DDTHH:MM:??",
"YYYY-MM-DDTHH:MM:XX",
"YYYY-MM-DDTHH:??:??",
"YYYY-MM-DDTHH:??:XX"]
|
Functions |
|
valid_duration_constraint_replacement ( |
True if ISO8601 duration string |
valid_iso8601_date_constraint_pattern ( |
True if string literal like |
valid_iso8601_time_constraint_pattern ( |
True if string literal like |
valid_iso8601_date_time_constraint_pattern ( |
True if string literal in form |
valid_iso8601_duration_constraint_pattern ( |
True if string in form |
{
"name": "C_TEMPORAL_DEFINITIONS",
"documentation": "Definitions related to `C_TEMPORAL` constraints.",
"properties": {
"valid_date_constraint_patterns": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "valid_date_constraint_patterns",
"documentation": "List of allowed date constraints. Contains the values:\n\n```\n\"YYYY-MM-DD\" -- full date required\n\"YYYY-MM-??\" -- day optional\n\"YYYY-MM-XX\" -- day prohibited\n\"YYYY-??-??\" -- any partial or full date\n\"YYYY-??-XX\" -- day prohibited\n\"YYYY-XX-XX\" -- only prohibited\n```",
"is_mandatory": true,
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 1,
"upper_unbounded": true
}
},
"valid_date_constraint_replacements": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "valid_date_constraint_replacements",
"documentation": "List of allowed date constraint replacements e.g. in specialised archetype. Contains the values:\n\n----\n\"YYYY-MM-DD\": [],\n\n\"YYYY-MM-??\": [\"YYYY-MM-DD\", \n \"YYYY-MM-XX\"],\n\n\"YYYY-MM-XX\": [],\n\n\"YYYY-??-??\": [\"YYYY-MM-??\",\n \"YYYY-MM-DD\",\n \"YYYY-MM-XX\",\n \"YYYY-??-XX\",\n \"YYYY-XX-XX\"],\n\n\"YYYY-??-XX\": [\"YYYY-MM-XX\", \n \"YYYY-XX-XX\"],\n\n\"YYYY-XX-XX\": []\n----\n\nIn the above, an empty list value indicates no replacements possible.",
"is_mandatory": true,
"type_def": {
"root_type": "Hash",
"generic_parameter_defs": {
"K": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
},
"V": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "List",
"generic_parameters": [
"String"
]
}
}
}
},
"valid_time_constraint_patterns": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "valid_time_constraint_patterns",
"documentation": "List of allowed time constraints. Contains the values:\n\n```\n\"HH:MM:SS\" -- full time required\n\"HH:MM:??\" -- seconds optional\n\"HH:MM:XX\" -- minutes required, seconds prohibited\n\"HH:??:??\" -- minutes and seconds optional\n\"HH:??:XX\" -- minutes optional, seconds prohibited\n```",
"is_mandatory": true,
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 1,
"upper_unbounded": true
}
},
"valid_time_constraint_replacements": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "valid_time_constraint_replacements",
"documentation": "List of allowed time constraint replacements e.g. in specialised archetype. Contains the values:\n\n----\n\"HH:MM:SS\": [],\n\n\"HH:MM:??\": [\"HH:MM:SS\",\n \"HH:MM:XX\"],\n\n\"HH:MM:XX\": [],\n\n\"HH-??-??\": [\"HH:MM:??\",\n \"HH:MM:SS\",\n \"HH:MM:XX\",\n \"HH:??:XX\"],\n\n\"HH-??-XX\": [\"HH:MM:XX\"]\n----\n\nIn the above, an empty list value indicates no replacements possible.",
"is_mandatory": true,
"type_def": {
"root_type": "Hash",
"generic_parameter_defs": {
"K": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
},
"V": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "List",
"generic_parameters": [
"String"
]
}
}
}
},
"valid_date_time_constraint_patterns": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "valid_date_time_constraint_patterns",
"documentation": "List of allowed date/time constraints. Contains the values:\n\n```\n\"YYYY-MM-DDTHH:MM:SS\" -- full date/time required\n\"YYYY-MM-DDTHH:MM:??\" -- seconds optional\n\"YYYY-MM-DDTHH:MM:XX\" -- seconds prohibited\n\"YYYY-MM-DDTHH:??:??\" -- minutes and seconds optional\n\"YYYY-MM-DDTHH:??:XX\" -- minutes optional, seconds prohibited\n\"YYYY-??-??T??:??:??\" -- any date/time ok\n```",
"is_mandatory": true,
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 1,
"upper_unbounded": true
}
},
"valid_date_time_constraint_replacements": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "valid_date_time_constraint_replacements",
"documentation": "List of allowed date/time constraint replacements e.g. in specialised archetype. Contains the values:\n\n----\n\"YYYY-MM-DDTHH:MM:SS\": [],\n\n\"YYYY-MM-DDTHH:MM:??\": [\"YYYY-MM-DDTHH:MM:SS\",\n \"YYYY-MM-DDTHH:MM:XX\"],\n\n\"YYYY-MM-DDTHH:MM:XX\": [],\n\n\"YYYY-MM-DDTHH:??:??\": [\"YYYY-MM-DDTHH:??:XX\",\n \"YYYY-MM-DDTHH:MM:SS\",\n \"YYYY-MM-DDTHH:MM:??\",\n \"YYYY-MM-DDTHH:MM:XX\"],\n\n\"YYYY-MM-DDTHH:??:XX\": [\"YYYY-MM-DDTHH:MM:XX\"],\n\n\"YYYY-??-??T??:??:??\": [\"YYYY-MM-DDTHH:MM:SS\",\n \"YYYY-MM-DDTHH:MM:??\",\n \"YYYY-MM-DDTHH:MM:XX\",\n \"YYYY-MM-DDTHH:??:??\",\n \"YYYY-MM-DDTHH:??:XX\"]\n----",
"is_mandatory": true,
"type_def": {
"root_type": "Hash",
"generic_parameter_defs": {
"K": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
},
"V": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "List",
"generic_parameters": [
"String"
]
}
}
}
}
},
"functions": {
"valid_duration_constraint_replacement": {
"name": "valid_duration_constraint_replacement",
"documentation": "True if ISO8601 duration string `_other_dur_` contains every character element in `_a_dur_`. For example: 'PYD' (period with year and days only) conforms to 'PYMD', but doesn't conform to 'PY'.",
"parameters": {
"a_dur": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_dur",
"type": "String"
},
"other_dur": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other_dur",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"valid_iso8601_date_constraint_pattern": {
"name": "valid_iso8601_date_constraint_pattern",
"documentation": "True if string literal like `\"yyyy-MM-dd\"` containing `\"XX\"` or `\"??\"` in `MM` or `dd` slots in pattern constraint is in `_valid_date_constraint_patterns_`.",
"parameters": {
"s": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "s",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"valid_iso8601_time_constraint_pattern": {
"name": "valid_iso8601_time_constraint_pattern",
"documentation": "True if string literal like `\"hh:mm:ss[.ssss]\"` containing `\"XX\"` or `\"??\"` in `mm` or `ss` slots in pattern constraint is in `_valid_time_constraint_patterns_`.",
"parameters": {
"s": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "s",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"valid_iso8601_date_time_constraint_pattern": {
"name": "valid_iso8601_date_time_constraint_pattern",
"documentation": "True if string literal in form `\"yyyy-MM-dd hh:mm:ss[.ssss]\"` containing `\"XX\"` or `\"??\"` in variable slots in pattern constraint is in `_valid_date_time_constraint_patterns_`.",
"parameters": {
"s": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "s",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"valid_iso8601_duration_constraint_pattern": {
"name": "valid_iso8601_duration_constraint_pattern",
"documentation": "True if string in form `P[Y|y][M|m][W|w][D|d][T[H|h][M|m][S|s]]` (note: allowing 'W' to be mixed in is an openEHR deviation of ISO 8601).",
"parameters": {
"s": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "s",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
Conformance semantics: C_TEMPORAL
The following functions redefine those of the same names in C_ORDERED and formally define the conformance of a node of a C_TEMPORAL descendant type in a specialised archetype to a corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path and of the same AOM type.
c_value_conforms_to (other: C_TEMPORAL): Boolean
-- True if this node is a strict subset of `other`
do
Result := precursor (other) and
other.pattern_constraint.is_empty or
not pattern_constraint.is_empty and then
valid_pattern_constraint_replacement (pattern_constraint, other.pattern_constraint)
end
c_value_congruent_to (other: C_TEMPORAL): Boolean
-- True if this node's value constraint is the same as that of `other`
do
Result := precursor (other) and
pattern_constraint ~ other.pattern_constraint
end
C_DATE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_DATE |
|
|---|---|---|
Description |
Constraint on instances representing dates in the form either of a set of validity values, or else date ranges based on the There is no validity flag for |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
constraint: |
Formal constraint on the assumed primitive For a pattern constraint or no constraint, use an empty list. |
0..1 |
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
0..1 |
assumed_value: |
Value to be assumed if none sent in data. |
Functions |
Signature |
Meaning |
1..1 |
month_validity (): |
Validity of month in constrained date. |
1..1 |
day_validity (): |
Validity of day in constrained date. |
1..1 |
Return |
|
1..1 |
valid_pattern_constraint_replacement ( |
Return |
Invariants |
Pattern_validity: |
|
| C_DATE | |||
|---|---|---|---|
Constraint on instances representing dates in the form either of a set of validity values, or else date ranges based on the There is no validity flag for |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_PRIMITIVE_OBJECT, C_ORDERED, C_TEMPORAL |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
assumed_value: |
Value to be assumed if none sent in data. |
||
C_PRIMITIVE_OBJECT.is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
constraint: |
Formal constraint on the assumed primitive For a pattern constraint or no constraint, use an empty list. |
||
C_TEMPORAL.pattern_constraint: |
Optional alternative constraint in the form of a pattern based on ISO8601. See descendants for details. |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_PRIMITIVE_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_PRIMITIVE_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
C_TEMPORAL.any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
(abstract) C_DEFINED_OBJECT.prototype_value (): |
Generate a prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.has_assumed_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.constrained_typename (): |
Generate name of native type that is constrained by this |
||
C_TEMPORAL.c_value_conforms_to ( |
True if |
||
C_TEMPORAL.c_value_congruent_to ( |
True if |
||
valid_pattern_constraint ( |
Return |
||
valid_pattern_constraint_replacement ( |
Return |
||
month_validity (): |
Validity of month in constrained date. |
||
day_validity (): |
Validity of day in constrained date. |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
C_PRIMITIVE_OBJECT.Inv_valid_assumed_value: |
|||
Pattern_validity: |
|||
{
"name": "C_DATE",
"documentation": "Constraint on instances representing dates in the form either of a set of validity values, or else date ranges based on the `C_ORDERED` list constraint. \n\nThere 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_TEMPORAL"
],
"properties": {
"constraint": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "constraint",
"documentation": "Formal constraint on the assumed primitive `Iso8601_date` type, in the form of one or more `Interval<Iso8601_date>`.\n\nFor a pattern constraint or no constraint, use an empty list.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "Interval",
"generic_parameters": [
"Iso8601_date"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"default_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "default_value",
"documentation": "Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes.",
"type": "Iso8601_date"
},
"assumed_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "assumed_value",
"documentation": "Value to be assumed if none sent in data.",
"type": "Iso8601_date"
}
},
"functions": {
"month_validity": {
"name": "month_validity",
"documentation": "Validity of month in constrained date.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
},
"day_validity": {
"name": "day_validity",
"documentation": "Validity of day in constrained date.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
},
"valid_pattern_constraint": {
"name": "valid_pattern_constraint",
"documentation": "Return `valid_iso8601_date_constraint_pattern (a_pattern)` ",
"parameters": {
"a_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_pattern",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"valid_pattern_constraint_replacement": {
"name": "valid_pattern_constraint_replacement",
"documentation": "Return `valid_date_constraint_replacements.has(an_other_pattern.as_upper) and then \nvalid_date_constraint_replacements.item (an_other_pattern.as_upper).has (a_pattern.as_upper)`.",
"parameters": {
"a_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_pattern",
"type": "String"
},
"an_other_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "an_other_pattern",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
},
"invariants": {
"Pattern_validity": "pattern /= Void implies valid_iso8601_date_constraint_pattern(pattern)"
}
}
C_TIME Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_TIME |
|
|---|---|---|
Description |
Constraint on instances representing times in the form either of a set of validity values, or else time ranges based on the There is no validity flag for |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
constraint: |
Formal constraint on the assumed primitive For a pattern constraint or no constraint, use an empty list. |
0..1 |
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
0..1 |
assumed_value: |
Value to be assumed if none sent in data. |
Functions |
Signature |
Meaning |
1..1 |
minute_validity (): |
Validity of minute in constrained time. |
1..1 |
second_validity (): |
Validity of second in constrained time. |
1..1 |
millisecond_validity (): |
Validity of millisecond in constrained time. |
1..1 |
timezone_validity (): |
Validity of timezone in constrained time. |
1..1 |
Return |
|
1..1 |
valid_pattern_constraint_replacement ( |
Return |
Invariants |
Pattern_validity: |
|
| C_TIME | |||
|---|---|---|---|
Constraint on instances representing times in the form either of a set of validity values, or else time ranges based on the There is no validity flag for |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_PRIMITIVE_OBJECT, C_ORDERED, C_TEMPORAL |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
assumed_value: |
Value to be assumed if none sent in data. |
||
C_PRIMITIVE_OBJECT.is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
constraint: |
Formal constraint on the assumed primitive For a pattern constraint or no constraint, use an empty list. |
||
C_TEMPORAL.pattern_constraint: |
Optional alternative constraint in the form of a pattern based on ISO8601. See descendants for details. |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_PRIMITIVE_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_PRIMITIVE_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
C_TEMPORAL.any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
(abstract) C_DEFINED_OBJECT.prototype_value (): |
Generate a prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.has_assumed_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.constrained_typename (): |
Generate name of native type that is constrained by this |
||
C_TEMPORAL.c_value_conforms_to ( |
True if |
||
C_TEMPORAL.c_value_congruent_to ( |
True if |
||
valid_pattern_constraint ( |
Return |
||
valid_pattern_constraint_replacement ( |
Return |
||
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 time. |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
C_PRIMITIVE_OBJECT.Inv_valid_assumed_value: |
|||
Pattern_validity: |
|||
{
"name": "C_TIME",
"documentation": "Constraint on instances representing times in the form either of a set of validity values, or else time ranges based on the `C_ORDERED` list constraint. \n\nThere 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_TEMPORAL"
],
"properties": {
"constraint": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "constraint",
"documentation": "Formal constraint on the assumed primitive `Iso8601_time` type, in the form of one or more `Interval<Iso8601_time>`.\n\nFor a pattern constraint or no constraint, use an empty list.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "Interval",
"generic_parameters": [
"Iso8601_time"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"default_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "default_value",
"documentation": "Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes.",
"type": "Iso8601_time"
},
"assumed_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "assumed_value",
"documentation": "Value to be assumed if none sent in data.",
"type": "Iso8601_time"
}
},
"functions": {
"minute_validity": {
"name": "minute_validity",
"documentation": "Validity of minute in constrained time.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
},
"second_validity": {
"name": "second_validity",
"documentation": "Validity of second in constrained time.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
},
"millisecond_validity": {
"name": "millisecond_validity",
"documentation": "Validity of millisecond in constrained time.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
},
"timezone_validity": {
"name": "timezone_validity",
"documentation": "Validity of timezone in constrained time.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
},
"valid_pattern_constraint": {
"name": "valid_pattern_constraint",
"documentation": "Return `valid_iso8601_time_constraint_pattern (a_pattern)` ",
"parameters": {
"a_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_pattern",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"valid_pattern_constraint_replacement": {
"name": "valid_pattern_constraint_replacement",
"documentation": "Return `valid_time_constraint_replacements.has(an_other_pattern.as_upper) and then \nvalid_time_constraint_replacements.item (an_other_pattern.as_upper).has (a_pattern.as_upper)`.",
"parameters": {
"a_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_pattern",
"type": "String"
},
"an_other_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "an_other_pattern",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
},
"invariants": {
"Pattern_validity": "pattern /= Void implies valid_iso8601_time_constraint_pattern (pattern)"
}
}
C_DATE_TIME Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_DATE_TIME |
|
|---|---|---|
Description |
Constraint on instances representing date/times, i.e. instants in time. There is no validity flag for |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
constraint: |
Formal constraint on the assumed primitive For a pattern constraint or no constraint, use an empty list. |
0..1 |
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
0..1 |
assumed_value: |
Value to be assumed if none sent in data. |
Functions |
Signature |
Meaning |
1..1 |
Return |
|
1..1 |
valid_pattern_constraint_replacement ( |
Return |
1..1 |
month_validity (): |
Validity of month in constrained date. |
1..1 |
day_validity (): |
Validity of day in constrained date. |
1..1 |
minute_validity (): |
Validity of minute in constrained time. |
1..1 |
second_validity (): |
Validity of second in constrained time. |
1..1 |
millisecond_validity (): |
Validity of millisecond in constrained time. |
1..1 |
timezone_validity (): |
Validity of timezone in constrained date/time. |
Invariants |
Pattern_validity: |
|
| C_DATE_TIME | |||
|---|---|---|---|
Constraint on instances representing date/times, i.e. instants in time. There is no validity flag for |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_PRIMITIVE_OBJECT, C_ORDERED, C_TEMPORAL |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
assumed_value: |
Value to be assumed if none sent in data. |
||
C_PRIMITIVE_OBJECT.is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
constraint: |
Formal constraint on the assumed primitive For a pattern constraint or no constraint, use an empty list. |
||
C_TEMPORAL.pattern_constraint: |
Optional alternative constraint in the form of a pattern based on ISO8601. See descendants for details. |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_PRIMITIVE_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_PRIMITIVE_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
C_TEMPORAL.any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
(abstract) C_DEFINED_OBJECT.prototype_value (): |
Generate a prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.has_assumed_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.constrained_typename (): |
Generate name of native type that is constrained by this |
||
C_TEMPORAL.c_value_conforms_to ( |
True if |
||
C_TEMPORAL.c_value_congruent_to ( |
True if |
||
valid_pattern_constraint ( |
Return |
||
valid_pattern_constraint_replacement ( |
Return |
||
month_validity (): |
Validity of month in constrained date. |
||
day_validity (): |
Validity of day in constrained date. |
||
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/time. |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
C_PRIMITIVE_OBJECT.Inv_valid_assumed_value: |
|||
Pattern_validity: |
|||
{
"name": "C_DATE_TIME",
"documentation": "Constraint on instances representing date/times, i.e. instants in time.\n\nThere 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_TEMPORAL"
],
"properties": {
"constraint": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "constraint",
"documentation": "Formal constraint on the assumed primitive `Iso8601_date_time` type, in the form of one or more `Interval<Iso8601_date_time>`.\n\nFor a pattern constraint or no constraint, use an empty list.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "Interval",
"generic_parameters": [
"Iso8601_date_time"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"default_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "default_value",
"documentation": "Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes.",
"type": "Iso8601_date_time"
},
"assumed_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "assumed_value",
"documentation": "Value to be assumed if none sent in data.",
"type": "Iso8601_date_time"
}
},
"functions": {
"valid_pattern_constraint": {
"name": "valid_pattern_constraint",
"documentation": "Return `valid_iso8601_date_time_constraint_pattern (a_pattern)` ",
"parameters": {
"a_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_pattern",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"valid_pattern_constraint_replacement": {
"name": "valid_pattern_constraint_replacement",
"documentation": "Return `valid_date_time_constraint_replacements.has(an_other_pattern.as_upper) and then \nvalid_date_time_constraint_replacements.item (an_other_pattern.as_upper).has (a_pattern.as_upper)`.",
"parameters": {
"a_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_pattern",
"type": "String"
},
"an_other_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "an_other_pattern",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"month_validity": {
"name": "month_validity",
"documentation": "Validity of month in constrained date.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
},
"day_validity": {
"name": "day_validity",
"documentation": "Validity of day in constrained date.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
},
"minute_validity": {
"name": "minute_validity",
"documentation": "Validity of minute in constrained time.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
},
"second_validity": {
"name": "second_validity",
"documentation": "Validity of second in constrained time.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
},
"millisecond_validity": {
"name": "millisecond_validity",
"documentation": "Validity of millisecond in constrained time.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
},
"timezone_validity": {
"name": "timezone_validity",
"documentation": "Validity of timezone in constrained date/time.",
"post_conditions": {
"": ""
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "VALIDITY_KIND"
}
}
},
"invariants": {
"Pattern_validity": "pattern /= Void implies valid_iso8601_date_time_constraint_pattern(pattern)"
}
}
C_DURATION Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_DURATION |
|
|---|---|---|
Description |
Constraint on instances representing duration, which is assumed to have the same parts as the ISO 8601 duration string. Thus, constraints are of the form 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 |
constraint: |
Formal constraint on the assumed primitive For a pattern constraint or no constraint, use an empty list. |
0..1 |
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
0..1 |
assumed_value: |
Value to be assumed if none sent in data. |
Functions |
Signature |
Meaning |
1..1 |
years_allowed: (): |
True if years are allowed in the constrained Duration. |
1..1 |
months_allowed: (): |
True if months are allowed in the constrained Duration. |
1..1 |
weeks_allowed: (): |
True if weeks are allowed in the constrained Duration. |
1..1 |
days_allowed (): |
True if days are allowed in the constrained Duration. |
1..1 |
hours_allowed (): |
True if hours are allowed in the constrained Duration. |
1..1 |
minutes_allowed (): |
True if minutes are allowed in the constrained Duration. |
1..1 |
seconds_allowed (): |
True if seconds are allowed in the constrained Duration. |
1..1 |
Return |
|
1..1 |
valid_pattern_constraint_replacement ( |
Return |
| C_DURATION | |||
|---|---|---|---|
Constraint on instances representing duration, which is assumed to have the same parts as the ISO 8601 duration string. Thus, constraints are of the form 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: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_PRIMITIVE_OBJECT, C_ORDERED, C_TEMPORAL |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
default_value: |
Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes. |
||
assumed_value: |
Value to be assumed if none sent in data. |
||
C_PRIMITIVE_OBJECT.is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
constraint: |
Formal constraint on the assumed primitive For a pattern constraint or no constraint, use an empty list. |
||
C_TEMPORAL.pattern_constraint: |
Optional alternative constraint in the form of a pattern based on ISO8601. See descendants for details. |
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_PRIMITIVE_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_PRIMITIVE_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
C_TEMPORAL.any_allowed (): |
True if any value (i.e. instance) of the reference model type would be allowed. Redefined in descendants. |
||
(abstract) C_DEFINED_OBJECT.valid_value ( |
True if |
||
(abstract) C_DEFINED_OBJECT.prototype_value (): |
Generate a prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.has_assumed_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.constrained_typename (): |
Generate name of native type that is constrained by this |
||
C_TEMPORAL.c_value_conforms_to ( |
True if |
||
C_TEMPORAL.c_value_congruent_to ( |
True if |
||
valid_pattern_constraint ( |
Return |
||
valid_pattern_constraint_replacement ( |
Return |
||
years_allowed: (): |
True if years are allowed in the constrained Duration. |
||
months_allowed: (): |
True if months are allowed in the constrained Duration. |
||
weeks_allowed: (): |
True if weeks are allowed in the constrained Duration. |
||
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 (): |
True if seconds are allowed in the constrained Duration. |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
C_PRIMITIVE_OBJECT.Inv_valid_assumed_value: |
|||
{
"name": "C_DURATION",
"documentation": "Constraint on instances representing duration, which is assumed to have the same parts as the ISO 8601 duration string. Thus, constraints 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\n",
"ancestors": [
"C_TEMPORAL"
],
"properties": {
"constraint": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "constraint",
"documentation": "Formal constraint on the assumed primitive `Iso8601_duration` type, in the form of one or more `Interval<Iso8601_duration>`.\n\nFor a pattern constraint or no constraint, use an empty list.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "Interval",
"generic_parameters": [
"Iso8601_duration"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"default_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "default_value",
"documentation": "Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes.",
"type": "Iso8601_duration"
},
"assumed_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "assumed_value",
"documentation": "Value to be assumed if none sent in data.",
"type": "Iso8601_duration"
}
},
"functions": {
"years_allowed:": {
"name": "years_allowed:",
"documentation": "True if years are allowed in the constrained Duration.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"months_allowed:": {
"name": "months_allowed:",
"documentation": "True if months are allowed in the constrained Duration.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"weeks_allowed:": {
"name": "weeks_allowed:",
"documentation": "True if weeks are allowed in the constrained Duration.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"days_allowed": {
"name": "days_allowed",
"documentation": "True if days are allowed in the constrained Duration.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"hours_allowed": {
"name": "hours_allowed",
"documentation": "True if hours are allowed in the constrained Duration.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"minutes_allowed": {
"name": "minutes_allowed",
"documentation": "True if minutes are allowed in the constrained Duration.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"seconds_allowed": {
"name": "seconds_allowed",
"documentation": "True if seconds are allowed in the constrained Duration.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"valid_pattern_constraint": {
"name": "valid_pattern_constraint",
"documentation": "Return `valid_iso8601_duration_constraint_pattern (a_pattern)` ",
"parameters": {
"a_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_pattern",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"valid_pattern_constraint_replacement": {
"name": "valid_pattern_constraint_replacement",
"documentation": "Return `valid_duration_constraint_replacement (a_pattern, an_other_pattern)`.",
"parameters": {
"a_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_pattern",
"type": "String"
},
"an_other_pattern": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "an_other_pattern",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
C_TERMINOLOGY_CODE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_TERMINOLOGY_CODE |
|||
|---|---|---|---|---|
Description |
Constrainer type for instances of
If there is an assumed value for the ac-code case above, the The |
|||
Inherit |
||||
Attributes |
Signature |
Meaning |
||
1..1 |
constraint: |
Type of individual constraint - a single string that can either be a local at-code, or a local ac-code signifying a locally defined value set. If an ac-code, assumed_value may contain an at-code from the value set of the ac-code. Use an empty string for no constraint. |
||
0..1 |
assumed_value: |
Assumed Terminology code value. |
||
0..1 |
default_value: |
|||
0..1 |
constraint_status: |
Constraint status of this terminology constraint. If Void, the meaning is as follows:
In the case of a specialised archetype generated by flattening, the value of this field will be:
|
||
Functions |
Signature |
Meaning |
||
1..1 |
constraint_required (): |
True if |
||
1..1 |
effective_constraint_status (): |
Return the effective integer value of the
|
||
0..1 |
Effective set of at-code values corresponding to an ac-code for a locally defined value set. Not defined for ac-codes that have no local value set. |
|||
0..1 |
For locally defined value sets within individual code bindings: return the term URI(s) substituted from bindings for local at-codes in |
|||
0..1 |
value_set_resolved (): |
For locally defined value sets within individual code bindings: final set of external codes to which value set is resolved. |
||
1..1 |
valid_value ( |
True if a |
||
1..1 |
prototype_value (): |
A generated prototype value from this constraint object. |
||
1..1 |
any_allowed (): |
True if |
||
1..1 |
c_value_conforms_to ( |
True if |
||
1..1 |
c_value_congruent_to ( |
True if |
||
| C_TERMINOLOGY_CODE | |||
|---|---|---|---|
Constrainer type for instances of
If there is an assumed value for the ac-code case above, the The |
|||
Inherits: ADL_CODE_DEFINITIONS, ARCHETYPE_CONSTRAINT, C_OBJECT, C_DEFINED_OBJECT, C_PRIMITIVE_OBJECT |
|||
Constants |
|||
ADL_CODE_DEFINITIONS.Id_code_leader: |
String leader of ‘identifier’ codes, i.e. codes used to identify archetype nodes. |
||
ADL_CODE_DEFINITIONS.Value_code_leader: |
String leader of ‘value’ codes, i.e. codes used to identify codes values, including value set members. |
||
ADL_CODE_DEFINITIONS.Value_set_code_leader: |
String leader of ‘value set’ codes, i.e. codes used to identify value sets. |
||
ADL_CODE_DEFINITIONS.Specialisation_separator: |
Character used to separate numeric parts of codes belonging to different specialisation levels. |
||
ADL_CODE_DEFINITIONS.Code_regex_pattern: `String = "(0 |
[1-9][0-9]*)(\.(0 |
||
[1-9]))"` [1..1] |
Regex used to define the legal numeric part of any archetype code. Corresponds to the simple pattern of dotted numbers, as used in typical multi-level numbering schemes. |
||
ADL_CODE_DEFINITIONS.Root_code_regex_pattern: |
Regex pattern of the root id code of any archetype. Corresponds to codes of the form |
||
ADL_CODE_DEFINITIONS.Primitive_node_id: |
Code id used for |
||
Attributes |
|||
ARCHETYPE_CONSTRAINT.parent: |
Parent node, except in the case of the top of a tree, i.e. root |
||
ARCHETYPE_CONSTRAINT.soc_parent: |
|||
Reference model type that this node corresponds to. |
|||
C_OBJECT.occurrences: |
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. Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute. |
||
Semantic identifier of this node, used to dis-tinguish sibling nodes. All nodes must have a For |
|||
True if this node and by implication all sub-nodes are deprecated for use. |
|||
C_OBJECT.sibling_order: |
Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a |
||
default_value: |
|||
assumed_value: |
Assumed Terminology code value. |
||
C_PRIMITIVE_OBJECT.is_enumerated_type_constraint: |
True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String. |
||
constraint: |
Type of individual constraint - a single string that can either be a local at-code, or a local ac-code signifying a locally defined value set. If an ac-code, assumed_value may contain an at-code from the value set of the ac-code. Use an empty string for no constraint. |
||
constraint_status: |
Constraint status of this terminology constraint. If Void, the meaning is as follows:
In the case of a specialised archetype generated by flattening, the value of this field will be:
|
||
Functions |
|||
ADL_CODE_DEFINITIONS.codes_conformant ( |
True if |
||
ADL_CODE_DEFINITIONS.is_adl_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_id_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_value_set_code ( |
True if |
||
ADL_CODE_DEFINITIONS.is_redefined_code ( |
A code has been specialised if there is a non-zero code index anywhere above the last index e.g.
|
||
ADL_CODE_DEFINITIONS.code_exists_at_level ( |
Is |
||
C_OBJECT.is_prohibited (): |
True if this |
||
ARCHETYPE_CONSTRAINT.has_path ( |
True if the relative path |
||
ARCHETYPE_CONSTRAINT.path (): |
Path of this node relative to root of archetype. |
||
C_PRIMITIVE_OBJECT.c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
C_PRIMITIVE_OBJECT.c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node Typically used to test if an inherited node locally contains any constraints. |
||
ARCHETYPE_CONSTRAINT.is_second_order_constrained (): |
True if there is a second order constraint such as a tuple constraint on this node. |
||
ARCHETYPE_CONSTRAINT.is_root (): |
True if this node is the root of the tree. |
||
ARCHETYPE_CONSTRAINT.is_leaf (): |
True if this node is a terminal node in the tree structure, i.e. having no child nodes. |
||
Level of specialisation of this archetype node, based on its |
|||
C_OBJECT.effective_occurrences (): |
Compute effective occurrences, where no local occurrences constraint set. If the owning If local |
||
C_OBJECT.occurrences_conforms_to ( |
True if this node Parameters
|
||
C_OBJECT.node_id_conforms_to ( |
True if this node id conforms to |
||
any_allowed (): |
True if |
||
valid_value ( |
True if a |
||
prototype_value (): |
A generated prototype value from this constraint object. |
||
C_DEFINED_OBJECT.has_default_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.has_assumed_value (): |
True if there is an assumed value. |
||
C_PRIMITIVE_OBJECT.constrained_typename (): |
Generate name of native type that is constrained by this |
||
c_value_conforms_to ( |
True if |
||
c_value_congruent_to ( |
True if |
||
constraint_required (): |
True if |
||
effective_constraint_status (): |
Return the effective integer value of the
|
||
Effective set of at-code values corresponding to an ac-code for a locally defined value set. Not defined for ac-codes that have no local value set. |
|||
For locally defined value sets within individual code bindings: return the term URI(s) substituted from bindings for local at-codes in |
|||
value_set_resolved (): |
For locally defined value sets within individual code bindings: final set of external codes to which value set is resolved. |
||
Invariants |
|||
ARCHETYPE_CONSTRAINT.Post: |
|||
C_DEFINED_OBJECT.Inv_valid_default_value: |
|||
C_PRIMITIVE_OBJECT.Inv_valid_assumed_value: |
|||
{
"name": "C_TERMINOLOGY_CODE",
"documentation": "Constrainer type for instances of `Terminology_code`. The constraint attribute can contain:\n\n* a single at-code\n* a single ac-code, representing a value-set that is defined in the archetype terminology\n\nIf there is an assumed value for the ac-code case above, the `_assumed_value_` attribute contains a single at-code, which must come from the list of at-codes defined as the internal value set for the ac-code.\n\nThe `_constraint_status_` attribute and `_constraint_required_()` function together define whether the `_constraint_` is considered formal ('required') or not. In the non-required cases, a data-item matched to this constraint may be any coded term.",
"ancestors": [
"C_PRIMITIVE_OBJECT"
],
"properties": {
"constraint": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "constraint",
"documentation": "Type of individual constraint - a single string that can either be a local at-code, or a local ac-code signifying a locally defined value set. If an ac-code, assumed_value may contain an at-code from the value set of the ac-code.\n\nUse an empty string for no constraint.",
"is_mandatory": true,
"type": "String"
},
"assumed_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "assumed_value",
"documentation": "Assumed Terminology code value.",
"type": "Terminology_code"
},
"default_value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "default_value",
"type": "Terminology_code"
},
"constraint_status": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "constraint_status",
"documentation": "Constraint status of this terminology constraint. If Void, the meaning is as follows:\n\n* in a top-level archetype, equivalent to `required`;\n* in a specialised (source) archetype, the meaning is to inherit the value from the corresponding node in the parent.\n\nIn the case of a specialised archetype generated by flattening, the value of this field will be:\n\n* Void if it was Void in the parent;\n* otherwise, it will carry the same value as in the parent.",
"type": "CONSTRAINT_STATUS"
}
},
"functions": {
"constraint_required": {
"name": "constraint_required",
"documentation": "True if `_constraint_status_` is defined and equals `required` OR if Void. I.e. in archetypes where `C_TERMINOLOGY_CODE` instances have no `_constraint_status_`, the `required` status is assumed, which applies to all legacy archetypes.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"effective_constraint_status": {
"name": "effective_constraint_status",
"documentation": "Return the effective integer value of the `_constraint_status_` field if it exists. If it is null, return 0, i.e. `required`.\n\nNOTE: the above logic applies to any `C_TERMINOLOGY_NODE` instance in a specialised archetype that redefines another such instance in the flat parent. I.e. no stated `_constraint_status_` means `required`.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Integer"
}
},
"value_set_expanded": {
"name": "value_set_expanded",
"documentation": "Effective set of at-code values corresponding to an ac-code for a locally defined value set. Not defined for ac-codes that have no local value set.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "String"
},
"is_nullable": true
},
"value_set_substituted": {
"name": "value_set_substituted",
"documentation": "For locally defined value sets within individual code bindings: return the term URI(s) substituted from bindings for local at-codes in `_value_set_expanded_`.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "Uri"
},
"is_nullable": true
},
"value_set_resolved": {
"name": "value_set_resolved",
"documentation": "For locally defined value sets within individual code bindings: final set of external codes to which value set is resolved.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "Terminology_code"
},
"is_nullable": true
},
"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": "Terminology_code"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"prototype_value": {
"name": "prototype_value",
"documentation": "A generated prototype value from this constraint object.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Terminology_code"
}
},
"any_allowed": {
"name": "any_allowed",
"documentation": "True if `_constraint_` is empty.",
"post_conditions": {
"Post": "Result := constraint.is_empty"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_conforms_to": {
"name": "c_value_conforms_to",
"documentation": "True if `_other.any_allowed_` or else every constraint in the `_constraint_` list exists in the `_other.constraint_`, and `_effective_constraint_status()_` is <= `_other.effective_constraint_status()_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_TERMINOLOGY_CODE"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_value_congruent_to": {
"name": "c_value_congruent_to",
"documentation": "True if `_constraint_` and `_other.constraint_` are both value-set ids, and expand to identical value sets, or else are identical value codes; and `_effective_constraint_status()_` = `_other.effective_constraint_status()_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_TERMINOLOGY_CODE"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
CONSTRAINT_STATUS Enumeration
-
Definition
-
Effective
-
BMM
-
UML
Enumeration |
CONSTRAINT_STATUS |
|
|---|---|---|
Description |
Status of |
|
Constants |
Signature |
Meaning |
required: |
Data item is required to formally satisfy Enumeration value = 0. |
|
extensible: |
Data item value should satisfy Enumeration value = 1. |
|
preferred: |
Data item value is by preference one of the codes defined by Enumeration value = 2. |
|
example: |
The |
|
| CONSTRAINT_STATUS | |
|---|---|
Status of |
|
Inherits: Any, Any, Ordered, Numeric, Ordered_Numeric, Integer |
|
Constants |
|
required: |
Data item is required to formally satisfy Enumeration value = 0. |
extensible: |
Data item value should satisfy Enumeration value = 1. |
preferred: |
Data item value is by preference one of the codes defined by Enumeration value = 2. |
example: |
The |
Functions |
|
Value equality: return True if |
|
Integer.equal alias "=", "==" ( |
Reference equality for reference types, value equality for value types. |
Create new instance of a type. |
|
Type name of an object as a string. May include generic parameters, as in |
|
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
Integer.less_than alias "<" ( |
Returns True if current Integer is less than |
Ordered.less_than_or_equal alias "⇐", "≤" ( |
True if current object less than or equal to |
Ordered.greater_than alias ">" ( |
True if current object greater than |
Ordered.greater_than_or_equal alias ">=", "≥" ( |
True if current object greater than or equal to |
Integer addition. |
|
Integer.subtract alias "-" ( |
Integer subtraction. |
Integer.multiply alias "*" ( |
Integer multiplication. |
Integer.divide alias "/" ( |
Integer division. |
Integer.exponent alias "^" ( |
Integer exponentiation. |
Generate negative of current Integer value. |
|
Integer.modulo alias "mod", "\\" ( |
Return self modulo other. |
{
"_type": "P_BMM_ENUMERATION_INTEGER",
"name": "CONSTRAINT_STATUS",
"documentation": "Status of `_constraint_`, with values allowing for 'soft' constraints, which are effectively different kinds of suggestions.",
"ancestors": [
"Integer"
],
"item_names": [
"required",
"extensible",
"preferred",
"example"
],
"item_values": [
0,
1,
2,
3
],
"item_documentations": [
"Data item is required to formally satisfy `_constraint_`.\n\nEnumeration value = 0.",
"Data item value should satisfy `_constraint_`, i.e. a term in `_constraint_` is to be used if it covers the data item meaning (including more generally); if not, another code may be used, including from another terminology.\n\nEnumeration value = 1.",
"Data item value is by preference one of the codes defined by `_constraint_`, but for local reasons may be another code, including from another terminology.\n\nEnumeration value = 2.",
"The `_constraint_` code or value-set is considered purely as an example, and the data item may have any value."
]
}
Conformance semantics: C_TERMINOLOGY_NODE
The following functions implement those of the same names in C_PRIMITIVE_OBJECT and formally define the conformance of a C_TERMINOLOGY_CODE node in a specialised archetype to a corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path and of the same AOM type.
c_value_conforms_to (other: C_TERMINOLOGY_CODE): Boolean
-- True if this node expresses a value constraint that conforms to that of `other'
local
this_vset, other_vset: List<String>
do
if other.any_allowed then
Result := True
-- check that constraint_status is valid. The following order hold down the specialisation
-- lineage, from lowest to highest: example (3) → preferred (2) → exensible (1) → required (0);
-- numerically, specialisation child must be <= parent
elseif effective_constraint_status > other.effective_constraint_status then
Result := False
-- if parent's constraint status is not 'required', then child automatically conforms
elseif other.effective_constraint_status > 0 then
Result := True
-- if we get here, we know that parent and child terminology constraint strengths are both `required`
-- so perform the value-set conformance check
elseif is_valid_value_set_code (constraint) and is_valid_value_set_code (other.constraint) then
-- firstly, check if the other value-set is empty, which means there is no value-set,
-- i.e. no constraint, which means that this object's value set automatically conforms.
other_vset := other.value_set_expanded
if not other_vset.is_empty then
this_vset := value_set_expanded
Result := codes_conformant (constraint, other.constraint) and then
for_all v: this_vset | other_vset.has (v)
else
Result := True
end
-- otherwise it's at-codes, so we just check lexical conformance
else
Result := codes_conformant (constraint, other.constraint)
end
end
c_value_congruent_to (other: C_TERMINOLOGY_CODE): Boolean
-- True if this node's value constraint is the same as that of `other'
local
this_vset, other_vset: List<String>
do
-- if both constraints are ac-codes, compare the value-set expansions
if is_valid_value_set_code (constraint) and is_valid_value_set_code (other.constraint) then
this_vset := value_set_expanded
other_vset := other.value_set_expanded
Result := constraint.is_equal (other.constraint) and then
this_vset.count = other_vset.count and then
for_all v: this_vset | other_vset.has (v)
-- otherwise it's at-codes, so we just compare them literally
else
Result := constraint.is_equal (other.constraint)
end
-- make sure constraint status is identical
Result := Result and effective_constraint_status = other.effective_constraint_status
end
C_SECOND_ORDER Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_SECOND_ORDER (abstract) |
|||
|---|---|---|---|---|
Description |
Abstract parent of classes defining second order constraints. |
|||
Attributes |
Signature |
Meaning |
||
0..1 |
members: |
Members of this second order constrainer. Normally redefined in descendants. |
||
Functions |
Signature |
Meaning |
||
1..1 |
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
1..1 |
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node other. Typically used to test if an inherited node locally contains any constraints. |
||
| C_SECOND_ORDER (abstract) | |||
|---|---|---|---|
Abstract parent of classes defining second order constraints. |
|||
Attributes |
|||
members: |
Members of this second order constrainer. Normally redefined in descendants. |
||
Functions |
|||
(abstract) c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
(abstract) c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node other. Typically used to test if an inherited node locally contains any constraints. |
||
{
"name": "C_SECOND_ORDER",
"documentation": "Abstract parent of classes defining second order constraints.",
"is_abstract": true,
"properties": {
"members": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "members",
"documentation": "Members of this second order constrainer. Normally redefined in descendants.",
"type_def": {
"container_type": "List",
"type": "ARCHETYPE_CONSTRAINT"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"c_conforms_to": {
"name": "c_conforms_to",
"documentation": "True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes.",
"is_abstract": true,
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_SECOND_ORDER"
},
"rmcc": {
"_type": "P_BMM_GENERIC_FUNCTION_PARAMETER",
"name": "rmcc",
"documentation": "RM conformance checker agent - a lambda (i.e. function object) that can compute conformance of type-names within the Reference Model on which the current archetype is based. The signature provides two arguments representing respectively, the `_rm_type_name_` of the current node and the `_rm_type_name_` of the node being redefined in a specialisation parent archetype.",
"type_def": {
"root_type": "FUNCTION"
}
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_congruent_to": {
"name": "c_congruent_to",
"documentation": "True if constraints represented by this node contain no further redefinitions with respect to the node other. Typically used to test if an inherited node locally contains any constraints.",
"is_abstract": true,
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_SECOND_ORDER"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
C_PRIMITIVE_TUPLE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_PRIMITIVE_TUPLE |
|||
|---|---|---|---|---|
Description |
Class representing a single object tuple instance in a tuple constraint. Each such instance is a vector of object constraints, where each member (each |
|||
Inherit |
||||
Attributes |
Signature |
Meaning |
||
1..1 |
members: |
Object constraint members of this tuple group. |
||
Functions |
Signature |
Meaning |
||
1..1 |
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
1..1 |
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node other. Typically used to test if an inherited node locally contains any constraints. |
||
| C_PRIMITIVE_TUPLE | |||
|---|---|---|---|
Class representing a single object tuple instance in a tuple constraint. Each such instance is a vector of object constraints, where each member (each |
|||
Inherits: C_SECOND_ORDER |
|||
Attributes |
|||
members: |
Object constraint members of this tuple group. |
||
Functions |
|||
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node other. Typically used to test if an inherited node locally contains any constraints. |
||
{
"name": "C_PRIMITIVE_TUPLE",
"documentation": "Class representing a single object tuple instance in a tuple constraint. Each such instance is a vector of object constraints, where each member (each `C_PRIMITIVE_OBJECT`) corresponds to one of the `C_ATTRIBUTEs` referred to by the owning `C_ATTRIBUTE_TUPLE`.",
"ancestors": [
"C_SECOND_ORDER"
],
"properties": {
"members": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "members",
"documentation": "Object constraint members of this tuple group.",
"is_mandatory": true,
"type_def": {
"container_type": "List",
"type": "C_PRIMITIVE_OBJECT"
},
"cardinality": {
"lower": 1,
"upper_unbounded": true
}
}
},
"functions": {
"c_conforms_to": {
"name": "c_conforms_to",
"documentation": "True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_PRIMITIVE_TUPLE"
},
"rmcc": {
"_type": "P_BMM_GENERIC_FUNCTION_PARAMETER",
"name": "rmcc",
"documentation": "RM conformance checker agent.",
"type_def": {
"root_type": "FUNCTION"
}
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_congruent_to": {
"name": "c_congruent_to",
"documentation": "True if constraints represented by this node contain no further redefinitions with respect to the node other. Typically used to test if an inherited node locally contains any constraints.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_SECOND_ORDER"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
C_ATTRIBUTE_TUPLE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
C_ATTRIBUTE_TUPLE |
|||
|---|---|---|---|---|
Description |
Object representing a constraint on an attribute tuple, i.e. a group of attributes that are constrained together. Typically used for representing co-varying constraints like |
|||
Inherit |
||||
Attributes |
Signature |
Meaning |
||
0..1 |
tuples: |
Tuple definitions. |
||
0..1 |
members: |
List of |
||
Functions |
Signature |
Meaning |
||
1..1 |
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
1..1 |
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node other. Typically used to test if an inherited node locally contains any constraints. |
||
| C_ATTRIBUTE_TUPLE | |||
|---|---|---|---|
Object representing a constraint on an attribute tuple, i.e. a group of attributes that are constrained together. Typically used for representing co-varying constraints like |
|||
Inherits: C_SECOND_ORDER |
|||
Attributes |
|||
members: |
List of |
||
tuples: |
Tuple definitions. |
||
Functions |
|||
c_conforms_to ( |
True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes. Parameters
|
||
c_congruent_to ( |
True if constraints represented by this node contain no further redefinitions with respect to the node other. Typically used to test if an inherited node locally contains any constraints. |
||
{
"name": "C_ATTRIBUTE_TUPLE",
"documentation": "Object representing a constraint on an attribute tuple, i.e. a group of attributes that are constrained together. Typically used for representing co-varying constraints like `{units, range}` constraints.",
"ancestors": [
"C_SECOND_ORDER"
],
"properties": {
"tuples": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "tuples",
"documentation": "Tuple definitions.",
"type_def": {
"container_type": "List",
"type": "C_PRIMITIVE_TUPLE"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"members": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "members",
"documentation": "List of `C_ATTRIBUTEs` forming the definition of the tuple.",
"type_def": {
"container_type": "List",
"type": "C_ATTRIBUTE"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"c_conforms_to": {
"name": "c_conforms_to",
"documentation": "True if constraints represented by this node, ignoring any sub-parts, are narrower or the same as other. Typically used during validation of specialised archetype nodes.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_ATTRIBUTE_TUPLE"
},
"rmcc": {
"_type": "P_BMM_GENERIC_FUNCTION_PARAMETER",
"name": "rmcc",
"documentation": "RM conformance checker agent.",
"type_def": {
"root_type": "FUNCTION"
}
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"c_congruent_to": {
"name": "c_congruent_to",
"documentation": "True if constraints represented by this node contain no further redefinitions with respect to the node other. Typically used to test if an inherited node locally contains any constraints.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "C_SECOND_ORDER"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
Conformance semantics: C_SECOND_ORDER
The following functions formally define the conformance interfaces of any C_SECOND_ORDER node in a specialised archetype to the corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path.
c_conforms_to (other: C_SECOND_ORDER; rmcc: FUNCTION<<a_type, other_type: String>, Boolean>): Boolean
-- True if this node on its own (ignoring any subparts) expresses the same or narrower
-- constraints as `other`.
-- Returns False if any of the following is incompatible:
-- * cardinality
-- * existence
require
other /= Void
rmcc /= Void
deferred
end
c_congruent_to (other: C_SECOND_ORDER): Boolean
-- True if this node on its own (ignoring any subparts) expresses no additional
-- constraints than `other`.
require
other /= Void
deferred
end
The following functions implement those of the same names from C_SECOND_ORDER, and formally define the conformance interfaces of any C_ATTRIBUTE_TUPLE node in a specialised archetype to the corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path.
c_conforms_to (other: C_ATTRIBUTE_TUPLE; rmcc: FUNCTION<<a_type, other_type: String>, Boolean>): BOOLEAN
-- True if this node is a subset of, or the same as `other'
do
Result :=
for_all t: tuples |
there_exists ot: other.tuples | t.c_conforms_to (ot, rmcc)
or else tuples.count < other.tuples.count and
for_all t: tuples |
there_exists ot: other.tuples | t.c_congruent_to (ot)
end
c_congruent_to (other: C_ATTRIBUTE_TUPLE): BOOLEAN
-- True if Current adds no further constraints with respect to `other'
do
Result := for_all t: tuples |
there_exists ot: other.tuples | t.c_congruent_to (ot)
end
The following functions implement those of the same names from C_SECOND_ORDER, and formally define the conformance interfaces of any C_PRIMITIVE_TUPLE node in a specialised archetype to the corresponding node in a parent archetype, where 'corresponding' means a node found at the same or a congruent path.
c_conforms_to (other: C_PRIMITIVE_TUPLE; rmcc: FUNCTION<<a_type, other_type: String>, Boolean>): BOOLEAN
-- True if this node is a subset of, or the same as `other'
do
if count = other.count then
Result := across members as cpo_csr all
cpo_csr.item.same_type (other.members.i_th (cpo_csr.cursor_index)) and then
cpo_csr.item.c_conforms_to (other.members.i_th (cpo_csr.cursor_index), rmcc)
end
end
end
c_congruent_to (other: C_PRIMITIVE_TUPLE): BOOLEAN
-- True if Current and `other' are semantically the same
do
if count = other.count then
Result := across members as cpo_csr all
cpo_csr.item.same_type (other.members.i_th (cpo_csr.cursor_index)) and then
cpo_csr.item.c_congruent_to (other.members.i_th (cpo_csr.cursor_index))
end
end
end