KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > mof > Model > OperationImpl


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 Foobar; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  */

21
22 // le Code généré de la Class: Operation
23
package org.omg.mof.Model ;
24 public class OperationImpl extends org.omg.mof.Model.OperationPOA {
25
26         //Ajout de la partie RefBaseObject
27
// Operation ref_mof_id
28
public java.lang.String JavaDoc ref_mof_id(){
29             int id = _orb().object_to_string(_this()).hashCode();
30              return String.valueOf(id);
31           }
32           // Operation ref_meta_object
33
public org.omg.mof.Reflective.RefObject ref_meta_object(){
34             throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_meta_object method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
35             }
36          // Operation ref_itself
37
public boolean ref_itself(org.omg.mof.Reflective.RefBaseObject other_object){
38              String JavaDoc id_obj = other_object.ref_mof_id();
39              if (ref_mof_id().equals(id_obj)) return true;
40              else return false;
41           }
42          // Operation ref_immediate_package
43
public org.omg.mof.Reflective._RefPackage ref_immediate_package(){
44             throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_immediate_package method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
45          }
46          // Operation ref_outermost_package
47
public org.omg.mof.Reflective._RefPackage ref_outermost_package(){
48          throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_moutermost_package method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
49           }
50           // Operation ref_delete
51
public void ref_delete() throws org.omg.mof.Reflective.MofError {
52           throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_delete method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
53           }
54
55             //Ajout de la partie RefObject
56
// Operation ref_is_instance_of
57
public boolean ref_is_instance_of(org.omg.mof.Reflective.RefObject some_class, boolean consider_subtypes) {
58           throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_is_instance_of method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
59         }
60         // Operation ref_create_instance
61
public org.omg.mof.Reflective.RefObject ref_create_instance(org.omg.CORBA.Any JavaDoc[] args) throws org.omg.mof.Reflective.MofError {
62          throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_create_instance method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
63         }
64         // Operation ref_all_objects
65
public org.omg.mof.Reflective.RefObject[] ref_all_objects(boolean include_subtypes){
66          throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_all_objects method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
67         }
68         // Operation ref_set_value
69
public void ref_set_value(org.omg.mof.Reflective.RefObject feature, org.omg.CORBA.Any JavaDoc new_value) throws org.omg.mof.Reflective.MofError {
70             throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_set_value method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
71         }
72         // Operation ref_value
73
public org.omg.CORBA.Any JavaDoc ref_value(org.omg.mof.Reflective.RefObject feature) throws org.omg.mof.Reflective.NotSet, org.omg.mof.Reflective.MofError {
74             throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_value method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
75         }
76         // Operation ref_unset_value
77
public void ref_unset_value() throws org.omg.mof.Reflective.MofError {
78           throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_unset_value method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
79         }
80         // Operation ref_add_value
81
public void ref_add_value(org.omg.mof.Reflective.RefObject feature, org.omg.CORBA.Any JavaDoc new_element) throws org.omg.mof.Reflective.MofError {
82           throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_add_value method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
83         }
84         // Operation ref_add_value_before
85
public void ref_add_value_before(org.omg.mof.Reflective.RefObject feature, org.omg.CORBA.Any JavaDoc new_element, org.omg.CORBA.Any JavaDoc before_element)
86             throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
87              throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_add_value_before method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
88         }
89         // Operation ref_add_value_at
90
public void ref_add_value_at(org.omg.mof.Reflective.RefObject feature, org.omg.CORBA.Any JavaDoc new_element, int position)
91             throws org.omg.mof.Reflective.BadPosition, org.omg.mof.Reflective.MofError {
92               throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_add_value_at method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
93         }
94         // Operation ref_modify_value
95
public void ref_modify_value(org.omg.mof.Reflective.RefObject feature, org.omg.CORBA.Any JavaDoc old_element, org.omg.CORBA.Any JavaDoc new_element)
96             throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
97               throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_modify_value method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
98         }
99         // Operation ref_modify_value_at
100
public void ref_modify_value_at(org.omg.mof.Reflective.RefObject feature, org.omg.CORBA.Any JavaDoc new_element, int position)
101             throws org.omg.mof.Reflective.BadPosition, org.omg.mof.Reflective.MofError {
102               throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_modify_value_at method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
103         }
104         // Operation ref_remove_value
105
public void ref_remove_value(org.omg.mof.Reflective.RefObject feature, org.omg.CORBA.Any JavaDoc existing_element)
106             throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
107              throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_remove_value method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
108         }
109         // Operation ref_remove_value_at
110
public void ref_remove_value_at(org.omg.mof.Reflective.RefObject feature, int position)
111             throws org.omg.mof.Reflective.BadPosition, org.omg.mof.Reflective.MofError {
112               throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_remove_value_at method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
113         }
114         // Operation ref_immediate_composite
115
public org.omg.mof.Reflective.RefObject ref_immediate_composite() {
116          throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_remove_value method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
117         }
118         // Operation ref_outermost_composite
119
public org.omg.mof.Reflective.RefObject ref_outermost_composite() {
120          throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_outermost_composite method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
121         }
122         // Operation ref_invoke_operation(
123
public org.omg.CORBA.Any JavaDoc ref_invoke_operation(org.omg.mof.Reflective.RefObject requested_temp, org.omg.mof.Reflective.ValueTypeListHolder args)
124             throws org.omg.mof.Reflective.OtherException, org.omg.mof.Reflective.MofError {
125               throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc("ref_invoke_operation( method not implemented",1 ,org.omg.CORBA.CompletionStatus.COMPLETED_NO);
126         }
127         private org.omg.mof.Model.OperationClass _class_proxy;
128     public org.omg.mof.Model.ModelElement[] all_of_type_model_element() {
129         return _class_proxy.all_of_type_model_element();
130         }
131     public org.omg.mof.Model.Namespace[] all_of_type_namespace() {
132         return _class_proxy.all_of_type_namespace();
133         }
134     public org.omg.mof.Model.Feature[] all_of_type_feature() {
135         return _class_proxy.all_of_type_feature();
136         }
137     public org.omg.mof.Model.BehavioralFeature[] all_of_type_behavioral_feature() {
138         return _class_proxy.all_of_type_behavioral_feature();
139         }
140     public org.omg.mof.Model.Operation create_operation(String JavaDoc name, String JavaDoc annotation, org.omg.mof.Model.VisibilityKind visibility, org.omg.mof.Model.ScopeKind scope, boolean is_query) throws org.omg.mof.Reflective.MofError {
141         return _class_proxy.create_operation(name, annotation, visibility, scope, is_query);
142         }
143     public org.omg.mof.Model.Operation[] all_of_class_operation() {
144         return _class_proxy.all_of_class_operation();
145         }
146     public org.omg.mof.Model.Operation[] all_of_type_operation() {
147         return _class_proxy.all_of_type_operation();
148         }
149         //
150
private String JavaDoc _name ;
151     public String JavaDoc name() throws org.omg.mof.Reflective.MofError {
152         return _name;
153         }
154     public void set_name(String JavaDoc new_value) throws org.omg.mof.Reflective.MofError {
155         _name = new_value ;
156         }
157
158         //
159
private String JavaDoc _annotation ;
160     public String JavaDoc annotation() throws org.omg.mof.Reflective.MofError {
161         return _annotation;
162         }
163     public void set_annotation(String JavaDoc new_value) throws org.omg.mof.Reflective.MofError {
164         _annotation = new_value ;
165         }
166
167         //
168
private java.util.Vector JavaDoc _qualified_names = new java.util.Vector JavaDoc();
169     public String JavaDoc[] qualified_name() throws org.omg.mof.Reflective.MofError{
170         //Création d'un vecteur conteneur et rajouyer le nom du l'élément
171
java.util.Vector JavaDoc _name_qualified = new java.util.Vector JavaDoc();
172         _name_qualified.addElement(_name);
173
174         // Calculer _qualified _name
175
Namespace _current = _this();
176         boolean exist = true;
177         while (exist) {
178             try {
179                 _current = _current.container();
180                 _name_qualified.addElement(_current.name());
181             }
182             catch (org.omg.mof.Reflective.NotSet ex) {
183                 exist = false;
184             }
185         }
186         String JavaDoc[] _temp = new String JavaDoc[_name_qualified.size()];
187         for (int i = 0; i < _temp.length; i++)
188             _temp[i] = (String JavaDoc) _name_qualified.elementAt(i);
189         return _temp;
190     }
191
192         //
193
private org.omg.mof.Model.VisibilityKind _visibility ;
194     public org.omg.mof.Model.VisibilityKind visibility() throws org.omg.mof.Reflective.MofError {
195         return _visibility;
196         }
197     public void set_visibility(org.omg.mof.Model.VisibilityKind new_value) throws org.omg.mof.Reflective.MofError {
198         _visibility = new_value ;
199         }
200
201         //
202
private org.omg.mof.Model.ScopeKind _scope ;
203     public org.omg.mof.Model.ScopeKind scope() throws org.omg.mof.Reflective.MofError {
204         return _scope;
205         }
206     public void set_scope(org.omg.mof.Model.ScopeKind new_value) throws org.omg.mof.Reflective.MofError {
207         _scope = new_value ;
208         }
209
210         //
211
private boolean _is_query ;
212     public boolean is_query() throws org.omg.mof.Reflective.MofError {
213         return _is_query;
214         }
215     public void set_is_query(boolean new_value) throws org.omg.mof.Reflective.MofError {
216         _is_query = new_value ;
217         }
218
219         //
220
private org.omg.mof.Model.Namespace _container = null;
221     public org.omg.mof.Model.Namespace container() throws org.omg.mof.Reflective.NotSet, org.omg.mof.Reflective.MofError {
222         if (_container!= null) return _container;
223         else throw new org.omg.mof.Reflective.NotSet();
224         }
225     public void set_container(org.omg.mof.Model.Namespace new_value) throws org.omg.mof.Reflective.MofError {
226         _container = new_value ;
227         }
228     public void unset_container() throws org.omg.mof.Reflective.MofError{
229         _container = null;
230         }
231
232         //
233
private java.util.Vector JavaDoc _required_elementss = new java.util.Vector JavaDoc();
234     public org.omg.mof.Model.ModelElement[] required_elements() throws org.omg.mof.Reflective.MofError {
235         org.omg.mof.Model.ModelElement[] temp1 = new org.omg.mof.Model.ModelElement[_required_elementss.size()];
236         for(int i=0; i< _required_elementss.size(); i++) temp1[i] = (org.omg.mof.Model.ModelElement)_required_elementss.elementAt(i);
237         return temp1;
238         }
239     public void set_required_elements(org.omg.mof.Model.ModelElement[] new_value) throws org.omg.mof.Reflective.MofError {
240         _required_elementss.removeAllElements();
241         for(int i= 0; i< new_value.length ; i++) _required_elementss.addElement(new_value[i]);
242         }
243     public void add_required_elements (org.omg.mof.Model.ModelElement new_element) throws org.omg.mof.Reflective.MofError{
244         _required_elementss.addElement(new_element);
245         }
246     public void modify_required_elements (org.omg.mof.Model.ModelElement old_element,org.omg.mof.Model.ModelElement new_element) throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError{
247         if( _required_elementss.contains(old_element)) {
248         int i =_required_elementss.indexOf(old_element);
249         _required_elementss.setElementAt(new_element, i);
250         }
251         else throw new org.omg.mof.Reflective.NotFound();
252         }
253     public void remove_required_elements (org.omg.mof.Model.ModelElement old_element ) throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
254         if(_required_elementss.contains(old_element)) _required_elementss.removeElement(old_element);
255         else throw new org.omg.mof.Reflective.NotFound() ;
256         }
257
258         //
259
private java.util.Vector JavaDoc _constraintss = new java.util.Vector JavaDoc();
260     public org.omg.mof.Model.Constraint[] constraints() throws org.omg.mof.Reflective.MofError {
261         org.omg.mof.Model.Constraint[] temp1 = new org.omg.mof.Model.Constraint[_constraintss.size()];
262         for(int i=0; i< _constraintss.size(); i++) temp1[i] = (org.omg.mof.Model.Constraint)_constraintss.elementAt(i);
263         return temp1;
264         }
265     public void set_constraints(org.omg.mof.Model.Constraint[] new_value) throws org.omg.mof.Reflective.MofError {
266         _constraintss.removeAllElements();
267         for(int i= 0; i< new_value.length ; i++) _constraintss.addElement(new_value[i]);
268         }
269     public void add_constraints (org.omg.mof.Model.Constraint new_element) throws org.omg.mof.Reflective.MofError{
270         _constraintss.addElement(new_element);
271         }
272     public void modify_constraints (org.omg.mof.Model.Constraint old_element,org.omg.mof.Model.Constraint new_element) throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError{
273         if( _constraintss.contains(old_element)) {
274         int i =_constraintss.indexOf(old_element);
275         _constraintss.setElementAt(new_element, i);
276         }
277         else throw new org.omg.mof.Reflective.NotFound();
278         }
279     public void remove_constraints (org.omg.mof.Model.Constraint old_element ) throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
280         if(_constraintss.contains(old_element)) _constraintss.removeElement(old_element);
281         else throw new org.omg.mof.Reflective.NotFound() ;
282         }
283
284         //
285
private java.util.Vector JavaDoc _contentss = new java.util.Vector JavaDoc();
286     public org.omg.mof.Model.ModelElement[] contents() throws org.omg.mof.Reflective.MofError {
287         org.omg.mof.Model.ModelElement[] temp1 = new org.omg.mof.Model.ModelElement[_contentss.size()];
288         for(int i=0; i< _contentss.size(); i++) temp1[i] = (org.omg.mof.Model.ModelElement)_contentss.elementAt(i);
289         return temp1;
290         }
291     public void set_contents(org.omg.mof.Model.ModelElement[] new_value) throws org.omg.mof.Reflective.MofError {
292         _contentss.removeAllElements();
293         for(int i= 0; i< new_value.length ; i++) _contentss.addElement(new_value[i]);
294         }
295     public void add_contents (org.omg.mof.Model.ModelElement new_element) throws org.omg.mof.Reflective.MofError{
296         _contentss.addElement(new_element);
297         }
298     public void add_contents_before (org.omg.mof.Model.ModelElement new_element, org.omg.mof.Model.ModelElement before_element) throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError{
299         if(_contentss.contains(before_element)) {
300         int i = _contentss.indexOf(before_element);
301         _contentss.insertElementAt(new_element, i);
302         }
303         else throw new org.omg.mof.Reflective.NotFound() ;
304         }
305     public void modify_contents (org.omg.mof.Model.ModelElement old_element,org.omg.mof.Model.ModelElement new_element) throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError{
306         if( _contentss.contains(old_element)) {
307         int i =_contentss.indexOf(old_element);
308         _contentss.setElementAt(new_element, i);
309         }
310         else throw new org.omg.mof.Reflective.NotFound();
311         }
312     public void remove_contents (org.omg.mof.Model.ModelElement old_element ) throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
313         if(_contentss.contains(old_element)) _contentss.removeElement(old_element);
314         else throw new org.omg.mof.Reflective.NotFound() ;
315         }
316
317         //
318
private java.util.Vector JavaDoc _exceptionss = new java.util.Vector JavaDoc();
319     public org.omg.mof.Model.MofException[] exceptions() throws org.omg.mof.Reflective.MofError {
320         org.omg.mof.Model.MofException[] temp1 = new org.omg.mof.Model.MofException[_exceptionss.size()];
321         for(int i=0; i< _exceptionss.size(); i++) temp1[i] = (org.omg.mof.Model.MofException)_exceptionss.elementAt(i);
322         return temp1;
323         }
324     public void set_exceptions(org.omg.mof.Model.MofException[] new_value) throws org.omg.mof.Reflective.MofError {
325         _exceptionss.removeAllElements();
326         for(int i= 0; i< new_value.length ; i++) _exceptionss.addElement(new_value[i]);
327         }
328     public void add_exceptions (org.omg.mof.Model.MofException new_element) throws org.omg.mof.Reflective.MofError{
329         _exceptionss.addElement(new_element);
330         }
331     public void add_exceptions_before (org.omg.mof.Model.MofException new_element, org.omg.mof.Model.MofException before_element) throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError{
332         if(_exceptionss.contains(before_element)) {
333         int i = _exceptionss.indexOf(before_element);
334         _exceptionss.insertElementAt(new_element, i);
335         }
336         else throw new org.omg.mof.Reflective.NotFound() ;
337         }
338     public void modify_exceptions (org.omg.mof.Model.MofException old_element,org.omg.mof.Model.MofException new_element) throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError{
339         if( _exceptionss.contains(old_element)) {
340         int i =_exceptionss.indexOf(old_element);
341         _exceptionss.setElementAt(new_element, i);
342         }
343         else throw new org.omg.mof.Reflective.NotFound();
344         }
345     public void remove_exceptions (org.omg.mof.Model.MofException old_element ) throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
346         if(_exceptionss.contains(old_element)) _exceptionss.removeElement(old_element);
347         else throw new org.omg.mof.Reflective.NotFound() ;
348         }
349
350     public OperationImpl(String JavaDoc name, String JavaDoc annotation, org.omg.mof.Model.VisibilityKind visibility, org.omg.mof.Model.ScopeKind scope, boolean is_query, org.omg.mof.Model.OperationClass _proxy){
351         _name = name ;
352         _annotation = annotation ;
353         _visibility = visibility ;
354         _scope = scope ;
355         _is_query = is_query ;
356         _class_proxy = _proxy ;
357           }
358     }
359
Popular Tags