Skip to main content
summaryrefslogtreecommitdiffstats
blob: 31b645374e5b2d4a1616199fa743b060ebda2329 (plain) (blame)
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
/*****************************************************************************
* Copyright (c)2020 CEA LIST, Committer Name, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* CEA LIST - Initial API and implementation
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr 
* Gabriel Pedroza (CEA LIST) gabriel.pedroza@cea.fr 
*****************************************************************************/
package org.eclipse.papyrus.pdp4eng.req.metareq

import org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.Fairly 
import org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.Lawful
import org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.ProcessPrinciple
import org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.Transparency
import org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.PurposeLimitation
import org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.Accuracy
import org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.StorageLimitation
import org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.SecuritySafety
import org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.DataMinimisation
import org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.LawfulByConsent
import org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.LawfulByContract

class GDPRRequirements {
	/**
	 * get Description for lawfull requirements from rticle5.1
	 */
	 def getDescriptionForLawfulRequirement(Lawful lawful){
	 	'''IF process "lawful.process.base_NamedElement.name" processes "getPersonalDataFromProcess(lawful)" of "lawful.dataSubject.base_NamedElement.name" THEN the Process "lawful.process.base_NamedElement.name" shall be lawfull.'''
	 }
	 
	 
	 /**
	 * get Description for fairly requirements from article5.1
	 */
	 def getDescriptionForFairlyRequirement(Fairly fairly){
	 	
	 	'''IF process "fairly.process.base_NamedElement.name" processes "getPersonalDataFromProcess(fairly)" of "fairly.dataSubject.base_NamedElement.name" THEN the Process "fairly.process.base_NamedElement.name" shall be fairly.'''
	 }
	 /**
	 * get Description for transparent requirements from article5.1
	 */
	 def getDescriptionForTransparentRequirement(Transparency transparency){
	 	
	 	'''IF process "transparency.process.base_NamedElement.name" processes "getPersonalDataFromProcess(transparency)" of "transparency.dataSubject.base_NamedElement.name" THEN the Process "transparency.process.base_NamedElement.name" shall be transparent.'''
	 }
	 /**
	 * get Description for transparent requirements from article5.1.b
	 */
	 def getDescriptionForPurposeLimitation(PurposeLimitation purposeLimitation){
	 	
	 	'''The purpose "purposeLimitation.purpose.base_NamedElement.name" of the PersonalData "purposeLimitation.personalData.base_NamedElement.name" shall be specified, explicit, legimate, and compatible.'''
	 }
	 
	 /**
	 * get Description for transparent requirements from article5.1.c
	 */
	 def getDescriptionForDataMinimisation(DataMinimisation dataMinimisation){
	 	
	 	'''Personal Data "dataMinimisation.personalData.base_NamedElement.name" shall be adequate, relevant and limited to what is necessary in relation to the purpose "dataMinimisation.purpose.base_NamedElement.name" for which they are processed'''
	 }
	 /**
	 * get Description for transparent requirements from article5.1.d
	 */
	 def getDescriptionForAccurate(Accuracy accuracy){
	 	'''Personal Data "accuracy.personalData.base_NamedElement.name" shall be accurate and, where necessary, kept up to date. If personal data "accuracy.personalData.base_NamedElement.name" are inaccurate, having regard to the purposes "accuracy.purpose.base_NamedElement.name" for which they are processed, it shall  erased or rectified without delay.'''
	 }
	 /**
	 * get Description for transparent requirements from article5.1.e
	 */
	 def getDescriptionForStorageLimitation(StorageLimitation storageLimitation){
	 	'''Personal Data "storageLimitation.personalData.base_NamedElement.name" shall be kept in a form which permits identification of data subject "storageLimitation.personalData.relatedTo.get(0).base_NamedElement.name" for no longer than is necessary for the purpose "storageLimitation.purpose.base_NamedElement.name" for which the personal data are processed'''
	 	
	 }
	 
	  /**
	 * get Description for transparent requirements from article5.1.e
	 */
	 def getDescriptionForSecuritySafety(SecuritySafety securitySafety){
	 	'''Personal Data getPersonalDataFromProcess(securitySafety)  shall be processed in a manner that ensures appropriate security. '''
	 }
	 
	 /**
	 * get Description for lawfullByConsent requirements from article6.1.a
	 */
	 def getDescriptionForLawfulByConsent(LawfulByConsent lawfulByConsent){
	 	'''Processing "lawfulByConsent.process.base_NamedElement.name" shall be lawful if the data subject "lawfulByConsent.dataSubject.base_NamedElement.name" has given consent "lawfulByConsent.consent.base_NamedElement.name" to the processing of his or her personal data :"getPersonalDataFromProcess(lawfulByConsent)" for one or more specific purposes lawfulByConsent.process.contributedTo.base_NamedElement.name'''
	}
	
	 /**
	 * get Description for lawfullByContract requirements from article6.1.b
	 */
	 def getDescriptionForLawfulByConsent(LawfulByContract lawfulByContract){
	 	'''Processing "lawfulByContract.process.base_NamedElement.name" shall be lawful if processing "lawfulByContract.process.base_NamedElement.name" is necessary for the performance of the contract:"lawfulByContract.contract.base_NamedElement" to which the data subject:"lawfulByContract.dataSubject.base_NamedElement.name" is party or in order to take steps at the request of the data subject prior to entering into a contract'''
	}
	 
	 def getPersonalDataFromProcess(ProcessPrinciple ProcessPrinciple){
		var result = ""
	 	
	 	for (element : ProcessPrinciple.personalData) {
	 		result=result+ element.base_NamedElement.name+" ";
	 	}
	 	return result
	 }
	 
	 
}

Back to the top