KickJava   Java API By Example, From Geeks To Geeks.

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


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: Constraint
23
package org.omg.mof.Model;
24 public class ConstraintImpl extends org.omg.mof.Model.ConstraintPOA {
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(
35             "ref_meta_object method not implemented",
36             1,
37             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
38     }
39     // Operation ref_itself
40
public boolean ref_itself(
41         org.omg.mof.Reflective.RefBaseObject other_object) {
42         String JavaDoc id_obj = other_object.ref_mof_id();
43         if (ref_mof_id().equals(id_obj))
44             return true;
45         else
46             return false;
47     }
48     // Operation ref_immediate_package
49
public org.omg.mof.Reflective._RefPackage ref_immediate_package() {
50         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
51             "ref_immediate_package method not implemented",
52             1,
53             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
54     }
55     // Operation ref_outermost_package
56
public org.omg.mof.Reflective._RefPackage ref_outermost_package() {
57         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
58             "ref_moutermost_package method not implemented",
59             1,
60             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
61     }
62     // Operation ref_delete
63
public void ref_delete() throws org.omg.mof.Reflective.MofError {
64         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
65             "ref_delete method not implemented",
66             1,
67             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
68     }
69
70     //Ajout de la partie RefObject
71
// Operation ref_is_instance_of
72
public boolean ref_is_instance_of(
73         org.omg.mof.Reflective.RefObject some_class,
74         boolean consider_subtypes) {
75         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
76             "ref_is_instance_of method not implemented",
77             1,
78             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
79     }
80     // Operation ref_create_instance
81
public org.omg.mof.Reflective.RefObject ref_create_instance(
82         org.omg.CORBA.Any JavaDoc[] args)
83         throws org.omg.mof.Reflective.MofError {
84         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
85             "ref_create_instance method not implemented",
86             1,
87             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
88     }
89     // Operation ref_all_objects
90
public org.omg.mof.Reflective.RefObject[] ref_all_objects(
91         boolean include_subtypes) {
92         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
93             "ref_all_objects method not implemented",
94             1,
95             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
96     }
97     // Operation ref_set_value
98
public void ref_set_value(
99         org.omg.mof.Reflective.RefObject feature,
100         org.omg.CORBA.Any JavaDoc new_value)
101         throws org.omg.mof.Reflective.MofError {
102         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
103             "ref_set_value method not implemented",
104             1,
105             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
106     }
107     // Operation ref_value
108
public org.omg.CORBA.Any JavaDoc ref_value(
109         org.omg.mof.Reflective.RefObject feature)
110         throws org.omg.mof.Reflective.NotSet, org.omg.mof.Reflective.MofError {
111         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
112             "ref_value method not implemented",
113             1,
114             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
115     }
116     // Operation ref_unset_value
117
public void ref_unset_value() throws org.omg.mof.Reflective.MofError {
118         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
119             "ref_unset_value method not implemented",
120             1,
121             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
122     }
123     // Operation ref_add_value
124
public void ref_add_value(
125         org.omg.mof.Reflective.RefObject feature,
126         org.omg.CORBA.Any JavaDoc new_element)
127         throws org.omg.mof.Reflective.MofError {
128         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
129             "ref_add_value method not implemented",
130             1,
131             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
132     }
133     // Operation ref_add_value_before
134
public void ref_add_value_before(
135         org.omg.mof.Reflective.RefObject feature,
136         org.omg.CORBA.Any JavaDoc new_element,
137         org.omg.CORBA.Any JavaDoc before_element)
138         throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
139         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
140             "ref_add_value_before method not implemented",
141             1,
142             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
143     }
144     // Operation ref_add_value_at
145
public void ref_add_value_at(
146         org.omg.mof.Reflective.RefObject feature,
147         org.omg.CORBA.Any JavaDoc new_element,
148         int position)
149         throws org.omg.mof.Reflective.BadPosition, org.omg.mof.Reflective.MofError {
150         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
151             "ref_add_value_at method not implemented",
152             1,
153             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
154     }
155     // Operation ref_modify_value
156
public void ref_modify_value(
157         org.omg.mof.Reflective.RefObject feature,
158         org.omg.CORBA.Any JavaDoc old_element,
159         org.omg.CORBA.Any JavaDoc new_element)
160         throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
161         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
162             "ref_modify_value method not implemented",
163             1,
164             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
165     }
166     // Operation ref_modify_value_at
167
public void ref_modify_value_at(
168         org.omg.mof.Reflective.RefObject feature,
169         org.omg.CORBA.Any JavaDoc new_element,
170         int position)
171         throws org.omg.mof.Reflective.BadPosition, org.omg.mof.Reflective.MofError {
172         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
173             "ref_modify_value_at method not implemented",
174             1,
175             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
176     }
177     // Operation ref_remove_value
178
public void ref_remove_value(
179         org.omg.mof.Reflective.RefObject feature,
180         org.omg.CORBA.Any JavaDoc existing_element)
181         throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
182         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
183             "ref_remove_value method not implemented",
184             1,
185             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
186     }
187     // Operation ref_remove_value_at
188
public void ref_remove_value_at(
189         org.omg.mof.Reflective.RefObject feature,
190         int position)
191         throws org.omg.mof.Reflective.BadPosition, org.omg.mof.Reflective.MofError {
192         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
193             "ref_remove_value_at method not implemented",
194             1,
195             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
196     }
197     // Operation ref_immediate_composite
198
public org.omg.mof.Reflective.RefObject ref_immediate_composite() {
199         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
200             "ref_remove_value method not implemented",
201             1,
202             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
203     }
204     // Operation ref_outermost_composite
205
public org.omg.mof.Reflective.RefObject ref_outermost_composite() {
206         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
207             "ref_outermost_composite method not implemented",
208             1,
209             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
210     }
211     // Operation ref_invoke_operation(
212
public org.omg.CORBA.Any JavaDoc ref_invoke_operation(
213         org.omg.mof.Reflective.RefObject requested_temp,
214         org.omg.mof.Reflective.ValueTypeListHolder args)
215         throws
216             org.omg.mof.Reflective.OtherException,
217             org.omg.mof.Reflective.MofError {
218         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc(
219             "ref_invoke_operation( method not implemented",
220             1,
221             org.omg.CORBA.CompletionStatus.COMPLETED_NO);
222     }
223     private org.omg.mof.Model.ConstraintClass _class_proxy;
224     public org.omg.mof.Model.ModelElement[] all_of_type_model_element() {
225         return _class_proxy.all_of_type_model_element();
226     }
227     public org.omg.mof.Model.Constraint create_constraint(
228         String JavaDoc name,
229         String JavaDoc annotation,
230         org
231
            .omg
232             .mof
233             .Model
234             .ConstraintClassPackage
235             .EvaluationKind evaluation_policy,
236         org.omg.CORBA.Any JavaDoc expression,
237         String JavaDoc language)
238         throws org.omg.mof.Reflective.MofError {
239         return _class_proxy.create_constraint(
240             name,
241             annotation,
242             evaluation_policy,
243             expression,
244             language);
245     }
246     public org.omg.mof.Model.Constraint[] all_of_class_constraint() {
247         return _class_proxy.all_of_class_constraint();
248     }
249     public org.omg.mof.Model.Constraint[] all_of_type_constraint() {
250         return _class_proxy.all_of_type_constraint();
251     }
252     //
253
private String JavaDoc _name;
254     public String JavaDoc name() throws org.omg.mof.Reflective.MofError {
255         return _name;
256     }
257     public void set_name(String JavaDoc new_value)
258         throws org.omg.mof.Reflective.MofError {
259         _name = new_value;
260     }
261
262     //
263
private String JavaDoc _annotation;
264     public String JavaDoc annotation() throws org.omg.mof.Reflective.MofError {
265         return _annotation;
266     }
267     public void set_annotation(String JavaDoc new_value)
268         throws org.omg.mof.Reflective.MofError {
269         _annotation = new_value;
270     }
271
272     //
273
private java.util.Vector JavaDoc _qualified_names = new java.util.Vector JavaDoc();
274     public String JavaDoc[] qualified_name() throws org.omg.mof.Reflective.MofError {
275         //Création d'un vecteur conteneur et rajouyer le nom du l'élément
276
java.util.Vector JavaDoc _name_qualified = new java.util.Vector JavaDoc();
277         _name_qualified.addElement(_name);
278
279         // Calculer _qualified _name
280
ModelElement _current = _this();
281         boolean exist = true;
282         while (exist) {
283             try {
284                 _current = _current.container();
285                 _name_qualified.addElement(_current.name());
286             } catch (org.omg.mof.Reflective.NotSet ex) {
287                 exist = false;
288             }
289         }
290         String JavaDoc[] _temp = new String JavaDoc[_name_qualified.size()];
291         for (int i = 0; i < _temp.length; i++)
292             _temp[i] = (String JavaDoc) _name_qualified.elementAt(i);
293         return _temp;
294     }
295
296     //
297
private org
298
        .omg
