KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > mapping > Mapping


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: Mapping.java,v 1.3 2005/06/08 06:21:43 nickb Exp $
16  */

17 package org.eclipse.emf.mapping;
18
19
20 import java.util.Collection JavaDoc;
21
22 import org.eclipse.emf.common.util.EList;
23 import org.eclipse.emf.common.util.TreeIterator;
24 import org.eclipse.emf.ecore.EObject;
25
26
27 /**
28  * <!-- begin-user-doc -->
29  * A representation of the model object '<em><b>Mapping</b></em>'.
30  * <!-- end-user-doc -->
31  *
32  * <p>
33  * The following features are supported:
34  * <ul>
35  * <li>{@link org.eclipse.emf.mapping.Mapping#getHelper <em>Helper</em>}</li>
36  * <li>{@link org.eclipse.emf.mapping.Mapping#getNested <em>Nested</em>}</li>
37  * <li>{@link org.eclipse.emf.mapping.Mapping#getNestedIn <em>Nested In</em>}</li>
38  * <li>{@link org.eclipse.emf.mapping.Mapping#getInputs <em>Inputs</em>}</li>
39  * <li>{@link org.eclipse.emf.mapping.Mapping#getOutputs <em>Outputs</em>}</li>
40  * <li>{@link org.eclipse.emf.mapping.Mapping#getTypeMapping <em>Type Mapping</em>}</li>
41  * </ul>
42  * </p>
43  *
44  * @see org.eclipse.emf.mapping.MappingPackage#getMapping()
45  * @model
46  * @generated
47  */

