From 9459040970e73aae1b2828e20175c18b633abe03 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Tue, 17 Dec 2024 18:32:19 +0800 Subject: [PATCH] feat: (WIP) sample UML diagram and model descriptions (ported from CalConnect/PUBLIC_DRAFTS#29) --- sources/cc-11001.adoc | 5 +-- sources/draft-apthorp-ical-tasks.adoc | 6 ++-- sources/draft-ietf-calext-ical-tasks.adoc | 8 ++--- sources/model/calendar.lutaml | 20 ++++++++++++ sources/model/event.lutaml | 39 +++++++++++++++++++++++ sources/sections/70-model.adoc | 23 +++++++++++++ sources/views/calendar_view.lutaml | 13 ++++++++ 7 files changed, 105 insertions(+), 9 deletions(-) create mode 100644 sources/model/calendar.lutaml create mode 100644 sources/model/event.lutaml create mode 100644 sources/sections/70-model.adoc create mode 100644 sources/views/calendar_view.lutaml diff --git a/sources/cc-11001.adoc b/sources/cc-11001.adoc index 441529b..31f3c57 100644 --- a/sources/cc-11001.adoc +++ b/sources/cc-11001.adoc @@ -13,7 +13,7 @@ :city: Bonn :code: 53113 :country: Germany -:contibutor-uri: http://www.dhl.com +:contributor-uri: http://www.dhl.com :email: adrian.apthorp@dhl.com :fullname_2: Michael Douglass :lastname_2: Douglass @@ -24,7 +24,7 @@ :state_2: NY :code_2: 12180 :country_2: United States of America -:contibutor-uri_2: https://bcs.com/ +:contributor-uri_2: https://bcs.com/ :email_2: mdouglass@bedework.com :mn-document-class: cc :mn-output-extensions: xml,html,pdf,rxl @@ -69,6 +69,7 @@ include::sections/54-new-components.adoc[] include::sections/60-caldav.adoc[] +include::sections/70-model.adoc[] include::sections/100-security.adoc[] diff --git a/sources/draft-apthorp-ical-tasks.adoc b/sources/draft-apthorp-ical-tasks.adoc index d848889..a5896fd 100644 --- a/sources/draft-apthorp-ical-tasks.adoc +++ b/sources/draft-apthorp-ical-tasks.adoc @@ -19,7 +19,7 @@ :city: Bonn :code: 53113 :country: Germany -:contibutor-uri: http://www.dhl.com +:contributor-uri: http://www.dhl.com :email: aapthorp@theiet.org :fullname_2: Cyrus Daboo :lastname_2: Daboo @@ -30,7 +30,7 @@ :state_2: CA :code_2: 95014 :country_2: United States of America -:contibutor-uri_2: https://www.apple.com +:contributor-uri_2: https://www.apple.com :email_2: cyrus@daboo.name :fullname_3: Michael Douglass :lastname_3: Douglass @@ -41,7 +41,7 @@ :state_3: NY :code_3: 12180 :country_3: United States of America -:contibutor-uri_3: https://bcs.com/ +:contributor-uri_3: https://bcs.com/ :email_3: mdouglass@bedework.com :docfile: draft-apthorp-ical-tasks.adoc :mn-document-class: ietf diff --git a/sources/draft-ietf-calext-ical-tasks.adoc b/sources/draft-ietf-calext-ical-tasks.adoc index ce805ac..3b49c11 100644 --- a/sources/draft-ietf-calext-ical-tasks.adoc +++ b/sources/draft-ietf-calext-ical-tasks.adoc @@ -17,7 +17,7 @@ :city: Bonn :code: 53113 :country: Germany -:contibutor-uri: http://www.dhl.com +:contributor-uri: http://www.dhl.com :email: adrian.apthorp@dhl.com :fullname_2: Michael Douglass :lastname_2: Douglass @@ -28,12 +28,11 @@ :state_2: NY :code_2: 12180 :country_2: United States of America -:contibutor-uri_2: https://bcs.com/ +:contributor-uri_2: https://bcs.com/ :email_2: mdouglass@bedework.com :mn-document-class: ietf -:mn-output-extensions: xml,txt,html +:mn-output-extensions: rfc,xml,txt,html :workgroup: calext -:technical-committee: TC Calendar include::sections/00-abstract.adoc[] @@ -73,6 +72,7 @@ include::sections/54-new-components.adoc[] include::sections/60-caldav.adoc[] +include::sections/70-model.adoc[] include::sections/100-security.adoc[] diff --git a/sources/model/calendar.lutaml b/sources/model/calendar.lutaml new file mode 100644 index 0000000..6335cf1 --- /dev/null +++ b/sources/model/calendar.lutaml @@ -0,0 +1,20 @@ +class Calendar { + definition { + A calendar. + } + + identifier: String[1] { + definition { + Unique identifier of the calendar. + + [example] + `calendar:1234` is a sample of a unique calendar identifier. + } + } + + events: Event[0..*] { + definition { + Events. + } + } +} diff --git a/sources/model/event.lutaml b/sources/model/event.lutaml new file mode 100644 index 0000000..6d4ca3b --- /dev/null +++ b/sources/model/event.lutaml @@ -0,0 +1,39 @@ +class Event { + definition { + An event. + } + + identifier: String[1] { + definition { + Unique identifier of the event. + + [example] + `event:1234` is a sample of a unique event identifier. + } + } + + startTime: DateTime[1] { + definition { + Start time of the event. + } + } + + endTime: DateTime[1] { + definition { + End time of the event. + } + } + + location: String[1] { + definition { + Location of the event. + } + } + + description: String[1] { + definition { + Description of the event. + } + } + +} diff --git a/sources/sections/70-model.adoc b/sources/sections/70-model.adoc new file mode 100644 index 0000000..b092c13 --- /dev/null +++ b/sources/sections/70-model.adoc @@ -0,0 +1,23 @@ + +== Model + +=== General + +lutaml_diagram::views/calendar_view.lutaml[] + + +// Calendar + +[lutaml_uml_class,views/calendar_view.lutaml,Calendar] + +// Event + +[lutaml_uml_class,views/calendar_view.lutaml,Event] + + +== Class attribute tables + +[lutaml_uml_attributes_table,views/calendar_view.lutaml,Calendar] + +[lutaml_uml_attributes_table,views/calendar_view.lutaml,Event] + diff --git a/sources/views/calendar_view.lutaml b/sources/views/calendar_view.lutaml new file mode 100644 index 0000000..3126f22 --- /dev/null +++ b/sources/views/calendar_view.lutaml @@ -0,0 +1,13 @@ +diagram CalendarView { + title 'Calendar and its models' + caption 'Calendar and its models' + + include ../model/calendar.lutaml + include ../model/event.lutaml + + association { + owner Calendar + member Event + owner_type association + } +}