Skip to main content
summaryrefslogtreecommitdiffstats
blob: 78fa709e276568408f49f0ccc9c2f0c8ed98ea3c (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
/**
 * Copyright (c) 2012, 2014 Obeo.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     Obeo - initial API and implementation
 */
package org.eclipse.emf.compare;

import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;

/**
 * <!-- begin-user-doc --> A representation of the model object '<em><b>Diff</b></em>'. <!-- end-user-doc -->
 * <!-- begin-model-doc --> A DiffElement describes a difference related to the EObjects mapped by its parent
 * MatchElement. <!-- end-model-doc -->
 * <p>
 * The following features are supported:
 * <ul>
 * <li>{@link org.eclipse.emf.compare.Diff#getMatch <em>Match</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getRequires <em>Requires</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getRequiredBy <em>Required By</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getImplies <em>Implies</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getImpliedBy <em>Implied By</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getRefines <em>Refines</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getRefinedBy <em>Refined By</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getPrimeRefining <em>Prime Refining</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getKind <em>Kind</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getSource <em>Source</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getState <em>State</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getEquivalence <em>Equivalence</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Diff#getConflict <em>Conflict</em>}</li>
 * </ul>
 * </p>
 * 
 * @see org.eclipse.emf.compare.ComparePackage#getDiff()
 * @model
 * @generated
 */
public interface Diff extends EObject {
	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n    Obeo - initial API and implementation"; //$NON-NLS-1$

	/**
	 * Returns the value of the '<em><b>Match</b></em>' container reference. It is bidirectional and its
	 * opposite is '{@link org.eclipse.emf.compare.Match#getDifferences <em>Differences</em>}'. <!--
	 * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> Back-reference towards this
	 * difference's parent match, it points towards the mapping on which this difference has been detected.
	 * <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>Match</em>' container reference.
	 * @see #setMatch(Match)
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_Match()
	 * @see org.eclipse.emf.compare.Match#getDifferences
	 * @model opposite="differences" required="true" transient="false"
	 * @generated
	 */
	Match getMatch();

	/**
	 * Sets the value of the '{@link org.eclipse.emf.compare.Diff#getMatch <em>Match</em>}' container
	 * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param value
	 *            the new value of the '<em>Match</em>' container reference.
	 * @see #getMatch()
	 * @generated
	 */
	void setMatch(Match value);

	/**
	 * Returns the value of the '<em><b>Requires</b></em>' reference list. The list contents are of type
	 * {@link org.eclipse.emf.compare.Diff}. It is bidirectional and its opposite is '
	 * {@link org.eclipse.emf.compare.Diff#getRequiredBy <em>Required By</em>}'. <!-- begin-user-doc --> <!--
	 * end-user-doc --> <!-- begin-model-doc --> This will reference all differences that should be merged
	 * before this one. <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>Requires</em>' reference list.
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_Requires()
	 * @see org.eclipse.emf.compare.Diff#getRequiredBy
	 * @model opposite="requiredBy"
	 * @generated
	 */
	EList<Diff> getRequires();

	/**
	 * Returns the value of the '<em><b>Required By</b></em>' reference list. The list contents are of type
	 * {@link org.eclipse.emf.compare.Diff}. It is bidirectional and its opposite is '
	 * {@link org.eclipse.emf.compare.Diff#getRequires <em>Requires</em>}'. <!-- begin-user-doc --> <!--
	 * end-user-doc --> <!-- begin-model-doc --> This will reference all differences that depend on this one
	 * for their merging. <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>Required By</em>' reference list.
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_RequiredBy()
	 * @see org.eclipse.emf.compare.Diff#getRequires
	 * @model opposite="requires"
	 * @generated
	 */
	EList<Diff> getRequiredBy();

	/**
	 * Returns the value of the '<em><b>Implies</b></em>' reference list. The list contents are of type
	 * {@link org.eclipse.emf.compare.Diff}. It is bidirectional and its opposite is '
	 * {@link org.eclipse.emf.compare.Diff#getImpliedBy <em>Implied By</em>}'. <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Implies</em>' reference list isn't clear, there really should be more of a
	 * description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * 
	 * @return the value of the '<em>Implies</em>' reference list.
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_Implies()
	 * @see org.eclipse.emf.compare.Diff#getImpliedBy
	 * @model opposite="impliedBy"
	 * @since 4.0
	 * @generated
	 */
	EList<Diff> getImplies();

	/**
	 * Returns the value of the '<em><b>Implied By</b></em>' reference list. The list contents are of type
	 * {@link org.eclipse.emf.compare.Diff}. It is bidirectional and its opposite is '
	 * {@link org.eclipse.emf.compare.Diff#getImplies <em>Implies</em>}'. <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Implied By</em>' reference list isn't clear, there really should be more of
	 * a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * 
	 * @return the value of the '<em>Implied By</em>' reference list.
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_ImpliedBy()
	 * @see org.eclipse.emf.compare.Diff#getImplies
	 * @model opposite="implies"
	 * @since 4.0
	 * @generated
	 */
	EList<Diff> getImpliedBy();

	/**
	 * Returns the value of the '<em><b>Refines</b></em>' reference list. The list contents are of type
	 * {@link org.eclipse.emf.compare.Diff}. It is bidirectional and its opposite is '
	 * {@link org.eclipse.emf.compare.Diff#getRefinedBy <em>Refined By</em>}'. <!-- begin-user-doc --> <!--
	 * end-user-doc --> <!-- begin-model-doc --> This can be used to create "high level" differences to
	 * regroup one or more diffs in a common "container". For example, this could be used to regroup <i>n</i>
	 * technical differences into one single semantic difference, such as the differences
	 * "profile application added" and "reference to stereotype added" that can actually be regrouped under a
	 * single, more understandable "stereotype application added". <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>Refines</em>' reference list.
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_Refines()
	 * @see org.eclipse.emf.compare.Diff#getRefinedBy
	 * @model opposite="refinedBy"
	 * @generated
	 */
	EList<Diff> getRefines();

	/**
	 * Returns the value of the '<em><b>Refined By</b></em>' reference list. The list contents are of type
	 * {@link org.eclipse.emf.compare.Diff}. It is bidirectional and its opposite is '
	 * {@link org.eclipse.emf.compare.Diff#getRefines <em>Refines</em>}'. <!-- begin-user-doc --> <!--
	 * end-user-doc --> <!-- begin-model-doc --> This will reference the higher-level difference that shadows
	 * this one, if any. <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>Refined By</em>' reference list.
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_RefinedBy()
	 * @see org.eclipse.emf.compare.Diff#getRefines
	 * @model opposite="refines"
	 * @generated
	 */
	EList<Diff> getRefinedBy();

	/**
	 * Returns the value of the '<em><b>Prime Refining</b></em>' reference. <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Prime Refining</em>' reference isn't clear, there really should be more of a
	 * description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * 
	 * @return the value of the '<em>Prime Refining</em>' reference.
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_PrimeRefining()
	 * @model transient="true" changeable="false" derived="true"
	 * @since 4.0
	 * @generated
	 */
	Diff getPrimeRefining();

	/**
	 * Returns the value of the '<em><b>Kind</b></em>' attribute. The literals are from the enumeration
	 * {@link org.eclipse.emf.compare.DifferenceKind}. <!-- begin-user-doc --> <!-- end-user-doc --> <!--
	 * begin-model-doc --> Describes the kind of this difference, whether it is an addition, deletion, change,
	 * or move. <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>Kind</em>' attribute.
	 * @see org.eclipse.emf.compare.DifferenceKind
	 * @see #setKind(DifferenceKind)
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_Kind()
	 * @model required="true"
	 * @generated
	 */
	DifferenceKind getKind();

	/**
	 * Sets the value of the '{@link org.eclipse.emf.compare.Diff#getKind <em>Kind</em>}' attribute. <!--
	 * begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param value
	 *            the new value of the '<em>Kind</em>' attribute.
	 * @see org.eclipse.emf.compare.DifferenceKind
	 * @see #getKind()
	 * @generated
	 */
	void setKind(DifferenceKind value);

	/**
	 * Returns the value of the '<em><b>Conflict</b></em>' reference. It is bidirectional and its opposite is
	 * '{@link org.eclipse.emf.compare.Conflict#getDifferences <em>Differences</em>}'. <!-- begin-user-doc -->
	 * <!-- end-user-doc --> <!-- begin-model-doc --> If this element is in conflict with one (or more) other
	 * differences, this will reference the Conflict association. <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>Conflict</em>' reference.
	 * @see #setConflict(Conflict)
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_Conflict()
	 * @see org.eclipse.emf.compare.Conflict#getDifferences
	 * @model opposite="differences"
	 * @generated
	 */
	Conflict getConflict();

	/**
	 * Sets the value of the '{@link org.eclipse.emf.compare.Diff#getConflict <em>Conflict</em>}' reference.
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param value
	 *            the new value of the '<em>Conflict</em>' reference.
	 * @see #getConflict()
	 * @generated
	 */
	void setConflict(Conflict value);

	/**
	 * Returns the value of the '<em><b>Source</b></em>' attribute. The literals are from the enumeration
	 * {@link org.eclipse.emf.compare.DifferenceSource}. <!-- begin-user-doc --> <!-- end-user-doc --> <!--
	 * begin-model-doc --> Returns the source of this diff, either one of DifferenceSource.LEFT (for two-way
	 * comparisons or differences detected between the left and origin elements) or DifferenceSource.RIGHT
	 * (for differences between the right and origin elements). <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>Source</em>' attribute.
	 * @see org.eclipse.emf.compare.DifferenceSource
	 * @see #setSource(DifferenceSource)
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_Source()
	 * @model required="true"
	 * @generated
	 */
	DifferenceSource getSource();

	/**
	 * Sets the value of the '{@link org.eclipse.emf.compare.Diff#getSource <em>Source</em>}' attribute. <!--
	 * begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param value
	 *            the new value of the '<em>Source</em>' attribute.
	 * @see org.eclipse.emf.compare.DifferenceSource
	 * @see #getSource()
	 * @generated
	 */
	void setSource(DifferenceSource value);

	/**
	 * Returns the value of the '<em><b>State</b></em>' attribute. The literals are from the enumeration
	 * {@link org.eclipse.emf.compare.DifferenceState}. <!-- begin-user-doc --> <!-- end-user-doc --> <!--
	 * begin-model-doc --> Returns the current state of this diff, either one of DifferenceState.UNRESOLVED
	 * (Diff is still in its initial state), DifferenceState.MERGED when the Diff has been merged or
	 * DifferenceState.DISCARDED if the user chose to ignore this difference. <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>State</em>' attribute.
	 * @see org.eclipse.emf.compare.DifferenceState
	 * @see #setState(DifferenceState)
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_State()
	 * @model required="true"
	 * @generated
	 */
	DifferenceState getState();

	/**
	 * Sets the value of the '{@link org.eclipse.emf.compare.Diff#getState <em>State</em>}' attribute. <!--
	 * begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param value
	 *            the new value of the '<em>State</em>' attribute.
	 * @see org.eclipse.emf.compare.DifferenceState
	 * @see #getState()
	 * @generated
	 */
	void setState(DifferenceState value);

	/**
	 * Returns the value of the '<em><b>Equivalence</b></em>' reference. It is bidirectional and its opposite
	 * is '{@link org.eclipse.emf.compare.Equivalence#getDifferences <em>Differences</em>}'. <!--
	 * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> If this diff is equivalent to
	 * another, we will reference the equivalence from here. For example, if a reference has an eOpposite, we
	 * will detect one diff for each side of the bidirectional reference, yet merging one of these diffs is
	 * enough. We consider them equivalent. <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>Equivalence</em>' reference.
	 * @see #setEquivalence(Equivalence)
	 * @see org.eclipse.emf.compare.ComparePackage#getDiff_Equivalence()
	 * @see org.eclipse.emf.compare.Equivalence#getDifferences
	 * @model opposite="differences"
	 * @generated
	 */
	Equivalence getEquivalence();

	/**
	 * Sets the value of the '{@link org.eclipse.emf.compare.Diff#getEquivalence <em>Equivalence</em>}'
	 * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param value
	 *            the new value of the '<em>Equivalence</em>' reference.
	 * @see #getEquivalence()
	 * @generated
	 */
	void setEquivalence(Equivalence value);

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> This will merge the diff from
	 * left to right. <!-- end-model-doc -->
	 * 
	 * @model
	 * @generated
	 */
	@Deprecated
	void copyRightToLeft();

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> This will merge the diff from
	 * right to left. <!-- end-model-doc -->
	 * 
	 * @model
	 * @generated
	 */
	@Deprecated
	void copyLeftToRight();

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> This will remove the diff from
	 * the model, effectively "forgetting" about it. <!-- end-model-doc -->
	 * 
	 * @model
	 * @generated
	 */
	void discard();

} // Diff

Back to the top