KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > mapping > domain > MappingDomain


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: MappingDomain.java,v 1.2 2005/06/08 06:21:43 nickb Exp $
16  */

17 package org.eclipse.emf.mapping.domain;
18
19
20 import java.util.List JavaDoc;
21
22 import org.eclipse.emf.ecore.EObject;
23 import org.eclipse.emf.edit.domain.EditingDomain;
24 import org.eclipse.emf.mapping.MappingRoot;
25
26
27 //import org.eclipse.emf.mapping.Mapping;
28
//import org.eclipse.emf.mapping.MappingRoot;
29

30
31
32 /**
33  * This interface extends the editing domain to provide the additional needs for <em>editing</em> in a mapping scenario.
34  */

35 public interface MappingDomain extends EditingDomain
36 {
37   /**
38    * This returns the output meta object corresponding to the given input meta object.
39    */

40   EObject getOutputMetaObject(EObject inputMetaObject);
41
42   /**
43    * This returns the name of the object.
44    */

45   String JavaDoc getName(Object JavaDoc object);
46
47   /**
48    * This sets the name of the object.
49    */

50   void setName(Object JavaDoc object, String JavaDoc name);
51
52   /**
53    * This returns the corresponding output name for the given input name.
54    */

55   String JavaDoc getOutputName(String JavaDoc inputName);
56
57   /**
58    * This returns the list of words (substrings) in the specified output name.
59    */

60   List JavaDoc parseOutputName(String JavaDoc outputName);
61
62   /**
63    * This returns the list of words (substrings) in the specified input name.
64    */

65   List JavaDoc parseInputName(String JavaDoc inputName);
66
67   /**
68    * This returns the type classifier of the input or output object.
69    */

70   Object JavaDoc getTypeClassifier(Object JavaDoc mappedObject);
71
72   /**
73    * This sets the type classifier of the input or output object.
74    */

75   void setTypeClassifier(Object JavaDoc mappedObject, Object JavaDoc typeClassifier);
76
77   /**
78    * This returns the corresponding type classifier for the given input type classifier.
79    */

80   Object JavaDoc getOutputTypeClassifier(Object JavaDoc inputTypeClassifier);
81
82   /**
83    * This returns the mapping root for this domain.
84    */

85   MappingRoot getMappingRoot();
86
87   /**
88    * This sets the mapping root for this domain to use.
89    */

90   void setMappingRoot(MappingRoot root);
91
92   /**
93    * This returns a set of flags that control enablement of mapping creation and removal commands for this domain.
94    */

95   int getMappingEnablementFlags();
96
97   static final int ENABLE_MULTIPLE_INPUTS = 0x0001;
98   static final int ENABLE_MULTIPLE_OUTPUTS = 0x0002;
99   static final int ENABLE_MULTIPLE_INPUT_MAPPINGS = 0x0004;
100   static final int ENABLE_MULTIPLE_OUTPUT_MAPPINGS = 0x0008;
101   static final int ENABLE_INCOMPATIBLE_METAOBJECTS = 0x0010;
102   static final int ENABLE_INCOMPATIBLE_TYPE_CLASSIFIERS = 0x0020;
103   static final int ENABLE_EMPTY_INPUTS = 0x0040;
104   static final int ENABLE_EMPTY_OUTPUTS = 0x0080;
105   static final int ENABLE_UNMAPPED_PARENTS = 0x0100;
106   static final int ENABLE_ALL = 0xFFFF;
107
108 }
109
Popular Tags