48 public interface Mapping extends EObject
49 {
50   /**
51    * Returns the value of the '<em><b>Helper</b></em>' containment reference.
52    * It is bidirectional and its opposite is '{@link org.eclipse.emf.mapping.MappingHelper#getMapper <em>Mapper</em>}'.
53    * <!-- begin-user-doc -->
54    * <p>
55    * If the meaning of the '<em>Helper</em>' containment reference isn't clear,
56    * there really should be more of a description here...
57    * </p>
58    * <!-- end-user-doc -->
59    * @return the value of the '<em>Helper</em>' containment reference.
60    * @see #setHelper(MappingHelper)
61    * @see org.eclipse.emf.mapping.MappingPackage#getMapping_Helper()
62    * @see org.eclipse.emf.mapping.MappingHelper#getMapper
63    * @model opposite="mapper" containment="true"
64    * @generated
65    */

66   MappingHelper getHelper();
67
68   /**
69    * Sets the value of the '{@link org.eclipse.emf.mapping.Mapping#getHelper <em>Helper</em>}' containment reference.
70    * <!-- begin-user-doc -->
71    * <!-- end-user-doc -->
72    * @param value the new value of the '<em>Helper</em>' containment reference.
73    * @see #getHelper()
74    * @generated
75    */

76   void setHelper(MappingHelper value);
77
78   /**
79    * Returns the value of the '<em><b>Nested</b></em>' containment reference list.
80    * The list contents are of type {@link org.eclipse.emf.mapping.Mapping}.
81    * It is bidirectional and its opposite is '{@link org.eclipse.emf.mapping.Mapping#getNestedIn <em>Nested In</em>}'.
82    * <!-- begin-user-doc -->
83    * <p>
84    * If the meaning of the '<em>Nested</em>' containment reference list isn't clear,
85    * there really should be more of a description here...
86    * </p>
87    * <!-- end-user-doc -->
88    * @return the value of the '<em>Nested</em>' containment reference list.
89    * @see org.eclipse.emf.mapping.MappingPackage#getMapping_Nested()
90    * @see org.eclipse.emf.mapping.Mapping#getNestedIn
91    * @model type="org.eclipse.emf.mapping.Mapping" opposite="nestedIn" containment="true"
92    * @generated
93    */

94   EList getNested();
95
96   /**
97    * Returns the value of the '<em><b>Nested In</b></em>' container reference.
98    * It is bidirectional and its opposite is '{@link org.eclipse.emf.mapping.Mapping#getNested <em>Nested</em>}'.
99    * <!-- begin-user-doc -->
100    * <p>
101    * If the meaning of the '<em>Nested In</em>' container reference isn't clear,
102    * there really should be more of a description here...
103    * </p>
104    * <!-- end-user-doc -->
105    * @return the value of the '<em>Nested In</em>' container reference.
106    * @see #setNestedIn(Mapping)
107    * @see org.eclipse.emf.mapping.MappingPackage#getMapping_NestedIn()
108    * @see org.eclipse.emf.mapping.Mapping#getNested
109    * @model opposite="nested"
110    * @generated
111    */

112   Mapping getNestedIn();
113
114   /**
115    * Sets the value of the '{@link org.eclipse.emf.mapping.Mapping#getNestedIn <em>Nested In</em>}' container reference.
116    * <!-- begin-user-doc -->
117    * <!-- end-user-doc -->
118    * @param value the new value of the '<em>Nested In</em>' container reference.
119    * @see #getNestedIn()
120    * @generated
121    */

122   void setNestedIn(Mapping value);
123
124   /**
125    * Returns the value of the '<em><b>Inputs</b></em>' reference list.
126    * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
127    * <!-- begin-user-doc -->
128    * <p>
129    * If the meaning of the '<em>Inputs</em>' reference list isn't clear,
130    * there really should be more of a description here...
131    * </p>
132    * <!-- end-user-doc -->
133    * @return the value of the '<em>Inputs</em>' reference list.
134    * @see org.eclipse.emf.mapping.MappingPackage#getMapping_Inputs()
135    * @model type="org.eclipse.emf.ecore.EObject"
136    * @generated
137    */

138   EList getInputs();
139
140   /**
141    * Returns the value of the '<em><b>Outputs</b></em>' reference list.
142    * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
143    * <!-- begin-user-doc -->
144    * <p>
145    * If the meaning of the '<em>Outputs</em>' reference list isn't clear,
146    * there really should be more of a description here...
147    * </p>
148    * <!-- end-user-doc -->
149    * @return the value of the '<em>Outputs</em>' reference list.
150    * @see org.eclipse.emf.mapping.MappingPackage#getMapping_Outputs()
151    * @model type="org.eclipse.emf.ecore.EObject"
152    * @generated
153    */

154   EList getOutputs();
155
156   /**
157    * Returns the value of the '<em><b>Type Mapping</b></em>' reference.
158    * <!-- begin-user-doc -->
159    * <p>
160    * If the meaning of the '<em>Type Mapping</em>' reference isn't clear,
161    * there really should be more of a description here...
162    * </p>
163    * <!-- end-user-doc -->
164    * @return the value of the '<em>Type Mapping</em>' reference.
165    * @see #setTypeMapping(Mapping)
166    * @see org.eclipse.emf.mapping.MappingPackage#getMapping_TypeMapping()
167    * @model
168    * @generated
169    */

170   Mapping getTypeMapping();
171
172   /**
173    * Sets the value of the '{@link org.eclipse.emf.mapping.Mapping#getTypeMapping <em>Type Mapping</em>}' reference.
174    * <!-- begin-user-doc -->
175    * <!-- end-user-doc -->
176    * @param value the new value of the '<em>Type Mapping</em>' reference.
177    * @see #getTypeMapping()
178    * @generated
179    */

180   void setTypeMapping(Mapping value);
181
182   /**
183    * This returns a set containing the results of {@link #getInputs} and {@link #getOutputs}.
184    */

185   public Collection JavaDoc getMappedObjects();
186
187   /**
188    * This returns the same as either {@link #getInputs} or {@link #getOutputs}
189    * depending on the mapping root's isTopToBottom.
190    */

191   public EList getTops();
192
193   /**
194    * This returns the same as either {@link #getInputs} or {@link #getOutputs}
195    * depending on the mapping root's isTopToBottom.
196    */

197   public EList getBottoms();
198
199   /**
200    * This returns either the containing mapping root or the object itself, if it is a mapping root.
201    */

202   public MappingRoot getMappingRoot();
203
204   /**
205    * This method is delegated to the containing mapping if one exists, or returns false otherwise.
206    * Subclasses can override this method to return true when the logical direction of a mapping is
207    * reversed (i.e., from outputs to inputs).
208    */

209   public boolean isReverse();
210
211   /**
212    * This returns the same as {@link #getInputs} if {@link #isReverse} returns false.
213    * Otherwise it returns the same as {@link #getOutputs}.
214    */

215   public EList getSenders();
216
217   /**
218    * This returns the same as {@link #getOutputs} if {@link #isReverse} returns false.
219    * Otherwise it returns the same as {@link #getInputs}.
220    */

221   public EList getReceivers();
222
223   /**
224    * This returns the mapping helper for this mapping, if it has one. Otherwise, if the mapping has an
225    * associated type mapping it returns the type mapping's helper.
226    */

227   public MappingHelper getEffectiveHelper();
228
229   /**
230    * This returns a tree iterator that iterates over this mapping,
231    * all it's nested mappings,
232    * and their nested mappings,
233    * and so on.
234    */

235   public TreeIterator treeIterator();
236
237   /**
238    * This returns a tree iterator that iterates over this mapping (but only if includeRoot is true),
239    * all it's nested mappings,
240    * and their nested mappings,
241    * and so on.
242    */

243   public TreeIterator treeIterator(boolean includeRoot);
244
245 }
246
Popular Tags