001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 3.0.7 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 * Set of configuration option values for a converter. 013 <p> 014 * <p style='color: #777; font-style: italic'> 015This class of objects is defined by libSBML only and has no direct 016equivalent in terms of SBML components. It is a class used in 017the implementation of extra functionality provided by libSBML. 018</p> 019 020 <p> 021 * LibSBML provides a number of converters that can perform transformations 022 * on SBML documents. The properties of SBML converters are communicated 023 * using objects of class {@link ConversionProperties}, and within such objects, 024 * individual options are encapsulated using {@link ConversionOption} objects. The 025 * {@link ConversionProperties} class provides numerous methods for setting and 026 * getting options. 027 <p> 028 * {@link ConversionProperties} objects are also used to determine the target SBML 029 * namespace when an SBML converter's behavior depends on the intended 030 * Level+Version combination of SBML. In addition, it is conceivable that 031 * conversions may be affected by SBML Level 3 packages being used by an 032 * SBML document; consequently, the packages in use are also communicated by 033 * the values of the SBML namespaces set on a {@link ConversionProperties} object. 034 <p> 035 * <p> 036 * <h2>General information about the use of SBML converters</h2> 037 <p> 038 * The use of all the converters follows a similar approach. First, one 039 * creates a {@link ConversionProperties} object and calls 040 * {@link ConversionProperties#addOption(ConversionOption)} 041 * on this object with one arguments: a text string that identifies the desired 042 * converter. (The text string is specific to each converter; consult the 043 * documentation for a given converter to find out how it should be enabled.) 044 <p> 045 * Next, for some converters, the caller can optionally set some 046 * converter-specific properties using additional calls to 047 * {@link ConversionProperties#addOption(ConversionOption)}. 048 * Many converters provide the ability to 049 * configure their behavior to some extent; this is realized through the use 050 * of properties that offer different options. The default property values 051 * for each converter can be interrogated using the method 052 * {@link SBMLConverter#getDefaultProperties()} on the converter class in question . 053 <p> 054 * Finally, the caller should invoke the method 055 * {@link SBMLDocument#convert(ConversionProperties)} 056 * with the {@link ConversionProperties} object as an argument. 057 <p> 058 * <h3>Example of invoking an SBML converter</h3> 059 <p> 060 * The following code fragment illustrates an example using 061 * {@link SBMLReactionConverter}, which is invoked using the option string 062 * <code>'replaceReactions':</code> 063 <p> 064<pre class='fragment'> 065{@link ConversionProperties} props = new {@link ConversionProperties}(); 066if (props != null) { 067 props.addOption('replaceReactions'); 068} else { 069 // Deal with error. 070} 071</pre> 072<p> 073 * In the case of {@link SBMLReactionConverter}, there are no options to affect 074 * its behavior, so the next step is simply to invoke the converter on 075 * an {@link SBMLDocument} object. Continuing the example code: 076 <p> 077<pre class='fragment'> 078 // Assume that the variable 'document' has been set to an {@link SBMLDocument} object. 079 status = document.convert(config); 080 if (status != libsbml.LIBSBML_OPERATION_SUCCESS) 081 { 082 // Handle error somehow. 083 System.out.println('Error: conversion failed due to the following:'); 084 document.printErrors(); 085 } 086</pre> 087<p> 088 * Here is an example of using a converter that offers an option. The 089 * following code invokes {@link SBMLStripPackageConverter} to remove the 090 * SBML Level 3 <em>Layout</em> package from a model. It sets the name 091 * of the package to be removed by adding a value for the option named 092 * <code>'package'</code> defined by that converter: 093 <p> 094<pre class='fragment'> 095{@link ConversionProperties} config = new {@link ConversionProperties}(); 096if (config != None) { 097 config.addOption('stripPackage'); 098 config.addOption('package', 'layout'); 099 status = document.convert(config); 100 if (status != LIBSBML_OPERATION_SUCCESS) { 101 // Handle error somehow. 102 System.out.println('Error: unable to strip the {@link Layout} package'); 103 document.printErrors(); 104 } 105} else { 106 // Handle error somehow. 107 System.out.println('Error: unable to create {@link ConversionProperties} object'); 108} 109</pre> 110<p> 111 * <h3>Available SBML converters in libSBML</h3> 112 <p> 113 * LibSBML provides a number of built-in converters; by convention, their 114 * names end in <em>Converter</em>. The following are the built-in converters 115 * provided by libSBML 5.12.0 116: 117 <p> 118 * <p> 119 * <ul> 120 * <li> {@link CobraToFbcConverter} 121 * <li> {@link CompFlatteningConverter} 122 * <li> {@link FbcToCobraConverter} 123 * <li> {@link FbcV1ToV2Converter} 124 * <li> {@link FbcV2ToV1Converter} 125 * <li> {@link SBMLFunctionDefinitionConverter} 126 * <li> {@link SBMLIdConverter} 127 * <li> {@link SBMLInferUnitsConverter} 128 * <li> {@link SBMLInitialAssignmentConverter} 129 * <li> {@link SBMLLevel1Version1Converter} 130 * <li> {@link SBMLLevelVersionConverter} 131 * <li> {@link SBMLLocalParameterConverter} 132 * <li> {@link SBMLReactionConverter} 133 * <li> {@link SBMLRuleConverter} 134 * <li> {@link SBMLStripPackageConverter} 135 * <li> {@link SBMLUnitsConverter} 136 * 137 * </ul> 138 <p> 139 * @see ConversionOption 140 * @see SBMLNamespaces 141 */ 142 143public class ConversionProperties { 144 private long swigCPtr; 145 protected boolean swigCMemOwn; 146 147 protected ConversionProperties(long cPtr, boolean cMemoryOwn) 148 { 149 swigCMemOwn = cMemoryOwn; 150 swigCPtr = cPtr; 151 } 152 153 protected static long getCPtr(ConversionProperties obj) 154 { 155 return (obj == null) ? 0 : obj.swigCPtr; 156 } 157 158 protected static long getCPtrAndDisown (ConversionProperties obj) 159 { 160 long ptr = 0; 161 162 if (obj != null) 163 { 164 ptr = obj.swigCPtr; 165 obj.swigCMemOwn = false; 166 } 167 168 return ptr; 169 } 170 171 protected void finalize() { 172 delete(); 173 } 174 175 public synchronized void delete() { 176 if (swigCPtr != 0) { 177 if (swigCMemOwn) { 178 swigCMemOwn = false; 179 libsbmlJNI.delete_ConversionProperties(swigCPtr); 180 } 181 swigCPtr = 0; 182 } 183 } 184 185 186/** 187 * Constructor that initializes the conversion properties 188 * with a specific SBML target namespace. 189 <p> 190 * @param targetNS the target namespace to convert to 191 <p> 192 * 193</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 194The native C++ implementation of this method defines a default argument 195value. In the documentation generated for different libSBML language 196bindings, you may or may not see corresponding arguments in the method 197declarations. For example, in Java and C#, a default argument is handled by 198declaring two separate methods, with one of them having the argument and 199the other one lacking the argument. However, the libSBML documentation will 200be <em>identical</em> for both methods. Consequently, if you are reading 201this and do not see an argument even though one is described, please look 202for descriptions of other variants of this method near where this one 203appears in the documentation. 204</dd></dl> 205 206 */ public 207 ConversionProperties(SBMLNamespaces targetNS) { 208 this(libsbmlJNI.new_ConversionProperties__SWIG_0(SBMLNamespaces.getCPtr(targetNS), targetNS), true); 209 } 210 211 212/** 213 * Constructor that initializes the conversion properties 214 * with a specific SBML target namespace. 215 <p> 216 * @param targetNS the target namespace to convert to 217 <p> 218 * 219</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 220The native C++ implementation of this method defines a default argument 221value. In the documentation generated for different libSBML language 222bindings, you may or may not see corresponding arguments in the method 223declarations. For example, in Java and C#, a default argument is handled by 224declaring two separate methods, with one of them having the argument and 225the other one lacking the argument. However, the libSBML documentation will 226be <em>identical</em> for both methods. Consequently, if you are reading 227this and do not see an argument even though one is described, please look 228for descriptions of other variants of this method near where this one 229appears in the documentation. 230</dd></dl> 231 232 */ public 233 ConversionProperties() { 234 this(libsbmlJNI.new_ConversionProperties__SWIG_1(), true); 235 } 236 237 238/** 239 * Copy constructor. 240 <p> 241 * @param orig the object to copy. 242 */ public 243 ConversionProperties(ConversionProperties orig) { 244 this(libsbmlJNI.new_ConversionProperties__SWIG_2(ConversionProperties.getCPtr(orig), orig), true); 245 } 246 247 248/** 249 * Creates and returns a deep copy of this {@link ConversionProperties} object. 250 <p> 251 * @return the (deep) copy of this {@link ConversionProperties} object. 252 */ public 253 ConversionProperties cloneObject() { 254 long cPtr = libsbmlJNI.ConversionProperties_cloneObject(swigCPtr, this); 255 return (cPtr == 0) ? null : new ConversionProperties(cPtr, true); 256 } 257 258 259/** 260 * Returns the current target SBML namespace. 261 <p> 262 * @return the SBMLNamepaces object expressing the target namespace. 263 */ public 264 SBMLNamespaces getTargetNamespaces() { 265 return libsbml.DowncastSBMLNamespaces(libsbmlJNI.ConversionProperties_getTargetNamespaces(swigCPtr, this), false); 266} 267 268 269/** 270 * Returns <code>true</code> if the target SBML namespace has been set. 271 <p> 272 * @return <code>true</code> if the target namespace has been set, <code>false</code> 273 * otherwise. 274 */ public 275 boolean hasTargetNamespaces() { 276 return libsbmlJNI.ConversionProperties_hasTargetNamespaces(swigCPtr, this); 277 } 278 279 280/** 281 * Sets the target namespace. 282 <p> 283 * @param targetNS the target namespace to use. 284 */ public 285 void setTargetNamespaces(SBMLNamespaces targetNS) { 286 libsbmlJNI.ConversionProperties_setTargetNamespaces(swigCPtr, this, SBMLNamespaces.getCPtr(targetNS), targetNS); 287 } 288 289 290/** 291 * Returns the description string for a given option in this properties 292 * object. 293 <p> 294 * @param key the key for the option. 295 <p> 296 * @return the description text of the option with the given key. 297 */ public 298 String getDescription(String key) { 299 return libsbmlJNI.ConversionProperties_getDescription(swigCPtr, this, key); 300 } 301 302 303/** 304 * Returns the type of a given option in this properties object. 305 <p> 306 * @param key the key for the option. 307 <p> 308 * @return the type of the option with the given key. 309 */ public 310 int getType(String key) { 311 return libsbmlJNI.ConversionProperties_getType(swigCPtr, this, key); 312 } 313 314 315/** 316 * Returns the {@link ConversionOption} object for a given key. 317 <p> 318 * @param key the key for the option. 319 <p> 320 * @return the option with the given key. 321 */ public 322 ConversionOption getOption(String key) { 323 long cPtr = libsbmlJNI.ConversionProperties_getOption__SWIG_0(swigCPtr, this, key); 324 return (cPtr == 0) ? null : new ConversionOption(cPtr, false); 325 } 326 327 328/** 329 * Returns the {@link ConversionOption} object for the given index. 330 <p> 331 * @param index the index for the option. 332 <p> 333 * @return the option with the given index. 334 */ public 335 ConversionOption getOption(int index) { 336 long cPtr = libsbmlJNI.ConversionProperties_getOption__SWIG_1(swigCPtr, this, index); 337 return (cPtr == 0) ? null : new ConversionOption(cPtr, false); 338 } 339 340 341/** 342 * Adds a copy of the given option to this properties object. 343 <p> 344 * @param option the option to add 345 */ public 346 void addOption(ConversionOption option) { 347 libsbmlJNI.ConversionProperties_addOption__SWIG_0(swigCPtr, this, ConversionOption.getCPtr(option), option); 348 } 349 350 351/** 352 * Adds a new {@link ConversionOption} object with the given parameters. 353 <p> 354 * @param key the key for the new option 355 * @param value (optional) the value of that option 356 * @param type (optional) the type of the option (see the documentation 357 * for {@link ConversionOption} for more information about the types) 358 * @param description (optional) the description for the option 359 <p> 360 * 361</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 362The native C++ implementation of this method defines a default argument 363value. In the documentation generated for different libSBML language 364bindings, you may or may not see corresponding arguments in the method 365declarations. For example, in Java and C#, a default argument is handled by 366declaring two separate methods, with one of them having the argument and 367the other one lacking the argument. However, the libSBML documentation will 368be <em>identical</em> for both methods. Consequently, if you are reading 369this and do not see an argument even though one is described, please look 370for descriptions of other variants of this method near where this one 371appears in the documentation. 372</dd></dl> 373 374 */ public 375 void addOption(String key, String value, int type, String description) { 376 libsbmlJNI.ConversionProperties_addOption__SWIG_1(swigCPtr, this, key, value, type, description); 377 } 378 379 380/** 381 * Adds a new {@link ConversionOption} object with the given parameters. 382 <p> 383 * @param key the key for the new option 384 * @param value (optional) the value of that option 385 * @param type (optional) the type of the option (see the documentation 386 * for {@link ConversionOption} for more information about the types) 387 * @param description (optional) the description for the option 388 <p> 389 * 390</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 391The native C++ implementation of this method defines a default argument 392value. In the documentation generated for different libSBML language 393bindings, you may or may not see corresponding arguments in the method 394declarations. For example, in Java and C#, a default argument is handled by 395declaring two separate methods, with one of them having the argument and 396the other one lacking the argument. However, the libSBML documentation will 397be <em>identical</em> for both methods. Consequently, if you are reading 398this and do not see an argument even though one is described, please look 399for descriptions of other variants of this method near where this one 400appears in the documentation. 401</dd></dl> 402 403 */ public 404 void addOption(String key, String value, int type) { 405 libsbmlJNI.ConversionProperties_addOption__SWIG_2(swigCPtr, this, key, value, type); 406 } 407 408 409/** 410 * Adds a new {@link ConversionOption} object with the given parameters. 411 <p> 412 * @param key the key for the new option 413 * @param value (optional) the value of that option 414 * @param type (optional) the type of the option (see the documentation 415 * for {@link ConversionOption} for more information about the types) 416 * @param description (optional) the description for the option 417 <p> 418 * 419</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 420The native C++ implementation of this method defines a default argument 421value. In the documentation generated for different libSBML language 422bindings, you may or may not see corresponding arguments in the method 423declarations. For example, in Java and C#, a default argument is handled by 424declaring two separate methods, with one of them having the argument and 425the other one lacking the argument. However, the libSBML documentation will 426be <em>identical</em> for both methods. Consequently, if you are reading 427this and do not see an argument even though one is described, please look 428for descriptions of other variants of this method near where this one 429appears in the documentation. 430</dd></dl> 431 432 */ public 433 void addOption(String key, String value) { 434 libsbmlJNI.ConversionProperties_addOption__SWIG_3(swigCPtr, this, key, value); 435 } 436 437 438/** 439 * Adds a new {@link ConversionOption} object with the given parameters. 440 <p> 441 * @param key the key for the new option 442 * @param value (optional) the value of that option 443 * @param type (optional) the type of the option (see the documentation 444 * for {@link ConversionOption} for more information about the types) 445 * @param description (optional) the description for the option 446 <p> 447 * 448</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 449The native C++ implementation of this method defines a default argument 450value. In the documentation generated for different libSBML language 451bindings, you may or may not see corresponding arguments in the method 452declarations. For example, in Java and C#, a default argument is handled by 453declaring two separate methods, with one of them having the argument and 454the other one lacking the argument. However, the libSBML documentation will 455be <em>identical</em> for both methods. Consequently, if you are reading 456this and do not see an argument even though one is described, please look 457for descriptions of other variants of this method near where this one 458appears in the documentation. 459</dd></dl> 460 461 */ public 462 void addOption(String key) { 463 libsbmlJNI.ConversionProperties_addOption__SWIG_4(swigCPtr, this, key); 464 } 465 466 467/** 468 * Adds a new {@link ConversionOption} object with the given parameters. 469 <p> 470 * @param key the key for the new option 471 * @param value the string value of that option 472 * @param description (optional) the description for the option 473 <p> 474 * 475</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 476The native C++ implementation of this method defines a default argument 477value. In the documentation generated for different libSBML language 478bindings, you may or may not see corresponding arguments in the method 479declarations. For example, in Java and C#, a default argument is handled by 480declaring two separate methods, with one of them having the argument and 481the other one lacking the argument. However, the libSBML documentation will 482be <em>identical</em> for both methods. Consequently, if you are reading 483this and do not see an argument even though one is described, please look 484for descriptions of other variants of this method near where this one 485appears in the documentation. 486</dd></dl> 487 488 */ public 489 void addOption(String key, String value, String description) { 490 libsbmlJNI.ConversionProperties_addOption__SWIG_5(swigCPtr, this, key, value, description); 491 } 492 493 494/** 495 * Adds a new {@link ConversionOption} object with the given parameters. 496 <p> 497 * @param key the key for the new option 498 * @param value the boolean value of that option 499 * @param description (optional) the description for the option 500 <p> 501 * 502</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 503The native C++ implementation of this method defines a default argument 504value. In the documentation generated for different libSBML language 505bindings, you may or may not see corresponding arguments in the method 506declarations. For example, in Java and C#, a default argument is handled by 507declaring two separate methods, with one of them having the argument and 508the other one lacking the argument. However, the libSBML documentation will 509be <em>identical</em> for both methods. Consequently, if you are reading 510this and do not see an argument even though one is described, please look 511for descriptions of other variants of this method near where this one 512appears in the documentation. 513</dd></dl> 514 515 */ public 516 void addOption(String key, boolean value, String description) { 517 libsbmlJNI.ConversionProperties_addOption__SWIG_7(swigCPtr, this, key, value, description); 518 } 519 520 521/** 522 * Adds a new {@link ConversionOption} object with the given parameters. 523 <p> 524 * @param key the key for the new option 525 * @param value the boolean value of that option 526 * @param description (optional) the description for the option 527 <p> 528 * 529</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 530The native C++ implementation of this method defines a default argument 531value. In the documentation generated for different libSBML language 532bindings, you may or may not see corresponding arguments in the method 533declarations. For example, in Java and C#, a default argument is handled by 534declaring two separate methods, with one of them having the argument and 535the other one lacking the argument. However, the libSBML documentation will 536be <em>identical</em> for both methods. Consequently, if you are reading 537this and do not see an argument even though one is described, please look 538for descriptions of other variants of this method near where this one 539appears in the documentation. 540</dd></dl> 541 542 */ public 543 void addOption(String key, boolean value) { 544 libsbmlJNI.ConversionProperties_addOption__SWIG_8(swigCPtr, this, key, value); 545 } 546 547 548/** 549 * Adds a new {@link ConversionOption} object with the given parameters. 550 <p> 551 * @param key the key for the new option 552 * @param value the double value of that option 553 * @param description (optional) the description for the option 554 <p> 555 * 556</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 557The native C++ implementation of this method defines a default argument 558value. In the documentation generated for different libSBML language 559bindings, you may or may not see corresponding arguments in the method 560declarations. For example, in Java and C#, a default argument is handled by 561declaring two separate methods, with one of them having the argument and 562the other one lacking the argument. However, the libSBML documentation will 563be <em>identical</em> for both methods. Consequently, if you are reading 564this and do not see an argument even though one is described, please look 565for descriptions of other variants of this method near where this one 566appears in the documentation. 567</dd></dl> 568 569 */ public 570 void addOption(String key, double value, String description) { 571 libsbmlJNI.ConversionProperties_addOption__SWIG_9(swigCPtr, this, key, value, description); 572 } 573 574 575/** 576 * Adds a new {@link ConversionOption} object with the given parameters. 577 <p> 578 * @param key the key for the new option 579 * @param value the double value of that option 580 * @param description (optional) the description for the option 581 <p> 582 * 583</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 584The native C++ implementation of this method defines a default argument 585value. In the documentation generated for different libSBML language 586bindings, you may or may not see corresponding arguments in the method 587declarations. For example, in Java and C#, a default argument is handled by 588declaring two separate methods, with one of them having the argument and 589the other one lacking the argument. However, the libSBML documentation will 590be <em>identical</em> for both methods. Consequently, if you are reading 591this and do not see an argument even though one is described, please look 592for descriptions of other variants of this method near where this one 593appears in the documentation. 594</dd></dl> 595 596 */ public 597 void addOption(String key, double value) { 598 libsbmlJNI.ConversionProperties_addOption__SWIG_10(swigCPtr, this, key, value); 599 } 600 601 602/** 603 * Adds a new {@link ConversionOption} object with the given parameters. 604 <p> 605 * @param key the key for the new option 606 * @param value the float value of that option 607 * @param description (optional) the description for the option 608 <p> 609 * 610</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 611The native C++ implementation of this method defines a default argument 612value. In the documentation generated for different libSBML language 613bindings, you may or may not see corresponding arguments in the method 614declarations. For example, in Java and C#, a default argument is handled by 615declaring two separate methods, with one of them having the argument and 616the other one lacking the argument. However, the libSBML documentation will 617be <em>identical</em> for both methods. Consequently, if you are reading 618this and do not see an argument even though one is described, please look 619for descriptions of other variants of this method near where this one 620appears in the documentation. 621</dd></dl> 622 623 */ public 624 void addOption(String key, float value, String description) { 625 libsbmlJNI.ConversionProperties_addOption__SWIG_11(swigCPtr, this, key, value, description); 626 } 627 628 629/** 630 * Adds a new {@link ConversionOption} object with the given parameters. 631 <p> 632 * @param key the key for the new option 633 * @param value the float value of that option 634 * @param description (optional) the description for the option 635 <p> 636 * 637</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 638The native C++ implementation of this method defines a default argument 639value. In the documentation generated for different libSBML language 640bindings, you may or may not see corresponding arguments in the method 641declarations. For example, in Java and C#, a default argument is handled by 642declaring two separate methods, with one of them having the argument and 643the other one lacking the argument. However, the libSBML documentation will 644be <em>identical</em> for both methods. Consequently, if you are reading 645this and do not see an argument even though one is described, please look 646for descriptions of other variants of this method near where this one 647appears in the documentation. 648</dd></dl> 649 650 */ public 651 void addOption(String key, float value) { 652 libsbmlJNI.ConversionProperties_addOption__SWIG_12(swigCPtr, this, key, value); 653 } 654 655 656/** 657 * Adds a new {@link ConversionOption} object with the given parameters. 658 <p> 659 * @param key the key for the new option 660 * @param value the integer value of that option 661 * @param description (optional) the description for the option 662 <p> 663 * 664</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 665The native C++ implementation of this method defines a default argument 666value. In the documentation generated for different libSBML language 667bindings, you may or may not see corresponding arguments in the method 668declarations. For example, in Java and C#, a default argument is handled by 669declaring two separate methods, with one of them having the argument and 670the other one lacking the argument. However, the libSBML documentation will 671be <em>identical</em> for both methods. Consequently, if you are reading 672this and do not see an argument even though one is described, please look 673for descriptions of other variants of this method near where this one 674appears in the documentation. 675</dd></dl> 676 677 */ public 678 void addOption(String key, int value, String description) { 679 libsbmlJNI.ConversionProperties_addOption__SWIG_13(swigCPtr, this, key, value, description); 680 } 681 682 683/** 684 * Adds a new {@link ConversionOption} object with the given parameters. 685 <p> 686 * @param key the key for the new option 687 * @param value the integer value of that option 688 * @param description (optional) the description for the option 689 <p> 690 * 691</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 692The native C++ implementation of this method defines a default argument 693value. In the documentation generated for different libSBML language 694bindings, you may or may not see corresponding arguments in the method 695declarations. For example, in Java and C#, a default argument is handled by 696declaring two separate methods, with one of them having the argument and 697the other one lacking the argument. However, the libSBML documentation will 698be <em>identical</em> for both methods. Consequently, if you are reading 699this and do not see an argument even though one is described, please look 700for descriptions of other variants of this method near where this one 701appears in the documentation. 702</dd></dl> 703 704 */ public 705 void addOption(String key, int value) { 706 libsbmlJNI.ConversionProperties_addOption__SWIG_14(swigCPtr, this, key, value); 707 } 708 709 710/** 711 * Removes the option with the given key from this properties object. 712 <p> 713 * @param key the key for the new option to remove 714 * @return the removed option 715 */ public 716 ConversionOption removeOption(String key) { 717 long cPtr = libsbmlJNI.ConversionProperties_removeOption(swigCPtr, this, key); 718 return (cPtr == 0) ? null : new ConversionOption(cPtr, false); 719 } 720 721 722/** 723 * Returns <code>true</code> if this properties object contains an option with 724 * the given key. 725 <p> 726 * @param key the key of the option to find. 727 <p> 728 * @return <code>true</code> if an option with the given <code>key</code> exists in 729 * this properties object, <code>false</code> otherwise. 730 */ public 731 boolean hasOption(String key) { 732 return libsbmlJNI.ConversionProperties_hasOption(swigCPtr, this, key); 733 } 734 735 736/** 737 * Returns the value of the given option as a string. 738 <p> 739 * @param key the key for the option. 740 <p> 741 * @return the string value of the option with the given key. 742 */ public 743 String getValue(String key) { 744 return libsbmlJNI.ConversionProperties_getValue(swigCPtr, this, key); 745 } 746 747 748/** 749 * Sets the value of the given option to a string. 750 <p> 751 * @param key the key for the option 752 * @param value the new value 753 */ public 754 void setValue(String key, String value) { 755 libsbmlJNI.ConversionProperties_setValue(swigCPtr, this, key, value); 756 } 757 758 759/** 760 * Returns the value of the given option as a Boolean. 761 <p> 762 * @param key the key for the option. 763 <p> 764 * @return the boolean value of the option with the given key. 765 */ public 766 boolean getBoolValue(String key) { 767 return libsbmlJNI.ConversionProperties_getBoolValue(swigCPtr, this, key); 768 } 769 770 771/** 772 * Sets the value of the given option to a Boolean. 773 <p> 774 * @param key the key for the option. 775 <p> 776 * @param value the new Boolean value. 777 */ public 778 void setBoolValue(String key, boolean value) { 779 libsbmlJNI.ConversionProperties_setBoolValue(swigCPtr, this, key, value); 780 } 781 782 783/** 784 * Returns the value of the given option as a <code>double.</code> 785 <p> 786 * @param key the key for the option. 787 <p> 788 * @return the double value of the option with the given key. 789 */ public 790 double getDoubleValue(String key) { 791 return libsbmlJNI.ConversionProperties_getDoubleValue(swigCPtr, this, key); 792 } 793 794 795/** 796 * Sets the value of the given option to a <code>double.</code> 797 <p> 798 * @param key the key for the option. 799 <p> 800 * @param value the new double value. 801 */ public 802 void setDoubleValue(String key, double value) { 803 libsbmlJNI.ConversionProperties_setDoubleValue(swigCPtr, this, key, value); 804 } 805 806 807/** 808 * Returns the value of the given option as a <code>float.</code> 809 <p> 810 * @param key the key for the option. 811 <p> 812 * @return the float value of the option with the given key. 813 */ public 814 float getFloatValue(String key) { 815 return libsbmlJNI.ConversionProperties_getFloatValue(swigCPtr, this, key); 816 } 817 818 819/** 820 * Sets the value of the given option to a <code>float.</code> 821 <p> 822 * @param key the key for the option. 823 <p> 824 * @param value the new float value. 825 */ public 826 void setFloatValue(String key, float value) { 827 libsbmlJNI.ConversionProperties_setFloatValue(swigCPtr, this, key, value); 828 } 829 830 831/** 832 * Returns the value of the given option as an integer. 833 <p> 834 * @param key the key for the option. 835 <p> 836 * @return the int value of the option with the given key. 837 */ public 838 int getIntValue(String key) { 839 return libsbmlJNI.ConversionProperties_getIntValue(swigCPtr, this, key); 840 } 841 842 843/** 844 * Sets the value of the given option to an integer. 845 <p> 846 * @param key the key for the option. 847 <p> 848 * @param value the new integer value. 849 */ public 850 void setIntValue(String key, int value) { 851 libsbmlJNI.ConversionProperties_setIntValue(swigCPtr, this, key, value); 852 } 853 854 855/** 856 * Returns the number of options in this Conversion Properties object 857 <p> 858 * @return the number of options in this properties object 859 */ public 860 int getNumOptions() { 861 return libsbmlJNI.ConversionProperties_getNumOptions(swigCPtr, this); 862 } 863 864}