KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > modfact > corba > helper > JMICommon


1 /**
2  * copyright 2002 2003 Laboratoire d'Informatique Paris 6 (LIP6)
3  *
4  * This file is part of ModFact.
5  *
6  * ModFact is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * at your option) any later version.
10  *
11  * ModFact is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with ModFact; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */

20 package org.objectweb.modfact.corba.helper;
21
22 import org.omg.CORBA.TypeCode JavaDoc;
23 import org.omg.CORBA.TypeCodePackage.BadKind JavaDoc;
24 import org.omg.mof.Model.Association;
25 import org.omg.mof.Model.Classifier;
26 import org.omg.mof.Model.Import;
27 import org.omg.mof.Model.MofAttribute;
28 import org.omg.mof.Reflective.MofError;
29 import org.omg.mof.Reflective.NotSet;
30
31 /**
32  * @author Xavier Blanc
33  *
34  */

35 public interface JMICommon {
36
37     
38     /**
39      * Return the JMI name of a package
40      */

41     public String JavaDoc jmiPackageName(org.omg.mof.Model.Package _package)
42         throws MofError;
43
44     /**
45      * Return the JMI name of a package (be carefull, look at the TAG or maybe print an import)
46      */

47     public String JavaDoc jmiPackageQualifiedName(org.omg.mof.Model.Package _package)
48         throws MofError, NotSet;
49
50     /**
51      * Return the JMI name of a class
52      */

53     public String JavaDoc jmiClassName(org.omg.mof.Model.Class _class)
54         throws MofError, NotSet;
55
56     /**
57      * Return the JMI qualified name of a class
58      */

59     public String JavaDoc jmiClassQualifiedName(org.omg.mof.Model.Class _class)
60         throws MofError, NotSet;
61
62     /**
63      * Return the JMI name of an association
64      */

65     public String JavaDoc jmiAssociationName(Association _association)
66         throws MofError, NotSet;
67
68     /**
69      * Return the JMI name of an association
70      */

71     public String JavaDoc jmiAssociationQualifiedName(Association _association)
72         throws MofError, NotSet;
73
74     /**
75      * Return the JMI name of an attribute
76      */

77     public String JavaDoc jmiAttributeName(MofAttribute _attribute) throws MofError;
78
79     /**
80      * Return the JMI name of a DataType
81      */

82     public String JavaDoc jmiTypeCodeName(TypeCode JavaDoc _type) throws BadKind JavaDoc;
83
84     /**
85      * Return the JMI name of an Import
86      */

87     public String JavaDoc jmiImportName(Import _import) throws MofError, NotSet;
88
89     /**
90      * Return the JMI name of a Classifier (DataType or org.omg.mof.Model.org.omg.mof.Model.Class)
91      */

92     public String JavaDoc jmiClassifierName(Classifier _classifier)
93         throws MofError, BadKind JavaDoc, NotSet;
94
95     /**
96      * Return the JMI name of a Classifier (DataType or org.omg.mof.Model.org.omg.mof.Model.Class)
97      */

98     public String JavaDoc jmiClassifierQualifiedName(Classifier _classifier)
99         throws MofError, BadKind JavaDoc, NotSet;
100
101     /**
102      *
103      */

104     //public String jmiType(String type);
105

106     /**
107      *
108      */

109     public String JavaDoc jmiFormat1(String JavaDoc name) throws MofError;
110
111     /**
112      *
113      */

114     public String JavaDoc jmiNullableTypeCodeName(TypeCode JavaDoc _type) throws BadKind JavaDoc;
115
116     /**
117      * Return a nullable type (i.e. Boolean instead of boolean)
118      */

119     public String JavaDoc jmiNullableClassifierName(Classifier classifier)
120         throws MofError, BadKind JavaDoc, NotSet;
121
122     /**
123      * Return a nullable type (i.e. Boolean instead of boolean)
124      */

125     public String JavaDoc jmiNullableClassifierQualifiedName(Classifier classifier)
126         throws MofError, BadKind JavaDoc, NotSet;
127
128     /**
129      * Return the accessor name of the attribute
130      * @param attribute
131      * @return
132      * @throws MofError
133      */

134     public String JavaDoc jmiAccessorName(MofAttribute attribute) throws MofError;
135     
136     /**
137      * Return the mutator name of the attribute
138      * @param attribute
139      * @return
140      * @throws MofError
141      */

142     public String JavaDoc jmiMutatorName(MofAttribute attribute) throws MofError;
143     
144     /**
145      * Give the value of a Constant
146      */

147     public String JavaDoc valueOfConstant(org.omg.CORBA.Any JavaDoc _value)
148         throws org.omg.CORBA.TypeCodePackage.BadKind JavaDoc;
149 }
Popular Tags