Skip to main content
summaryrefslogtreecommitdiffstats
blob: 770afc56175f9a79a0a6ff410505ee1661285e89 (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
/**
 * Copyright (c) 2013, 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.Diagnostic;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.compare.utils.IEqualityHelper;
import org.eclipse.emf.ecore.EObject;

/**
 * <!-- begin-user-doc --> A representation of the model object '<em><b>Comparison</b></em>'. <!--
 * end-user-doc --> <!-- begin-model-doc --> This will act as the "root" of a comparison. It will reference
 * one match for every root of the input models, along with the differences detected for each of them. <!--
 * end-model-doc -->
 * <p>
 * The following features are supported:
 * <ul>
 * <li>{@link org.eclipse.emf.compare.Comparison#getMatchedResources <em>Matched Resources</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Comparison#getMatches <em>Matches</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Comparison#getConflicts <em>Conflicts</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Comparison#getEquivalences <em>Equivalences</em>}</li>
 * <li>{@link org.eclipse.emf.compare.Comparison#isThreeWay <em>Three Way</em>}</li>
 * </ul>
 * </p>
 * 
 * @see org.eclipse.emf.compare.ComparePackage#getComparison()
 * @model
 * @generated
 */
public interface Comparison 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>Matched Resources</b></em>' containment reference list. The list
	 * contents are of type {@link org.eclipse.emf.compare.MatchResource}. <!-- begin-user-doc --> <!--
	 * end-user-doc --> <!-- begin-model-doc --> This contains the mappings for each compared Resource. <!--
	 * end-model-doc -->
	 * 
	 * @return the value of the '<em>Matched Resources</em>' containment reference list.
	 * @see org.eclipse.emf.compare.ComparePackage#getComparison_MatchedResources()
	 * @model containment="true"
	 * @generated
	 */
	EList<MatchResource> getMatchedResources();

	/**
	 * Returns the value of the '<em><b>Matches</b></em>' containment reference list. The list contents are of
	 * type {@link org.eclipse.emf.compare.Match}. <!-- begin-user-doc --> <!-- end-user-doc --> <!--
	 * begin-model-doc --> This contains the match tree "mimicking" the input models' hierarchy. <!--
	 * end-model-doc -->
	 * 
	 * @return the value of the '<em>Matches</em>' containment reference list.
	 * @see org.eclipse.emf.compare.ComparePackage#getComparison_Matches()
	 * @model containment="true"
	 * @generated
	 */
	EList<Match> getMatches();

	/**
	 * Returns the value of the '<em><b>Conflicts</b></em>' containment reference list. The list contents are
	 * of type {@link org.eclipse.emf.compare.Conflict}. <!-- begin-user-doc --> <!-- end-user-doc --> <!--
	 * begin-model-doc --> If we detected any conflict during the comparison process, this will contain them.
	 * <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>Conflicts</em>' containment reference list.
	 * @see org.eclipse.emf.compare.ComparePackage#getComparison_Conflicts()
	 * @model containment="true"
	 * @generated
	 */
	EList<Conflict> getConflicts();

	/**
	 * Returns the value of the '<em><b>Equivalences</b></em>' containment reference list. The list contents
	 * are of type {@link org.eclipse.emf.compare.Equivalence}. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * <!-- begin-model-doc --> If we detected any equivalence between diffs during the comparison process,
	 * this will contain them. <!-- end-model-doc -->
	 * 
	 * @return the value of the '<em>Equivalences</em>' containment reference list.
	 * @see org.eclipse.emf.compare.ComparePackage#getComparison_Equivalences()
	 * @model containment="true"
	 * @generated
	 */
	EList<Equivalence> getEquivalences();

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> Returns all differences
	 * contained by this Comparison and its children. <!-- end-model-doc -->
	 * 
	 * @model kind="operation"
	 * @generated
	 */
	EList<Diff> getDifferences();

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> Returns all differences that
	 * reference the given EObject (for instance, all ReferenceChanges that reference the given EObject
	 * through the "value" EReference).
	 * <p>
	 * To get differences detected on the given EObject or one of its counterpart in left, right or origin,
	 * you should call the following code:
	 * 
	 * <pre>
	 * Match match = getMatch(eObject);
	 * if (match != null) {
	 * 	differences = match.getDifferences();
	 * }
	 * </pre>
	 * 
	 * @param element
	 *            The EObject for which we seek all related differences. <!-- end-model-doc -->
	 * @model
	 * @generated
	 */
	EList<Diff> getDifferences(EObject element);

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> Finds and return the Match for
	 * the given EObject.
	 * 
	 * @param element
	 *            The EObject for which we seek the match. <!-- end-model-doc -->
	 * @model
	 * @generated
	 */
	Match getMatch(EObject element);

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @model kind="operation" dataType="org.eclipse.emf.compare.IEqualityHelper"
	 * @generated
	 */
	IEqualityHelper getEqualityHelper();

	/**
	 * Returns the value of the '<em><b>Three Way</b></em>' attribute. <!-- begin-user-doc --> <!--
	 * end-user-doc -->
	 * 
	 * @return the value of the '<em>Three Way</em>' attribute.
	 * @see #setThreeWay(boolean)
	 * @see org.eclipse.emf.compare.ComparePackage#getComparison_ThreeWay()
	 * @model
	 * @generated
	 */
	boolean isThreeWay();

	/**
	 * Sets the value of the '{@link org.eclipse.emf.compare.Comparison#isThreeWay <em>Three Way</em>}'
	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param value
	 *            the new value of the '<em>Three Way</em>' attribute.
	 * @see #isThreeWay()
	 * @generated
	 */
	void setThreeWay(boolean value);

	/**
	 * Returns the value of the '<em><b>Diagnostic</b></em>' attribute. <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Diagnostic</em>' attribute isn't clear, there really should be more of a
	 * description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * 
	 * @return the value of the '<em>Diagnostic</em>' attribute.
	 * @see #setDiagnostic(Diagnostic)
	 * @see org.eclipse.emf.compare.ComparePackage#getComparison_Diagnostic()
	 * @model dataType="org.eclipse.emf.compare.Diagnostic" transient="true"
	 * @since 4.0
	 * @generated
	 */
	Diagnostic getDiagnostic();

	/**
	 * Sets the value of the '{@link org.eclipse.emf.compare.Comparison#getDiagnostic <em>Diagnostic</em>}'
	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param value
	 *            the new value of the '<em>Diagnostic</em>' attribute.
	 * @see #getDiagnostic()
	 * @since 4.0
	 * @generated
	 */
	void setDiagnostic(Diagnostic value);

} // Comparison

Back to the top