001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 3.0.10 004 * 005 * Do not make changes to this file unless you know what you are doing--modify 006 * the SWIG interface file instead. 007 * ----------------------------------------------------------------------------- */ 008 009package org.sbml.libsbml; 010 011/** 012 * <span class="pkg-marker pkg-color-groups"><a href="group__groups.html">groups</a></span> 013 A member of a {@link Group}. 014 <p> 015 * {@link Member} class objects are used to define what constitutes a 'group' in the 016 * SBML Level 3 {@link Group} package. {@link Member} objects reference other SBML 017 * components in an SBML document. A {@link Member} has four optional attributes: 018 * 'id' and 'name', which identify the element, and 'idRef' and 'metaIdRef' 019 * which reference the identifiers of other elements. 020 <p> 021 * There must be exactly one (and only one) method used to reference another 022 * element: either 'idRef' or 'metaIdRef' may be defined, but not both. 023 * (Multiple attributes are needed to account for the different types of 024 * identifiers that a given object may have.) The referenced object 025 * (including, potentially, another {@link Group} object) is thus made a member of 026 * the {@link Group} in which the {@link Member} object is contained. 027 <p> 028 * Since {@link Member} is derived from {@link SBase}, which provides both the ability to 029 * attach {@link SBO} terms as well as MIRIAM annotations, the semantics of a given 030 * member in a model can be made more precise by reference to external 031 * controlled vocabularies and ontologies. 032 <p> 033 * <h2>Membership in a {@link Group} object</h2> 034 <p> 035 * If an SBML element is referenced by a {@link Group}'s child {@link Member} (directly or 036 * indirectly), it is considered to be a member of that {@link Group}. If the same 037 * element is referenced by multiple {@link Member} objects, this is equivalent to 038 * including it just once. (It is considered best practice to avoid this, 039 * but does not make for an invalid SBML document.) 040 <p> 041 * Children of referenced elements are not considered to be members of the 042 * Group: a {@link KineticLaw} of a referenced {@link Reaction} is not itself a {@link Group} 043 * member. Even the membership of so-called SBML container classes (e.g., 044 * {@link ListOfSpecies}, {@link ListOfCompartments}, etc.) does not imply inclusion of 045 * children as members of the {@link Group}. The sole exception to this rule is the 046 * handling of {@link ListOfMembers} class. 047 <p> 048 * Please refer to the description of the {@link Group} class for more information 049 * about groups, members, and the semantics of group membership. 050 <p> 051 * @see Group 052 * @see ListOfGroups 053 * @see ListOfMembers 054 */ 055 056public class Member extends SBase { 057 private long swigCPtr; 058 059 protected Member(long cPtr, boolean cMemoryOwn) 060 { 061 super(libsbmlJNI.Member_SWIGUpcast(cPtr), cMemoryOwn); 062 swigCPtr = cPtr; 063 } 064 065 protected static long getCPtr(Member obj) 066 { 067 return (obj == null) ? 0 : obj.swigCPtr; 068 } 069 070 protected static long getCPtrAndDisown (Member obj) 071 { 072 long ptr = 0; 073 074 if (obj != null) 075 { 076 ptr = obj.swigCPtr; 077 obj.swigCMemOwn = false; 078 } 079 080 return ptr; 081 } 082 083 protected void finalize() { 084 delete(); 085 } 086 087 public synchronized void delete() { 088 if (swigCPtr != 0) { 089 if (swigCMemOwn) { 090 swigCMemOwn = false; 091 libsbmlJNI.delete_Member(swigCPtr); 092 } 093 swigCPtr = 0; 094 } 095 super.delete(); 096 } 097 098 099/** 100 * Creates a new {@link Member} using the given SBML Level, Version and 101 * “groups” package version. 102 <p> 103 * @param level a long integer, the SBML Level to assign to this {@link Member}. 104 <p> 105 * @param version a long integer, the SBML Version to assign to this {@link Member}. 106 <p> 107 * @param pkgVersion a long integer, the SBML Groups Version to assign to 108 * this {@link Member}. 109 <p> 110 * <p> 111 * @note Attempting to add an object to an {@link SBMLDocument} having a different 112 * combination of SBML Level, Version and XML namespaces than the object 113 * itself will result in an error at the time a caller attempts to make the 114 * addition. A parent object must have compatible Level, Version and XML 115 * namespaces. (Strictly speaking, a parent may also have more XML 116 * namespaces than a child, but the reverse is not permitted.) The 117 * restriction is necessary to ensure that an SBML model has a consistent 118 * overall structure. This requires callers to manage their objects 119 * carefully, but the benefit is increased flexibility in how models can be 120 * created by permitting callers to create objects bottom-up if desired. In 121 * situations where objects are not yet attached to parents (e.g., 122 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 123 * libSBML determine such things as whether it is valid to assign a 124 * particular value to an attribute. For packages, this means that the 125 * parent object to which this package element is being added must have 126 * been created with the package namespace, or that the package namespace 127 * was added to it, even if that parent is not a package object itself. 128 */ public 129 Member(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException { 130 this(libsbmlJNI.new_Member__SWIG_0(level, version, pkgVersion), true); 131 } 132 133 134/** 135 * Creates a new {@link Member} using the given SBML Level, Version and 136 * “groups” package version. 137 <p> 138 * @param level a long integer, the SBML Level to assign to this {@link Member}. 139 <p> 140 * @param version a long integer, the SBML Version to assign to this {@link Member}. 141 <p> 142 * @param pkgVersion a long integer, the SBML Groups Version to assign to 143 * this {@link Member}. 144 <p> 145 * <p> 146 * @note Attempting to add an object to an {@link SBMLDocument} having a different 147 * combination of SBML Level, Version and XML namespaces than the object 148 * itself will result in an error at the time a caller attempts to make the 149 * addition. A parent object must have compatible Level, Version and XML 150 * namespaces. (Strictly speaking, a parent may also have more XML 151 * namespaces than a child, but the reverse is not permitted.) The 152 * restriction is necessary to ensure that an SBML model has a consistent 153 * overall structure. This requires callers to manage their objects 154 * carefully, but the benefit is increased flexibility in how models can be 155 * created by permitting callers to create objects bottom-up if desired. In 156 * situations where objects are not yet attached to parents (e.g., 157 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 158 * libSBML determine such things as whether it is valid to assign a 159 * particular value to an attribute. For packages, this means that the 160 * parent object to which this package element is being added must have 161 * been created with the package namespace, or that the package namespace 162 * was added to it, even if that parent is not a package object itself. 163 */ public 164 Member(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 165 this(libsbmlJNI.new_Member__SWIG_1(level, version), true); 166 } 167 168 169/** 170 * Creates a new {@link Member} using the given SBML Level, Version and 171 * “groups” package version. 172 <p> 173 * @param level a long integer, the SBML Level to assign to this {@link Member}. 174 <p> 175 * @param version a long integer, the SBML Version to assign to this {@link Member}. 176 <p> 177 * @param pkgVersion a long integer, the SBML Groups Version to assign to 178 * this {@link Member}. 179 <p> 180 * <p> 181 * @note Attempting to add an object to an {@link SBMLDocument} having a different 182 * combination of SBML Level, Version and XML namespaces than the object 183 * itself will result in an error at the time a caller attempts to make the 184 * addition. A parent object must have compatible Level, Version and XML 185 * namespaces. (Strictly speaking, a parent may also have more XML 186 * namespaces than a child, but the reverse is not permitted.) The 187 * restriction is necessary to ensure that an SBML model has a consistent 188 * overall structure. This requires callers to manage their objects 189 * carefully, but the benefit is increased flexibility in how models can be 190 * created by permitting callers to create objects bottom-up if desired. In 191 * situations where objects are not yet attached to parents (e.g., 192 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 193 * libSBML determine such things as whether it is valid to assign a 194 * particular value to an attribute. For packages, this means that the 195 * parent object to which this package element is being added must have 196 * been created with the package namespace, or that the package namespace 197 * was added to it, even if that parent is not a package object itself. 198 */ public 199 Member(long level) throws org.sbml.libsbml.SBMLConstructorException { 200 this(libsbmlJNI.new_Member__SWIG_2(level), true); 201 } 202 203 204/** 205 * Creates a new {@link Member} using the given SBML Level, Version and 206 * “groups” package version. 207 <p> 208 * @param level a long integer, the SBML Level to assign to this {@link Member}. 209 <p> 210 * @param version a long integer, the SBML Version to assign to this {@link Member}. 211 <p> 212 * @param pkgVersion a long integer, the SBML Groups Version to assign to 213 * this {@link Member}. 214 <p> 215 * <p> 216 * @note Attempting to add an object to an {@link SBMLDocument} having a different 217 * combination of SBML Level, Version and XML namespaces than the object 218 * itself will result in an error at the time a caller attempts to make the 219 * addition. A parent object must have compatible Level, Version and XML 220 * namespaces. (Strictly speaking, a parent may also have more XML 221 * namespaces than a child, but the reverse is not permitted.) The 222 * restriction is necessary to ensure that an SBML model has a consistent 223 * overall structure. This requires callers to manage their objects 224 * carefully, but the benefit is increased flexibility in how models can be 225 * created by permitting callers to create objects bottom-up if desired. In 226 * situations where objects are not yet attached to parents (e.g., 227 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 228 * libSBML determine such things as whether it is valid to assign a 229 * particular value to an attribute. For packages, this means that the 230 * parent object to which this package element is being added must have 231 * been created with the package namespace, or that the package namespace 232 * was added to it, even if that parent is not a package object itself. 233 */ public 234 Member() throws org.sbml.libsbml.SBMLConstructorException { 235 this(libsbmlJNI.new_Member__SWIG_3(), true); 236 } 237 238 239/** 240 * Creates a new {@link Member} using the given {@link GroupsPkgNamespaces} object. 241 <p> 242 * <p> 243 * The package namespaces object used in this constructor is derived from a 244 * {@link SBMLNamespaces} object, which encapsulates SBML Level/Version/namespaces 245 * information. It is used to communicate the SBML Level, Version, and 246 * package version and name information used in addition to SBML Level 3 Core. A 247 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an 248 * package namespace object somewhere in a program once, then hand that object 249 * as needed to object constructors of that package that accept it as and 250 * argument, such as this one. 251 <p> 252 * @param groupsns the {@link GroupsPkgNamespaces} object. 253 <p> 254 * <p> 255 * @note Attempting to add an object to an {@link SBMLDocument} having a different 256 * combination of SBML Level, Version and XML namespaces than the object 257 * itself will result in an error at the time a caller attempts to make the 258 * addition. A parent object must have compatible Level, Version and XML 259 * namespaces. (Strictly speaking, a parent may also have more XML 260 * namespaces than a child, but the reverse is not permitted.) The 261 * restriction is necessary to ensure that an SBML model has a consistent 262 * overall structure. This requires callers to manage their objects 263 * carefully, but the benefit is increased flexibility in how models can be 264 * created by permitting callers to create objects bottom-up if desired. In 265 * situations where objects are not yet attached to parents (e.g., 266 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 267 * libSBML determine such things as whether it is valid to assign a 268 * particular value to an attribute. For packages, this means that the 269 * parent object to which this package element is being added must have 270 * been created with the package namespace, or that the package namespace 271 * was added to it, even if that parent is not a package object itself. 272 */ public 273 Member(GroupsPkgNamespaces groupsns) throws org.sbml.libsbml.SBMLConstructorException { 274 this(libsbmlJNI.new_Member__SWIG_4(GroupsPkgNamespaces.getCPtr(groupsns), groupsns), true); 275 } 276 277 278/** 279 * Copy constructor for {@link Member}. 280 <p> 281 * @param orig the {@link Member} instance to copy. 282 */ public 283 Member(Member orig) throws org.sbml.libsbml.SBMLConstructorException { 284 this(libsbmlJNI.new_Member__SWIG_5(Member.getCPtr(orig), orig), true); 285 } 286 287 288/** 289 * Creates and returns a deep copy of this {@link Member} object. 290 <p> 291 * @return a (deep) copy of this {@link Member} object. 292 */ public 293 Member cloneObject() { 294 long cPtr = libsbmlJNI.Member_cloneObject(swigCPtr, this); 295 return (cPtr == 0) ? null : new Member(cPtr, true); 296 } 297 298 299/** 300 * Returns the value of the 'id' attribute of this {@link Member}. 301 <p> 302 * @return the value of the 'id' attribute of this {@link Member} as a string. 303 */ public 304 String getId() { 305 return libsbmlJNI.Member_getId(swigCPtr, this); 306 } 307 308 309/** 310 * Returns the value of the 'name' attribute of this {@link Member}. 311 <p> 312 * @return the value of the 'name' attribute of this {@link Member} as a string. 313 */ public 314 String getName() { 315 return libsbmlJNI.Member_getName(swigCPtr, this); 316 } 317 318 319/** 320 * Returns the value of the 'idRef' attribute of this {@link Member}. 321 <p> 322 * <p> 323 * The attributes 'idRef' and 'metaIdRef' on {@link Member} are used to reference the 324 * identifiers of other components in a model in order to include them as 325 * members of a {@link Group}. There must be exactly one (and only one) method used 326 * to reference another element: either 'idRef' or 'metaIdRef' may be 327 * defined, but not both. The value must be the identifier of an object 328 * elsewhere in the {@link Model}. (Object identifiers are usually set by attributes 329 * named 'id'; thus, the 'idRef' value will usually be the 'id' value of an 330 * object in the {@link Model}.) An example value of 'idRef' might be the identifier 331 * of a species in the model, or the identifier of a {@link Group} object. The 332 * namespace in which the <code>SId</code> value is to be found is the 333 * <code>SId</code> namespace of the {@link Model} to which the {@link Group} belongs. 334 * Conversely, elements with 'id' values that are not part of the SId 335 * namespace may <em>not</em> be referenced by this 'idRef' attribute. In SBML 336 * Level 3, this includes the {@link Unit} and {@link LocalParameter} 337 * objects. 338 <p> 339 * @return the value of the 'idRef' attribute of this {@link Member} as a string. 340 */ public 341 String getIdRef() { 342 return libsbmlJNI.Member_getIdRef(swigCPtr, this); 343 } 344 345 346/** 347 * Returns the value of the 'metaIdRef' attribute of this {@link Member}. 348 <p> 349 * <p> 350 * The attributes 'idRef' and 'metaIdRef' on {@link Member} are used to reference the 351 * identifiers of other components in a model in order to include them as 352 * members of a {@link Group}. There must be exactly one (and only one) method used 353 * to reference another element: either 'idRef' or 'metaIdRef' may be 354 * defined, but not both. The 'metaIdRef' attribute takes a value of type 355 * <code>IDREF</code>. This attribute is used to refer to a 'metaid' 356 * attribute value on any other object in the {@link Model}, for cases where the 357 * object being referenced does not have an identifier in the {@link Model} SId 358 * namespace. (This is the case with, for example, units and rules in SBML 359 * Level 3 Version 1.) Since meta identifiers are optional 360 * attributes of {@link SBase}, all SBML objects have the potential to have a meta 361 * identifier value, including most elements from other SBML packages. 362 <p> 363 * Note that even if used in conjunction with the SBML Level 3 364 * Hierarchical Model Composition package, this attribute is not allowed to 365 * reference elements that reside within other {@link Model} objects in the same SBML 366 * Document. Referenced elements must be normal members of the parent {@link Model} 367 * containing the {@link Member} object, and submodel elements may be normally 368 * accessed by creating replacements. 369 <p> 370 * @return the value of the 'metaIdRef' attribute of this {@link Member} as a string. 371 */ public 372 String getMetaIdRef() { 373 return libsbmlJNI.Member_getMetaIdRef(swigCPtr, this); 374 } 375 376 377/** 378 * Predicate returning <code>true</code> if this {@link Member}'s 'id' attribute is set. 379 <p> 380 * @return <code>true</code> if this {@link Member}'s 'id' attribute has been set, otherwise @c 381 * false is returned. 382 */ public 383 boolean isSetId() { 384 return libsbmlJNI.Member_isSetId(swigCPtr, this); 385 } 386 387 388/** 389 * Predicate returning <code>true</code> if this {@link Member}'s 'name' attribute is set. 390 <p> 391 * @return <code>true</code> if this {@link Member}'s 'name' attribute has been set, otherwise 392 * <code>false</code> is returned. 393 */ public 394 boolean isSetName() { 395 return libsbmlJNI.Member_isSetName(swigCPtr, this); 396 } 397 398 399/** 400 * Predicate returning <code>true</code> if this {@link Member}'s 'idRef' attribute is set. 401 <p> 402 * <p> 403 * The attributes 'idRef' and 'metaIdRef' on {@link Member} are used to reference the 404 * identifiers of other components in a model in order to include them as 405 * members of a {@link Group}. There must be exactly one (and only one) method used 406 * to reference another element: either 'idRef' or 'metaIdRef' may be 407 * defined, but not both. The value must be the identifier of an object 408 * elsewhere in the {@link Model}. (Object identifiers are usually set by attributes 409 * named 'id'; thus, the 'idRef' value will usually be the 'id' value of an 410 * object in the {@link Model}.) An example value of 'idRef' might be the identifier 411 * of a species in the model, or the identifier of a {@link Group} object. The 412 * namespace in which the <code>SId</code> value is to be found is the 413 * <code>SId</code> namespace of the {@link Model} to which the {@link Group} belongs. 414 * Conversely, elements with 'id' values that are not part of the SId 415 * namespace may <em>not</em> be referenced by this 'idRef' attribute. In SBML 416 * Level 3, this includes the {@link Unit} and {@link LocalParameter} 417 * objects. 418 <p> 419 * @return <code>true</code> if this {@link Member}'s 'idRef' attribute has been set, otherwise 420 * <code>false</code> is returned. 421 */ public 422 boolean isSetIdRef() { 423 return libsbmlJNI.Member_isSetIdRef(swigCPtr, this); 424 } 425 426 427/** 428 * Predicate returning <code>true</code> if this {@link Member}'s 'metaIdRef' attribute is set. 429 <p> 430 * <p> 431 * The attributes 'idRef' and 'metaIdRef' on {@link Member} are used to reference the 432 * identifiers of other components in a model in order to include them as 433 * members of a {@link Group}. There must be exactly one (and only one) method used 434 * to reference another element: either 'idRef' or 'metaIdRef' may be 435 * defined, but not both. The 'metaIdRef' attribute takes a value of type 436 * <code>IDREF</code>. This attribute is used to refer to a 'metaid' 437 * attribute value on any other object in the {@link Model}, for cases where the 438 * object being referenced does not have an identifier in the {@link Model} SId 439 * namespace. (This is the case with, for example, units and rules in SBML 440 * Level 3 Version 1.) Since meta identifiers are optional 441 * attributes of {@link SBase}, all SBML objects have the potential to have a meta 442 * identifier value, including most elements from other SBML packages. 443 <p> 444 * Note that even if used in conjunction with the SBML Level 3 445 * Hierarchical Model Composition package, this attribute is not allowed to 446 * reference elements that reside within other {@link Model} objects in the same SBML 447 * Document. Referenced elements must be normal members of the parent {@link Model} 448 * containing the {@link Member} object, and submodel elements may be normally 449 * accessed by creating replacements. 450 <p> 451 * @return <code>true</code> if this {@link Member}'s 'metaIdRef' attribute has been set, 452 * otherwise <code>false</code> is returned. 453 */ public 454 boolean isSetMetaIdRef() { 455 return libsbmlJNI.Member_isSetMetaIdRef(swigCPtr, this); 456 } 457 458 459/** 460 * Sets the value of the 'id' attribute of this {@link Member}. 461 <p> 462 * @param id String& value of the 'id' attribute to be set. 463 <p> 464 * <p> 465 * @return integer value indicating success/failure of the 466 * function. The possible values 467 * returned by this function are: 468 * <ul> 469 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 470 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 471 * </ul> 472 */ public 473 int setId(String id) { 474 return libsbmlJNI.Member_setId(swigCPtr, this, id); 475 } 476 477 478/** 479 * Sets the value of the 'name' attribute of this {@link Member}. 480 <p> 481 * @param name String& value of the 'name' attribute to be set. 482 <p> 483 * <p> 484 * @return integer value indicating success/failure of the 485 * function. The possible values 486 * returned by this function are: 487 * <ul> 488 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 489 * </ul> 490 */ public 491 int setName(String name) { 492 return libsbmlJNI.Member_setName(swigCPtr, this, name); 493 } 494 495 496/** 497 * Sets the value of the 'idRef' attribute of this {@link Member}. 498 <p> 499 * <p> 500 * The attributes 'idRef' and 'metaIdRef' on {@link Member} are used to reference the 501 * identifiers of other components in a model in order to include them as 502 * members of a {@link Group}. There must be exactly one (and only one) method used 503 * to reference another element: either 'idRef' or 'metaIdRef' may be 504 * defined, but not both. The value must be the identifier of an object 505 * elsewhere in the {@link Model}. (Object identifiers are usually set by attributes 506 * named 'id'; thus, the 'idRef' value will usually be the 'id' value of an 507 * object in the {@link Model}.) An example value of 'idRef' might be the identifier 508 * of a species in the model, or the identifier of a {@link Group} object. The 509 * namespace in which the <code>SId</code> value is to be found is the 510 * <code>SId</code> namespace of the {@link Model} to which the {@link Group} belongs. 511 * Conversely, elements with 'id' values that are not part of the SId 512 * namespace may <em>not</em> be referenced by this 'idRef' attribute. In SBML 513 * Level 3, this includes the {@link Unit} and {@link LocalParameter} 514 * objects. 515 <p> 516 * @param idRef String& value of the 'idRef' attribute to be set. 517 <p> 518 * <p> 519 * @return integer value indicating success/failure of the 520 * function. The possible values 521 * returned by this function are: 522 * <ul> 523 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 524 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 525 * </ul> 526 */ public 527 int setIdRef(String idRef) { 528 return libsbmlJNI.Member_setIdRef(swigCPtr, this, idRef); 529 } 530 531 532/** 533 * Sets the value of the 'metaIdRef' attribute of this {@link Member}. 534 <p> 535 * <p> 536 * The attributes 'idRef' and 'metaIdRef' on {@link Member} are used to reference the 537 * identifiers of other components in a model in order to include them as 538 * members of a {@link Group}. There must be exactly one (and only one) method used 539 * to reference another element: either 'idRef' or 'metaIdRef' may be 540 * defined, but not both. The 'metaIdRef' attribute takes a value of type 541 * <code>IDREF</code>. This attribute is used to refer to a 'metaid' 542 * attribute value on any other object in the {@link Model}, for cases where the 543 * object being referenced does not have an identifier in the {@link Model} SId 544 * namespace. (This is the case with, for example, units and rules in SBML 545 * Level 3 Version 1.) Since meta identifiers are optional 546 * attributes of {@link SBase}, all SBML objects have the potential to have a meta 547 * identifier value, including most elements from other SBML packages. 548 <p> 549 * Note that even if used in conjunction with the SBML Level 3 550 * Hierarchical Model Composition package, this attribute is not allowed to 551 * reference elements that reside within other {@link Model} objects in the same SBML 552 * Document. Referenced elements must be normal members of the parent {@link Model} 553 * containing the {@link Member} object, and submodel elements may be normally 554 * accessed by creating replacements. 555 <p> 556 * @param metaIdRef String& value of the 'metaIdRef' attribute to be 557 * set. 558 <p> 559 * <p> 560 * @return integer value indicating success/failure of the 561 * function. The possible values 562 * returned by this function are: 563 * <ul> 564 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 565 * </ul> 566 */ public 567 int setMetaIdRef(String metaIdRef) { 568 return libsbmlJNI.Member_setMetaIdRef(swigCPtr, this, metaIdRef); 569 } 570 571 572/** 573 * Unsets the value of the 'id' attribute of this {@link Member}. 574 <p> 575 * <p> 576 * @return integer value indicating success/failure of the 577 * function. The possible values 578 * returned by this function are: 579 * <ul> 580 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 581 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 582 * </ul> 583 */ public 584 int unsetId() { 585 return libsbmlJNI.Member_unsetId(swigCPtr, this); 586 } 587 588 589/** 590 * Unsets the value of the 'name' attribute of this {@link Member}. 591 <p> 592 * <p> 593 * @return integer value indicating success/failure of the 594 * function. The possible values 595 * returned by this function are: 596 * <ul> 597 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 598 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 599 * </ul> 600 */ public 601 int unsetName() { 602 return libsbmlJNI.Member_unsetName(swigCPtr, this); 603 } 604 605 606/** 607 * Unsets the value of the 'idRef' attribute of this {@link Member}. 608 <p> 609 * <p> 610 * The attributes 'idRef' and 'metaIdRef' on {@link Member} are used to reference the 611 * identifiers of other components in a model in order to include them as 612 * members of a {@link Group}. There must be exactly one (and only one) method used 613 * to reference another element: either 'idRef' or 'metaIdRef' may be 614 * defined, but not both. The value must be the identifier of an object 615 * elsewhere in the {@link Model}. (Object identifiers are usually set by attributes 616 * named 'id'; thus, the 'idRef' value will usually be the 'id' value of an 617 * object in the {@link Model}.) An example value of 'idRef' might be the identifier 618 * of a species in the model, or the identifier of a {@link Group} object. The 619 * namespace in which the <code>SId</code> value is to be found is the 620 * <code>SId</code> namespace of the {@link Model} to which the {@link Group} belongs. 621 * Conversely, elements with 'id' values that are not part of the SId 622 * namespace may <em>not</em> be referenced by this 'idRef' attribute. In SBML 623 * Level 3, this includes the {@link Unit} and {@link LocalParameter} 624 * objects. 625 <p> 626 * <p> 627 * @return integer value indicating success/failure of the 628 * function. The possible values 629 * returned by this function are: 630 * <ul> 631 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 632 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 633 * </ul> 634 */ public 635 int unsetIdRef() { 636 return libsbmlJNI.Member_unsetIdRef(swigCPtr, this); 637 } 638 639 640/** 641 * Unsets the value of the 'metaIdRef' attribute of this {@link Member}. 642 <p> 643 * <p> 644 * The attributes 'idRef' and 'metaIdRef' on {@link Member} are used to reference the 645 * identifiers of other components in a model in order to include them as 646 * members of a {@link Group}. There must be exactly one (and only one) method used 647 * to reference another element: either 'idRef' or 'metaIdRef' may be 648 * defined, but not both. The 'metaIdRef' attribute takes a value of type 649 * <code>IDREF</code>. This attribute is used to refer to a 'metaid' 650 * attribute value on any other object in the {@link Model}, for cases where the 651 * object being referenced does not have an identifier in the {@link Model} SId 652 * namespace. (This is the case with, for example, units and rules in SBML 653 * Level 3 Version 1.) Since meta identifiers are optional 654 * attributes of {@link SBase}, all SBML objects have the potential to have a meta 655 * identifier value, including most elements from other SBML packages. 656 <p> 657 * Note that even if used in conjunction with the SBML Level 3 658 * Hierarchical Model Composition package, this attribute is not allowed to 659 * reference elements that reside within other {@link Model} objects in the same SBML 660 * Document. Referenced elements must be normal members of the parent {@link Model} 661 * containing the {@link Member} object, and submodel elements may be normally 662 * accessed by creating replacements. 663 <p> 664 * <p> 665 * @return integer value indicating success/failure of the 666 * function. The possible values 667 * returned by this function are: 668 * <ul> 669 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 670 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 671 * </ul> 672 */ public 673 int unsetMetaIdRef() { 674 return libsbmlJNI.Member_unsetMetaIdRef(swigCPtr, this); 675 } 676 677 678/** 679 * <p> 680 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another 681 * value. 682 <p> 683 * <p> 684 * In SBML, object identifiers are of a data type called <code>SId</code>. 685 * In SBML Level 3, an explicit data type called <code>SIdRef</code> was 686 * introduced for attribute values that refer to <code>SId</code> values; in 687 * previous Levels of SBML, this data type did not exist and attributes were 688 * simply described to as 'referring to an identifier', but the effective 689 * data type was the same as <code>SIdRef</code> in Level 3. These and 690 * other methods of libSBML refer to the type <code>SIdRef</code> for all 691 * Levels of SBML, even if the corresponding SBML specification did not 692 * explicitly name the data type. 693 <p> 694 * This method works by looking at all attributes and (if appropriate) 695 * mathematical formulas in MathML content, comparing the referenced 696 * identifiers to the value of <code>oldid</code>. If any matches are found, the 697 * matching values are replaced with <code>newid</code>. The method does <em>not</em> 698 * descend into child elements. 699 <p> 700 * @param oldid the old identifier. 701 * @param newid the new identifier. 702 */ public 703 void renameSIdRefs(String oldid, String newid) { 704 libsbmlJNI.Member_renameSIdRefs(swigCPtr, this, oldid, newid); 705 } 706 707 708/** 709 * Returns the XML element name of this {@link Member} object. 710 <p> 711 * For {@link Member}, the XML element name is always <code>'member'.</code> 712 <p> 713 * @return the name of this element, i.e. <code>'member'.</code> 714 */ public 715 String getElementName() { 716 return libsbmlJNI.Member_getElementName(swigCPtr, this); 717 } 718 719 720/** 721 * Returns the libSBML type code for this {@link Member} object. 722 <p> 723 * <p> 724 * LibSBML attaches an identifying code to every kind of SBML object. These 725 * are integer constants known as <em>SBML type codes</em>. The names of all 726 * the codes begin with the characters <code>SBML_</code>. 727 * In the Java language interface for libSBML, the 728 * type codes are defined as static integer constants in the interface class 729 * {@link libsbmlConstants}. Note that different Level 3 730 * package plug-ins may use overlapping type codes; to identify the package 731 * to which a given object belongs, call the <code>getPackageName()</code> 732 * method on the object. 733 <p> 734 * @return the SBML type code for this object: 735 * {@link libsbmlConstants#SBML_GROUPS_MEMBER SBML_GROUPS_MEMBER}. 736 <p> 737 * <p> 738 * @warning <span class='warning'>The specific integer values of the possible 739 * type codes may be reused by different libSBML plug-ins for SBML Level 3. 740 * packages, To fully identify the correct code, <strong>it is necessary to 741 * invoke both getTypeCode() and getPackageName()</strong>.</span> 742 <p> 743 * @see #getElementName() 744 * @see #getPackageName() 745 */ public 746 int getTypeCode() { 747 return libsbmlJNI.Member_getTypeCode(swigCPtr, this); 748 } 749 750 751/** 752 * Predicate returning <code>true</code> if all the required attributes for this {@link Member} 753 * object have been set. 754 <p> 755 * @return <code>true</code> to indicate that all the required attributes of this 756 * {@link Member} have been set, otherwise <code>false</code> is returned. 757 <p> 758 * @note The required attributes for the {@link Member} object are: 759 */ public 760 boolean hasRequiredAttributes() { 761 return libsbmlJNI.Member_hasRequiredAttributes(swigCPtr, this); 762 } 763 764 765/** * @internal */ public 766 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 767 libsbmlJNI.Member_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 768 } 769 770 771/** * @internal */ public 772 SBase getReferencedElement() { 773 return libsbml.DowncastSBase(libsbmlJNI.Member_getReferencedElement(swigCPtr, this), false); 774} 775 776}