-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoclRules.json
62 lines (62 loc) · 3.4 KB
/
oclRules.json
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
[
{
"name": "CmOtherTypeMustBeDefined",
"errorMessage": "OtherType must be defined when Type = other",
"expression": "context ContactMethod inv CmOtherTypeMustBeDefined: self.Type = ContactMethodType::other implies not self.OtherType.oclIsUndefined()"
},
{
"name": "ViOtherTypeMustBeDefined",
"errorMessage": "OtherType must be defined when Type = other",
"expression": "context VoterId inv ViOtherTypeMustBeDefined: self.Type = VoterIdType::other implies not self.OtherType.oclIsUndefined()"
},
{
"name": "EiOtherTypeMustBeDefined",
"errorMessage": "OtherType must be defined when Type = other",
"expression": "context ExternalIdentifier inv EiOtherTypeMustBeDefined: self.Type = IdentifierType::other implies not self.OtherType.oclIsUndefined()"
},
{
"name": "NMustDefineOne",
"errorMessage": "Either FullName or component parts must be defined.",
"expression": "context Name inv NMustDefineOne: self.FirstName.oclIsUndefined() and self.LastName.oclIsUndefined() and self.MiddleName->size() = 0 and self.Prefix.oclIsUndefined() and self.Suffix.oclIsUndefined() implies not self.FullName.oclIsUndefined()"
},
{
"name": "VcOtherTypeMustBeDefined",
"errorMessage": "OtherType must be defined when Type = other",
"expression": "context VoterClassification inv VcOtherTypeMustBeDefined: self.Type = VoterClassificationType::other implies not self.OtherType.oclIsUndefined()"
},
{
"name": "ViMustChooseOne",
"errorMessage": "FileValue or StringValue must be defined (but not both)",
"expression": "context VoterId inv ViMustChooseOne: not self.StringValue.oclIsUndefined() xor not self.FileValue.oclIsUndefined()"
},
{
"name": "AiMustChooseOne",
"errorMessage": "FileValue or StringValue must be defined (but not both)",
"expression": "context AdditionalInfo inv AiMustChooseOne: not self.StringValue.oclIsUndefined() xor not self.FileValue.oclIsUndefined()"
},
{
"name": "SOtherSourceMustBeDefined",
"errorMessage": "OtherType must be defined when Type = other",
"expression": "context Signature inv SOtherSourceMustBeDefined: self.Type = SignatureType::other implies not self.OtherType.oclIsUndefined()"
},
{
"name": "OtherTypeMustBeDefinedTransitive",
"errorMessage": "When OtherType is defined, Type must be other",
"expression": "context VoterClassification inv OtherTypeMustBeDefinedTransitive: not self.OtherType.oclIsUndefined() implies self.Type = VoterClassificationType::other"
},
{
"name": "StartDateBeforeEndDate",
"errorMessage": "The start date must occur before or at the end date",
"expression": "context Election inv StartDateBeforeEndDate: StartDate <= EndDate"
},
{
"name": "RpOtherTypeMustBeDefined",
"errorMessage": "OtherType must be defined when Type = other",
"expression": "context RequestProxy inv RpOtherTypeMustBeDefined: self.Type = RequestProxyType::other implies not self.OtherType.oclIsUndefined()"
},
{
"name": "BallotRequestRequired",
"errorMessage": "Ballot Request must have BallotRequest obj",
"expression": "context VoterRecordsRequest inv BallotRequestRequired: self.Type->exists(c | c = 'ballot-request') implies not self.BallotRequest.oclIsUndefined()"
}
]