-
Notifications
You must be signed in to change notification settings - Fork 2
/
incorrect_jolie_program.ol
99 lines (90 loc) · 1.71 KB
/
incorrect_jolie_program.ol
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
///@beginCtx(BookingManagement)
///@aggregate
///@entity
type ParkingSpaceBooking {
///@identifier
bookingID: long
///@part
parkingSpace: ParkingSpace
///@part
driver: Driver
///@part
timeSlot: TimeSlot
priceInEuro: double
}
/*type priceInDollars_type {
self?: ParkingSpaceBooking
}*/
interface ParkingSpaceBooking_interface {
RequestResponse:
priceInDollars(priceInDollars_type)(double)
}
///@entity
type ParkingSpace {
///@identifier
id: long
ownerId: long
name: string
description: string
location: Location
parkingSpaceCount: int
availability: TimeSlots
priceInEuroPerHour: double
priceInEuroPerKwh: double
chargerSpeed: ChargerSpeed
plugType: string
activated: bool
blocked: bool
offered: bool
createdDate: string
lastModifiedDate: string
}
///@valueObject
type Location {
latitude: double
longitude: double
}
type TimeSlots {
s*: TimeSlot
}
type ChargerSpeed {
literal: string(enum(["FAST", "NORMAL"]))
}
///@entity
type Driver {
///@identifier
id: string
}
///@valueObject
type TimeSlot {
start: string
end: string
}
///@factory
type create_type {
d: Driver
p: ParkingSpace
t: TimeSlot
priceInEuro: double
}
interface ParkingSpaceBookingFactory_interface {
RequestResponse:
create(create_type)(ParkingSpaceBooking)
}
///@specification
type isExpired_type {
b: ParkingSpaceBooking
}
interface BookingExpiration_interface {
RequestResponse:
///@validator
isExpired(isExpired_type)(bool)
}
///@valueObject
type ParkingSpaceBookingVO {
driver: string
parkingSpace: long
timeSlot: TimeSlot
priceInEuro: double
}
///@endCtx