From ed0bc443004379cfcd03379925857644612628e5 Mon Sep 17 00:00:00 2001 From: jeromesimeon Date: Wed, 29 Sep 2021 11:09:24 -0400 Subject: [PATCH] fix(concerto) Adjustments to new Concerto metamodel Signed-off-by: jeromesimeon --- src/concerto/metamodel@0.3.0.cto | 46 +++++++++----------------------- 1 file changed, 12 insertions(+), 34 deletions(-) diff --git a/src/concerto/metamodel@0.3.0.cto b/src/concerto/metamodel@0.3.0.cto index 12e26f6..fbe4bd5 100644 --- a/src/concerto/metamodel@0.3.0.cto +++ b/src/concerto/metamodel@0.3.0.cto @@ -18,10 +18,8 @@ namespace concerto.metamodel * The metadmodel for Concerto files */ concept TypeIdentifier { - @FormEditor("selectOptions", "types") - o String name default="Concept" - @FormEditor( "hide", true) - o String fullyQualifiedName optional + o String name + o String namespace optional } abstract concept DecoratorLiteral { @@ -56,22 +54,20 @@ concept IdentifiedBy extends Identified { o String name } -concept EnumDeclaration { - @FormEditor("title", "Enum Name") - o String name default="EnumName" regex=/^(?!null|true|false)(\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 +abstract concept Declaration {} + +concept EnumDeclaration extends Declaration { + o String name regex=/^(?!null|true|false)(\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 o EnumProperty[] properties } concept EnumProperty { - o String name default="propertyName" regex=/^(?!null|true|false)(\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 - @FormEditor("hide", true) + o String name regex=/^(?!null|true|false)(\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 o Decorator[] decorators optional } -concept ConceptDeclaration { - @FormEditor("title", "Concept Name") - o String name default="ConceptName" regex=/^(?!null|true|false)(\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 - @FormEditor("hide", true) +concept ConceptDeclaration extends Declaration { + o String name regex=/^(?!null|true|false)(\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 o Decorator[] decorators optional o Boolean isAbstract default=false o Identified identified optional @@ -91,31 +87,23 @@ concept TransactionDeclaration extends ConceptDeclaration { concept EventDeclaration extends ConceptDeclaration { } -@FormEditor("defaultSubconcept","concerto.metamodel.StringProperty") abstract concept Property { - o String name default="propertyName" regex=/^(?!null|true|false)(\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 - @FormEditor("title", "List") + o String name regex=/^(?!null|true|false)(\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 o Boolean isArray default=false - @FormEditor("title", "Optional") o Boolean isOptional default=false - @FormEditor("hide", true) o Decorator[] decorators optional } concept RelationshipProperty extends Property { - @FormEditor("title", "Type Name", "selectOptions", "types") o TypeIdentifier type } concept ObjectProperty extends Property { - @FormEditor("hide", true) o String defaultValue optional - @FormEditor("title", "Type Name", "selectOptions", "types") o TypeIdentifier type } concept BooleanProperty extends Property { - @FormEditor("hide", true) o Boolean defaultValue optional } @@ -123,9 +111,7 @@ concept DateTimeProperty extends Property { } concept StringProperty extends Property { - @FormEditor("hide", true) o String defaultValue optional - @FormEditor("hide", true) o StringRegexValidator validator optional } @@ -144,9 +130,7 @@ concept DoubleDomainValidator { } concept IntegerProperty extends Property { - @FormEditor("hide", true) o Integer defaultValue optional - @FormEditor("hide", true) o IntegerDomainValidator validator optional } @@ -156,9 +140,7 @@ concept IntegerDomainValidator { } concept LongProperty extends Property { - @FormEditor("hide", true) o Long defaultValue optional - @FormEditor("hide", true) o LongDomainValidator validator optional } @@ -180,11 +162,7 @@ concept ImportType extends Import { } concept ModelFile { - o String namespace default="my.namespace" - @FormEditor("hide", true) + o String namespace o Import[] imports optional - @FormEditor("title", "Enums") - o EnumDeclaration[] enums optional - @FormEditor("title", "Concepts") - o ConceptDeclaration[] concepts optional + o Declaration[] declarations optional }