-
Notifications
You must be signed in to change notification settings - Fork 2
/
animad.barrakuda
119 lines (99 loc) · 3.94 KB
/
animad.barrakuda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
domain animad package de.muenchen version 0.1;
serviceModel administration package de.muenchen.animad.admin version 0.1 {
// Lists (enumerations)
// Contains static data that does not change
customListType animals ["Elephant" "Giraffe" "Penguin" "Barrakuda"];
customListType gender ["male" "female"];
customListType features ["cleaning" "feeding" "breeding" "paperwork" "taxes"];
customLogicType bool;
// Text Patterns
// here we need a simple text type with a mininmal length of 2 and a maximum of 30
customTextType textMin2Max30 minLength=2 maxLength=30;
// Numbers
// A simple floating point number
customNumberType double pointNumber;
customNumberType int minValue=0;
// Dates
// We need one date datatype for dates that lie in the past
// and one for dates in combination with a time
customTimeType pastDate inThePast date;
customTimeType event dateAndTime;
customTimeType daytime time;
entity enclosure {
name textMin2Max30 mainFeature searchable "A123";
cleaningTime daytime mainFeature "15:15:15";
animalList oneToMany animal;
}
entity animal {
name textMin2Max30 mainFeature searchable "Paul";
species animals mainFeature searchable "Elephant";
birthday pastDate mainFeature "01.01.1990";
gender gender "male";
weight double "600.0";
keeperList manyToMany keeper;
alive bool "true";
}
entity keeper {
firstName textMin2Max30 mainFeature searchable "Hans";
lastName textMin2Max30 mainFeature searchable "Dampf";
employmentDate pastDate mainFeature searchable "01.01.2012";
skill manyToMany features "cleaning";
birthday pastDate "01.01.1990";
salary int "1500";
}
businessAction createAppointment {
purpose "Create an appointment at the veterinarian for an animal";
given species animals;
given animalName textMin2Max30;
given reasonForAppointment textMin2Max30;
then event;
}
}
guiModel keeperinterface package de.muenchen.animad.admin version 0.1 {
mainview animals;
view animals appearsInMenu {
component animals for administration.animal type Table {
button detail navigatesTo animalDetailView;
}
component createAnimal for administration.animal type CreateForm {
button save navigatesTo animals;
}
button CreateAppointment navigatesTo appointmentView;
}
view keepers appearsInMenu {
component keepers for administration.keeper type Table {}
component createKeeper for administration.keeper type CreateForm {
button save navigatesTo keepers;
}
}
view enclosures appearsInMenu {
component enclosures for administration.enclosure type Table {
button detail navigatesTo enclosureDetailView;
}
component createEnclosure for administration.enclosure type CreateForm {
button save navigatesTo enclosures;
}
}
view animalDetailView {
component readAnimal for administration.animal type ReadWriteForm {
}
relComponent animalsKeeper for administration.animal.keeperList type ReadEditComponent {
button delete navigatesTo animalDetailView;
}
relComponent animalsKeeperAdder for administration.animal.keeperList type AddTable {
}
}
view enclosureDetailView {
component readEnclosure for administration.enclosure type ReadWriteForm {
}
relComponent enclosureAnimals for administration.enclosure.animalList type ReadEditComponent {
button delete navigatesTo animalDetailView;
}
relComponent enclosureAnimalsAdder for administration.enclosure.animalList type AddTable {
}
}
view appointmentView {
component selectAnimal for administration.animal type Table;
button Send;
}
}