1 21 22 package org.omg.mof.Model; 24 public class AssociationImpl extends org.omg.mof.Model.AssociationPOA { 25 26 public java.lang.String ref_mof_id() { 29 int id = _orb().object_to_string(_this()).hashCode(); 30 return String.valueOf(id); 31 } 32 public org.omg.mof.Reflective.RefObject ref_meta_object() { 34 throw new org.omg.CORBA.NO_IMPLEMENT ( 35 "ref_meta_object method not implemented", 36 1, 37 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 38 } 39 public boolean ref_itself( 41 org.omg.mof.Reflective.RefBaseObject other_object) { 42 String 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 public org.omg.mof.Reflective._RefPackage ref_immediate_package() { 50 throw new org.omg.CORBA.NO_IMPLEMENT ( 51 "ref_immediate_package method not implemented", 52 1, 53 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 54 } 55 public org.omg.mof.Reflective._RefPackage ref_outermost_package() { 57 throw new org.omg.CORBA.NO_IMPLEMENT ( 58 "ref_moutermost_package method not implemented", 59 1, 60 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 61 } 62 public void ref_delete() throws org.omg.mof.Reflective.MofError { 64 throw new org.omg.CORBA.NO_IMPLEMENT ( 65 "ref_delete method not implemented", 66 1, 67 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 68 } 69 70 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 ( 76 "ref_is_instance_of method not implemented", 77 1, 78 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 79 } 80 public org.omg.mof.Reflective.RefObject ref_create_instance( 82 org.omg.CORBA.Any [] args) 83 throws org.omg.mof.Reflective.MofError { 84 throw new org.omg.CORBA.NO_IMPLEMENT ( 85 "ref_create_instance method not implemented", 86 1, 87 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 88 } 89 public org.omg.mof.Reflective.RefObject[] ref_all_objects( 91 boolean include_subtypes) { 92 throw new org.omg.CORBA.NO_IMPLEMENT ( 93 "ref_all_objects method not implemented", 94 1, 95 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 96 } 97 public void ref_set_value( 99 org.omg.mof.Reflective.RefObject feature, 100 org.omg.CORBA.Any new_value) 101 throws org.omg.mof.Reflective.MofError { 102 throw new org.omg.CORBA.NO_IMPLEMENT ( 103 "ref_set_value method not implemented", 104 1, 105 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 106 } 107 public org.omg.CORBA.Any 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 ( 112 "ref_value method not implemented", 113 1, 114 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 115 } 116 public void ref_unset_value() throws org.omg.mof.Reflective.MofError { 118 throw new org.omg.CORBA.NO_IMPLEMENT ( 119 "ref_unset_value method not implemented", 120 1, 121 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 122 } 123 public void ref_add_value( 125 org.omg.mof.Reflective.RefObject feature, 126 org.omg.CORBA.Any new_element) 127 throws org.omg.mof.Reflective.MofError { 128 throw new org.omg.CORBA.NO_IMPLEMENT ( 129 "ref_add_value method not implemented", 130 1, 131 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 132 } 133 public void ref_add_value_before( 135 org.omg.mof.Reflective.RefObject feature, 136 org.omg.CORBA.Any new_element, 137 org.omg.CORBA.Any before_element) 138 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 139 throw new org.omg.CORBA.NO_IMPLEMENT ( 140 "ref_add_value_before method not implemented", 141 1, 142 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 143 } 144 public void ref_add_value_at( 146 org.omg.mof.Reflective.RefObject feature, 147 org.omg.CORBA.Any 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 ( 151 "ref_add_value_at method not implemented", 152 1, 153 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 154 } 155 public void ref_modify_value( 157 org.omg.mof.Reflective.RefObject feature, 158 org.omg.CORBA.Any old_element, 159 org.omg.CORBA.Any new_element) 160 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 161 throw new org.omg.CORBA.NO_IMPLEMENT ( 162 "ref_modify_value method not implemented", 163 1, 164 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 165 } 166 public void ref_modify_value_at( 168 org.omg.mof.Reflective.RefObject feature, 169 org.omg.CORBA.Any 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 ( 173 "ref_modify_value_at method not implemented", 174 1, 175 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 176 } 177 public void ref_remove_value( 179 org.omg.mof.Reflective.RefObject feature, 180 org.omg.CORBA.Any existing_element) 181 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 182 throw new org.omg.CORBA.NO_IMPLEMENT ( 183 "ref_remove_value method not implemented", 184 1, 185 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 186 } 187 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 ( 193 "ref_remove_value_at method not implemented", 194 1, 195 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 196 } 197 public org.omg.mof.Reflective.RefObject ref_immediate_composite() { 199 throw new org.omg.CORBA.NO_IMPLEMENT ( 200 "ref_remove_value method not implemented", 201 1, 202 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 203 } 204 public org.omg.mof.Reflective.RefObject ref_outermost_composite() { 206 throw new org.omg.CORBA.NO_IMPLEMENT ( 207 "ref_outermost_composite method not implemented", 208 1, 209 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 210 } 211 public org.omg.CORBA.Any 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 ( 219 "ref_invoke_operation( method not implemented", 220 1, 221 org.omg.CORBA.CompletionStatus.COMPLETED_NO); 222 } 223 private org.omg.mof.Model.AssociationClass _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.Namespace[] all_of_type_namespace() { 228 return _class_proxy.all_of_type_namespace(); 229 } 230 public org 231 .omg 232 .mof 233 .Model 234 .GeneralizableElement[] all_of_type_generalizable_element() { 235 return _class_proxy.all_of_type_generalizable_element(); 236 } 237 public org.omg.mof.Model.Classifier[] all_of_type_classifier() { 238 return _class_proxy.all_of_type_classifier(); 239 } 240 public org.omg.mof.Model.Association create_association( 241 String name, 242 String annotation, 243 org.omg.mof.Model.VisibilityKind visibility, 244 boolean is_leaf, 245 boolean is_root, 246 boolean is_abstract, 247 boolean is_derived) 248 throws org.omg.mof.Reflective.MofError { 249 return _class_proxy.create_association( 250 name, 251 annotation, 252 visibility, 253 is_leaf, 254 is_root, 255 is_abstract, 256 is_derived); 257 } 258 public org.omg.mof.Model.Association[] all_of_class_association() { 259 return _class_proxy.all_of_class_association(); 260 } 261 public org.omg.mof.Model.Association[] all_of_type_association() { 262 return _class_proxy.all_of_type_association(); 263 } 264 private String _name; 266 public String name() throws org.omg.mof.Reflective.MofError { 267 return _name; 268 } 269 public void set_name(String new_value) 270 throws org.omg.mof.Reflective.MofError { 271 _name = new_value; 272 } 273 274 private String _annotation; 276 public String annotation() throws org.omg.mof.Reflective.MofError { 277 return _annotation; 278 } 279 public void set_annotation(String new_value) 280 throws org.omg.mof.Reflective.MofError { 281 _annotation = new_value; 282 } 283 284 private java.util.Vector _qualified_names = new java.util.Vector (); 286 public String [] qualified_name() throws org.omg.mof.Reflective.MofError { 287 java.util.Vector _name_qualified = new java.util.Vector (); 289 _name_qualified.addElement(_name); 290 291 Namespace _current = _this(); 293 boolean exist = true; 294 while (exist) { 295 try { 296 _current = _current.container(); 297 _name_qualified.addElement(_current.name()); 298 } catch (org.omg.mof.Reflective.NotSet ex) { 299 exist = false; 300 } 301 } 302 String [] _temp = new String [_name_qualified.size()]; 303 for (int i = 0; i < _temp.length; i++) 304 _temp[i] = (String ) _name_qualified.elementAt(i); 305 return _temp; 306 } 307 private org.omg.mof.Model.VisibilityKind _visibility; 309 public org.omg.mof.Model.VisibilityKind visibility() 310 throws org.omg.mof.Reflective.MofError { 311 return _visibility; 312 } 313 public void set_visibility(org.omg.mof.Model.VisibilityKind new_value) 314 throws org.omg.mof.Reflective.MofError { 315 _visibility = new_value; 316 } 317 318 private boolean _is_leaf; 320 public boolean is_leaf() throws org.omg.mof.Reflective.MofError { 321 return _is_leaf; 322 } 323 public void set_is_leaf(boolean new_value) 324 throws org.omg.mof.Reflective.MofError { 325 _is_leaf = new_value; 326 } 327 328 private boolean _is_root; 330 public boolean is_root() throws org.omg.mof.Reflective.MofError { 331 return _is_root; 332 } 333 public void set_is_root(boolean new_value) 334 throws org.omg.mof.Reflective.MofError { 335 _is_root = new_value; 336 } 337 338 private boolean _is_abstract; 340 public boolean is_abstract() throws org.omg.mof.Reflective.MofError { 341 return _is_abstract; 342 } 343 public void set_is_abstract(boolean new_value) 344 throws org.omg.mof.Reflective.MofError { 345 _is_abstract = new_value; 346 } 347 348 private boolean _is_derived; 350 public boolean is_derived() throws org.omg.mof.Reflective.MofError { 351 return _is_derived; 352 } 353 public void set_is_derived(boolean new_value) 354 throws org.omg.mof.Reflective.MofError { 355 _is_derived = new_value; 356 } 357 358 public GeneralizableElement[] all_supertypes() 360 throws org.omg.mof.Reflective.MofError { 361 java.util.Vector allSupertypesTable = new java.util.Vector (); 363 GeneralizableElement[] _supertypes = _this().supertypes(); 364 365 for (int i = 0; i < _supertypes.length; i++) { 366 GeneralizableElement currentSupertype = _supertypes[i]; 367 GeneralizableElement[] sup = currentSupertype.all_supertypes(); 368 for (int j = 0; j < sup.length; j++) { 369 if (!allSupertypesTable.contains(sup[j])) 370 allSupertypesTable.addElement(sup[j]); 371 } 372 if (!allSupertypesTable.contains(currentSupertype)) 373 allSupertypesTable.addElement(currentSupertype); 374 } 375 376 GeneralizableElement[] allSupertypes = 378 new GeneralizableElement[allSupertypesTable.size()]; 379 for (int i = 0; i < allSupertypesTable.size(); i++) 380 allSupertypes[i] = 381 (GeneralizableElement) allSupertypesTable.elementAt(i); 382 return allSupertypes; 383 } 384 385 private org.omg.mof.Model.Namespace _container = null; 418 public org.omg.mof.Model.Namespace container() 419 throws org.omg.mof.Reflective.NotSet, org.omg.mof.Reflective.MofError { 420 if (_container != null) 421 return _container; 422 else 423 throw new org.omg.mof.Reflective.NotSet(); 424 } 425 public void set_container(org.omg.mof.Model.Namespace new_value) 426 throws org.omg.mof.Reflective.MofError { 427 _container = new_value; 428 } 429 public void unset_container() throws org.omg.mof.Reflective.MofError { 430 _container = null; 431 } 432 433 private java.util.Vector _required_elementss = new java.util.Vector (); 435 public org.omg.mof.Model.ModelElement[] required_elements() 436 throws org.omg.mof.Reflective.MofError { 437 org.omg.mof.Model.ModelElement[] temp1 = 438 new org.omg.mof.Model.ModelElement[_required_elementss.size()]; 439 for (int i = 0; i < _required_elementss.size(); i++) 440 temp1[i] = 441 (org.omg.mof.Model.ModelElement) _required_elementss.elementAt( 442 i); 443 return temp1; 444 } 445 public void set_required_elements( 446 org.omg.mof.Model.ModelElement[] new_value) 447 throws org.omg.mof.Reflective.MofError { 448 _required_elementss.removeAllElements(); 449 for (int i = 0; i < new_value.length; i++) 450 _required_elementss.addElement(new_value[i]); 451 } 452 public void add_required_elements( 453 org.omg.mof.Model.ModelElement new_element) 454 throws org.omg.mof.Reflective.MofError { 455 _required_elementss.addElement(new_element); 456 } 457 public void modify_required_elements( 458 org.omg.mof.Model.ModelElement old_element, 459 org.omg.mof.Model.ModelElement new_element) 460 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 461 if (_required_elementss.contains(old_element)) { 462 int i = _required_elementss.indexOf(old_element); 463 _required_elementss.setElementAt(new_element, i); 464 } else 465 throw new org.omg.mof.Reflective.NotFound(); 466 } 467 public void remove_required_elements( 468 org.omg.mof.Model.ModelElement old_element) 469 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 470 if (_required_elementss.contains(old_element)) 471 _required_elementss.removeElement(old_element); 472 else 473 throw new org.omg.mof.Reflective.NotFound(); 474 } 475 476 private java.util.Vector _constraintss = new java.util.Vector (); 478 public org.omg.mof.Model.Constraint[] constraints() 479 throws org.omg.mof.Reflective.MofError { 480 org.omg.mof.Model.Constraint[] temp1 = 481 new org.omg.mof.Model.Constraint[_constraintss.size()]; 482 for (int i = 0; i < _constraintss.size(); i++) 483 temp1[i] = 484 (org.omg.mof.Model.Constraint) _constraintss.elementAt(i); 485 return temp1; 486 } 487 public void set_constraints(org.omg.mof.Model.Constraint[] new_value) 488 throws org.omg.mof.Reflective.MofError { 489 _constraintss.removeAllElements(); 490 for (int i = 0; i < new_value.length; i++) 491 _constraintss.addElement(new_value[i]); 492 } 493 public void add_constraints(org.omg.mof.Model.Constraint new_element) 494 throws org.omg.mof.Reflective.MofError { 495 _constraintss.addElement(new_element); 496 } 497 public void modify_constraints( 498 org.omg.mof.Model.Constraint old_element, 499 org.omg.mof.Model.Constraint new_element) 500 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 501 if (_constraintss.contains(old_element)) { 502 int i = _constraintss.indexOf(old_element); 503 _constraintss.setElementAt(new_element, i); 504 } else 505 throw new org.omg.mof.Reflective.NotFound(); 506 } 507 public void remove_constraints(org.omg.mof.Model.Constraint old_element) 508 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 509 if (_constraintss.contains(old_element)) 510 _constraintss.removeElement(old_element); 511 else 512 throw new org.omg.mof.Reflective.NotFound(); 513 } 514 515 private java.util.Vector _contentss = new java.util.Vector (); 517 public org.omg.mof.Model.ModelElement[] contents() 518 throws org.omg.mof.Reflective.MofError { 519 org.omg.mof.Model.ModelElement[] temp1 = 520 new org.omg.mof.Model.ModelElement[_contentss.size()]; 521 for (int i = 0; i < _contentss.size(); i++) 522 temp1[i] = (org.omg.mof.Model.ModelElement) _contentss.elementAt(i); 523 return temp1; 524 } 525 public void set_contents(org.omg.mof.Model.ModelElement[] new_value) 526 throws org.omg.mof.Reflective.MofError { 527 _contentss.removeAllElements(); 528 for (int i = 0; i < new_value.length; i++) 529 _contentss.addElement(new_value[i]); 530 } 531 public void add_contents(org.omg.mof.Model.ModelElement new_element) 532 throws org.omg.mof.Reflective.MofError { 533 _contentss.addElement(new_element); 534 } 535 public void add_contents_before( 536 org.omg.mof.Model.ModelElement new_element, 537 org.omg.mof.Model.ModelElement before_element) 538 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 539 if (_contentss.contains(before_element)) { 540 int i = _contentss.indexOf(before_element); 541 _contentss.insertElementAt(new_element, i); 542 } else 543 throw new org.omg.mof.Reflective.NotFound(); 544 } 545 public void modify_contents( 546 org.omg.mof.Model.ModelElement old_element, 547 org.omg.mof.Model.ModelElement new_element) 548 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 549 if (_contentss.contains(old_element)) { 550 int i = _contentss.indexOf(old_element); 551 _contentss.setElementAt(new_element, i); 552 } else 553 throw new org.omg.mof.Reflective.NotFound(); 554 } 555 public void remove_contents(org.omg.mof.Model.ModelElement old_element) 556 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 557 if (_contentss.contains(old_element)) 558 _contentss.removeElement(old_element); 559 else 560 throw new org.omg.mof.Reflective.NotFound(); 561 } 562 563 private java.util.Vector _supertypess = new java.util.Vector (); 565 public org.omg.mof.Model.GeneralizableElement[] supertypes() 566 throws org.omg.mof.Reflective.MofError { 567 org.omg.mof.Model.GeneralizableElement[] temp1 = 568 new org.omg.mof.Model.GeneralizableElement[_supertypess.size()]; 569 for (int i = 0; i < _supertypess.size(); i++) 570 temp1[i] = 571 ( 572 org 573 .omg 574 .mof 575 .Model 576 .GeneralizableElement) _supertypess 577 .elementAt( 578 i); 579 return temp1; 580 } 581 public void set_supertypes( 582 org.omg.mof.Model.GeneralizableElement[] new_value) 583 throws org.omg.mof.Reflective.MofError { 584 _supertypess.removeAllElements(); 585 for (int i = 0; i < new_value.length; i++) 586 _supertypess.addElement(new_value[i]); 587 } 588 public void add_supertypes( 589 org.omg.mof.Model.GeneralizableElement new_element) 590 throws org.omg.mof.Reflective.MofError { 591 _supertypess.addElement(new_element); 592 } 593 public void add_supertypes_before( 594 org.omg.mof.Model.GeneralizableElement new_element, 595 org.omg.mof.Model.GeneralizableElement before_element) 596 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 597 if (_supertypess.contains(before_element)) { 598 int i = _supertypess.indexOf(before_element); 599 _supertypess.insertElementAt(new_element, i); 600 } else 601 throw new org.omg.mof.Reflective.NotFound(); 602 } 603 public void modify_supertypes( 604 org.omg.mof.Model.GeneralizableElement old_element, 605 org.omg.mof.Model.GeneralizableElement new_element) 606 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 607 if (_supertypess.contains(old_element)) { 608 int i = _supertypess.indexOf(old_element); 609 _supertypess.setElementAt(new_element, i); 610 } else 611 throw new org.omg.mof.Reflective.NotFound(); 612 } 613 public void remove_supertypes( 614 org.omg.mof.Model.GeneralizableElement old_element) 615 throws org.omg.mof.Reflective.NotFound, org.omg.mof.Reflective.MofError { 616 if (_supertypess.contains(old_element)) 617 _supertypess.removeElement(old_element); 618 else 619 throw new org.omg.mof.Reflective.NotFound(); 620 } 621 622 public AssociationImpl( 623 String name, 624 String annotation, 625 org.omg.mof.Model.VisibilityKind visibility, 626 boolean is_leaf, 627 boolean is_root, 628 boolean is_abstract, 629 boolean is_derived, 630 org.omg.mof.Model.AssociationClass _proxy) { 631 _name = name; 632 _annotation = annotation; 633 _visibility = visibility; 634 _is_leaf = is_leaf; 635 _is_root = is_root; 636 _is_abstract = is_abstract; 637 _is_derived = is_derived; 638 _class_proxy = _proxy; 639 } 640 } 641 | Popular Tags |