Skip to content

Commit

Permalink
fix(concerto) Adjustments to new Concerto metamodel
Browse files Browse the repository at this point in the history
Signed-off-by: jeromesimeon <[email protected]>
  • Loading branch information
jeromesimeon committed Sep 29, 2021
1 parent 411f462 commit ed0bc44
Showing 1 changed file with 12 additions and 34 deletions.
46 changes: 12 additions & 34 deletions src/concerto/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand All @@ -91,41 +87,31 @@ 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
}

concept DateTimeProperty extends Property {
}

concept StringProperty extends Property {
@FormEditor("hide", true)
o String defaultValue optional
@FormEditor("hide", true)
o StringRegexValidator validator optional
}

Expand All @@ -144,9 +130,7 @@ concept DoubleDomainValidator {
}

concept IntegerProperty extends Property {
@FormEditor("hide", true)
o Integer defaultValue optional
@FormEditor("hide", true)
o IntegerDomainValidator validator optional
}

Expand All @@ -156,9 +140,7 @@ concept IntegerDomainValidator {
}

concept LongProperty extends Property {
@FormEditor("hide", true)
o Long defaultValue optional
@FormEditor("hide", true)
o LongDomainValidator validator optional
}

Expand All @@ -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
}

0 comments on commit ed0bc44

Please sign in to comment.