diff --git a/lib/metamodel.cto b/lib/metamodel.cto index 79113e8..5ff79ec 100644 --- a/lib/metamodel.cto +++ b/lib/metamodel.cto @@ -148,6 +148,7 @@ concept DateTimeProperty extends Property { concept StringProperty extends Property { o String defaultValue optional o StringRegexValidator validator optional + o StringLengthValidator lengthValidator optional } concept StringRegexValidator { @@ -155,6 +156,11 @@ concept StringRegexValidator { o String flags } +concept StringLengthValidator { + o Integer minLength optional + o Integer maxLength optional +} + concept DoubleProperty extends Property { o Double defaultValue optional o DoubleDomainValidator validator optional @@ -239,6 +245,7 @@ concept DoubleScalar extends ScalarDeclaration { concept StringScalar extends ScalarDeclaration { o String defaultValue optional o StringRegexValidator validator optional + o StringLengthValidator lengthValidator optional } concept DateTimeScalar extends ScalarDeclaration { diff --git a/lib/metamodel.js b/lib/metamodel.js index 7288cbd..7e050ea 100644 --- a/lib/metamodel.js +++ b/lib/metamodel.js @@ -19,6 +19,6 @@ /** * The metamodel itself, as a CTO string */ -const metaModelCto = "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@DotNetNamespace(\"AccordProject.Concerto.Metamodel\")\nnamespace concerto.metamodel@1.0.0\n\nconcept Position {\n o Integer line\n o Integer column\n o Integer offset\n}\n\nconcept Range {\n o Position start\n o Position end\n o String source optional\n}\n\nconcept TypeIdentifier {\n o String name\n o String namespace optional\n}\n\nabstract concept DecoratorLiteral {\n o Range location optional\n}\n\nconcept DecoratorString extends DecoratorLiteral {\n o String value\n}\n\nconcept DecoratorNumber extends DecoratorLiteral {\n o Double value\n}\n\nconcept DecoratorBoolean extends DecoratorLiteral {\n o Boolean value\n}\n\nconcept DecoratorTypeReference extends DecoratorLiteral {\n o TypeIdentifier type\n o Boolean isArray default=false\n}\n\nconcept Decorator {\n o String name\n o DecoratorLiteral[] arguments optional\n o Range location optional\n}\n\nconcept Identified {\n}\n\nconcept IdentifiedBy extends Identified {\n o String name\n}\n\nabstract concept Declaration {\n 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\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept MapDeclaration extends Declaration {\n o MapKeyType key\n o AggregateValueType value\n}\n\nconcept MapKeyType {\n o TypeIdentifier type\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept AggregateValueType {\n o TypeIdentifier type\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept AggregateRelationshipValueType extends AggregateValueType {\n\t o Boolean isRelationship\n}\n\nconcept EnumDeclaration extends Declaration {\n o EnumProperty[] properties\n}\n\nconcept EnumProperty {\n 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\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept ConceptDeclaration extends Declaration {\n o Boolean isAbstract default=false\n o Identified identified optional\n o TypeIdentifier superType optional\n o Property[] properties\n}\n\nconcept AssetDeclaration extends ConceptDeclaration {\n}\n\nconcept ParticipantDeclaration extends ConceptDeclaration {\n}\n\nconcept TransactionDeclaration extends ConceptDeclaration {\n}\n\nconcept EventDeclaration extends ConceptDeclaration {\n}\n\nabstract concept Property {\n 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\n o Boolean isArray default=false\n o Boolean isOptional default=false\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept RelationshipProperty extends Property {\n o TypeIdentifier type\n}\n\nconcept ObjectProperty extends Property {\n o String defaultValue optional\n o TypeIdentifier type\n}\n\nconcept BooleanProperty extends Property {\n o Boolean defaultValue optional\n}\n\nconcept DateTimeProperty extends Property {\n}\n\nconcept StringProperty extends Property {\n o String defaultValue optional\n o StringRegexValidator validator optional\n}\n\nconcept StringRegexValidator {\n o String pattern\n o String flags\n}\n\nconcept DoubleProperty extends Property {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept DoubleDomainValidator {\n o Double lower optional\n o Double upper optional\n}\n\nconcept IntegerProperty extends Property {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept IntegerDomainValidator {\n o Integer lower optional\n o Integer upper optional\n}\n\nconcept LongProperty extends Property {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept LongDomainValidator {\n o Long lower optional\n o Long upper optional\n}\n\nabstract concept Import {\n o String namespace\n o String uri optional\n}\n\nconcept ImportAll extends Import {\n}\n\nconcept ImportType extends Import {\n o String name\n}\n\nconcept ImportTypes extends Import {\n o String[] types\n}\n\nconcept Model {\n o String namespace\n o String sourceUri optional\n o String concertoVersion optional\n o Import[] imports optional\n o Declaration[] declarations optional\n o Decorator[] decorators optional\n}\n\nconcept Models {\n o Model[] models\n}\n\nabstract concept ScalarDeclaration extends Declaration {\n}\n\nconcept BooleanScalar extends ScalarDeclaration {\n o Boolean defaultValue\n}\n\nconcept IntegerScalar extends ScalarDeclaration {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept LongScalar extends ScalarDeclaration {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept DoubleScalar extends ScalarDeclaration {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept StringScalar extends ScalarDeclaration {\n o String defaultValue optional\n o StringRegexValidator validator optional\n}\n\nconcept DateTimeScalar extends ScalarDeclaration {\n o String defaultValue optional\n}\n"; +const metaModelCto = "/*\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n@DotNetNamespace(\"AccordProject.Concerto.Metamodel\")\r\nnamespace concerto.metamodel@1.0.0\r\n\r\nconcept Position {\r\n o Integer line\r\n o Integer column\r\n o Integer offset\r\n}\r\n\r\nconcept Range {\r\n o Position start\r\n o Position end\r\n o String source optional\r\n}\r\n\r\nconcept TypeIdentifier {\r\n o String name\r\n o String namespace optional\r\n}\r\n\r\nabstract concept DecoratorLiteral {\r\n o Range location optional\r\n}\r\n\r\nconcept DecoratorString extends DecoratorLiteral {\r\n o String value\r\n}\r\n\r\nconcept DecoratorNumber extends DecoratorLiteral {\r\n o Double value\r\n}\r\n\r\nconcept DecoratorBoolean extends DecoratorLiteral {\r\n o Boolean value\r\n}\r\n\r\nconcept DecoratorTypeReference extends DecoratorLiteral {\r\n o TypeIdentifier type\r\n o Boolean isArray default=false\r\n}\r\n\r\nconcept Decorator {\r\n o String name\r\n o DecoratorLiteral[] arguments optional\r\n o Range location optional\r\n}\r\n\r\nconcept Identified {\r\n}\r\n\r\nconcept IdentifiedBy extends Identified {\r\n o String name\r\n}\r\n\r\nabstract concept Declaration {\r\n 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\r\n o Decorator[] decorators optional\r\n o Range location optional\r\n}\r\n\r\nconcept MapDeclaration extends Declaration {\r\n o MapKeyType key\r\n o AggregateValueType value\r\n}\r\n\r\nconcept MapKeyType {\r\n o TypeIdentifier type\r\n o Decorator[] decorators optional\r\n o Range location optional\r\n}\r\n\r\nconcept AggregateValueType {\r\n o TypeIdentifier type\r\n o Decorator[] decorators optional\r\n o Range location optional\r\n}\r\n\r\nconcept AggregateRelationshipValueType extends AggregateValueType {\r\n}\r\n\r\nconcept EnumDeclaration extends Declaration {\r\n o EnumProperty[] properties\r\n}\r\n\r\nconcept EnumProperty {\r\n 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\r\n o Decorator[] decorators optional\r\n o Range location optional\r\n}\r\n\r\nconcept ConceptDeclaration extends Declaration {\r\n o Boolean isAbstract default=false\r\n o Identified identified optional\r\n o TypeIdentifier superType optional\r\n o Property[] properties\r\n}\r\n\r\nconcept AssetDeclaration extends ConceptDeclaration {\r\n}\r\n\r\nconcept ParticipantDeclaration extends ConceptDeclaration {\r\n}\r\n\r\nconcept TransactionDeclaration extends ConceptDeclaration {\r\n}\r\n\r\nconcept EventDeclaration extends ConceptDeclaration {\r\n}\r\n\r\nabstract concept Property {\r\n 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\r\n o Boolean isArray default=false\r\n o Boolean isOptional default=false\r\n o Decorator[] decorators optional\r\n o Range location optional\r\n}\r\n\r\nconcept RelationshipProperty extends Property {\r\n o TypeIdentifier type\r\n}\r\n\r\nconcept ObjectProperty extends Property {\r\n o String defaultValue optional\r\n o TypeIdentifier type\r\n}\r\n\r\nconcept BooleanProperty extends Property {\r\n o Boolean defaultValue optional\r\n}\r\n\r\nconcept DateTimeProperty extends Property {\r\n}\r\n\r\nconcept StringProperty extends Property {\r\n o String defaultValue optional\r\n o StringRegexValidator validator optional\r\n o StringLengthValidator lengthValidator optional\r\n}\r\n\r\nconcept StringRegexValidator {\r\n o String pattern\r\n o String flags\r\n}\r\n\r\nconcept StringLengthValidator {\r\n o Integer minLength optional\r\n o Integer maxLength optional\r\n}\r\n\r\nconcept DoubleProperty extends Property {\r\n o Double defaultValue optional\r\n o DoubleDomainValidator validator optional\r\n}\r\n\r\nconcept DoubleDomainValidator {\r\n o Double lower optional\r\n o Double upper optional\r\n}\r\n\r\nconcept IntegerProperty extends Property {\r\n o Integer defaultValue optional\r\n o IntegerDomainValidator validator optional\r\n}\r\n\r\nconcept IntegerDomainValidator {\r\n o Integer lower optional\r\n o Integer upper optional\r\n}\r\n\r\nconcept LongProperty extends Property {\r\n o Long defaultValue optional\r\n o LongDomainValidator validator optional\r\n}\r\n\r\nconcept LongDomainValidator {\r\n o Long lower optional\r\n o Long upper optional\r\n}\r\n\r\nabstract concept Import {\r\n o String namespace\r\n o String uri optional\r\n}\r\n\r\nconcept ImportAll extends Import {\r\n}\r\n\r\nconcept ImportType extends Import {\r\n o String name\r\n}\r\n\r\nconcept ImportTypes extends Import {\r\n o String[] types\r\n}\r\n\r\nconcept Model {\r\n o String namespace\r\n o String sourceUri optional\r\n o String concertoVersion optional\r\n o Import[] imports optional\r\n o Declaration[] declarations optional\r\n o Decorator[] decorators optional\r\n}\r\n\r\nconcept Models {\r\n o Model[] models\r\n}\r\n\r\nabstract concept ScalarDeclaration extends Declaration {\r\n}\r\n\r\nconcept BooleanScalar extends ScalarDeclaration {\r\n o Boolean defaultValue\r\n}\r\n\r\nconcept IntegerScalar extends ScalarDeclaration {\r\n o Integer defaultValue optional\r\n o IntegerDomainValidator validator optional\r\n}\r\n\r\nconcept LongScalar extends ScalarDeclaration {\r\n o Long defaultValue optional\r\n o LongDomainValidator validator optional\r\n}\r\n\r\nconcept DoubleScalar extends ScalarDeclaration {\r\n o Double defaultValue optional\r\n o DoubleDomainValidator validator optional\r\n}\r\n\r\nconcept StringScalar extends ScalarDeclaration {\r\n o String defaultValue optional\r\n o StringRegexValidator validator optional\r\n o StringLengthValidator lengthValidator optional\r\n}\r\n\r\nconcept DateTimeScalar extends ScalarDeclaration {\r\n o String defaultValue optional\r\n}\r\n"; module.exports = metaModelCto; diff --git a/lib/metamodel.json b/lib/metamodel.json index ada52a1..c04b859 100644 --- a/lib/metamodel.json +++ b/lib/metamodel.json @@ -698,6 +698,16 @@ }, "isArray": false, "isOptional": true + }, + { + "$class": "concerto.metamodel@1.0.0.ObjectProperty", + "name": "lengthValidator", + "type": { + "$class": "concerto.metamodel@1.0.0.TypeIdentifier", + "name": "StringLengthValidator" + }, + "isArray": false, + "isOptional": true } ], "superType": { @@ -724,6 +734,25 @@ } ] }, + { + "$class": "concerto.metamodel@1.0.0.ConceptDeclaration", + "name": "StringLengthValidator", + "isAbstract": false, + "properties": [ + { + "$class": "concerto.metamodel@1.0.0.IntegerProperty", + "name": "minLength", + "isArray": false, + "isOptional": true + }, + { + "$class": "concerto.metamodel@1.0.0.IntegerProperty", + "name": "maxLength", + "isArray": false, + "isOptional": true + } + ] + }, { "$class": "concerto.metamodel@1.0.0.ConceptDeclaration", "name": "DoubleProperty", @@ -1125,6 +1154,16 @@ }, "isArray": false, "isOptional": true + }, + { + "$class": "concerto.metamodel@1.0.0.ObjectProperty", + "name": "lengthValidator", + "type": { + "$class": "concerto.metamodel@1.0.0.TypeIdentifier", + "name": "StringLengthValidator" + }, + "isArray": false, + "isOptional": true } ], "superType": { diff --git a/test/cto/person.cto b/test/cto/person.cto index 36111a6..19bf6d7 100644 --- a/test/cto/person.cto +++ b/test/cto/person.cto @@ -13,8 +13,9 @@ abstract participant Individual { } participant Person extends Individual { - o String firstName regex=/[a-zA-Z]*/u - o String lastName + o String firstName regex=/[a-zA-Z]*/u length=[1,] + o String lastName length=[,100] + o string middleName length=[1,100] o Address address o Address address2 default="USAddress" @description("Work Address") diff --git a/test/cto/person.json b/test/cto/person.json index affc8f0..381c7d3 100644 --- a/test/cto/person.json +++ b/test/cto/person.json @@ -249,13 +249,32 @@ "$class": "concerto.metamodel@1.0.0.StringRegexValidator", "pattern": "[a-zA-Z]*", "flags": "u" + }, + "lengthValidator": { + "$class": "concerto.metamodel@1.0.0.StringLengthValidator", + "minLength": 1 } }, { "$class": "concerto.metamodel@1.0.0.StringProperty", "name": "lastName", "isArray": false, - "isOptional": false + "isOptional": false, + "lengthValidator": { + "$class": "concerto.metamodel@1.0.0.StringLengthValidator", + "maxLength": 100 + } + }, + { + "$class": "concerto.metamodel@1.0.0.StringProperty", + "name": "middleName", + "isArray": false, + "isOptional": false, + "lengthValidator": { + "$class": "concerto.metamodel@1.0.0.StringLengthValidator", + "minLength": 1, + "maxLength": 100 + } }, { "$class": "concerto.metamodel@1.0.0.ObjectProperty", diff --git a/test/cto/personResolved.json b/test/cto/personResolved.json index b953b9d..63c25f2 100644 --- a/test/cto/personResolved.json +++ b/test/cto/personResolved.json @@ -52,13 +52,32 @@ "$class": "concerto.metamodel@1.0.0.StringRegexValidator", "pattern": "[a-zA-Z]*", "flags": "u" + }, + "lengthValidator": { + "$class": "concerto.metamodel@1.0.0.StringLengthValidator", + "minLength": 1 } }, { "$class": "concerto.metamodel@1.0.0.StringProperty", "name": "lastName", "isArray": false, - "isOptional": false + "isOptional": false, + "lengthValidator": { + "$class": "concerto.metamodel@1.0.0.StringLengthValidator", + "maxLength": 100 + } + }, + { + "$class": "concerto.metamodel@1.0.0.StringProperty", + "name": "middleName", + "isArray": false, + "isOptional": false, + "lengthValidator": { + "$class": "concerto.metamodel@1.0.0.StringLengthValidator", + "minLength": 1, + "maxLength": 100 + } }, { "$class": "concerto.metamodel@1.0.0.ObjectProperty", diff --git a/types/lib/metamodel.d.ts b/types/lib/metamodel.d.ts index 04d2d89..850e103 100644 --- a/types/lib/metamodel.d.ts +++ b/types/lib/metamodel.d.ts @@ -2,4 +2,4 @@ export = metaModelCto; /** * The metamodel itself, as a CTO string */ -declare const metaModelCto: "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@DotNetNamespace(\"AccordProject.Concerto.Metamodel\")\nnamespace concerto.metamodel@1.0.0\n\nconcept Position {\n o Integer line\n o Integer column\n o Integer offset\n}\n\nconcept Range {\n o Position start\n o Position end\n o String source optional\n}\n\nconcept TypeIdentifier {\n o String name\n o String namespace optional\n}\n\nabstract concept DecoratorLiteral {\n o Range location optional\n}\n\nconcept DecoratorString extends DecoratorLiteral {\n o String value\n}\n\nconcept DecoratorNumber extends DecoratorLiteral {\n o Double value\n}\n\nconcept DecoratorBoolean extends DecoratorLiteral {\n o Boolean value\n}\n\nconcept DecoratorTypeReference extends DecoratorLiteral {\n o TypeIdentifier type\n o Boolean isArray default=false\n}\n\nconcept Decorator {\n o String name\n o DecoratorLiteral[] arguments optional\n o Range location optional\n}\n\nconcept Identified {\n}\n\nconcept IdentifiedBy extends Identified {\n o String name\n}\n\nabstract concept Declaration {\n 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\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept MapDeclaration extends Declaration {\n o MapKeyType key\n o AggregateValueType value\n}\n\nconcept MapKeyType {\n o TypeIdentifier type\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept AggregateValueType {\n o TypeIdentifier type\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept AggregateRelationshipValueType extends AggregateValueType {\n\t o Boolean isRelationship\n}\n\nconcept EnumDeclaration extends Declaration {\n o EnumProperty[] properties\n}\n\nconcept EnumProperty {\n 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\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept ConceptDeclaration extends Declaration {\n o Boolean isAbstract default=false\n o Identified identified optional\n o TypeIdentifier superType optional\n o Property[] properties\n}\n\nconcept AssetDeclaration extends ConceptDeclaration {\n}\n\nconcept ParticipantDeclaration extends ConceptDeclaration {\n}\n\nconcept TransactionDeclaration extends ConceptDeclaration {\n}\n\nconcept EventDeclaration extends ConceptDeclaration {\n}\n\nabstract concept Property {\n 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\n o Boolean isArray default=false\n o Boolean isOptional default=false\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept RelationshipProperty extends Property {\n o TypeIdentifier type\n}\n\nconcept ObjectProperty extends Property {\n o String defaultValue optional\n o TypeIdentifier type\n}\n\nconcept BooleanProperty extends Property {\n o Boolean defaultValue optional\n}\n\nconcept DateTimeProperty extends Property {\n}\n\nconcept StringProperty extends Property {\n o String defaultValue optional\n o StringRegexValidator validator optional\n}\n\nconcept StringRegexValidator {\n o String pattern\n o String flags\n}\n\nconcept DoubleProperty extends Property {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept DoubleDomainValidator {\n o Double lower optional\n o Double upper optional\n}\n\nconcept IntegerProperty extends Property {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept IntegerDomainValidator {\n o Integer lower optional\n o Integer upper optional\n}\n\nconcept LongProperty extends Property {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept LongDomainValidator {\n o Long lower optional\n o Long upper optional\n}\n\nabstract concept Import {\n o String namespace\n o String uri optional\n}\n\nconcept ImportAll extends Import {\n}\n\nconcept ImportType extends Import {\n o String name\n}\n\nconcept ImportTypes extends Import {\n o String[] types\n}\n\nconcept Model {\n o String namespace\n o String sourceUri optional\n o String concertoVersion optional\n o Import[] imports optional\n o Declaration[] declarations optional\n o Decorator[] decorators optional\n}\n\nconcept Models {\n o Model[] models\n}\n\nabstract concept ScalarDeclaration extends Declaration {\n}\n\nconcept BooleanScalar extends ScalarDeclaration {\n o Boolean defaultValue\n}\n\nconcept IntegerScalar extends ScalarDeclaration {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept LongScalar extends ScalarDeclaration {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept DoubleScalar extends ScalarDeclaration {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept StringScalar extends ScalarDeclaration {\n o String defaultValue optional\n o StringRegexValidator validator optional\n}\n\nconcept DateTimeScalar extends ScalarDeclaration {\n o String defaultValue optional\n}\n"; +declare const metaModelCto: "/*\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n@DotNetNamespace(\"AccordProject.Concerto.Metamodel\")\r\nnamespace concerto.metamodel@1.0.0\r\n\r\nconcept Position {\r\n o Integer line\r\n o Integer column\r\n o Integer offset\r\n}\r\n\r\nconcept Range {\r\n o Position start\r\n o Position end\r\n o String source optional\r\n}\r\n\r\nconcept TypeIdentifier {\r\n o String name\r\n o String namespace optional\r\n}\r\n\r\nabstract concept DecoratorLiteral {\r\n o Range location optional\r\n}\r\n\r\nconcept DecoratorString extends DecoratorLiteral {\r\n o String value\r\n}\r\n\r\nconcept DecoratorNumber extends DecoratorLiteral {\r\n o Double value\r\n}\r\n\r\nconcept DecoratorBoolean extends DecoratorLiteral {\r\n o Boolean value\r\n}\r\n\r\nconcept DecoratorTypeReference extends DecoratorLiteral {\r\n o TypeIdentifier type\r\n o Boolean isArray default=false\r\n}\r\n\r\nconcept Decorator {\r\n o String name\r\n o DecoratorLiteral[] arguments optional\r\n o Range location optional\r\n}\r\n\r\nconcept Identified {\r\n}\r\n\r\nconcept IdentifiedBy extends Identified {\r\n o String name\r\n}\r\n\r\nabstract concept Declaration {\r\n 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\r\n o Decorator[] decorators optional\r\n o Range location optional\r\n}\r\n\r\nconcept MapDeclaration extends Declaration {\r\n o MapKeyType key\r\n o AggregateValueType value\r\n}\r\n\r\nconcept MapKeyType {\r\n o TypeIdentifier type\r\n o Decorator[] decorators optional\r\n o Range location optional\r\n}\r\n\r\nconcept AggregateValueType {\r\n o TypeIdentifier type\r\n o Decorator[] decorators optional\r\n o Range location optional\r\n}\r\n\r\nconcept AggregateRelationshipValueType extends AggregateValueType {\r\n}\r\n\r\nconcept EnumDeclaration extends Declaration {\r\n o EnumProperty[] properties\r\n}\r\n\r\nconcept EnumProperty {\r\n 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\r\n o Decorator[] decorators optional\r\n o Range location optional\r\n}\r\n\r\nconcept ConceptDeclaration extends Declaration {\r\n o Boolean isAbstract default=false\r\n o Identified identified optional\r\n o TypeIdentifier superType optional\r\n o Property[] properties\r\n}\r\n\r\nconcept AssetDeclaration extends ConceptDeclaration {\r\n}\r\n\r\nconcept ParticipantDeclaration extends ConceptDeclaration {\r\n}\r\n\r\nconcept TransactionDeclaration extends ConceptDeclaration {\r\n}\r\n\r\nconcept EventDeclaration extends ConceptDeclaration {\r\n}\r\n\r\nabstract concept Property {\r\n 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\r\n o Boolean isArray default=false\r\n o Boolean isOptional default=false\r\n o Decorator[] decorators optional\r\n o Range location optional\r\n}\r\n\r\nconcept RelationshipProperty extends Property {\r\n o TypeIdentifier type\r\n}\r\n\r\nconcept ObjectProperty extends Property {\r\n o String defaultValue optional\r\n o TypeIdentifier type\r\n}\r\n\r\nconcept BooleanProperty extends Property {\r\n o Boolean defaultValue optional\r\n}\r\n\r\nconcept DateTimeProperty extends Property {\r\n}\r\n\r\nconcept StringProperty extends Property {\r\n o String defaultValue optional\r\n o StringRegexValidator validator optional\r\n o StringLengthValidator lengthValidator optional\r\n}\r\n\r\nconcept StringRegexValidator {\r\n o String pattern\r\n o String flags\r\n}\r\n\r\nconcept StringLengthValidator {\r\n o Integer minLength optional\r\n o Integer maxLength optional\r\n}\r\n\r\nconcept DoubleProperty extends Property {\r\n o Double defaultValue optional\r\n o DoubleDomainValidator validator optional\r\n}\r\n\r\nconcept DoubleDomainValidator {\r\n o Double lower optional\r\n o Double upper optional\r\n}\r\n\r\nconcept IntegerProperty extends Property {\r\n o Integer defaultValue optional\r\n o IntegerDomainValidator validator optional\r\n}\r\n\r\nconcept IntegerDomainValidator {\r\n o Integer lower optional\r\n o Integer upper optional\r\n}\r\n\r\nconcept LongProperty extends Property {\r\n o Long defaultValue optional\r\n o LongDomainValidator validator optional\r\n}\r\n\r\nconcept LongDomainValidator {\r\n o Long lower optional\r\n o Long upper optional\r\n}\r\n\r\nabstract concept Import {\r\n o String namespace\r\n o String uri optional\r\n}\r\n\r\nconcept ImportAll extends Import {\r\n}\r\n\r\nconcept ImportType extends Import {\r\n o String name\r\n}\r\n\r\nconcept ImportTypes extends Import {\r\n o String[] types\r\n}\r\n\r\nconcept Model {\r\n o String namespace\r\n o String sourceUri optional\r\n o String concertoVersion optional\r\n o Import[] imports optional\r\n o Declaration[] declarations optional\r\n o Decorator[] decorators optional\r\n}\r\n\r\nconcept Models {\r\n o Model[] models\r\n}\r\n\r\nabstract concept ScalarDeclaration extends Declaration {\r\n}\r\n\r\nconcept BooleanScalar extends ScalarDeclaration {\r\n o Boolean defaultValue\r\n}\r\n\r\nconcept IntegerScalar extends ScalarDeclaration {\r\n o Integer defaultValue optional\r\n o IntegerDomainValidator validator optional\r\n}\r\n\r\nconcept LongScalar extends ScalarDeclaration {\r\n o Long defaultValue optional\r\n o LongDomainValidator validator optional\r\n}\r\n\r\nconcept DoubleScalar extends ScalarDeclaration {\r\n o Double defaultValue optional\r\n o DoubleDomainValidator validator optional\r\n}\r\n\r\nconcept StringScalar extends ScalarDeclaration {\r\n o String defaultValue optional\r\n o StringRegexValidator validator optional\r\n o StringLengthValidator lengthValidator optional\r\n}\r\n\r\nconcept DateTimeScalar extends ScalarDeclaration {\r\n o String defaultValue optional\r\n}\r\n";