lutaml / lutaml-uml

UML module for LutaML
2 stars 2 forks source link

UML syntax: DataType #10

Closed ronaldtse closed 3 years ago

ronaldtse commented 4 years ago
Screen Shot 2020-08-03 at 9 25 49 PM Screen Shot 2020-08-03 at 9 25 59 PM

e.g.

data_type "Banking Information" {
  "art code"
  "CCT Number"
}

primitive Integer

enum Address {
  Mr.
  Mrs.
}

Thoughts?

Originally from: https://www.slideshare.net/iscrquinter/uml-omg-fundamental-certification-2

w00lf commented 4 years ago

@ronaldtse lets also add attribute name to syntax, like this:

data_type "Banking Information" {
  attribute "art code"
  attribute "CCT Number"
}

primitive Integer

enum Address {
  attribute "Mr."
  attribute "Mrs."
}
ronaldtse commented 4 years ago

I think we can add "attribute" for easier parsing for data type, but let's allow a shorthand notation.

For enum, those are not "attributes" but data instances. Calling them attributes is misleading. We can use entry or something like that. But still I prefer having a shorthand notation.

w00lf commented 4 years ago

I think we can add "attribute" for easier parsing for data type, but let's allow a shorthand notation.

For enum, those are not "attributes" but data instances. Calling them attributes is misleading. We can use entry or something like that. But still I prefer having a shorthand notation.

Ok, got you, lets introduce short notation: when entry for enum or class does not equal to predefined names(generalizes| aggregation|method) will treat as a field for class or entry for enum?

ronaldtse commented 4 years ago

Yeah, e.g.:

class A {
  my_attr1
  attribute my_attr2
}

enum A {
  my_val1
  entry my_val2
}

?

w00lf commented 3 years ago

Done in #49