1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// @generated by openehr-codegen from BMM (`BMM_DEFINITIONS`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0
//! The openEHR `BMM_DEFINITIONS` spec class, generated from the vendored BMM
//! meta-model.
use crate::v2_4::bmm::rm_access::reference_model_access::ReferenceModelAccess;
use crate::v2_4::bmm::rm_access::schema_descriptor::SchemaDescriptor;
/// Definitions used by all BMM packages.
#[doc(alias = "BMM_DEFINITIONS")]
#[derive(Debug, Clone, PartialEq)]
pub struct BmmDefinitionsData {}
impl BmmDefinitionsData {
/// Current internal version of BMM meta-model, used to determine if a given schema can be processed by a given implementation of the model.
/// BMM constant `Bmm_internal_version`.
pub const BMM_INTERNAL_VERSION: &str = "";
/// Delimiter used to separate schema id from package path in a fully qualified path.
/// BMM constant `Schema_name_delimiter`.
pub const SCHEMA_NAME_DELIMITER: &str = "::";
/// Delimiter used to separate package names in a package path.
/// BMM constant `Package_name_delimiter`.
pub const PACKAGE_NAME_DELIMITER: &str = ".";
/// Extension used for BMM files.
/// BMM constant `Bmm_schema_file_extension`.
pub const BMM_SCHEMA_FILE_EXTENSION: &str = ".bmm";
/// Appears between a name and a type in a declaration or type signature.
/// BMM constant `Type_delimiter`.
pub const TYPE_DELIMITER: char = ':';
/// Left delimiter for generic class and generic type names, as used in `List<T>`.
/// BMM constant `Generic_left_delimiter`.
pub const GENERIC_LEFT_DELIMITER: char = '<';
/// Right delimiter for generic class and generic type names, as used in `List<T>`.
/// BMM constant `Generic_right_delimiter`.
pub const GENERIC_RIGHT_DELIMITER: char = '>';
/// Separator used in Generic types.
/// BMM constant `Generic_separator`.
pub const GENERIC_SEPARATOR: char = ',';
/// Delimiter between formal type parameter and constraint type, as used in `Sortable<T: Ordered>`.
/// BMM constant `Generic_constraint_delimiter`.
pub const GENERIC_CONSTRAINT_DELIMITER: char = ':';
/// Left delimiter of a Tuple type and also instance. Example:
///
/// * `[Integer, String]` - a tuple type;
/// * `[3, "Quixote"]` - a tuple.
/// BMM constant `Tuple_left_delim`.
pub const TUPLE_LEFT_DELIM: char = '[';
/// Right delimiter of a Tuple type and also instance.
/// BMM constant `Tuple_right_delim`.
pub const TUPLE_RIGHT_DELIM: char = ']';
/// Separator used in Tuple types and instances.
/// BMM constant `Tuple_separator`.
pub const TUPLE_SEPARATOR: char = ',';
/// Left delimiter used in serial form of instance constrained enumeration.
/// BMM constant `Constraint_left_delim`.
pub const CONSTRAINT_LEFT_DELIM: char = '«';
/// Right delimiter used in serial form of instance constrained enumeration.
/// BMM constant `Constraint_right_delim`.
pub const CONSTRAINT_RIGHT_DELIM: char = '»';
/// Attribute name of logical attribute 'bmm_version' in .bmm schema file.
/// BMM constant `Metadata_bmm_version`.
pub const METADATA_BMM_VERSION: &str = "bmm_version";
/// Attribute name of logical attribute 'schema_name' in .bmm schema file.
/// BMM constant `Metadata_schema_name`.
pub const METADATA_SCHEMA_NAME: &str = "schema_name";
/// Attribute name of logical attribute 'rm_publisher' in .bmm schema file.
/// BMM constant `Metadata_rm_publisher`.
pub const METADATA_RM_PUBLISHER: &str = "rm_publisher";
/// Attribute name of logical attribute 'rm_release' in .bmm schema file.
/// BMM constant `Metadata_rm_release`.
pub const METADATA_RM_RELEASE: &str = "rm_release";
/// Attribute name of logical attribute 'schema_revision' in .bmm schema file.
/// BMM constant `Metadata_schema_revision`.
pub const METADATA_SCHEMA_REVISION: &str = "schema_revision";
/// Attribute name of logical attribute 'schema_lifecycle_state' in .bmm schema file.
/// BMM constant `Metadata_schema_lifecycle_state`.
pub const METADATA_SCHEMA_LIFECYCLE_STATE: &str = "schema_lifecycle_state";
/// Attribute name of logical attribute 'schema_description' in .bmm schema file.
/// BMM constant `Metadata_schema_description`.
pub const METADATA_SCHEMA_DESCRIPTION: &str = "schema_description";
/// Path of schema file.
/// BMM constant `Metadata_schema_path`.
pub const METADATA_SCHEMA_PATH: &str = "schema_path";
}
/// Polymorphic slot of `BMM_DEFINITIONS`, dispatched on each payload's `_type`.
///
/// Definitions used by all BMM packages.
#[doc(alias = "BMM_DEFINITIONS")]
#[derive(Debug, Clone, PartialEq)]
pub enum BmmDefinitions {
/// The `REFERENCE_MODEL_ACCESS` subtype of `BMM_DEFINITIONS`.
ReferenceModelAccess(ReferenceModelAccess),
/// The `SCHEMA_DESCRIPTOR` subtype of `BMM_DEFINITIONS`.
SchemaDescriptor(SchemaDescriptor),
/// An instance of `BMM_DEFINITIONS` itself (its own, least-rich form).
BmmDefinitions(BmmDefinitionsData),
}