001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 2.0.11 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 * 013 * Representation of attributes on an XML node. 014 * <p> 015 * <p style='color: #777; font-style: italic'> 016This class of objects is defined by libSBML only and has no direct 017equivalent in terms of SBML components. This class is not prescribed by 018the SBML specifications, although it is used to implement features 019defined in SBML. 020</p> 021 022 * <p> 023 * <!-- leave this next break as-is to work around some doxygen bug --> 024 */ 025 026public class XMLAttributes { 027 private long swigCPtr; 028 protected boolean swigCMemOwn; 029 030 protected XMLAttributes(long cPtr, boolean cMemoryOwn) 031 { 032 swigCMemOwn = cMemoryOwn; 033 swigCPtr = cPtr; 034 } 035 036 protected static long getCPtr(XMLAttributes obj) 037 { 038 return (obj == null) ? 0 : obj.swigCPtr; 039 } 040 041 protected static long getCPtrAndDisown (XMLAttributes obj) 042 { 043 long ptr = 0; 044 045 if (obj != null) 046 { 047 ptr = obj.swigCPtr; 048 obj.swigCMemOwn = false; 049 } 050 051 return ptr; 052 } 053 054 protected void finalize() { 055 delete(); 056 } 057 058 public synchronized void delete() { 059 if (swigCPtr != 0) { 060 if (swigCMemOwn) { 061 swigCMemOwn = false; 062 libsbmlJNI.delete_XMLAttributes(swigCPtr); 063 } 064 swigCPtr = 0; 065 } 066 } 067 068 /** 069 * Equality comparison method for XMLAttributes. 070 * <p> 071 * Because the Java methods for libSBML are actually wrappers around code 072 * implemented in C++ and C, certain operations will not behave as 073 * expected. Equality comparison is one such case. An instance of a 074 * libSBML object class is actually a <em>proxy object</em> 075 * wrapping the real underlying C/C++ object. The normal <code>==</code> 076 * equality operator in Java will <em>only compare the Java proxy objects</em>, 077 * not the underlying native object. The result is almost never what you 078 * want in practical situations. Unfortunately, Java does not provide a 079 * way to override <code>==</code>. 080 * <p> 081 * The alternative that must be followed is to use the 082 * <code>equals()</code> method. The <code>equals</code> method on this 083 * class overrides the default java.lang.Object one, and performs an 084 * intelligent comparison of instances of objects of this class. The 085 * result is an assessment of whether two libSBML Java objects are truly 086 * the same underlying native-code objects. 087 * <p> 088 * The use of this method in practice is the same as the use of any other 089 * Java <code>equals</code> method. For example, 090 * <em>a</em><code>.equals(</code><em>b</em><code>)</code> returns 091 * <code>true</code> if <em>a</em> and <em>b</em> are references to the 092 * same underlying object. 093 * 094 * @param sb a reference to an object to which the current object 095 * instance will be compared 096 * 097 * @return <code>true</code> if <code>sb</code> refers to the same underlying 098 * native object as this one, <code>false</code> otherwise 099 */ 100 public boolean equals(Object sb) 101 { 102 if ( this == sb ) 103 { 104 return true; 105 } 106 return swigCPtr == getCPtr((XMLAttributes)(sb)); 107 } 108 109 /** 110 * Returns a hashcode for this XMLAttributes object. 111 * 112 * @return a hash code usable by Java methods that need them. 113 */ 114 public int hashCode() 115 { 116 return (int)(swigCPtr^(swigCPtr>>>32)); 117 } 118 119 120/** 121 * Creates a new empty {@link XMLAttributes} set. 122 */ public 123 XMLAttributes() throws org.sbml.libsbml.XMLConstructorException { 124 this(libsbmlJNI.new_XMLAttributes__SWIG_0(), true); 125 } 126 127 128/** 129 * Copy constructor; creates a copy of this {@link XMLAttributes} set. 130 * <p> 131 * <code>orig</code> the {@link XMLAttributes} object to copy. 132 * <p> 133 * @throws XMLConstructorException 134 * Thrown if the argument <code>orig</code> is <code>null.</code> 135 */ public 136 XMLAttributes(XMLAttributes orig) throws org.sbml.libsbml.XMLConstructorException { 137 this(libsbmlJNI.new_XMLAttributes__SWIG_1(XMLAttributes.getCPtr(orig), orig), true); 138 } 139 140 141/** 142 * Creates and returns a deep copy of this {@link XMLAttributes} set. 143 * <p> 144 * @return a (deep) copy of this {@link XMLAttributes} set. 145 */ public 146 XMLAttributes cloneObject() { 147 long cPtr = libsbmlJNI.XMLAttributes_cloneObject(swigCPtr, this); 148 return (cPtr == 0) ? null : new XMLAttributes(cPtr, true); 149 } 150 151 152/** 153 * Adds an attribute (a name/value pair) to this {@link XMLAttributes} object, 154 * optionally with a prefix and URI defining a namespace. 155 * <p> 156 * @param name a string, the local name of the attribute. 157 * @param value a string, the value of the attribute. 158 * @param namespaceURI a string, the namespace URI of the attribute. 159 * @param prefix a string, the prefix of the namespace 160 * <p> 161 * @return an integer code indicating the success or failure of the 162 * function. The possible values returned by this 163 * function are: 164 * <ul> 165 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 166 * </ul> 167 * <p> 168 * @note if local name with the same namespace URI already exists in this 169 * attribute set, its value and prefix will be replaced. 170 * <p> 171 * <!-- Don't remove the leading </dl> below. It's a hack for javadoc. --> 172</dl><dl class='docnote'><dt><b>Documentation note:</b></dt><dd> 173The native C++ implementation of this method defines a default argument 174value. In the documentation generated for different libSBML language 175bindings, you may or may not see corresponding arguments in the method 176declarations. For example, in Java and C#, a default argument is handled by 177declaring two separate methods, with one of them having the argument and 178the other one lacking the argument. However, the libSBML documentation will 179be <em>identical</em> for both methods. Consequently, if you are reading 180this and do not see an argument even though one is described, please look 181for descriptions of other variants of this method near where this one 182appears in the documentation. 183</dd></dl> 184 185 */ public 186 int add(String name, String value, String namespaceURI, String prefix) { 187 return libsbmlJNI.XMLAttributes_add__SWIG_0(swigCPtr, this, name, value, namespaceURI, prefix); 188 } 189 190 191/** 192 * Adds an attribute (a name/value pair) to this {@link XMLAttributes} object, 193 * optionally with a prefix and URI defining a namespace. 194 * <p> 195 * @param name a string, the local name of the attribute. 196 * @param value a string, the value of the attribute. 197 * @param namespaceURI a string, the namespace URI of the attribute. 198 * @param prefix a string, the prefix of the namespace 199 * <p> 200 * @return an integer code indicating the success or failure of the 201 * function. The possible values returned by this 202 * function are: 203 * <ul> 204 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 205 * </ul> 206 * <p> 207 * @note if local name with the same namespace URI already exists in this 208 * attribute set, its value and prefix will be replaced. 209 * <p> 210 * <!-- Don't remove the leading </dl> below. It's a hack for javadoc. --> 211</dl><dl class='docnote'><dt><b>Documentation note:</b></dt><dd> 212The native C++ implementation of this method defines a default argument 213value. In the documentation generated for different libSBML language 214bindings, you may or may not see corresponding arguments in the method 215declarations. For example, in Java and C#, a default argument is handled by 216declaring two separate methods, with one of them having the argument and 217the other one lacking the argument. However, the libSBML documentation will 218be <em>identical</em> for both methods. Consequently, if you are reading 219this and do not see an argument even though one is described, please look 220for descriptions of other variants of this method near where this one 221appears in the documentation. 222</dd></dl> 223 224 */ public 225 int add(String name, String value, String namespaceURI) { 226 return libsbmlJNI.XMLAttributes_add__SWIG_1(swigCPtr, this, name, value, namespaceURI); 227 } 228 229 230/** 231 * Adds an attribute (a name/value pair) to this {@link XMLAttributes} object, 232 * optionally with a prefix and URI defining a namespace. 233 * <p> 234 * @param name a string, the local name of the attribute. 235 * @param value a string, the value of the attribute. 236 * @param namespaceURI a string, the namespace URI of the attribute. 237 * @param prefix a string, the prefix of the namespace 238 * <p> 239 * @return an integer code indicating the success or failure of the 240 * function. The possible values returned by this 241 * function are: 242 * <ul> 243 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 244 * </ul> 245 * <p> 246 * @note if local name with the same namespace URI already exists in this 247 * attribute set, its value and prefix will be replaced. 248 * <p> 249 * <!-- Don't remove the leading </dl> below. It's a hack for javadoc. --> 250</dl><dl class='docnote'><dt><b>Documentation note:</b></dt><dd> 251The native C++ implementation of this method defines a default argument 252value. In the documentation generated for different libSBML language 253bindings, you may or may not see corresponding arguments in the method 254declarations. For example, in Java and C#, a default argument is handled by 255declaring two separate methods, with one of them having the argument and 256the other one lacking the argument. However, the libSBML documentation will 257be <em>identical</em> for both methods. Consequently, if you are reading 258this and do not see an argument even though one is described, please look 259for descriptions of other variants of this method near where this one 260appears in the documentation. 261</dd></dl> 262 263 */ public 264 int add(String name, String value) { 265 return libsbmlJNI.XMLAttributes_add__SWIG_2(swigCPtr, this, name, value); 266 } 267 268 269/** 270 * Adds an attribute with the given {@link XMLTriple}/value pair to this {@link XMLAttributes} set. 271 * <p> 272 * @note if local name with the same namespace URI already exists in this attribute set, 273 * its value and prefix will be replaced. 274 * <p> 275 * @param triple an {@link XMLTriple}, the XML triple of the attribute. 276 * @param value a string, the value of the attribute. 277 * <p> 278 * @return integer value indicating success/failure of the 279 * function. The possible values 280 * returned by this function are: 281 * <ul> 282 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 283 * </ul> 284 */ public 285 int add(XMLTriple triple, String value) { 286 return libsbmlJNI.XMLAttributes_add__SWIG_3(swigCPtr, this, XMLTriple.getCPtr(triple), triple, value); 287 } 288 289 290/** 291 * Removes an attribute with the given index from this {@link XMLAttributes} set. 292 * <p> 293 * @param n an integer the index of the resource to be deleted 294 * @return integer value indicating success/failure of the 295 * function. The possible values 296 * returned by this function are: 297 * <ul> 298 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 299 * <li> {@link libsbmlConstants#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE } 300 * </ul> 301 */ public 302 int removeResource(int n) { 303 return libsbmlJNI.XMLAttributes_removeResource(swigCPtr, this, n); 304 } 305 306 307/** 308 * Removes an attribute with the given index from this {@link XMLAttributes} set. 309 * (This function is an alias of {@link XMLAttributes#removeResource(int n)} ). 310 * <p> 311 * @param n an integer the index of the resource to be deleted 312 * <p> 313 * @return integer value indicating success/failure of the 314 * function. The possible values 315 * returned by this function are: 316 * <ul> 317 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 318 * <li> {@link libsbmlConstants#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE } 319 * </ul> 320 */ public 321 int remove(int n) { 322 return libsbmlJNI.XMLAttributes_remove__SWIG_0(swigCPtr, this, n); 323 } 324 325 326/** 327 * Removes an attribute with the given local name and namespace URI from 328 * this {@link XMLAttributes} set. 329 * <p> 330 * @param name a string, the local name of the attribute. 331 * @param uri a string, the namespace URI of the attribute. 332 * <p> 333 * @return integer value indicating success/failure of the 334 * function. The possible values 335 * returned by this function are: 336 * <ul> 337 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 338 * <li> {@link libsbmlConstants#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE } 339 * </ul> 340 */ public 341 int remove(String name, String uri) { 342 return libsbmlJNI.XMLAttributes_remove__SWIG_1(swigCPtr, this, name, uri); 343 } 344 345 346/** 347 * Removes an attribute with the given local name and namespace URI from 348 * this {@link XMLAttributes} set. 349 * <p> 350 * @param name a string, the local name of the attribute. 351 * @param uri a string, the namespace URI of the attribute. 352 * <p> 353 * @return integer value indicating success/failure of the 354 * function. The possible values 355 * returned by this function are: 356 * <ul> 357 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 358 * <li> {@link libsbmlConstants#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE } 359 * </ul> 360 */ public 361 int remove(String name) { 362 return libsbmlJNI.XMLAttributes_remove__SWIG_2(swigCPtr, this, name); 363 } 364 365 366/** 367 * Removes an attribute with the given {@link XMLTriple} from this {@link XMLAttributes} set. 368 * <p> 369 * @param triple an {@link XMLTriple}, the XML triple of the attribute. 370 * <p> 371 * @return integer value indicating success/failure of the 372 * function. The possible values 373 * returned by this function are: 374 * <ul> 375 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 376 * <li> {@link libsbmlConstants#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE } 377 * </ul> 378 */ public 379 int remove(XMLTriple triple) { 380 return libsbmlJNI.XMLAttributes_remove__SWIG_3(swigCPtr, this, XMLTriple.getCPtr(triple), triple); 381 } 382 383 384/** 385 * Clears (deletes) all attributes in this {@link XMLAttributes} object. 386 * <p> 387 * @return integer value indicating success/failure of the 388 * function. The possible values 389 * returned by this function are: 390 * <ul> 391 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 392 * </ul> 393 */ public 394 int clear() { 395 return libsbmlJNI.XMLAttributes_clear(swigCPtr, this); 396 } 397 398 399/** 400 * Return the index of an attribute with the given name. 401 * <p> 402 * @note A namespace bound to the name is not checked by this function. 403 * Thus, if there are multiple attributes with the given local name and 404 * different namespaces, the smallest index among those attributes will 405 * be returned. {@link XMLAttributes#getIndex(String name, String uri)} const or 406 * {@link XMLAttributes#getIndex(XMLTriple triple)} const should be used to get an index of an 407 * attribute with the given local name and namespace. 408 * <p> 409 * @param name a string, the local name of the attribute for which the 410 * index is required. 411 * <p> 412 * @return the index of an attribute with the given local name, or -1 if not present. 413 */ public 414 int getIndex(String name) { 415 return libsbmlJNI.XMLAttributes_getIndex__SWIG_0(swigCPtr, this, name); 416 } 417 418 419/** 420 * Return the index of an attribute with the given local name and namespace URI. 421 * <p> 422 * @param name a string, the local name of the attribute. 423 * @param uri a string, the namespace URI of the attribute. 424 * <p> 425 * @return the index of an attribute with the given local name and namespace URI, 426 * or -1 if not present. 427 */ public 428 int getIndex(String name, String uri) { 429 return libsbmlJNI.XMLAttributes_getIndex__SWIG_1(swigCPtr, this, name, uri); 430 } 431 432 433/** 434 * Return the index of an attribute with the given {@link XMLTriple}. 435 * <p> 436 * @param triple an {@link XMLTriple}, the XML triple of the attribute for which 437 * the index is required. 438 * <p> 439 * @return the index of an attribute with the given {@link XMLTriple}, or -1 if not present. 440 */ public 441 int getIndex(XMLTriple triple) { 442 return libsbmlJNI.XMLAttributes_getIndex__SWIG_2(swigCPtr, this, XMLTriple.getCPtr(triple), triple); 443 } 444 445 446/** 447 * Return the number of attributes in the set. 448 * <p> 449 * @return the number of attributes in this {@link XMLAttributes} set. 450 */ public 451 int getLength() { 452 return libsbmlJNI.XMLAttributes_getLength(swigCPtr, this); 453 } 454 455 456/** 457 * Return the number of attributes in the set. 458 * <p> 459 * @return the number of attributes in this {@link XMLAttributes} set. 460 * <p> 461 * This function is an alias for getLength introduced for consistency 462 * with other XML classes. 463 */ public 464 int getNumAttributes() { 465 return libsbmlJNI.XMLAttributes_getNumAttributes(swigCPtr, this); 466 } 467 468 469/** 470 * Return the local name of an attribute in this {@link XMLAttributes} set (by position). 471 * <p> 472 * @param index an integer, the position of the attribute whose local name is 473 * required. 474 * <p> 475 * @return the local name of an attribute in this list (by position). 476 * <p> 477 * @note If index is out of range, an empty string will be returned. Use 478 * {@link XMLAttributes#hasAttribute(int index)} const to test for the attribute 479 * existence. 480 */ public 481 String getName(int index) { 482 return libsbmlJNI.XMLAttributes_getName(swigCPtr, this, index); 483 } 484 485 486/** 487 * Return the prefix of an attribute in this {@link XMLAttributes} set (by position). 488 * <p> 489 * @param index an integer, the position of the attribute whose prefix is 490 * required. 491 * <p> 492 * @return the namespace prefix of an attribute in this list (by 493 * position). 494 * <p> 495 * @note If index is out of range, an empty string will be returned. Use 496 * {@link XMLAttributes#hasAttribute(int index)} const to test for the attribute 497 * existence. 498 */ public 499 String getPrefix(int index) { 500 return libsbmlJNI.XMLAttributes_getPrefix(swigCPtr, this, index); 501 } 502 503 504/** 505 * Return the prefixed name of an attribute in this {@link XMLAttributes} set (by position). 506 * <p> 507 * @param index an integer, the position of the attribute whose prefixed 508 * name is required. 509 * <p> 510 * @return the prefixed name of an attribute in this list (by 511 * position). 512 * <p> 513 * @note If index is out of range, an empty string will be returned. Use 514 * {@link XMLAttributes#hasAttribute(int index)} const to test for attribute existence. 515 */ public 516 String getPrefixedName(int index) { 517 return libsbmlJNI.XMLAttributes_getPrefixedName(swigCPtr, this, index); 518 } 519 520 521/** 522 * Return the namespace URI of an attribute in this {@link XMLAttributes} set (by position). 523 * <p> 524 * @param index an integer, the position of the attribute whose namespace URI is 525 * required. 526 * <p> 527 * @return the namespace URI of an attribute in this list (by position). 528 * <p> 529 * @note If index is out of range, an empty string will be returned. Use 530 * {@link XMLAttributes#hasAttribute(int index)} const to test for attribute existence. 531 */ public 532 String getURI(int index) { 533 return libsbmlJNI.XMLAttributes_getURI(swigCPtr, this, index); 534 } 535 536 537/** 538 * Return the value of an attribute in this {@link XMLAttributes} set (by position). 539 * <p> 540 * @param index an integer, the position of the attribute whose value is 541 * required. 542 * <p> 543 * @return the value of an attribute in the list (by position). 544 * <p> 545 * @note If index is out of range, an empty string will be returned. Use 546 * {@link XMLAttributes#hasAttribute(int index)} const to test for attribute existence. 547 */ public 548 String getValue(int index) { 549 return libsbmlJNI.XMLAttributes_getValue__SWIG_0(swigCPtr, this, index); 550 } 551 552 553/** 554 * Return an attribute's value by name. 555 * <p> 556 * @param name a string, the local name of the attribute whose value is required. 557 * <p> 558 * @return The attribute value as a string. 559 * <p> 560 * @note If an attribute with the given local name does not exist, an 561 * empty string will be returned. Use 562 * {@link XMLAttributes#hasAttribute(String name, String uri)} const 563 * to test for attribute existence. A namespace bound to the local name 564 * is not checked by this function. Thus, if there are multiple 565 * attributes with the given local name and different namespaces, the 566 * value of an attribute with the smallest index among those attributes 567 * will be returned. {@link XMLAttributes#getValue(String name)} const or 568 * {@link XMLAttributes#getValue(XMLTriple triple)} const should be used to get a value of an 569 * attribute with the given local name and namespace. 570 */ public 571 String getValue(String name) { 572 return libsbmlJNI.XMLAttributes_getValue__SWIG_1(swigCPtr, this, name); 573 } 574 575 576/** 577 * Return a value of an attribute with the given local name and namespace URI. 578 * <p> 579 * @param name a string, the local name of the attribute whose value is required. 580 * @param uri a string, the namespace URI of the attribute. 581 * <p> 582 * @return The attribute value as a string. 583 * <p> 584 * @note If an attribute with the given local name and namespace URI does 585 * not exist, an empty string will be returned. Use 586 * {@link XMLAttributes#hasAttribute(String name, String uri)} const 587 * to test for attribute existence. 588 */ public 589 String getValue(String name, String uri) { 590 return libsbmlJNI.XMLAttributes_getValue__SWIG_2(swigCPtr, this, name, uri); 591 } 592 593 594/** 595 * Return a value of an attribute with the given {@link XMLTriple}. 596 * <p> 597 * @param triple an {@link XMLTriple}, the XML triple of the attribute whose 598 * value is required. 599 * <p> 600 * @return The attribute value as a string. 601 * <p> 602 * @note If an attribute with the given {@link XMLTriple} does not exist, an 603 * empty string will be returned. Use 604 * {@link XMLAttributes#hasAttribute(XMLTriple triple)} const to test for attribute existence. 605 */ public 606 String getValue(XMLTriple triple) { 607 return libsbmlJNI.XMLAttributes_getValue__SWIG_3(swigCPtr, this, XMLTriple.getCPtr(triple), triple); 608 } 609 610 611/** 612 * Predicate returning <code>true</code> or <code>false</code> depending on whether 613 * an attribute with the given index exists in this {@link XMLAttributes}. 614 * <p> 615 * @param index an integer, the position of the attribute. 616 * <p> 617 * @return <code>true</code> if an attribute with the given index exists in this 618 * {@link XMLAttributes}, <code>false</code> otherwise. 619 */ public 620 boolean hasAttribute(int index) { 621 return libsbmlJNI.XMLAttributes_hasAttribute__SWIG_0(swigCPtr, this, index); 622 } 623 624 625/** 626 * Predicate returning <code>true</code> or <code>false</code> depending on whether 627 * an attribute with the given local name and namespace URI exists in this 628 * {@link XMLAttributes}. 629 * <p> 630 * @param name a string, the local name of the attribute. 631 * @param uri a string, the namespace URI of the attribute. 632 * <p> 633 * @return <code>true</code> if an attribute with the given local name and namespace 634 * URI exists in this {@link XMLAttributes}, <code>false</code> otherwise. 635 */ public 636 boolean hasAttribute(String name, String uri) { 637 return libsbmlJNI.XMLAttributes_hasAttribute__SWIG_1(swigCPtr, this, name, uri); 638 } 639 640 641/** 642 * Predicate returning <code>true</code> or <code>false</code> depending on whether 643 * an attribute with the given local name and namespace URI exists in this 644 * {@link XMLAttributes}. 645 * <p> 646 * @param name a string, the local name of the attribute. 647 * @param uri a string, the namespace URI of the attribute. 648 * <p> 649 * @return <code>true</code> if an attribute with the given local name and namespace 650 * URI exists in this {@link XMLAttributes}, <code>false</code> otherwise. 651 */ public 652 boolean hasAttribute(String name) { 653 return libsbmlJNI.XMLAttributes_hasAttribute__SWIG_2(swigCPtr, this, name); 654 } 655 656 657/** 658 * Predicate returning <code>true</code> or <code>false</code> depending on whether 659 * an attribute with the given XML triple exists in this {@link XMLAttributes}. 660 * <p> 661 * @param triple an {@link XMLTriple}, the XML triple of the attribute 662 * <p> 663 * @return <code>true</code> if an attribute with the given XML triple exists in this 664 * {@link XMLAttributes}, <code>false</code> otherwise. 665 * <p> 666 */ public 667 boolean hasAttribute(XMLTriple triple) { 668 return libsbmlJNI.XMLAttributes_hasAttribute__SWIG_3(swigCPtr, this, XMLTriple.getCPtr(triple), triple); 669 } 670 671 672/** 673 * Predicate returning <code>true</code> or <code>false</code> depending on whether 674 * this {@link XMLAttributes} set is empty. 675 * <p> 676 * @return <code>true</code> if this {@link XMLAttributes} set is empty, <code>false</code> otherwise. 677 */ public 678 boolean isEmpty() { 679 return libsbmlJNI.XMLAttributes_isEmpty(swigCPtr, this); 680 } 681 682}