1
+ /*
2
+ * Licensed under the Apache License, Version 2.0 (the "License");
3
+ * you may not use this file except in compliance with the License.
4
+ * You may obtain a copy of the License at
5
+ *
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Unless required by applicable law or agreed to in writing, software
9
+ * distributed under the License is distributed on an "AS IS" BASIS,
10
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ * See the License for the specific language governing permissions and
12
+ * limitations under the License.
13
+ */
14
+ concerto version "^3.0.0"
15
+
16
+ @DotNetNamespace("AccordProject.Concerto.Metamodel")
17
+ namespace concerto.metamodel@1.0.0
18
+
19
+ concept Position {
20
+ o Integer line
21
+ o Integer column
22
+ o Integer offset
23
+ }
24
+
25
+ concept Range {
26
+ o Position start
27
+ o Position end
28
+ o String source optional
29
+ }
30
+
31
+ concept TypeIdentifier {
32
+ o String name
33
+ o String namespace optional
34
+ }
35
+
36
+ abstract concept DecoratorLiteral {
37
+ o Range location optional
38
+ }
39
+
40
+ concept DecoratorString extends DecoratorLiteral {
41
+ o String value
42
+ }
43
+
44
+ concept DecoratorNumber extends DecoratorLiteral {
45
+ o Double value
46
+ }
47
+
48
+ concept DecoratorBoolean extends DecoratorLiteral {
49
+ o Boolean value
50
+ }
51
+
52
+ concept DecoratorTypeReference extends DecoratorLiteral {
53
+ o TypeIdentifier type
54
+ o Boolean isArray default=false
55
+ }
56
+
57
+ concept Decorator {
58
+ o String name
59
+ o DecoratorLiteral[] arguments optional
60
+ o Range location optional
61
+ }
62
+
63
+ concept Identified {
64
+ }
65
+
66
+ concept IdentifiedBy extends Identified {
67
+ o String name
68
+ }
69
+
70
+ abstract concept Declaration {
71
+ o String name regex=/^(\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4})(?:\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D)*$/u
72
+ o Decorator[] decorators optional
73
+ o Range location optional
74
+ }
75
+
76
+ concept EnumDeclaration extends Declaration {
77
+ o EnumProperty[] properties
78
+ }
79
+
80
+ concept EnumProperty {
81
+ o String name regex=/^(\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4})(?:\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D)*$/u
82
+ o Decorator[] decorators optional
83
+ o Range location optional
84
+ }
85
+
86
+ concept ConceptDeclaration extends Declaration {
87
+ o Boolean isAbstract default=false
88
+ o Identified identified optional
89
+ o TypeIdentifier superType optional
90
+ o Property[] properties
91
+ }
92
+
93
+ concept AssetDeclaration extends ConceptDeclaration {
94
+ }
95
+
96
+ concept ParticipantDeclaration extends ConceptDeclaration {
97
+ }
98
+
99
+ concept TransactionDeclaration extends ConceptDeclaration {
100
+ }
101
+
102
+ concept EventDeclaration extends ConceptDeclaration {
103
+ }
104
+
105
+ abstract concept Property {
106
+ o String name regex=/^(\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4})(?:\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D)*$/u
107
+ o Boolean isArray default=false
108
+ o Boolean isOptional default=false
109
+ o Decorator[] decorators optional
110
+ o Range location optional
111
+ }
112
+
113
+ concept RelationshipProperty extends Property {
114
+ o TypeIdentifier type
115
+ }
116
+
117
+ concept ObjectProperty extends Property {
118
+ o String defaultValue optional
119
+ o TypeIdentifier type
120
+ }
121
+
122
+ concept BooleanProperty extends Property {
123
+ o Boolean defaultValue optional
124
+ }
125
+
126
+ concept DateTimeProperty extends Property {
127
+ }
128
+
129
+ concept StringProperty extends Property {
130
+ o String defaultValue optional
131
+ o StringRegexValidator validator optional
132
+ }
133
+
134
+ concept StringRegexValidator {
135
+ o String pattern
136
+ o String flags
137
+ }
138
+
139
+ concept DoubleProperty extends Property {
140
+ o Double defaultValue optional
141
+ o DoubleDomainValidator validator optional
142
+ }
143
+
144
+ concept DoubleDomainValidator {
145
+ o Double lower optional
146
+ o Double upper optional
147
+ }
148
+
149
+ concept IntegerProperty extends Property {
150
+ o Integer defaultValue optional
151
+ o IntegerDomainValidator validator optional
152
+ }
153
+
154
+ concept IntegerDomainValidator {
155
+ o Integer lower optional
156
+ o Integer upper optional
157
+ }
158
+
159
+ concept LongProperty extends Property {
160
+ o Long defaultValue optional
161
+ o LongDomainValidator validator optional
162
+ }
163
+
164
+ concept LongDomainValidator {
165
+ o Long lower optional
166
+ o Long upper optional
167
+ }
168
+
169
+ abstract concept Import {
170
+ o String namespace
171
+ o String uri optional
172
+ }
173
+
174
+ concept ImportAll extends Import {
175
+ }
176
+
177
+ concept ImportType extends Import {
178
+ o String name
179
+ }
180
+
181
+ concept ImportTypes extends Import {
182
+ o String[] types
183
+ }
184
+
185
+ concept Model {
186
+ o String namespace
187
+ o String sourceUri optional
188
+ o String concertoVersion optional
189
+ o Import[] imports optional
190
+ o Declaration[] declarations optional
191
+ o Decorator[] decorators optional
192
+ }
193
+
194
+ concept Models {
195
+ o Model[] models
196
+ }
197
+
198
+ abstract concept ScalarDeclaration extends Declaration {
199
+ }
200
+
201
+ concept BooleanScalar extends ScalarDeclaration {
202
+ o Boolean defaultValue
203
+ }
204
+
205
+ concept IntegerScalar extends ScalarDeclaration {
206
+ o Integer defaultValue optional
207
+ o IntegerDomainValidator validator optional
208
+ }
209
+
210
+ concept LongScalar extends ScalarDeclaration {
211
+ o Long defaultValue optional
212
+ o LongDomainValidator validator optional
213
+ }
214
+
215
+ concept DoubleScalar extends ScalarDeclaration {
216
+ o Double defaultValue optional
217
+ o DoubleDomainValidator validator optional
218
+ }
219
+
220
+ concept StringScalar extends ScalarDeclaration {
221
+ o String defaultValue optional
222
+ o StringRegexValidator validator optional
223
+ }
224
+
225
+ concept DateTimeScalar extends ScalarDeclaration {
226
+ o String defaultValue optional
227
+ }
0 commit comments