299         .mof
300         .Model
301         .ConstraintClassPackage
302         .EvaluationKind _evaluation_policy;
303     public org
304
        .omg
305         .mof
306         .Model
307         .ConstraintClassPackage
308         .EvaluationKind evaluation_policy()
309         throws org.omg.mof.Reflective.MofError {
310         return _evaluation_policy;
311     }
312     public void set_evaluation_policy(
313         org.omg.mof.Model.ConstraintClassPackage.EvaluationKind new_value)
314         throws org.omg.mof.Reflective.MofError {
315         _evaluation_policy = new_value;
316     }
317
318     //
319
private org.omg.CORBA.Any JavaDoc _expression;
320     public org.omg.CORBA.Any JavaDoc expression()
321         throws org.omg.mof.Reflective.MofError {
322         return _expression;
323     }
324     public void set_expression(org.omg.CORBA.Any JavaDoc new_value)
325         throws org.omg.mof.Reflective.MofError {
326         _expression = new_value;
327     }
328
329     //
330
private String JavaDoc _language;
331     public String JavaDoc language() throws org.omg.mof.Reflective.MofError {
332         return _language;
333     }
334     public void set_language(String JavaDoc new_value)
335         throws org.omg.mof.Reflective.MofError {
336         _language = new_value;
337     }
338
339     //
340
private org.omg.mof.Model.Namespace _container = null;
341     public org.omg.mof.Model.Namespace container()
342         throws org.omg.mof.Reflective.NotSet, org.omg.mof.Reflective.MofError {
343         if (_container != null)
344             return _container;
345         else
346             throw new org.omg.mof.Reflective.NotSet();
347     }
348     public void set_container(org.omg.mof.Model.Namespace new_value)
349         throws org.omg.mof.Reflective.MofError {
350         _container = new_value;
351     }
352     public void unset_container() throws org.omg.mof.Reflective.MofError {
353         _container = null;
354     }
355
356     //
357
private java.util.Vector JavaDoc _required_elementss = new java.util.Vector JavaDoc();
358     public org.omg.mof.Model.ModelElement[] required_elements()
359         throws org.omg.mof.Reflective.MofError {
360         org.omg.mof.Model.ModelElement[] temp1 =
361             new org.omg.mof.Model.ModelElement[_required_elementss.size()];
362         for (int i = 0; i < _required_elementss.size(); i++)
363             temp1[i] =
364                 (org.omg.mof.Model.ModelElement) _required_elementss.elementAt(
365                     i);
366         return temp1;
367     }
368     public void set_required_elements(
369         org.omg.mof.Model.ModelElement[] new_value)
370         throws org.omg.mof.Reflective.MofError {
371         _required_elementss.removeAllElements();
372         for (int i = 0; i < new_value.length; i++)
373             _required_elementss.addElement(new_value[i]);
374     }
375     public void add_required_elements(
376         org.omg.mof.Model.ModelElement new_element)
377         throws org.omg.mof.Reflective.MofError {
378         _required_elementss.addElement(new_element);
379     }
380     public void modify_required_elements(
381         org.omg.mof.Model.ModelElement old_element,
382         org.omg.mof.Model.ModelElement new_element)
383         throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
384         if (_required_elementss.contains(old_element)) {
385             int i = _required_elementss.indexOf(old_element);
386             _required_elementss.setElementAt(new_element, i);
387         } else
388             throw new org.omg.mof.Reflective.NotFound();
389     }
390     public void remove_required_elements(
391         org.omg.mof.Model.ModelElement old_element)
392         throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
393         if (_required_elementss.contains(old_element))
394             _required_elementss.removeElement(old_element);
395         else
396             throw new org.omg.mof.Reflective.NotFound();
397     }
398
399     //
400
private java.util.Vector JavaDoc _constraintss = new java.util.Vector JavaDoc();
401     public org.omg.mof.Model.Constraint[] constraints()
402         throws org.omg.mof.Reflective.MofError {
403         org.omg.mof.Model.Constraint[] temp1 =
404             new org.omg.mof.Model.Constraint[_constraintss.size()];
405         for (int i = 0; i < _constraintss.size(); i++)
406             temp1[i] =
407                 (org.omg.mof.Model.Constraint) _constraintss.elementAt(i);
408         return temp1;
409     }
410     public void set_constraints(org.omg.mof.Model.Constraint[] new_value)
411         throws org.omg.mof.Reflective.MofError {
412         _constraintss.removeAllElements();
413         for (int i = 0; i < new_value.length; i++)
414             _constraintss.addElement(new_value[i]);
415     }
416     public void add_constraints(org.omg.mof.Model.Constraint new_element)
417         throws org.omg.mof.Reflective.MofError {
418         _constraintss.addElement(new_element);
419     }
420     public void modify_constraints(
421         org.omg.mof.Model.Constraint old_element,
422         org.omg.mof.Model.Constraint new_element)
423         throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
424         if (_constraintss.contains(old_element)) {
425             int i = _constraintss.indexOf(old_element);
426             _constraintss.setElementAt(new_element, i);
427         } else
428             throw new org.omg.mof.Reflective.NotFound();
429     }
430     public void remove_constraints(org.omg.mof.Model.Constraint old_element)
431         throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
432         if (_constraintss.contains(old_element))
433             _constraintss.removeElement(old_element);
434         else
435             throw new org.omg.mof.Reflective.NotFound();
436     }
437
438     //
439
private java.util.Vector JavaDoc _constrained_elementss = new java.util.Vector JavaDoc();
440     public org.omg.mof.Model.ModelElement[] constrained_elements()
441         throws org.omg.mof.Reflective.MofError {
442         org.omg.mof.Model.ModelElement[] temp1 =
443             new org.omg.mof.Model.ModelElement[_constrained_elementss.size()];
444         for (int i = 0; i < _constrained_elementss.size(); i++)
445             temp1[i] =
446                 (
447                     org
448
                        .omg
449                         .mof
450                         .Model
451                         .ModelElement) _constrained_elementss
452                         .elementAt(
453                     i);
454         return temp1;
455     }
456     public void set_constrained_elements(
457         org.omg.mof.Model.ModelElement[] new_value)
458         throws org.omg.mof.Reflective.MofError {
459         _constrained_elementss.removeAllElements();
460         for (int i = 0; i < new_value.length; i++)
461             _constrained_elementss.addElement(new_value[i]);
462     }
463     public void add_constrained_elements(
464         org.omg.mof.Model.ModelElement new_element)
465         throws org.omg.mof.Reflective.MofError {
466         _constrained_elementss.addElement(new_element);
467     }
468     public void modify_constrained_elements(
469         org.omg.mof.Model.ModelElement old_element,
470         org.omg.mof.Model.ModelElement new_element)
471         throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
472         if (_constrained_elementss.contains(old_element)) {
473             int i = _constrained_elementss.indexOf(old_element);
474             _constrained_elementss.setElementAt(new_element, i);
475         } else
476             throw new org.omg.mof.Reflective.NotFound();
477     }
478     public void remove_constrained_elements(
479         org.omg.mof.Model.ModelElement old_element)
480         throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError {
481         if (_constrained_elementss.contains(old_element))
482             _constrained_elementss.removeElement(old_element);
483         else
484             throw new org.omg.mof.Reflective.NotFound();
485     }
486
487     public ConstraintImpl(
488         String JavaDoc name,
489         String JavaDoc annotation,
490         org
491
            .omg
492             .mof
493             .Model
494             .ConstraintClassPackage
495             .EvaluationKind evaluation_policy,
496         org.omg.CORBA.Any JavaDoc expression,
497         String JavaDoc language,
498         org.omg.mof.Model.ConstraintClass _proxy) {
499         _name = name;
500         _annotation = annotation;
501         _evaluation_policy = evaluation_policy;
502         _expression = expression;
503         _language = language;
504         _class_proxy = _proxy;
505     }
506 }
507
Popular Tags