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 * Implementation of SBML's Model construct. 014 * <p> 015 * In an SBML model definition, a single object of class {@link Model} serves as 016 * the overall container for the lists of the various model components. 017 * All of the lists are optional, but if a given list container is present 018 * within the model, the list must not be empty; that is, it must have 019 * length one or more. The following are the components and lists 020 * permitted in different Levels and Versions of SBML in 021 * version 5.8.0 022 023 * of libSBML: 024 * <ul> 025 * <li> In SBML Level 1, the components are: {@link UnitDefinition}, {@link Compartment}, 026 * {@link Species}, {@link Parameter}, {@link Rule}, and {@link Reaction}. Instances of the classes are 027 * placed inside instances of classes {@link ListOfUnitDefinitions}, 028 * {@link ListOfCompartments}, {@link ListOfSpecies}, {@link ListOfParameters}, {@link ListOfRules}, and 029 * {@link ListOfReactions}. 030 * <p> 031 * <li> In SBML Level 2 Version 1, the components are: {@link FunctionDefinition}, 032 * {@link UnitDefinition}, {@link Compartment}, {@link Species}, {@link Parameter}, {@link Rule}, {@link Reaction} and 033 * {@link Event}. Instances of the classes are placed inside instances of classes 034 * {@link ListOfFunctionDefinitions}, {@link ListOfUnitDefinitions}, {@link ListOfCompartments}, 035 * {@link ListOfSpecies}, {@link ListOfParameters}, {@link ListOfRules}, {@link ListOfReactions}, and 036 * {@link ListOfEvents}. 037 * <p> 038 * <li> In SBML Level 2 Versions 2, 3 and 4, the components are: 039 * {@link FunctionDefinition}, {@link UnitDefinition}, {@link CompartmentType}, {@link SpeciesType}, 040 * {@link Compartment}, {@link Species}, {@link Parameter}, {@link InitialAssignment}, {@link Rule}, {@link Constraint}, 041 * {@link Reaction} and {@link Event}. Instances of the classes are placed inside 042 * instances of classes {@link ListOfFunctionDefinitions}, {@link ListOfUnitDefinitions}, 043 * {@link ListOfCompartmentTypes}, {@link ListOfSpeciesTypes}, {@link ListOfCompartments}, 044 * {@link ListOfSpecies}, {@link ListOfParameters}, {@link ListOfInitialAssignments}, {@link ListOfRules}, 045 * {@link ListOfConstraints}, {@link ListOfReactions}, and {@link ListOfEvents}. 046 * <p> 047 * <li> In SBML Level 3 Version 1, the components are: {@link FunctionDefinition}, 048 * {@link UnitDefinition}, {@link Compartment}, {@link Species}, {@link Parameter}, {@link InitialAssignment}, 049 * {@link Rule}, {@link Constraint}, {@link Reaction} and {@link Event}. Instances of the classes are 050 * placed inside instances of classes {@link ListOfFunctionDefinitions}, 051 * {@link ListOfUnitDefinitions}, {@link ListOfCompartments}, {@link ListOfSpecies}, 052 * {@link ListOfParameters}, {@link ListOfInitialAssignments}, {@link ListOfRules}, 053 * {@link ListOfConstraints}, {@link ListOfReactions}, and {@link ListOfEvents}. 054 * </ul> 055 * <p> 056 * Although all the lists are optional, there are dependencies between SBML 057 * components such that defining some components requires defining others. 058 * An example is that defining a species requires defining a compartment, 059 * and defining a reaction requires defining a species. The dependencies 060 * are explained in more detail in the SBML specifications. 061 * <p> 062 * In addition to the above lists and attributes, the {@link Model} class in both 063 * SBML Level 2 and Level 3 has the usual two attributes of 'id' 064 * and 'name', and both are optional. As is the case for other SBML 065 * components with 'id' and 'name' attributes, they must be used according 066 * to the guidelines described in the SBML specifications. (Within the 067 * frameworks of SBML Level 2 and Level 3 Version 1 Core, a 068 * {@link Model} object identifier has no assigned meaning, but extension packages 069 * planned for SBML Level 3 are likely to make use of this 070 * identifier.) 071 * <p> 072 * Finally, SBML Level 3 has introduced a number of additional {@link Model} 073 * attributes. They are discussed in a separate section below. 074 * <p> 075 * <p> 076 * <h2>Approaches to creating objects using the libSBML API</h2> 077 * <p> 078 * LibSBML provides two main mechanisms for creating objects: class 079 * constructors 080 * (e.g., <a href='org/sbml/{@link libsbml}/Species.html'>Species()</a> ), 081 * and <code>create<span class='placeholder'><em>Object</em></span>()</code> 082 * methods (such as {@link Model#createSpecies()}) provided by certain <span 083 * class='placeholder'><em>Object</em></span> classes such as {@link Model}. These 084 * multiple mechanisms are provided by libSBML for flexibility and to 085 * support different use-cases, but they also have different implications 086 * for the overall model structure. 087 * <p> 088 * In general, the recommended approach is to use the <code>create<span 089 * class='placeholder'><em>Object</em></span>()</code> methods. These 090 * methods both create an object <em>and</em> link it to the parent in one step. 091 * Here is an example:<div class='fragment'><pre> 092// Create an {@link SBMLDocument} object in Level 3 Version 1 format: 093 094{@link SBMLDocument} sbmlDoc = new {@link SBMLDocument}(3, 1); 095 096// Create a {@link Model} object inside the {@link SBMLDocument} object and set 097// its identifier. The call returns a pointer to the {@link Model} object 098// created, and methods called on that object affect the attributes 099// of the object attached to the model (as expected). Note that 100// the call to setId() returns a status code, and a real program 101// should check this status code to make sure everything went okay. 102 103{@link Model} model = sbmlDoc.createModel(); 104model.setId("BestModelEver"); 105 106// Create a {@link Species} object inside the {@link Model} and set its identifier. 107// Similar to the lines above, this call returns a pointer to the {@link Species} 108// object created, and methods called on that object affect the attributes 109// of the object attached to the model (as expected). Note that, like 110// with {@link Model}, the call to setId() returns a status code, and a real program 111// should check this status code to make sure everything went okay. 112 113{@link Species} sp = model.createSpecies(); 114sp.setId("BestSpeciesEver"); 115</pre></div> 116 * <p> 117 * <p> 118 * The <code>create<span 119 * class='placeholder'><em>Object</em></span>()</code> methods return a 120 * pointer to the object created, but they also add the object to the 121 * relevant list of object instances contained in the parent. (These lists 122 * become the <code><listOf<span 123 * class='placeholder'><em>Object</em></span>s></code> elements in the 124 * finished XML rendition of SBML.) In the example above, 125 * {@link Model#createSpecies()} adds the created species directly to the 126 * <code><listOfSpecies<i></i>></code> list in the model. Subsequently, 127 * methods called on the species change the species in the model (which is 128 * what is expected in most situations). 129 * <p> 130 * <h2>Consistency and adherence to SBML specifications</h2> 131 * <p> 132 * To make it easier for applications to do whatever they need, 133 * libSBML version 5.8.0 134 135 * is relatively lax when it comes to enforcing correctness and 136 * completeness of models <em>during</em> model construction and editing. 137 * Essentially, libSBML <em>will</em> <em>not</em> in most cases check automatically 138 * that a model's components have valid attribute values, or that the 139 * overall model is consistent and free of errors—even obvious errors 140 * such as duplication of identifiers. This allows applications great 141 * leeway in how they build their models, but it means that software 142 * authors must take deliberate steps to ensure that the model will be, in 143 * the end, valid SBML. These steps include such things as keeping track 144 * of the identifiers used in a model, manually performing updates in 145 * certain situations where an entity is referenced in more than one place 146 * (e.g., a species that is referenced by multiple {@link SpeciesReference} 147 * objects), and so on. 148 * <p> 149 * That said, libSBML does provide powerful features for deliberately 150 * performing validation of SBML when an application decides it is time to 151 * do so. The interfaces to these facilities are on the {@link SBMLDocument} 152 * class, in the form of {@link SBMLDocument#checkInternalConsistency()} and 153 * {@link SBMLDocument#checkConsistency()}. Please refer to the documentation for 154 * {@link SBMLDocument} for more information about this. 155 * <p> 156 * While applications may play fast and loose and live like free spirits 157 * during the construction and editing of SBML models, they should always 158 * make sure to call {@link SBMLDocument#checkInternalConsistency()} and/or 159 * {@link SBMLDocument#checkConsistency()} before writing out the final version of 160 * an SBML model. 161 * <p> 162 * <p> 163 * <h2>Model attributes introduced in SBML Level 3</h2> 164 * <p> 165 * As mentioned above, the {@link Model} class has a number of optional attributes 166 * in SBML Level 3 Version 1 Core. These are 'substanceUnits', 167 * 'timeUnits', 'volumeUnits', 'areaUnits', 'lengthUnits', 'extentUnits', 168 * and 'conversionFactor. The following provide more information about 169 * them. 170 * <p> 171 * <h3>The 'substanceUnits' attribute</h3> 172 * <p> 173 * The 'substanceUnits' attribute is used to specify the unit of 174 * measurement associated with substance quantities of {@link Species} objects that 175 * do not specify units explicitly. If a given {@link Species} object definition 176 * does not specify its unit of substance quantity via the 'substanceUnits' 177 * attribute on the {@link Species} object instance, then that species inherits the 178 * value of the {@link Model} 'substanceUnits' attribute. If the {@link Model} does not 179 * define a value for this attribute, then there is no unit to inherit, and 180 * all species that do not specify individual 'substanceUnits' attribute 181 * values then have <em>no</em> declared units for their quantities. The 182 * SBML Level 3 Version 1 Core specification provides more 183 * details. 184 * <p> 185 * Note that when the identifier of a species appears in a model's 186 * mathematical expressions, the unit of measurement associated with that 187 * identifier is <em>not solely determined</em> by setting 'substanceUnits' 188 * on {@link Model} or {@link Species}. Please see the discussion about units given in 189 * the documentation for the {@link Species} class. 190 * <p> 191 * <p> 192 * <h3>The 'timeUnits' attribute</h3> 193 * <p> 194 * The 'timeUnits' attribute on SBML Level 3's {@link Model} object is used to 195 * specify the unit in which time is measured in the model. This attribute 196 * on {@link Model} is the <em>only</em> way to specify a unit for time in a model. 197 * It is a global attribute; time is measured in the model everywhere in 198 * the same way. This is particularly relevant to {@link Reaction} and {@link RateRule} 199 * objects in a model: all {@link Reaction} and {@link RateRule} objects in SBML define 200 * per-time values, and the unit of time is given by the 'timeUnits' 201 * attribute on the {@link Model} object instance. If the {@link Model} 'timeUnits' 202 * attribute has no value, it means that the unit of time is not defined 203 * for the model's reactions and rate rules. Leaving it unspecified in an 204 * SBML model does not result in an invalid model in SBML Level 3; 205 * however, as a matter of best practice, we strongly recommend that all 206 * models specify units of measurement for time. 207 * <p> 208 * <p> 209 * <h3>The 'volumeUnits', 'areaUnits', and 'lengthUnits' attributes</h3> 210 * <p> 211 * The attributes 'volumeUnits', 'areaUnits' and 'lengthUnits' together are 212 * used to set the units of measurements for the sizes of {@link Compartment} 213 * objects in an SBML Level 3 model when those objects do not 214 * otherwise specify units. The three attributes correspond to the most 215 * common cases of compartment dimensions: 'volumeUnits' for compartments 216 * having a 'spatialDimensions' attribute value of <code>'3'</code>, 'areaUnits' for 217 * compartments having a 'spatialDimensions' attribute value of <code>'2'</code>, and 218 * 'lengthUnits' for compartments having a 'spatialDimensions' attribute 219 * value of <code>'1'.</code> The attributes are not applicable to compartments 220 * whose 'spatialDimensions' attribute values are <em>not</em> one of <code>'1'</code>, 221 * <code>'2'</code> or <code>'3'.</code> 222 * <p> 223 * If a given {@link Compartment} object instance does not provide a value for its 224 * 'units' attribute, then the unit of measurement of that compartment's 225 * size is inherited from the value specified by the {@link Model} 'volumeUnits', 226 * 'areaUnits' or 'lengthUnits' attribute, as appropriate based on the 227 * {@link Compartment} object's 'spatialDimensions' attribute value. If the {@link Model} 228 * object does not define the relevant attribute, then there are no units 229 * to inherit, and all {@link Compartment} objects that do not set a value for 230 * their 'units' attribute then have <em>no</em> units associated with 231 * their compartment sizes. 232 * <p> 233 * The use of three separate attributes is a carry-over from SBML 234 * Level 2. Note that it is entirely possible for a model to define a 235 * value for two or more of the attributes 'volumeUnits', 'areaUnits' and 236 * 'lengthUnits' simultaneously, because SBML models may contain 237 * compartments with different numbers of dimensions. 238 * <p> 239 * <p> 240 * <h3>The 'extentUnits' attribute</h3> 241 * <p> 242 * Reactions are processes that occur over time. These processes involve 243 * events of some sort, where a single ``reaction event'' is one in which 244 * some set of entities (known as reactants, products and modifiers in 245 * SBML) interact, once. The <em>extent</em> of a reaction is a measure of 246 * how many times the reaction has occurred, while the time derivative of 247 * the extent gives the instantaneous rate at which the reaction is 248 * occurring. Thus, what is colloquially referred to as the 'rate of the 249 * reaction' is in fact equal to the rate of change of reaction extent. 250 * <p> 251 * In SBML Level 3, the combination of 'extentUnits' and 'timeUnits' 252 * defines the units of kinetic laws in SBML and establishes how the 253 * numerical value of each {@link KineticLaw} object's mathematical formula is 254 * meant to be interpreted in a model. The units of the kinetic laws are 255 * taken to be 'extentUnits' divided by 'timeUnits'. 256 * <p> 257 * Note that this embodies an important principle in SBML Level 3 258 * models: <em>all reactions in an SBML model must have the same units</em> 259 * for the rate of change of extent. In other words, the units of all 260 * reaction rates in the model <em>must be the same</em>. There is only 261 * one global value for 'extentUnits' and one global value for 'timeUnits'. 262 * <p> 263 * <p> 264 * <h3>The 'conversionFactor' attribute</h3> 265 * <p> 266 * The attribute 'conversionFactor' in SBML Level 3's {@link Model} object 267 * defines a global value inherited by all {@link Species} object instances that do 268 * not define separate values for their 'conversionFactor' attributes. The 269 * value of this attribute must refer to a {@link Parameter} object instance 270 * defined in the model. The {@link Parameter} object in question must be a 271 * constant; ie it must have its 'constant' attribute value set to 272 * <code>'true'.</code> 273 * <p> 274 * If a given {@link Species} object definition does not specify a conversion 275 * factor via the 'conversionFactor' attribute on {@link Species}, then the species 276 * inherits the conversion factor specified by the {@link Model} 'conversionFactor' 277 * attribute. If the {@link Model} does not define a value for this attribute, 278 * then there is no conversion factor to inherit. More information about 279 * conversion factors is provided in the SBML Level 3 Version 1 280 * specification. 281 */ 282 283public class Model extends SBase { 284 private long swigCPtr; 285 286 protected Model(long cPtr, boolean cMemoryOwn) 287 { 288 super(libsbmlJNI.Model_SWIGUpcast(cPtr), cMemoryOwn); 289 swigCPtr = cPtr; 290 } 291 292 protected static long getCPtr(Model obj) 293 { 294 return (obj == null) ? 0 : obj.swigCPtr; 295 } 296 297 protected static long getCPtrAndDisown (Model obj) 298 { 299 long ptr = 0; 300 301 if (obj != null) 302 { 303 ptr = obj.swigCPtr; 304 obj.swigCMemOwn = false; 305 } 306 307 return ptr; 308 } 309 310 protected void finalize() { 311 delete(); 312 } 313 314 public synchronized void delete() { 315 if (swigCPtr != 0) { 316 if (swigCMemOwn) { 317 swigCMemOwn = false; 318 libsbmlJNI.delete_Model(swigCPtr); 319 } 320 swigCPtr = 0; 321 } 322 super.delete(); 323 } 324 325 326/** 327 * Creates a new {@link Model} using the given SBML <code>level</code> and <code>version</code> 328 * values. 329 * <p> 330 * @param level a long integer, the SBML Level to assign to this {@link Model} 331 * <p> 332 * @param version a long integer, the SBML Version to assign to this 333 * {@link Model} 334 * <p> 335 * @throws SBMLConstructorException 336 * Thrown if the given <code>level</code> and <code>version</code> combination, or this kind 337 * of SBML object, are either invalid or mismatched with respect to the 338 * parent {@link SBMLDocument} object. 339 * <p> 340 * @note Upon the addition of a {@link Model} object to an {@link SBMLDocument} 341 * (e.g., using {@link SBMLDocument#setModel(Model m)}), the SBML Level, SBML Version 342 * and XML namespace of the document <em>override</em> the values used 343 * when creating the {@link Model} object via this constructor. This is 344 * necessary to ensure that an SBML document is a consistent structure. 345 * Nevertheless, the ability to supply the values at the time of creation 346 * of a {@link Model} is an important aid to producing valid SBML. Knowledge 347 * of the intented SBML Level and Version determine whether it is valid 348 * to assign a particular value to an attribute, or whether it is valid 349 * to add an object to an existing {@link SBMLDocument}. 350 */ public 351 Model(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 352 this(libsbmlJNI.new_Model__SWIG_0(level, version), true); 353 } 354 355 356/** 357 * Creates a new {@link Model} using the given {@link SBMLNamespaces} object 358 * <code>sbmlns</code>. 359 * <p> 360 * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces 361 * information. It is used to communicate the SBML Level, Version, and 362 * (in Level 3) packages used in addition to SBML Level 3 Core. 363 * A common approach to using this class constructor is to create an 364 * {@link SBMLNamespaces} object somewhere in a program, once, then pass it to 365 * object constructors such as this one when needed. 366 * <p> 367 * @param sbmlns an {@link SBMLNamespaces} object. 368 * <p> 369 * @throws SBMLConstructorException 370 * Thrown if the given <code>level</code> and <code>version</code> combination, or this kind 371 * of SBML object, are either invalid or mismatched with respect to the 372 * parent {@link SBMLDocument} object. 373 * <p> 374 * @note Upon the addition of a {@link Model} object to an {@link SBMLDocument} (e.g., 375 * using {@link SBMLDocument#setModel(Model m)}), the SBML XML namespace of the document 376 * <em>overrides</em> the value used when creating the {@link Model} object via this 377 * constructor. This is necessary to ensure that an SBML document is a 378 * consistent structure. Nevertheless, the ability to supply the values 379 * at the time of creation of a {@link Model} is an important aid to producing 380 * valid SBML. Knowledge of the intented SBML Level and Version 381 * determine whether it is valid to assign a particular value to an 382 * attribute, or whether it is valid to add an object to an existing 383 * {@link SBMLDocument}. 384 */ public 385 Model(SBMLNamespaces sbmlns) throws org.sbml.libsbml.SBMLConstructorException { 386 this(libsbmlJNI.new_Model__SWIG_1(SBMLNamespaces.getCPtr(sbmlns), sbmlns), true); 387 } 388 389 390/** 391 * Copy constructor; creates a (deep) copy of the given {@link Model} object. 392 * <p> 393 * @param orig the object to copy. 394 * <p> 395 * @throws SBMLConstructorException 396 * Thrown if the argument <code>orig</code> is <code>null.</code> 397 */ public 398 Model(Model orig) throws org.sbml.libsbml.SBMLConstructorException { 399 this(libsbmlJNI.new_Model__SWIG_2(Model.getCPtr(orig), orig), true); 400 } 401 402 403/** 404 * Creates and returns a deep copy of this {@link Model} object. 405 * <p> 406 * @return a (deep) copy of this {@link Model}. 407 */ public 408 Model cloneObject() { 409 long cPtr = libsbmlJNI.Model_cloneObject(swigCPtr, this); 410 return (cPtr == 0) ? null : new Model(cPtr, true); 411 } 412 413 414/** 415 * Returns the first child element found that has the given <code>id</code> in the 416 * model-wide SId namespace, or <code>null</code> if no such object is found. 417 * <p> 418 * @param id string representing the id of objects to find. 419 * <p> 420 * @return pointer to the first element found with the given <code>id</code>. 421 */ public 422 SBase getElementBySId(String id) { 423 return libsbml.DowncastSBase(libsbmlJNI.Model_getElementBySId(swigCPtr, this, id), false); 424} 425 426 427/** 428 * Returns the first child element it can find with the given <code>metaid</code>, or 429 * null if no such object is found. 430 * <p> 431 * @param metaid string representing the metaid of objects to find 432 * <p> 433 * @return pointer to the first element found with the given <code>metaid</code>. 434 */ public 435 SBase getElementByMetaId(String metaid) { 436 return libsbml.DowncastSBase(libsbmlJNI.Model_getElementByMetaId(swigCPtr, this, metaid), false); 437} 438 439 440/** 441 * Returns the value of the 'id' attribute of this {@link Model}. 442 * <p> 443 * @return the id of this {@link Model}. 444 */ public 445 String getId() { 446 return libsbmlJNI.Model_getId(swigCPtr, this); 447 } 448 449 450/** 451 * Returns the value of the 'name' attribute of this {@link Model}. 452 * <p> 453 * @return the name of this {@link Model}. 454 */ public 455 String getName() { 456 return libsbmlJNI.Model_getName(swigCPtr, this); 457 } 458 459 460/** 461 * Returns the value of the 'substanceUnits' attribute of this {@link Model}. 462 * <p> 463 * @return the substanceUnits of this {@link Model}. 464 * <p> 465 * @note The 'substanceUnits' attribute is available in 466 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 467 */ public 468 String getSubstanceUnits() { 469 return libsbmlJNI.Model_getSubstanceUnits(swigCPtr, this); 470 } 471 472 473/** 474 * Returns the value of the 'timeUnits' attribute of this {@link Model}. 475 * <p> 476 * @return the timeUnits of this {@link Model}. 477 * <p> 478 * @note The 'timeUnits' attribute is available in 479 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 480 */ public 481 String getTimeUnits() { 482 return libsbmlJNI.Model_getTimeUnits(swigCPtr, this); 483 } 484 485 486/** 487 * Returns the value of the 'volumeUnits' attribute of this {@link Model}. 488 * <p> 489 * @return the volumeUnits of this {@link Model}. 490 * <p> 491 * @note The 'volumeUnits' attribute is available in 492 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 493 */ public 494 String getVolumeUnits() { 495 return libsbmlJNI.Model_getVolumeUnits(swigCPtr, this); 496 } 497 498 499/** 500 * Returns the value of the 'areaUnits' attribute of this {@link Model}. 501 * <p> 502 * @return the areaUnits of this {@link Model}. 503 * <p> 504 * @note The 'areaUnits' attribute is available in 505 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 506 */ public 507 String getAreaUnits() { 508 return libsbmlJNI.Model_getAreaUnits(swigCPtr, this); 509 } 510 511 512/** 513 * Returns the value of the 'lengthUnits' attribute of this {@link Model}. 514 * <p> 515 * @return the lengthUnits of this {@link Model}. 516 * <p> 517 * @note The 'lengthUnits' attribute is available in 518 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 519 */ public 520 String getLengthUnits() { 521 return libsbmlJNI.Model_getLengthUnits(swigCPtr, this); 522 } 523 524 525/** 526 * Returns the value of the 'extentUnits' attribute of this {@link Model}. 527 * <p> 528 * @return the extentUnits of this {@link Model}. 529 * <p> 530 * @note The 'extentUnits' attribute is available in 531 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 532 */ public 533 String getExtentUnits() { 534 return libsbmlJNI.Model_getExtentUnits(swigCPtr, this); 535 } 536 537 538/** 539 * Returns the value of the 'conversionFactor' attribute of this {@link Model}. 540 * <p> 541 * @return the conversionFactor of this {@link Model}. 542 * <p> 543 * @note The 'conversionFactor' attribute is available in 544 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 545 */ public 546 String getConversionFactor() { 547 return libsbmlJNI.Model_getConversionFactor(swigCPtr, this); 548 } 549 550 551/** 552 * Predicate returning <code>true</code> if this 553 * {@link Model}'s 'id' attribute is set. 554 * <p> 555 * @return <code>true</code> if the 'id' attribute of this {@link Model} is 556 * set, <code>false</code> otherwise. 557 */ public 558 boolean isSetId() { 559 return libsbmlJNI.Model_isSetId(swigCPtr, this); 560 } 561 562 563/** 564 * Predicate returning <code>true</code> if this 565 * {@link Model}'s 'name' attribute is set. 566 * <p> 567 * @return <code>true</code> if the 'name' attribute of this {@link Model} is 568 * set, <code>false</code> otherwise. 569 */ public 570 boolean isSetName() { 571 return libsbmlJNI.Model_isSetName(swigCPtr, this); 572 } 573 574 575/** 576 * Predicate returning <code>true</code> if this 577 * {@link Model}'s 'substanceUnits' attribute is set. 578 * <p> 579 * @return <code>true</code> if the 'substanceUnits' attribute of this {@link Model} is 580 * set, <code>false</code> otherwise. 581 * <p> 582 * @note The 'substanceUnits' attribute is available in 583 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 584 */ public 585 boolean isSetSubstanceUnits() { 586 return libsbmlJNI.Model_isSetSubstanceUnits(swigCPtr, this); 587 } 588 589 590/** 591 * Predicate returning <code>true</code> if this 592 * {@link Model}'s 'timeUnits' attribute is set. 593 * <p> 594 * @return <code>true</code> if the 'timeUnits' attribute of this {@link Model} is 595 * set, <code>false</code> otherwise. 596 * <p> 597 * @note The 'substanceUnits' attribute is available in 598 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 599 */ public 600 boolean isSetTimeUnits() { 601 return libsbmlJNI.Model_isSetTimeUnits(swigCPtr, this); 602 } 603 604 605/** 606 * Predicate returning <code>true</code> if this 607 * {@link Model}'s 'volumeUnits' attribute is set. 608 * <p> 609 * @return <code>true</code> if the 'volumeUnits' attribute of this {@link Model} is 610 * set, <code>false</code> otherwise. 611 * <p> 612 * @note The 'volumeUnits' attribute is available in 613 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 614 */ public 615 boolean isSetVolumeUnits() { 616 return libsbmlJNI.Model_isSetVolumeUnits(swigCPtr, this); 617 } 618 619 620/** 621 * Predicate returning <code>true</code> if this 622 * {@link Model}'s 'areaUnits' attribute is set. 623 * <p> 624 * @return <code>true</code> if the 'areaUnits' attribute of this {@link Model} is 625 * set, <code>false</code> otherwise. 626 * <p> 627 * @note The 'areaUnits' attribute is available in 628 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 629 */ public 630 boolean isSetAreaUnits() { 631 return libsbmlJNI.Model_isSetAreaUnits(swigCPtr, this); 632 } 633 634 635/** 636 * Predicate returning <code>true</code> if this 637 * {@link Model}'s 'lengthUnits' attribute is set. 638 * <p> 639 * @return <code>true</code> if the 'lengthUnits' attribute of this {@link Model} is 640 * set, <code>false</code> otherwise. 641 * <p> 642 * @note The 'lengthUnits' attribute is available in 643 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 644 */ public 645 boolean isSetLengthUnits() { 646 return libsbmlJNI.Model_isSetLengthUnits(swigCPtr, this); 647 } 648 649 650/** 651 * Predicate returning <code>true</code> if this 652 * {@link Model}'s 'extentUnits' attribute is set. 653 * <p> 654 * @return <code>true</code> if the 'extentUnits' attribute of this {@link Model} is 655 * set, <code>false</code> otherwise. 656 * <p> 657 * @note The 'extentUnits' attribute is available in 658 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 659 */ public 660 boolean isSetExtentUnits() { 661 return libsbmlJNI.Model_isSetExtentUnits(swigCPtr, this); 662 } 663 664 665/** 666 * Predicate returning <code>true</code> if this 667 * {@link Model}'s 'conversionFactor' attribute is set. 668 * <p> 669 * @return <code>true</code> if the 'conversionFactor' attribute of this {@link Model} is 670 * set, <code>false</code> otherwise. 671 * <p> 672 * @note The 'conversionFactor' attribute is available in 673 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 674 */ public 675 boolean isSetConversionFactor() { 676 return libsbmlJNI.Model_isSetConversionFactor(swigCPtr, this); 677 } 678 679 680/** 681 * Sets the value of the 'id' attribute of this {@link Model}. 682 * <p> 683 * The string <code>sid</code> is copied. Note that SBML has strict requirements 684 * for the syntax of identifiers. The following is a summary of the definition of the SBML identifier type 685<code>SId</code>, which defines the permitted syntax of identifiers. We 686express the syntax using an extended form of BNF notation: 687<pre style='margin-left: 2em; border: none; font-weight: bold; font-size: 13px; color: black'> 688letter .= 'a'..'z','A'..'Z' 689digit .= '0'..'9' 690idChar .= letter | digit | '_' 691SId .= ( letter | '_' ) idChar* 692</pre> 693The characters <code>(</code> and <code>)</code> are used for grouping, the 694character <code>*</code> 'zero or more times', and the character 695<code>|</code> indicates logical 'or'. The equality of SBML identifiers is 696determined by an exact character sequence match; i.e., comparisons must be 697performed in a case-sensitive manner. In addition, there are a few 698conditions for the uniqueness of identifiers in an SBML model. Please 699consult the SBML specifications for the exact formulations. 700<p> 701 702 * <p> 703 * @param sid the string to use as the identifier of this {@link Model} 704 * <p> 705 * @return integer value indicating success/failure of the 706 * function. The possible values 707 * returned by this function are: 708 * <ul> 709 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 710 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 711 * </ul> 712 */ public 713 int setId(String sid) { 714 return libsbmlJNI.Model_setId(swigCPtr, this, sid); 715 } 716 717 718/** 719 * Sets the value of the 'name' attribute of this {@link Model}. 720 * <p> 721 * The string in <code>name</code> is copied. 722 * <p> 723 * @param name the new name for the {@link Model} 724 * <p> 725 * @return integer value indicating success/failure of the 726 * function. The possible values 727 * returned by this function are: 728 * <ul> 729 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 730 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 731 * </ul> 732 */ public 733 int setName(String name) { 734 return libsbmlJNI.Model_setName(swigCPtr, this, name); 735 } 736 737 738/** 739 * Sets the value of the 'substanceUnits' attribute of this {@link Model}. 740 * <p> 741 * The string in <code>units</code> is copied. 742 * <p> 743 * @param units the new substanceUnits for the {@link Model} 744 * <p> 745 * @return integer value indicating success/failure of the 746 * function. The possible values 747 * returned by this function are: 748 * <ul> 749 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 750 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 751 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 752 * </ul> 753 * <p> 754 * @note The 'substanceUnits' attribute is available in 755 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 756 */ public 757 int setSubstanceUnits(String units) { 758 return libsbmlJNI.Model_setSubstanceUnits(swigCPtr, this, units); 759 } 760 761 762/** 763 * Sets the value of the 'timeUnits' attribute of this {@link Model}. 764 * <p> 765 * The string in <code>units</code> is copied. 766 * <p> 767 * @param units the new timeUnits for the {@link Model} 768 * <p> 769 * @return integer value indicating success/failure of the 770 * function. The possible values 771 * returned by this function are: 772 * <ul> 773 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 774 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 775 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 776 * </ul> 777 * <p> 778 * @note The 'timeUnits' attribute is available in 779 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 780 */ public 781 int setTimeUnits(String units) { 782 return libsbmlJNI.Model_setTimeUnits(swigCPtr, this, units); 783 } 784 785 786/** 787 * Sets the value of the 'volumeUnits' attribute of this {@link Model}. 788 * <p> 789 * The string in <code>units</code> is copied. 790 * <p> 791 * @param units the new volumeUnits for the {@link Model} 792 * <p> 793 * @return integer value indicating success/failure of the 794 * function. The possible values 795 * returned by this function are: 796 * <ul> 797 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 798 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 799 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 800 * </ul> 801 * <p> 802 * @note The 'volumeUnits' attribute is available in 803 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 804 */ public 805 int setVolumeUnits(String units) { 806 return libsbmlJNI.Model_setVolumeUnits(swigCPtr, this, units); 807 } 808 809 810/** 811 * Sets the value of the 'areaUnits' attribute of this {@link Model}. 812 * <p> 813 * The string in <code>units</code> is copied. 814 * <p> 815 * @param units the new areaUnits for the {@link Model} 816 * <p> 817 * @return integer value indicating success/failure of the 818 * function. The possible values 819 * returned by this function are: 820 * <ul> 821 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 822 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 823 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 824 * </ul> 825 * <p> 826 * @note The 'areaUnits' attribute is available in 827 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 828 */ public 829 int setAreaUnits(String units) { 830 return libsbmlJNI.Model_setAreaUnits(swigCPtr, this, units); 831 } 832 833 834/** 835 * Sets the value of the 'lengthUnits' attribute of this {@link Model}. 836 * <p> 837 * The string in <code>units</code> is copied. 838 * <p> 839 * @param units the new lengthUnits for the {@link Model} 840 * <p> 841 * @return integer value indicating success/failure of the 842 * function. The possible values 843 * returned by this function are: 844 * <ul> 845 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 846 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 847 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 848 * </ul> 849 * <p> 850 * @note The 'lengthUnits' attribute is available in 851 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 852 */ public 853 int setLengthUnits(String units) { 854 return libsbmlJNI.Model_setLengthUnits(swigCPtr, this, units); 855 } 856 857 858/** 859 * Sets the value of the 'extentUnits' attribute of this {@link Model}. 860 * <p> 861 * The string in <code>units</code> is copied. 862 * <p> 863 * @param units the new extentUnits for the {@link Model} 864 * <p> 865 * @return integer value indicating success/failure of the 866 * function. The possible values 867 * returned by this function are: 868 * <ul> 869 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 870 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 871 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 872 * </ul> 873 * <p> 874 * @note The 'extentUnits' attribute is available in 875 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 876 */ public 877 int setExtentUnits(String units) { 878 return libsbmlJNI.Model_setExtentUnits(swigCPtr, this, units); 879 } 880 881 882/** 883 * Sets the value of the 'conversionFactor' attribute of this {@link Model}. 884 * <p> 885 * The string in <code>units</code> is copied. 886 * <p> 887 * @param units the new conversionFactor for the {@link Model} 888 * <p> 889 * @return integer value indicating success/failure of the 890 * function. The possible values 891 * returned by this function are: 892 * <ul> 893 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 894 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 895 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 896 * </ul> 897 * <p> 898 * @note The 'conversionFactor' attribute is available in 899 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 900 */ public 901 int setConversionFactor(String units) { 902 return libsbmlJNI.Model_setConversionFactor(swigCPtr, this, units); 903 } 904 905 906/** 907 * Unsets the value of the 'id' attribute of this {@link Model}. 908 * <p> 909 * @return integer value indicating success/failure of the 910 * function. The possible values 911 * returned by this function are: 912 * <ul> 913 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 914 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 915 * </ul> 916 */ public 917 int unsetId() { 918 return libsbmlJNI.Model_unsetId(swigCPtr, this); 919 } 920 921 922/** 923 * Unsets the value of the 'name' attribute of this {@link Model}. 924 * <p> 925 * @return integer value indicating success/failure of the 926 * function. The possible values 927 * returned by this function are: 928 * <ul> 929 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 930 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 931 * </ul> 932 */ public 933 int unsetName() { 934 return libsbmlJNI.Model_unsetName(swigCPtr, this); 935 } 936 937 938/** 939 * Unsets the value of the 'substanceUnits' attribute of this {@link Model}. 940 * <p> 941 * @return integer value indicating success/failure of the 942 * function. The possible values 943 * returned by this function are: 944 * <ul> 945 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 946 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 947 * </ul> 948 * <p> 949 * @note The 'substanceUnits' attribute is available in 950 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 951 */ public 952 int unsetSubstanceUnits() { 953 return libsbmlJNI.Model_unsetSubstanceUnits(swigCPtr, this); 954 } 955 956 957/** 958 * Unsets the value of the 'timeUnits' attribute of this {@link Model}. 959 * <p> 960 * @return integer value indicating success/failure of the 961 * function. The possible values 962 * returned by this function are: 963 * <ul> 964 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 965 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 966 * </ul> 967 * <p> 968 * @note The 'timeUnits' attribute is available in 969 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 970 */ public 971 int unsetTimeUnits() { 972 return libsbmlJNI.Model_unsetTimeUnits(swigCPtr, this); 973 } 974 975 976/** 977 * Unsets the value of the 'volumeUnits' attribute of this {@link Model}. 978 * <p> 979 * @return integer value indicating success/failure of the 980 * function. The possible values 981 * returned by this function are: 982 * <ul> 983 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 984 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 985 * </ul> 986 * <p> 987 * @note The 'volumeUnits' attribute is available in 988 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 989 */ public 990 int unsetVolumeUnits() { 991 return libsbmlJNI.Model_unsetVolumeUnits(swigCPtr, this); 992 } 993 994 995/** 996 * Unsets the value of the 'areaUnits' attribute of this {@link Model}. 997 * <p> 998 * @return integer value indicating success/failure of the 999 * function. The possible values 1000 * returned by this function are: 1001 * <ul> 1002 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1003 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 1004 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1005 * </ul> 1006 * <p> 1007 * @note The 'areaUnits' attribute is available in 1008 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 1009 */ public 1010 int unsetAreaUnits() { 1011 return libsbmlJNI.Model_unsetAreaUnits(swigCPtr, this); 1012 } 1013 1014 1015/** 1016 * Unsets the value of the 'lengthUnits' attribute of this {@link Model}. 1017 * <p> 1018 * @return integer value indicating success/failure of the 1019 * function. The possible values 1020 * returned by this function are: 1021 * <ul> 1022 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1023 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 1024 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1025 * </ul> 1026 * <p> 1027 * @note The 'lengthUnits' attribute is available in 1028 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 1029 */ public 1030 int unsetLengthUnits() { 1031 return libsbmlJNI.Model_unsetLengthUnits(swigCPtr, this); 1032 } 1033 1034 1035/** 1036 * Unsets the value of the 'extentUnits' attribute of this {@link Model}. 1037 * <p> 1038 * @return integer value indicating success/failure of the 1039 * function. The possible values 1040 * returned by this function are: 1041 * <ul> 1042 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1043 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 1044 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1045 * </ul> 1046 * <p> 1047 * @note The 'extentUnits' attribute is available in 1048 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 1049 */ public 1050 int unsetExtentUnits() { 1051 return libsbmlJNI.Model_unsetExtentUnits(swigCPtr, this); 1052 } 1053 1054 1055/** 1056 * Unsets the value of the 'conversionFactor' attribute of this {@link Model}. 1057 * <p> 1058 * @return integer value indicating success/failure of the 1059 * function. The possible values 1060 * returned by this function are: 1061 * <ul> 1062 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1063 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 1064 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1065 * </ul> 1066 * <p> 1067 * @note The 'conversionFactor' attribute is available in 1068 * SBML Level 3 but is not present on {@link Model} in lower Levels of SBML. 1069 */ public 1070 int unsetConversionFactor() { 1071 return libsbmlJNI.Model_unsetConversionFactor(swigCPtr, this); 1072 } 1073 1074 1075/** 1076 * Adds a copy of the given {@link FunctionDefinition} object to this {@link Model}. 1077 * <p> 1078 * @param fd the {@link FunctionDefinition} to add 1079 * <p> 1080 * @return integer value indicating success/failure of the 1081 * function. The possible values 1082 * returned by this function are: 1083 * <ul> 1084 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1085 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1086 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1087 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 1088 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1089 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1090 * </ul> 1091 * <p> 1092 * @note This method should be used with some caution. The fact that 1093 * this method <em>copies</em> the object passed to it means that the caller 1094 * will be left holding a physically different object instance than the 1095 * one contained in this {@link Model}. Changes made to the original object 1096 * instance (such as resetting attribute values) will <em>not affect the 1097 * instance in the {@link Model}</em>. In addition, the caller should make sure 1098 * to free the original object if it is no longer being used, or else a 1099 * memory leak will result. Please see {@link Model#createFunctionDefinition()} 1100 * for a method that does not lead to these issues. 1101 * <p> 1102 * @see #createFunctionDefinition() 1103 */ public 1104 int addFunctionDefinition(FunctionDefinition fd) { 1105 return libsbmlJNI.Model_addFunctionDefinition(swigCPtr, this, FunctionDefinition.getCPtr(fd), fd); 1106 } 1107 1108 1109/** 1110 * Adds a copy of the given {@link UnitDefinition} object to this {@link Model}. 1111 * <p> 1112 * @param ud the {@link UnitDefinition} object to add 1113 * <p> 1114 * @return integer value indicating success/failure of the 1115 * function. The possible values 1116 * returned by this function are: 1117 * <ul> 1118 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1119 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1120 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1121 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 1122 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1123 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1124 * </ul> 1125 * <p> 1126 * @note This method should be used with some caution. The fact that 1127 * this method <em>copies</em> the object passed to it means that the caller 1128 * will be left holding a physically different object instance than the 1129 * one contained in this {@link Model}. Changes made to the original object 1130 * instance (such as resetting attribute values) will <em>not affect the 1131 * instance in the {@link Model}</em>. In addition, the caller should make sure 1132 * to free the original object if it is no longer being used, or else a 1133 * memory leak will result. Please see {@link Model#createUnitDefinition()} for 1134 * a method that does not lead to these issues. 1135 * <p> 1136 * @see #createUnitDefinition() 1137 */ public 1138 int addUnitDefinition(UnitDefinition ud) { 1139 return libsbmlJNI.Model_addUnitDefinition(swigCPtr, this, UnitDefinition.getCPtr(ud), ud); 1140 } 1141 1142 1143/** 1144 * Adds a copy of the given {@link CompartmentType} object to this {@link Model}. 1145 * <p> 1146 * @param ct the {@link CompartmentType} object to add 1147 * <p> 1148 * @return integer value indicating success/failure of the 1149 * function. The possible values 1150 * returned by this function are: 1151 * <ul> 1152 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1153 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1154 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1155 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 1156 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1157 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1158 * </ul> 1159 * <p> 1160 * @note This method should be used with some caution. The fact that 1161 * this method <em>copies</em> the object passed to it means that the caller 1162 * will be left holding a physically different object instance than the 1163 * one contained in this {@link Model}. Changes made to the original object 1164 * instance (such as resetting attribute values) will <em>not affect the 1165 * instance in the {@link Model}</em>. In addition, the caller should make sure 1166 * to free the original object if it is no longer being used, or else a 1167 * memory leak will result. Please see {@link Model#createCompartmentType()} 1168 * for a method that does not lead to these issues. 1169 * <p> 1170 * @note The {@link CompartmentType} object class is only available in SBML 1171 * Level 2 Versions 2–4. It is not available in 1172 * Level 1 nor Level 3. 1173 * <p> 1174 * @see #createCompartmentType() 1175 */ public 1176 int addCompartmentType(CompartmentType ct) { 1177 return libsbmlJNI.Model_addCompartmentType(swigCPtr, this, CompartmentType.getCPtr(ct), ct); 1178 } 1179 1180 1181/** 1182 * Adds a copy of the given {@link SpeciesType} object to this {@link Model}. 1183 * <p> 1184 * @param st the {@link SpeciesType} object to add 1185 * <p> 1186 * @return integer value indicating success/failure of the 1187 * function. The possible values 1188 * returned by this function are: 1189 * <ul> 1190 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1191 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1192 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1193 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 1194 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1195 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1196 * </ul> 1197 * <p> 1198 * @note This method should be used with some caution. The fact that 1199 * this method <em>copies</em> the object passed to it means that the caller 1200 * will be left holding a physically different object instance than the 1201 * one contained in this {@link Model}. Changes made to the original object 1202 * instance (such as resetting attribute values) will <em>not affect the 1203 * instance in the {@link Model}</em>. In addition, the caller should make sure 1204 * to free the original object if it is no longer being used, or else a 1205 * memory leak will result. Please see {@link Model#createSpeciesType()} for a 1206 * method that does not lead to these issues. 1207 * <p> 1208 * @note The {@link SpeciesType} object class is only available in SBML 1209 * Level 2 Versions 2–4. It is not available in 1210 * Level 1 nor Level 3. 1211 * <p> 1212 * @see #createSpeciesType() 1213 */ public 1214 int addSpeciesType(SpeciesType st) { 1215 return libsbmlJNI.Model_addSpeciesType(swigCPtr, this, SpeciesType.getCPtr(st), st); 1216 } 1217 1218 1219/** 1220 * Adds a copy of the given {@link Compartment} object to this {@link Model}. 1221 * <p> 1222 * @param c the {@link Compartment} object to add 1223 * <p> 1224 * @return integer value indicating success/failure of the 1225 * function. The possible values 1226 * returned by this function are: 1227 * <ul> 1228 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1229 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1230 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1231 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 1232 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1233 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1234 * </ul> 1235 * <p> 1236 * @note This method should be used with some caution. The fact that 1237 * this method <em>copies</em> the object passed to it means that the caller 1238 * will be left holding a physically different object instance than the 1239 * one contained in this {@link Model}. Changes made to the original object 1240 * instance (such as resetting attribute values) will <em>not affect the 1241 * instance in the {@link Model}</em>. In addition, the caller should make sure 1242 * to free the original object if it is no longer being used, or else a 1243 * memory leak will result. Please see {@link Model#createCompartment()} for a 1244 * method that does not lead to these issues. 1245 * <p> 1246 * @see #createCompartment() 1247 */ public 1248 int addCompartment(Compartment c) { 1249 return libsbmlJNI.Model_addCompartment(swigCPtr, this, Compartment.getCPtr(c), c); 1250 } 1251 1252 1253/** 1254 * Adds a copy of the given {@link Species} object to this {@link Model}. 1255 * <p> 1256 * @param s the {@link Species} object to add 1257 * <p> 1258 * @return integer value indicating success/failure of the 1259 * function. The possible values 1260 * returned by this function are: 1261 * <ul> 1262 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1263 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1264 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1265 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 1266 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1267 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1268 * </ul> 1269 * <p> 1270 * @note This method should be used with some caution. The fact that 1271 * this method <em>copies</em> the object passed to it means that the caller 1272 * will be left holding a physically different object instance than the 1273 * one contained in this {@link Model}. Changes made to the original object 1274 * instance (such as resetting attribute values) will <em>not affect the 1275 * instance in the {@link Model}</em>. In addition, the caller should make sure 1276 * to free the original object if it is no longer being used, or else a 1277 * memory leak will result. Please see {@link Model#createSpecies()} for a 1278 * method that does not lead to these issues. 1279 * <p> 1280 * @see #createSpecies() 1281 */ public 1282 int addSpecies(Species s) { 1283 return libsbmlJNI.Model_addSpecies(swigCPtr, this, Species.getCPtr(s), s); 1284 } 1285 1286 1287/** 1288 * Adds a copy of the given {@link Parameter} object to this {@link Model}. 1289 * <p> 1290 * @param p the {@link Parameter} object to add 1291 * <p> 1292 * @return integer value indicating success/failure of the 1293 * function. The possible values 1294 * returned by this function are: 1295 * <ul> 1296 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1297 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1298 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1299 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 1300 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1301 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1302 * </ul> 1303 * <p> 1304 * @note This method should be used with some caution. The fact that 1305 * this method <em>copies</em> the object passed to it means that the caller 1306 * will be left holding a physically different object instance than the 1307 * one contained in this {@link Model}. Changes made to the original object 1308 * instance (such as resetting attribute values) will <em>not affect the 1309 * instance in the {@link Model}</em>. In addition, the caller should make sure 1310 * to free the original object if it is no longer being used, or else a 1311 * memory leak will result. Please see {@link Model#createParameter()} for a 1312 * method that does not lead to these issues. 1313 * <p> 1314 * @see #createParameter() 1315 */ public 1316 int addParameter(Parameter p) { 1317 return libsbmlJNI.Model_addParameter(swigCPtr, this, Parameter.getCPtr(p), p); 1318 } 1319 1320 1321/** 1322 * Adds a copy of the given {@link InitialAssignment} object to this {@link Model}. 1323 * <p> 1324 * @param ia the {@link InitialAssignment} object to add 1325 * <p> 1326 * @return integer value indicating success/failure of the 1327 * function. The possible values 1328 * returned by this function are: 1329 * <ul> 1330 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1331 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1332 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1333 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 1334 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1335 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1336 * </ul> 1337 * <p> 1338 * @note This method should be used with some caution. The fact that 1339 * this method <em>copies</em> the object passed to it means that the caller 1340 * will be left holding a physically different object instance than the 1341 * one contained in this {@link Model}. Changes made to the original object 1342 * instance (such as resetting attribute values) will <em>not affect the 1343 * instance in the {@link Model}</em>. In addition, the caller should make sure 1344 * to free the original object if it is no longer being used, or else a 1345 * memory leak will result. Please see {@link Model#createInitialAssignment()} 1346 * for a method that does not lead to these issues. 1347 * <p> 1348 * @see #createInitialAssignment() 1349 */ public 1350 int addInitialAssignment(InitialAssignment ia) { 1351 return libsbmlJNI.Model_addInitialAssignment(swigCPtr, this, InitialAssignment.getCPtr(ia), ia); 1352 } 1353 1354 1355/** 1356 * Adds a copy of the given {@link Rule} object to this {@link Model}. 1357 * <p> 1358 * @param r the {@link Rule} object to add 1359 * <p> 1360 * @return integer value indicating success/failure of the 1361 * function. The possible values 1362 * returned by this function are: 1363 * <ul> 1364 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1365 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1366 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1367 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 1368 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1369 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1370 * </ul> 1371 * <p> 1372 * @note This method should be used with some caution. The fact that 1373 * this method <em>copies</em> the object passed to it means that the caller 1374 * will be left holding a physically different object instance than the 1375 * one contained in this {@link Model}. Changes made to the original object 1376 * instance (such as resetting attribute values) will <em>not affect the 1377 * instance in the {@link Model}</em>. In addition, the caller should make sure 1378 * to free the original object if it is no longer being used, or else a 1379 * memory leak will result. Please see the methods 1380 * {@link Model#createAlgebraicRule()}, {@link Model#createAssignmentRule()} and 1381 * {@link Model#createRateRule()} for methods that do not lead to these issues. 1382 * <p> 1383 * @see #createAlgebraicRule() 1384 * @see #createAssignmentRule() 1385 * @see #createRateRule() 1386 */ public 1387 int addRule(Rule r) { 1388 return libsbmlJNI.Model_addRule(swigCPtr, this, Rule.getCPtr(r), r); 1389 } 1390 1391 1392/** 1393 * Adds a copy of the given {@link Constraint} object to this {@link Model}. 1394 * <p> 1395 * @param c the {@link Constraint} object to add 1396 * <p> 1397 * @return integer value indicating success/failure of the 1398 * function. The possible values 1399 * returned by this function are: 1400 * <ul> 1401 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1402 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1403 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1404 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1405 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1406 * </ul> 1407 * <p> 1408 * @note This method should be used with some caution. The fact that 1409 * this method <em>copies</em> the object passed to it means that the caller 1410 * will be left holding a physically different object instance than the 1411 * one contained in this {@link Model}. Changes made to the original object 1412 * instance (such as resetting attribute values) will <em>not affect the 1413 * instance in the {@link Model}</em>. In addition, the caller should make sure 1414 * to free the original object if it is no longer being used, or else a 1415 * memory leak will result. Please see {@link Model#createConstraint()} for a 1416 * method that does not lead to these issues. 1417 * <p> 1418 * @see #createConstraint() 1419 */ public 1420 int addConstraint(Constraint c) { 1421 return libsbmlJNI.Model_addConstraint(swigCPtr, this, Constraint.getCPtr(c), c); 1422 } 1423 1424 1425/** 1426 * Adds a copy of the given {@link Reaction} object to this {@link Model}. 1427 * <p> 1428 * @param r the {@link Reaction} object to add 1429 * <p> 1430 * @return integer value indicating success/failure of the 1431 * function. The possible values 1432 * returned by this function are: 1433 * <ul> 1434 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1435 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1436 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1437 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 1438 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1439 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1440 * </ul> 1441 * <p> 1442 * @note This method should be used with some caution. The fact that 1443 * this method <em>copies</em> the object passed to it means that the caller 1444 * will be left holding a physically different object instance than the 1445 * one contained in this {@link Model}. Changes made to the original object 1446 * instance (such as resetting attribute values) will <em>not affect the 1447 * instance in the {@link Model}</em>. In addition, the caller should make sure 1448 * to free the original object if it is no longer being used, or else a 1449 * memory leak will result. Please see {@link Model#createReaction()} for a 1450 * method that does not lead to these issues. 1451 * <p> 1452 * @see #createReaction() 1453 */ public 1454 int addReaction(Reaction r) { 1455 return libsbmlJNI.Model_addReaction(swigCPtr, this, Reaction.getCPtr(r), r); 1456 } 1457 1458 1459/** 1460 * Adds a copy of the given {@link Event} object to this {@link Model}. 1461 * <p> 1462 * @param e the {@link Event} object to add 1463 * <p> 1464 * @return integer value indicating success/failure of the 1465 * function. The possible values 1466 * returned by this function are: 1467 * <ul> 1468 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1469 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 1470 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 1471 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 1472 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT } 1473 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 1474 * </ul> 1475 * <p> 1476 * @note This method should be used with some caution. The fact that 1477 * this method <em>copies</em> the object passed to it means that the caller 1478 * will be left holding a physically different object instance than the 1479 * one contained in this {@link Model}. Changes made to the original object 1480 * instance (such as resetting attribute values) will <em>not affect the 1481 * instance in the {@link Model}</em>. In addition, the caller should make sure 1482 * to free the original object if it is no longer being used, or else a 1483 * memory leak will result. Please see {@link Model#createEvent()} for a method 1484 * that does not lead to these issues. 1485 * <p> 1486 * @see #createEvent() 1487 */ public 1488 int addEvent(Event e) { 1489 return libsbmlJNI.Model_addEvent(swigCPtr, this, Event.getCPtr(e), e); 1490 } 1491 1492 1493/** 1494 * Creates a new {@link FunctionDefinition} inside this {@link Model} and returns it. 1495 * <p> 1496 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1497 * any SBML package namespaces, are used to initialize this 1498 * object's corresponding attributes. 1499 * <p> 1500 * @return the {@link FunctionDefinition} object created 1501 * <p> 1502 * @see #addFunctionDefinition(FunctionDefinition fd) 1503 */ public 1504 FunctionDefinition createFunctionDefinition() { 1505 long cPtr = libsbmlJNI.Model_createFunctionDefinition(swigCPtr, this); 1506 return (cPtr == 0) ? null : new FunctionDefinition(cPtr, false); 1507 } 1508 1509 1510/** 1511 * Creates a new {@link UnitDefinition} inside this {@link Model} and returns it. 1512 * <p> 1513 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1514 * any SBML package namespaces, are used to initialize this 1515 * object's corresponding attributes. 1516 * <p> 1517 * @return the {@link UnitDefinition} object created 1518 * <p> 1519 * @see #addUnitDefinition(UnitDefinition ud) 1520 */ public 1521 UnitDefinition createUnitDefinition() { 1522 long cPtr = libsbmlJNI.Model_createUnitDefinition(swigCPtr, this); 1523 return (cPtr == 0) ? null : new UnitDefinition(cPtr, false); 1524 } 1525 1526 1527/** 1528 * Creates a new {@link Unit} object within the last {@link UnitDefinition} object 1529 * created in this model and returns a pointer to it. 1530 * <p> 1531 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1532 * any SBML package namespaces, are used to initialize this 1533 * object's corresponding attributes. 1534 * <p> 1535 * The mechanism by which the {@link UnitDefinition} was created is not 1536 * significant. If a {@link UnitDefinition} object does not exist in this model, 1537 * a new {@link Unit} is <em>not</em> created and <code>null</code> is returned instead. 1538 * <p> 1539 * @return the {@link Unit} object created 1540 * <p> 1541 * @see #addUnitDefinition(UnitDefinition ud) 1542 */ public 1543 Unit createUnit() { 1544 long cPtr = libsbmlJNI.Model_createUnit(swigCPtr, this); 1545 return (cPtr == 0) ? null : new Unit(cPtr, false); 1546 } 1547 1548 1549/** 1550 * Creates a new {@link CompartmentType} inside this {@link Model} and returns it. 1551 * <p> 1552 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1553 * any SBML package namespaces, are used to initialize this 1554 * object's corresponding attributes. 1555 * <p> 1556 * @return the {@link CompartmentType} object created 1557 * <p> 1558 * @note The {@link CompartmentType} object class is only available in SBML 1559 * Level 2 Versions 2–4. It is not available in 1560 * Level 1 nor Level 3. 1561 * <p> 1562 * @see #addCompartmentType(CompartmentType ct) 1563 */ public 1564 CompartmentType createCompartmentType() { 1565 long cPtr = libsbmlJNI.Model_createCompartmentType(swigCPtr, this); 1566 return (cPtr == 0) ? null : new CompartmentType(cPtr, false); 1567 } 1568 1569 1570/** 1571 * Creates a new {@link SpeciesType} inside this {@link Model} and returns it. 1572 * <p> 1573 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1574 * any SBML package namespaces, are used to initialize this 1575 * object's corresponding attributes. 1576 * <p> 1577 * @return the {@link SpeciesType} object created 1578 * <p> 1579 * @note The {@link SpeciesType} object class is only available in SBML 1580 * Level 2 Versions 2–4. It is not available in 1581 * Level 1 nor Level 3. 1582 * <p> 1583 * @see #addSpeciesType(SpeciesType st) 1584 */ public 1585 SpeciesType createSpeciesType() { 1586 long cPtr = libsbmlJNI.Model_createSpeciesType(swigCPtr, this); 1587 return (cPtr == 0) ? null : new SpeciesType(cPtr, false); 1588 } 1589 1590 1591/** 1592 * Creates a new {@link Compartment} inside this {@link Model} and returns it. 1593 * <p> 1594 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1595 * any SBML package namespaces, are used to initialize this 1596 * object's corresponding attributes. 1597 * <p> 1598 * @return the {@link Compartment} object created 1599 * <p> 1600 * @see #addCompartment(Compartment c) 1601 */ public 1602 Compartment createCompartment() { 1603 long cPtr = libsbmlJNI.Model_createCompartment(swigCPtr, this); 1604 return (cPtr == 0) ? null : new Compartment(cPtr, false); 1605 } 1606 1607 1608/** 1609 * Creates a new {@link Species} inside this {@link Model} and returns it. 1610 * <p> 1611 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1612 * any SBML package namespaces, are used to initialize this 1613 * object's corresponding attributes. 1614 * <p> 1615 * @return the {@link Species} object created 1616 * <p> 1617 * @see #addSpecies(Species s) 1618 */ public 1619 Species createSpecies() { 1620 long cPtr = libsbmlJNI.Model_createSpecies(swigCPtr, this); 1621 return (cPtr == 0) ? null : new Species(cPtr, false); 1622 } 1623 1624 1625/** 1626 * Creates a new {@link Parameter} inside this {@link Model} and returns it. 1627 * <p> 1628 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1629 * any SBML package namespaces, are used to initialize this 1630 * object's corresponding attributes. 1631 * <p> 1632 * @return the {@link Parameter} object created 1633 * <p> 1634 * @see #addParameter(Parameter p) 1635 */ public 1636 Parameter createParameter() { 1637 long cPtr = libsbmlJNI.Model_createParameter(swigCPtr, this); 1638 return (cPtr == 0) ? null : new Parameter(cPtr, false); 1639 } 1640 1641 1642/** 1643 * Creates a new {@link InitialAssignment} inside this {@link Model} and returns it. 1644 * <p> 1645 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1646 * any SBML package namespaces, are used to initialize this 1647 * object's corresponding attributes. 1648 * <p> 1649 * @return the {@link InitialAssignment} object created 1650 * <p> 1651 * @see #addInitialAssignment(InitialAssignment ia) 1652 */ public 1653 InitialAssignment createInitialAssignment() { 1654 long cPtr = libsbmlJNI.Model_createInitialAssignment(swigCPtr, this); 1655 return (cPtr == 0) ? null : new InitialAssignment(cPtr, false); 1656 } 1657 1658 1659/** 1660 * Creates a new {@link AlgebraicRule} inside this {@link Model} and returns it. 1661 * <p> 1662 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1663 * any SBML package namespaces, are used to initialize this 1664 * object's corresponding attributes. 1665 * <p> 1666 * @return the {@link AlgebraicRule} object created 1667 * <p> 1668 * @see #addRule(Rule r) 1669 */ public 1670 AlgebraicRule createAlgebraicRule() { 1671 long cPtr = libsbmlJNI.Model_createAlgebraicRule(swigCPtr, this); 1672 return (cPtr == 0) ? null : new AlgebraicRule(cPtr, false); 1673 } 1674 1675 1676/** 1677 * Creates a new {@link AssignmentRule} inside this {@link Model} and returns it. 1678 * <p> 1679 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1680 * any SBML package namespaces, are used to initialize this 1681 * object's corresponding attributes. 1682 * <p> 1683 * @return the {@link AssignmentRule} object created 1684 * <p> 1685 * @see #addRule(Rule r) 1686 */ public 1687 AssignmentRule createAssignmentRule() { 1688 long cPtr = libsbmlJNI.Model_createAssignmentRule(swigCPtr, this); 1689 return (cPtr == 0) ? null : new AssignmentRule(cPtr, false); 1690 } 1691 1692 1693/** 1694 * Creates a new {@link RateRule} inside this {@link Model} and returns it. 1695 * <p> 1696 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1697 * any SBML package namespaces, are used to initialize this 1698 * object's corresponding attributes. 1699 * <p> 1700 * @return the {@link RateRule} object created 1701 * <p> 1702 * @see #addRule(Rule r) 1703 */ public 1704 RateRule createRateRule() { 1705 long cPtr = libsbmlJNI.Model_createRateRule(swigCPtr, this); 1706 return (cPtr == 0) ? null : new RateRule(cPtr, false); 1707 } 1708 1709 1710/** 1711 * Creates a new {@link Constraint} inside this {@link Model} and returns it. 1712 * <p> 1713 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1714 * any SBML package namespaces, are used to initialize this 1715 * object's corresponding attributes. 1716 * <p> 1717 * @return the {@link Constraint} object created 1718 * <p> 1719 * @see #addConstraint(Constraint c) 1720 */ public 1721 Constraint createConstraint() { 1722 long cPtr = libsbmlJNI.Model_createConstraint(swigCPtr, this); 1723 return (cPtr == 0) ? null : new Constraint(cPtr, false); 1724 } 1725 1726 1727/** 1728 * Creates a new {@link Reaction} inside this {@link Model} and returns it. 1729 * <p> 1730 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1731 * any SBML package namespaces, are used to initialize this 1732 * object's corresponding attributes. 1733 * <p> 1734 * @return the {@link Reaction} object created 1735 * <p> 1736 * @see #addReaction(Reaction r) 1737 */ public 1738 Reaction createReaction() { 1739 long cPtr = libsbmlJNI.Model_createReaction(swigCPtr, this); 1740 return (cPtr == 0) ? null : new Reaction(cPtr, false); 1741 } 1742 1743 1744/** 1745 * Creates a new {@link SpeciesReference} object for a reactant inside the last 1746 * {@link Reaction} object in this {@link Model}, and returns a pointer to it. 1747 * <p> 1748 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1749 * any SBML package namespaces, are used to initialize this 1750 * object's corresponding attributes. 1751 * <p> 1752 * The mechanism by which the last {@link Reaction} object was created and added 1753 * to this {@link Model} is not significant. It could have been created in a 1754 * variety of ways, for example using createReaction(). If a {@link Reaction} 1755 * does not exist for this model, a new {@link SpeciesReference} is <em>not</em> 1756 * created and <code>null</code> is returned instead. 1757 * <p> 1758 * @return the {@link SpeciesReference} object created 1759 */ public 1760 SpeciesReference createReactant() { 1761 long cPtr = libsbmlJNI.Model_createReactant(swigCPtr, this); 1762 return (cPtr == 0) ? null : new SpeciesReference(cPtr, false); 1763 } 1764 1765 1766/** 1767 * Creates a new {@link SpeciesReference} object for a product inside the last 1768 * {@link Reaction} object in this {@link Model}, and returns a pointer to it. 1769 * <p> 1770 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1771 * any SBML package namespaces, are used to initialize this 1772 * object's corresponding attributes. 1773 * <p> 1774 * The mechanism by which the last {@link Reaction} object was created and added 1775 * to this {@link Model} is not significant. It could have been created in a 1776 * variety of ways, for example using createReaction(). If a {@link Reaction} 1777 * does not exist for this model, a new {@link SpeciesReference} is <em>not</em> 1778 * created and <code>null</code> is returned instead. 1779 * <p> 1780 * @return the {@link SpeciesReference} object created 1781 */ public 1782 SpeciesReference createProduct() { 1783 long cPtr = libsbmlJNI.Model_createProduct(swigCPtr, this); 1784 return (cPtr == 0) ? null : new SpeciesReference(cPtr, false); 1785 } 1786 1787 1788/** 1789 * Creates a new {@link ModifierSpeciesReference} object for a modifier species 1790 * inside the last {@link Reaction} object in this {@link Model}, and returns a pointer 1791 * to it. 1792 * <p> 1793 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1794 * any SBML package namespaces, are used to initialize this 1795 * object's corresponding attributes. 1796 * <p> 1797 * The mechanism by which the last {@link Reaction} object was created and added 1798 * to this {@link Model} is not significant. It could have been created in a 1799 * variety of ways, for example using createReaction(). If a {@link Reaction} 1800 * does not exist for this model, a new {@link ModifierSpeciesReference} is 1801 * <em>not</em> created and <code>null</code> is returned instead. 1802 * <p> 1803 * @return the {@link SpeciesReference} object created 1804 */ public 1805 ModifierSpeciesReference createModifier() { 1806 long cPtr = libsbmlJNI.Model_createModifier(swigCPtr, this); 1807 return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, false); 1808 } 1809 1810 1811/** 1812 * Creates a new {@link KineticLaw} inside the last {@link Reaction} object created in 1813 * this {@link Model}, and returns a pointer to it. 1814 * <p> 1815 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1816 * any SBML package namespaces, are used to initialize this 1817 * object's corresponding attributes. 1818 * <p> 1819 * The mechanism by which the last {@link Reaction} object was created and added 1820 * to this {@link Model} is not significant. It could have been created in a 1821 * variety of ways, for example using createReaction(). If a {@link Reaction} 1822 * does not exist for this model, or a {@link Reaction} exists but already has a 1823 * {@link KineticLaw}, a new {@link KineticLaw} is <em>not</em> created and <code>null</code> is returned 1824 * instead. 1825 * <p> 1826 * @return the {@link KineticLaw} object created 1827 */ public 1828 KineticLaw createKineticLaw() { 1829 long cPtr = libsbmlJNI.Model_createKineticLaw(swigCPtr, this); 1830 return (cPtr == 0) ? null : new KineticLaw(cPtr, false); 1831 } 1832 1833 1834/** 1835 * Creates a new local {@link Parameter} inside the {@link KineticLaw} object of the last 1836 * {@link Reaction} created inside this {@link Model}, and returns a pointer to it. 1837 * <p> 1838 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1839 * any SBML package namespaces, are used to initialize this 1840 * object's corresponding attributes. 1841 * <p> 1842 * The last {@link KineticLaw} object in this {@link Model} could have been created in a 1843 * variety of ways. For example, it could have been added using 1844 * createKineticLaw(), or it could be the result of using 1845 * {@link Reaction#createKineticLaw()} on the {@link Reaction} object created by a 1846 * createReaction(). If a {@link Reaction} does not exist for this model, or the 1847 * last {@link Reaction} does not contain a {@link KineticLaw} object, a new {@link Parameter} is 1848 * <em>not</em> created and <code>null</code> is returned instead. 1849 * <p> 1850 * @return the {@link Parameter} object created 1851 */ public 1852 Parameter createKineticLawParameter() { 1853 long cPtr = libsbmlJNI.Model_createKineticLawParameter(swigCPtr, this); 1854 return (cPtr == 0) ? null : new Parameter(cPtr, false); 1855 } 1856 1857 1858/** 1859 * Creates a new {@link LocalParameter} inside the {@link KineticLaw} object of the last 1860 * {@link Reaction} created inside this {@link Model}, and returns a pointer to it. 1861 * <p> 1862 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1863 * any SBML package namespaces, are used to initialize this 1864 * object's corresponding attributes. 1865 * <p> 1866 * The last {@link KineticLaw} object in this {@link Model} could have been created in a 1867 * variety of ways. For example, it could have been added using 1868 * createKineticLaw(), or it could be the result of using 1869 * {@link Reaction#createKineticLaw()} on the {@link Reaction} object created by a 1870 * createReaction(). If a {@link Reaction} does not exist for this model, or the 1871 * last {@link Reaction} does not contain a {@link KineticLaw} object, a new {@link Parameter} is 1872 * <em>not</em> created and <code>null</code> is returned instead. 1873 * <p> 1874 * @return the {@link Parameter} object created 1875 */ public 1876 LocalParameter createKineticLawLocalParameter() { 1877 long cPtr = libsbmlJNI.Model_createKineticLawLocalParameter(swigCPtr, this); 1878 return (cPtr == 0) ? null : new LocalParameter(cPtr, false); 1879 } 1880 1881 1882/** 1883 * Creates a new {@link Event} inside this {@link Model} and returns it. 1884 * <p> 1885 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1886 * any SBML package namespaces, are used to initialize this 1887 * object's corresponding attributes. 1888 * <p> 1889 * @return the {@link Event} object created 1890 */ public 1891 Event createEvent() { 1892 long cPtr = libsbmlJNI.Model_createEvent(swigCPtr, this); 1893 return (cPtr == 0) ? null : new Event(cPtr, false); 1894 } 1895 1896 1897/** 1898 * Creates a new {@link EventAssignment} inside the last {@link Event} object created in 1899 * this {@link Model}, and returns a pointer to it. 1900 * <p> 1901 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1902 * any SBML package namespaces, are used to initialize this 1903 * object's corresponding attributes. 1904 * <p> 1905 * The mechanism by which the last {@link Event} object in this model was created 1906 * is not significant. It could have been created in a variety of ways, 1907 * for example by using createEvent(). If no {@link Event} object exists in this 1908 * {@link Model} object, a new {@link EventAssignment} is <em>not</em> created and <code>null</code> is 1909 * returned instead. 1910 * <p> 1911 * @return the {@link EventAssignment} object created 1912 */ public 1913 EventAssignment createEventAssignment() { 1914 long cPtr = libsbmlJNI.Model_createEventAssignment(swigCPtr, this); 1915 return (cPtr == 0) ? null : new EventAssignment(cPtr, false); 1916 } 1917 1918 1919/** 1920 * Creates a new {@link Trigger} inside the last {@link Event} object created in 1921 * this {@link Model}, and returns a pointer to it. 1922 * <p> 1923 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1924 * any SBML package namespaces, are used to initialize this 1925 * object's corresponding attributes. 1926 * <p> 1927 * The mechanism by which the last {@link Event} object in this model was created 1928 * is not significant. It could have been created in a variety of ways, 1929 * for example by using createEvent(). If no {@link Event} object exists in this 1930 * {@link Model} object, a new {@link Trigger} is <em>not</em> created and <code>null</code> is 1931 * returned instead. 1932 * <p> 1933 * @return the {@link Trigger} object created 1934 */ public 1935 Trigger createTrigger() { 1936 long cPtr = libsbmlJNI.Model_createTrigger(swigCPtr, this); 1937 return (cPtr == 0) ? null : new Trigger(cPtr, false); 1938 } 1939 1940 1941/** 1942 * Creates a new {@link Delay} inside the last {@link Event} object created in 1943 * this {@link Model}, and returns a pointer to it. 1944 * <p> 1945 * The SBML Level and Version of the enclosing {@link Model} object, as well as 1946 * any SBML package namespaces, are used to initialize this 1947 * object's corresponding attributes. 1948 * <p> 1949 * The mechanism by which the last {@link Event} object in this model was created 1950 * is not significant. It could have been created in a variety of ways, 1951 * for example by using createEvent(). If no {@link Event} object exists in this 1952 * {@link Model} object, a new {@link Delay} is <em>not</em> created and <code>null</code> is 1953 * returned instead. 1954 * <p> 1955 * @return the {@link Delay} object created 1956 */ public 1957 Delay createDelay() { 1958 long cPtr = libsbmlJNI.Model_createDelay(swigCPtr, this); 1959 return (cPtr == 0) ? null : new Delay(cPtr, false); 1960 } 1961 1962 1963/** 1964 * Sets the value of the 'annotation' subelement of this SBML object to a 1965 * copy of <code>annotation</code>. 1966 * <p> 1967 * Any existing content of the 'annotation' subelement is discarded. 1968 * Unless you have taken steps to first copy and reconstitute any 1969 * existing annotations into the <code>annotation</code> that is about to be 1970 * assigned, it is likely that performing such wholesale replacement is 1971 * unfriendly towards other software applications whose annotations are 1972 * discarded. An alternative may be to use appendAnnotation(). 1973 * <p> 1974 * @param annotation an XML structure that is to be used as the content 1975 * of the 'annotation' subelement of this object 1976 * <p> 1977 * @return integer value indicating success/failure of the 1978 * function. The possible values 1979 * returned by this function are: 1980 * <ul> 1981 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 1982 * </ul> 1983 * <p> 1984 * @see #appendAnnotation(XMLNode annotation) 1985 */ public 1986 int setAnnotation(XMLNode annotation) { 1987 return libsbmlJNI.Model_setAnnotation__SWIG_0(swigCPtr, this, XMLNode.getCPtr(annotation), annotation); 1988 } 1989 1990 1991/** 1992 * Sets the value of the 'annotation' subelement of this SBML object to a 1993 * copy of <code>annotation</code>. 1994 * <p> 1995 * Any existing content of the 'annotation' subelement is discarded. 1996 * Unless you have taken steps to first copy and reconstitute any 1997 * existing annotations into the <code>annotation</code> that is about to be 1998 * assigned, it is likely that performing such wholesale replacement is 1999 * unfriendly towards other software applications whose annotations are 2000 * discarded. An alternative may be to use appendAnnotation(). 2001 * <p> 2002 * @param annotation an XML string that is to be used as the content 2003 * of the 'annotation' subelement of this object 2004 * <p> 2005 * @return integer value indicating success/failure of the 2006 * function. The possible values 2007 * returned by this function are: 2008 * <ul> 2009 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 2010 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 2011 * </ul> 2012 * <p> 2013 * @see #appendAnnotation(String annotation) 2014 */ public 2015 int setAnnotation(String annotation) { 2016 return libsbmlJNI.Model_setAnnotation__SWIG_1(swigCPtr, this, annotation); 2017 } 2018 2019 2020/** 2021 * Appends annotation content to any existing content in the 'annotation' 2022 * subelement of this object. 2023 * <p> 2024 * The content in <code>annotation</code> is copied. Unlike setAnnotation(), this 2025 * method allows other annotations to be preserved when an application 2026 * adds its own data. 2027 * <p> 2028 * @param annotation an XML structure that is to be copied and appended 2029 * to the content of the 'annotation' subelement of this object 2030 * <p> 2031 * @return integer value indicating success/failure of the 2032 * function. The possible values 2033 * returned by this function are: 2034 * <ul> 2035 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 2036 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 2037 * </ul> 2038 * <p> 2039 * @see #setAnnotation(XMLNode annotation) 2040 */ public 2041 int appendAnnotation(XMLNode annotation) { 2042 return libsbmlJNI.Model_appendAnnotation__SWIG_0(swigCPtr, this, XMLNode.getCPtr(annotation), annotation); 2043 } 2044 2045 2046/** 2047 * Appends annotation content to any existing content in the 'annotation' 2048 * subelement of this object. 2049 * <p> 2050 * The content in <code>annotation</code> is copied. Unlike setAnnotation(), this 2051 * method allows other annotations to be preserved when an application 2052 * adds its own data. 2053 * <p> 2054 * @param annotation an XML string that is to be copied and appended 2055 * to the content of the 'annotation' subelement of this object 2056 * <p> 2057 * @return integer value indicating success/failure of the 2058 * function. The possible values 2059 * returned by this function are: 2060 * <ul> 2061 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 2062 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 2063 * </ul> 2064 * <p> 2065 * @see #setAnnotation(String annotation) 2066 */ public 2067 int appendAnnotation(String annotation) { 2068 return libsbmlJNI.Model_appendAnnotation__SWIG_1(swigCPtr, this, annotation); 2069 } 2070 2071 2072/** 2073 * Get the {@link ListOfFunctionDefinitions} object in this {@link Model}. 2074 * <p> 2075 * @return the list of FunctionDefinitions for this {@link Model}. 2076 */ public 2077 ListOfFunctionDefinitions getListOfFunctionDefinitions() { 2078 long cPtr = libsbmlJNI.Model_getListOfFunctionDefinitions__SWIG_0(swigCPtr, this); 2079 return (cPtr == 0) ? null : new ListOfFunctionDefinitions(cPtr, false); 2080 } 2081 2082 2083/** 2084 * Get the {@link ListOfUnitDefinitions} object in this {@link Model}. 2085 * <p> 2086 * @return the list of UnitDefinitions for this {@link Model}. 2087 */ public 2088 ListOfUnitDefinitions getListOfUnitDefinitions() { 2089 long cPtr = libsbmlJNI.Model_getListOfUnitDefinitions__SWIG_0(swigCPtr, this); 2090 return (cPtr == 0) ? null : new ListOfUnitDefinitions(cPtr, false); 2091 } 2092 2093 2094/** 2095 * Get the {@link ListOfCompartmentTypes} object in this {@link Model}. 2096 * <p> 2097 * @return the list of CompartmentTypes for this {@link Model}. 2098 * <p> 2099 * @note The {@link CompartmentType} object class is only available in SBML 2100 * Level 2 Versions 2–4. It is not available in 2101 * Level 1 nor Level 3. 2102 */ public 2103 ListOfCompartmentTypes getListOfCompartmentTypes() { 2104 long cPtr = libsbmlJNI.Model_getListOfCompartmentTypes__SWIG_0(swigCPtr, this); 2105 return (cPtr == 0) ? null : new ListOfCompartmentTypes(cPtr, false); 2106 } 2107 2108 2109/** 2110 * Get the {@link ListOfSpeciesTypes} object in this {@link Model}. 2111 * <p> 2112 * @return the list of SpeciesTypes for this {@link Model}. 2113 * <p> 2114 * @note The {@link SpeciesType} object class is only available in SBML 2115 * Level 2 Versions 2–4. It is not available in 2116 * Level 1 nor Level 3. 2117 */ public 2118 ListOfSpeciesTypes getListOfSpeciesTypes() { 2119 long cPtr = libsbmlJNI.Model_getListOfSpeciesTypes__SWIG_0(swigCPtr, this); 2120 return (cPtr == 0) ? null : new ListOfSpeciesTypes(cPtr, false); 2121 } 2122 2123 2124/** 2125 * Get the {@link ListOfCompartments} object in this {@link Model}. 2126 * <p> 2127 * @return the list of Compartments for this {@link Model}. 2128 */ public 2129 ListOfCompartments getListOfCompartments() { 2130 long cPtr = libsbmlJNI.Model_getListOfCompartments__SWIG_0(swigCPtr, this); 2131 return (cPtr == 0) ? null : new ListOfCompartments(cPtr, false); 2132 } 2133 2134 2135/** 2136 * Get the {@link ListOfSpecies} object in this {@link Model}. 2137 * <p> 2138 * @return the list of {@link Species} for this {@link Model}. 2139 */ public 2140 ListOfSpecies getListOfSpecies() { 2141 long cPtr = libsbmlJNI.Model_getListOfSpecies__SWIG_0(swigCPtr, this); 2142 return (cPtr == 0) ? null : new ListOfSpecies(cPtr, false); 2143 } 2144 2145 2146/** 2147 * Get the {@link ListOfParameters} object in this {@link Model}. 2148 * <p> 2149 * @return the list of Parameters for this {@link Model}. 2150 */ public 2151 ListOfParameters getListOfParameters() { 2152 long cPtr = libsbmlJNI.Model_getListOfParameters__SWIG_0(swigCPtr, this); 2153 return (cPtr == 0) ? null : new ListOfParameters(cPtr, false); 2154 } 2155 2156 2157/** 2158 * Get the {@link ListOfInitialAssignments} object in this {@link Model}. 2159 * <p> 2160 * @return the list of InitialAssignments for this {@link Model}. 2161 */ public 2162 ListOfInitialAssignments getListOfInitialAssignments() { 2163 long cPtr = libsbmlJNI.Model_getListOfInitialAssignments__SWIG_0(swigCPtr, this); 2164 return (cPtr == 0) ? null : new ListOfInitialAssignments(cPtr, false); 2165 } 2166 2167 2168/** 2169 * Get the {@link ListOfRules} object in this {@link Model}. 2170 * <p> 2171 * @return the list of Rules for this {@link Model}. 2172 */ public 2173 ListOfRules getListOfRules() { 2174 long cPtr = libsbmlJNI.Model_getListOfRules__SWIG_0(swigCPtr, this); 2175 return (cPtr == 0) ? null : new ListOfRules(cPtr, false); 2176 } 2177 2178 2179/** 2180 * Get the {@link ListOfConstraints} object in this {@link Model}. 2181 * <p> 2182 * @return the list of Constraints for this {@link Model}. 2183 */ public 2184 ListOfConstraints getListOfConstraints() { 2185 long cPtr = libsbmlJNI.Model_getListOfConstraints__SWIG_0(swigCPtr, this); 2186 return (cPtr == 0) ? null : new ListOfConstraints(cPtr, false); 2187 } 2188 2189 2190/** 2191 * Get the {@link ListOfReactions} object in this {@link Model}. 2192 * <p> 2193 * @return the list of Reactions for this {@link Model}. 2194 */ public 2195 ListOfReactions getListOfReactions() { 2196 long cPtr = libsbmlJNI.Model_getListOfReactions__SWIG_0(swigCPtr, this); 2197 return (cPtr == 0) ? null : new ListOfReactions(cPtr, false); 2198 } 2199 2200 2201/** 2202 * Get the {@link ListOfEvents} object in this {@link Model}. 2203 * <p> 2204 * @return the list of Events for this {@link Model}. 2205 */ public 2206 ListOfEvents getListOfEvents() { 2207 long cPtr = libsbmlJNI.Model_getListOfEvents__SWIG_0(swigCPtr, this); 2208 return (cPtr == 0) ? null : new ListOfEvents(cPtr, false); 2209 } 2210 2211 2212/** 2213 * Get the nth FunctionDefinitions object in this {@link Model}. 2214 * <p> 2215 * @return the nth {@link FunctionDefinition} of this {@link Model}. 2216 */ public 2217 FunctionDefinition getFunctionDefinition(long n) { 2218 long cPtr = libsbmlJNI.Model_getFunctionDefinition__SWIG_0(swigCPtr, this, n); 2219 return (cPtr == 0) ? null : new FunctionDefinition(cPtr, false); 2220 } 2221 2222 2223/** 2224 * Get a {@link FunctionDefinition} object based on its identifier. 2225 * <p> 2226 * @return the {@link FunctionDefinition} in this {@link Model} with the identifier 2227 * <code>sid</code> or <code>null</code> if no such {@link FunctionDefinition} exists. 2228 */ public 2229 FunctionDefinition getFunctionDefinition(String sid) { 2230 long cPtr = libsbmlJNI.Model_getFunctionDefinition__SWIG_2(swigCPtr, this, sid); 2231 return (cPtr == 0) ? null : new FunctionDefinition(cPtr, false); 2232 } 2233 2234 2235/** 2236 * Get the nth {@link UnitDefinition} object in this {@link Model}. 2237 * <p> 2238 * @return the nth {@link UnitDefinition} of this {@link Model}. 2239 */ public 2240 UnitDefinition getUnitDefinition(long n) { 2241 long cPtr = libsbmlJNI.Model_getUnitDefinition__SWIG_0(swigCPtr, this, n); 2242 return (cPtr == 0) ? null : new UnitDefinition(cPtr, false); 2243 } 2244 2245 2246/** 2247 * Get a {@link UnitDefinition} based on its identifier. 2248 * <p> 2249 * @return the {@link UnitDefinition} in this {@link Model} with the identifier <code>sid</code> or 2250 * <code>null</code> if no such {@link UnitDefinition} exists. 2251 */ public 2252 UnitDefinition getUnitDefinition(String sid) { 2253 long cPtr = libsbmlJNI.Model_getUnitDefinition__SWIG_2(swigCPtr, this, sid); 2254 return (cPtr == 0) ? null : new UnitDefinition(cPtr, false); 2255 } 2256 2257 2258/** 2259 * Get the nth {@link CompartmentType} object in this {@link Model}. 2260 * <p> 2261 * @return the nth {@link CompartmentType} of this {@link Model}. 2262 * <p> 2263 * @note The {@link CompartmentType} object class is only available in SBML 2264 * Level 2 Versions 2–4. It is not available in 2265 * Level 1 nor Level 3. 2266 */ public 2267 CompartmentType getCompartmentType(long n) { 2268 long cPtr = libsbmlJNI.Model_getCompartmentType__SWIG_0(swigCPtr, this, n); 2269 return (cPtr == 0) ? null : new CompartmentType(cPtr, false); 2270 } 2271 2272 2273/** 2274 * Get a {@link CompartmentType} object based on its identifier. 2275 * <p> 2276 * @return the {@link CompartmentType} in this {@link Model} with the identifier <code>sid</code> 2277 * or <code>null</code> if no such {@link CompartmentType} exists. 2278 * <p> 2279 * @note The {@link CompartmentType} object class is only available in SBML 2280 * Level 2 Versions 2–4. It is not available in 2281 * Level 1 nor Level 3. 2282 */ public 2283 CompartmentType getCompartmentType(String sid) { 2284 long cPtr = libsbmlJNI.Model_getCompartmentType__SWIG_2(swigCPtr, this, sid); 2285 return (cPtr == 0) ? null : new CompartmentType(cPtr, false); 2286 } 2287 2288 2289/** 2290 * Get the nth {@link SpeciesType} object in this {@link Model}. 2291 * <p> 2292 * @return the nth {@link SpeciesType} of this {@link Model}. 2293 * <p> 2294 * @note The {@link SpeciesType} object class is only available in SBML 2295 * Level 2 Versions 2–4. It is not available in 2296 * Level 1 nor Level 3. 2297 */ public 2298 SpeciesType getSpeciesType(long n) { 2299 long cPtr = libsbmlJNI.Model_getSpeciesType__SWIG_0(swigCPtr, this, n); 2300 return (cPtr == 0) ? null : new SpeciesType(cPtr, false); 2301 } 2302 2303 2304/** 2305 * Get a {@link SpeciesType} object based on its identifier. 2306 * <p> 2307 * @return the {@link SpeciesType} in this {@link Model} with the identifier <code>sid</code> or 2308 * <code>null</code> if no such {@link SpeciesType} exists. 2309 * <p> 2310 * @note The {@link SpeciesType} object class is only available in SBML 2311 * Level 2 Versions 2–4. It is not available in 2312 * Level 1 nor Level 3. 2313 */ public 2314 SpeciesType getSpeciesType(String sid) { 2315 long cPtr = libsbmlJNI.Model_getSpeciesType__SWIG_2(swigCPtr, this, sid); 2316 return (cPtr == 0) ? null : new SpeciesType(cPtr, false); 2317 } 2318 2319 2320/** 2321 * Get the nth {@link Compartment} object in this {@link Model}. 2322 * <p> 2323 * @return the nth {@link Compartment} of this {@link Model}. 2324 */ public 2325 Compartment getCompartment(long n) { 2326 long cPtr = libsbmlJNI.Model_getCompartment__SWIG_0(swigCPtr, this, n); 2327 return (cPtr == 0) ? null : new Compartment(cPtr, false); 2328 } 2329 2330 2331/** 2332 * Get a {@link Compartment} object based on its identifier. 2333 * <p> 2334 * @return the {@link Compartment} in this {@link Model} with the identifier <code>sid</code> or 2335 * <code>null</code> if no such {@link Compartment} exists. 2336 */ public 2337 Compartment getCompartment(String sid) { 2338 long cPtr = libsbmlJNI.Model_getCompartment__SWIG_2(swigCPtr, this, sid); 2339 return (cPtr == 0) ? null : new Compartment(cPtr, false); 2340 } 2341 2342 2343/** 2344 * Get the nth {@link Species} object in this {@link Model}. 2345 * <p> 2346 * @return the nth {@link Species} of this {@link Model}. 2347 */ public 2348 Species getSpecies(long n) { 2349 long cPtr = libsbmlJNI.Model_getSpecies__SWIG_0(swigCPtr, this, n); 2350 return (cPtr == 0) ? null : new Species(cPtr, false); 2351 } 2352 2353 2354/** 2355 * Get a {@link Species} object based on its identifier. 2356 * <p> 2357 * @return the {@link Species} in this {@link Model} with the identifier <code>sid</code> or <code>null</code> 2358 * if no such {@link Species} exists. 2359 */ public 2360 Species getSpecies(String sid) { 2361 long cPtr = libsbmlJNI.Model_getSpecies__SWIG_2(swigCPtr, this, sid); 2362 return (cPtr == 0) ? null : new Species(cPtr, false); 2363 } 2364 2365 2366/** 2367 * Get the nth {@link Parameter} object in this {@link Model}. 2368 * <p> 2369 * @return the nth {@link Parameter} of this {@link Model}. 2370 */ public 2371 Parameter getParameter(long n) { 2372 long cPtr = libsbmlJNI.Model_getParameter__SWIG_0(swigCPtr, this, n); 2373 return (cPtr == 0) ? null : new Parameter(cPtr, false); 2374 } 2375 2376 2377/** 2378 * Get a {@link Parameter} object based on its identifier. 2379 * <p> 2380 * @return the {@link Parameter} in this {@link Model} with the identifier <code>sid</code> or <code>null</code> 2381 * if no such {@link Parameter} exists. 2382 */ public 2383 Parameter getParameter(String sid) { 2384 long cPtr = libsbmlJNI.Model_getParameter__SWIG_2(swigCPtr, this, sid); 2385 return (cPtr == 0) ? null : new Parameter(cPtr, false); 2386 } 2387 2388 2389/** 2390 * Get the nth {@link InitialAssignment} object in this {@link Model}. 2391 * <p> 2392 * @return the nth {@link InitialAssignment} of this {@link Model}. 2393 */ public 2394 InitialAssignment getInitialAssignment(long n) { 2395 long cPtr = libsbmlJNI.Model_getInitialAssignment__SWIG_0(swigCPtr, this, n); 2396 return (cPtr == 0) ? null : new InitialAssignment(cPtr, false); 2397 } 2398 2399 2400/** 2401 * Get an {@link InitialAssignment} object based on the symbol to which it 2402 * assigns a value. 2403 * <p> 2404 * @return the {@link InitialAssignment} in this {@link Model} with the given 'symbol' 2405 * attribute value or <code>null</code> if no such {@link InitialAssignment} exists. 2406 */ public 2407 InitialAssignment getInitialAssignment(String symbol) { 2408 long cPtr = libsbmlJNI.Model_getInitialAssignment__SWIG_2(swigCPtr, this, symbol); 2409 return (cPtr == 0) ? null : new InitialAssignment(cPtr, false); 2410 } 2411 2412 2413/** 2414 * Get the nth {@link Rule} object in this {@link Model}. 2415 * <p> 2416 * @return the nth {@link Rule} of this {@link Model}. 2417 */ public 2418 Rule getRule(long n) { 2419 return (Rule) libsbml.DowncastSBase(libsbmlJNI.Model_getRule__SWIG_0(swigCPtr, this, n), false); 2420} 2421 2422 2423/** 2424 * Get a {@link Rule} object based on the variable to which it assigns a value. 2425 * <p> 2426 * @return the {@link Rule} in this {@link Model} with the given 'variable' attribute 2427 * value or <code>null</code> if no such {@link Rule} exists. 2428 */ public 2429 Rule getRule(String variable) { 2430 return (Rule) libsbml.DowncastSBase(libsbmlJNI.Model_getRule__SWIG_2(swigCPtr, this, variable), false); 2431} 2432 2433 2434/** 2435 * Get the nth {@link Constraint} object in this {@link Model}. 2436 * <p> 2437 * @return the nth {@link Constraint} of this {@link Model}. 2438 */ public 2439 Constraint getConstraint(long n) { 2440 long cPtr = libsbmlJNI.Model_getConstraint__SWIG_0(swigCPtr, this, n); 2441 return (cPtr == 0) ? null : new Constraint(cPtr, false); 2442 } 2443 2444 2445/** 2446 * Get the nth {@link Reaction} object in this {@link Model}. 2447 * <p> 2448 * @return the nth {@link Reaction} of this {@link Model}. 2449 */ public 2450 Reaction getReaction(long n) { 2451 long cPtr = libsbmlJNI.Model_getReaction__SWIG_0(swigCPtr, this, n); 2452 return (cPtr == 0) ? null : new Reaction(cPtr, false); 2453 } 2454 2455 2456/** 2457 * Get a {@link Reaction} object based on its identifier. 2458 * <p> 2459 * @return the {@link Reaction} in this {@link Model} with the identifier <code>sid</code> or <code>null</code> 2460 * if no such {@link Reaction} exists. 2461 */ public 2462 Reaction getReaction(String sid) { 2463 long cPtr = libsbmlJNI.Model_getReaction__SWIG_2(swigCPtr, this, sid); 2464 return (cPtr == 0) ? null : new Reaction(cPtr, false); 2465 } 2466 2467 2468/** 2469 * Get a {@link SpeciesReference} object based on its identifier. 2470 * <p> 2471 * @return the {@link SpeciesReference} in this {@link Model} with the identifier <code>sid</code> or <code>null</code> 2472 * if no such {@link SpeciesReference} exists. 2473 */ public 2474 SpeciesReference getSpeciesReference(String sid) { 2475 long cPtr = libsbmlJNI.Model_getSpeciesReference__SWIG_0(swigCPtr, this, sid); 2476 return (cPtr == 0) ? null : new SpeciesReference(cPtr, false); 2477 } 2478 2479 2480/** 2481 * Get the nth {@link Event} object in this {@link Model}. 2482 * <p> 2483 * @return the nth {@link Event} of this {@link Model}. 2484 */ public 2485 Event getEvent(long n) { 2486 long cPtr = libsbmlJNI.Model_getEvent__SWIG_0(swigCPtr, this, n); 2487 return (cPtr == 0) ? null : new Event(cPtr, false); 2488 } 2489 2490 2491/** 2492 * Get an {@link Event} object based on its identifier. 2493 * <p> 2494 * @return the {@link Event} in this {@link Model} with the identifier <code>sid</code> or <code>null</code> if 2495 * no such {@link Event} exists. 2496 */ public 2497 Event getEvent(String sid) { 2498 long cPtr = libsbmlJNI.Model_getEvent__SWIG_2(swigCPtr, this, sid); 2499 return (cPtr == 0) ? null : new Event(cPtr, false); 2500 } 2501 2502 2503/** 2504 * Get the number of {@link FunctionDefinition} objects in this {@link Model}. 2505 * <p> 2506 * @return the number of FunctionDefinitions in this {@link Model}. 2507 */ public 2508 long getNumFunctionDefinitions() { 2509 return libsbmlJNI.Model_getNumFunctionDefinitions(swigCPtr, this); 2510 } 2511 2512 2513/** 2514 * Get the number of {@link UnitDefinition} objects in this {@link Model}. 2515 * <p> 2516 * @return the number of UnitDefinitions in this {@link Model}. 2517 */ public 2518 long getNumUnitDefinitions() { 2519 return libsbmlJNI.Model_getNumUnitDefinitions(swigCPtr, this); 2520 } 2521 2522 2523/** 2524 * Get the number of {@link CompartmentType} objects in this {@link Model}. 2525 * <p> 2526 * @return the number of CompartmentTypes in this {@link Model}. 2527 * <p> 2528 * @note The {@link CompartmentType} object class is only available in SBML 2529 * Level 2 Versions 2–4. It is not available in 2530 * Level 1 nor Level 3. 2531 */ public 2532 long getNumCompartmentTypes() { 2533 return libsbmlJNI.Model_getNumCompartmentTypes(swigCPtr, this); 2534 } 2535 2536 2537/** 2538 * Get the number of {@link SpeciesType} objects in this {@link Model}. 2539 * <p> 2540 * @return the number of SpeciesTypes in this {@link Model}. 2541 * <p> 2542 * @note The {@link SpeciesType} object class is only available in SBML 2543 * Level 2 Versions 2–4. It is not available in 2544 * Level 1 nor Level 3. 2545 */ public 2546 long getNumSpeciesTypes() { 2547 return libsbmlJNI.Model_getNumSpeciesTypes(swigCPtr, this); 2548 } 2549 2550 2551/** 2552 * Get the number of {@link Compartment} objects in this {@link Model}. 2553 * <p> 2554 * @return the number of Compartments in this {@link Model}. 2555 */ public 2556 long getNumCompartments() { 2557 return libsbmlJNI.Model_getNumCompartments(swigCPtr, this); 2558 } 2559 2560 2561/** 2562 * Get the number of Specie objects in this {@link Model}. 2563 * <p> 2564 * @return the number of {@link Species} in this {@link Model}. 2565 */ public 2566 long getNumSpecies() { 2567 return libsbmlJNI.Model_getNumSpecies(swigCPtr, this); 2568 } 2569 2570 2571/** 2572 * Get the number of {@link Species} in this {@link Model} having their 2573 * 'boundaryCondition' attribute value set to <code>true.</code> 2574 * <p> 2575 * @return the number of {@link Species} in this {@link Model} with boundaryCondition set 2576 * to true. 2577 */ public 2578 long getNumSpeciesWithBoundaryCondition() { 2579 return libsbmlJNI.Model_getNumSpeciesWithBoundaryCondition(swigCPtr, this); 2580 } 2581 2582 2583/** 2584 * Get the number of {@link Parameter} objects in this {@link Model}. 2585 * <p> 2586 * @return the number of Parameters in this {@link Model}. Parameters defined in 2587 * KineticLaws are not included. 2588 */ public 2589 long getNumParameters() { 2590 return libsbmlJNI.Model_getNumParameters(swigCPtr, this); 2591 } 2592 2593 2594/** 2595 * Get the number of {@link InitialAssignment} objects in this {@link Model}. 2596 * <p> 2597 * @return the number of InitialAssignments in this {@link Model}. 2598 */ public 2599 long getNumInitialAssignments() { 2600 return libsbmlJNI.Model_getNumInitialAssignments(swigCPtr, this); 2601 } 2602 2603 2604/** 2605 * Get the number of {@link Rule} objects in this {@link Model}. 2606 * <p> 2607 * @return the number of Rules in this {@link Model}. 2608 */ public 2609 long getNumRules() { 2610 return libsbmlJNI.Model_getNumRules(swigCPtr, this); 2611 } 2612 2613 2614/** 2615 * Get the number of {@link Constraint} objects in this {@link Model}. 2616 * <p> 2617 * @return the number of Constraints in this {@link Model}. 2618 */ public 2619 long getNumConstraints() { 2620 return libsbmlJNI.Model_getNumConstraints(swigCPtr, this); 2621 } 2622 2623 2624/** 2625 * Get the number of {@link Reaction} objects in this {@link Model}. 2626 * <p> 2627 * @return the number of Reactions in this {@link Model}. 2628 */ public 2629 long getNumReactions() { 2630 return libsbmlJNI.Model_getNumReactions(swigCPtr, this); 2631 } 2632 2633 2634/** 2635 * Get the number of {@link Event} objects in this {@link Model}. 2636 * <p> 2637 * @return the number of Events in this {@link Model}. 2638 */ public 2639 long getNumEvents() { 2640 return libsbmlJNI.Model_getNumEvents(swigCPtr, this); 2641 } 2642 2643 2644/** 2645 * Finds this {@link Model}'s parent {@link SBMLDocument} and calls setModel(null) on it, 2646 * indirectly deleting itself. Overridden from the {@link SBase} function since 2647 * the parent is not a {@link ListOf}. 2648 * <p> 2649 * @return integer value indicating success/failure of the 2650 * function. The possible values 2651 * returned by this function are: 2652 * <ul> 2653 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 2654 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 2655 * </ul> 2656 */ public 2657 int removeFromParentAndDelete() { 2658 return libsbmlJNI.Model_removeFromParentAndDelete(swigCPtr, this); 2659 } 2660 2661 2662/** 2663 * Renames all the SIdRef attributes on this element, including any found in MathML 2664 */ public 2665 void renameSIdRefs(String oldid, String newid) { 2666 libsbmlJNI.Model_renameSIdRefs(swigCPtr, this, oldid, newid); 2667 } 2668 2669 2670/** 2671 * Renames all the UnitSIdRef attributes on this element 2672 */ public 2673 void renameUnitSIdRefs(String oldid, String newid) { 2674 libsbmlJNI.Model_renameUnitSIdRefs(swigCPtr, this, oldid, newid); 2675 } 2676 2677 2678/** 2679 * Predicate returning <code>true</code> if the 2680 * given {@link ASTNode} is a boolean. 2681 * <p> 2682 * Often times, this question can be answered with the {@link ASTNode}'s own 2683 * isBoolean() method, but if the AST is an expression that calls a 2684 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2685 * is needed for lookup context. 2686 * <p> 2687 * @return true if the given {@link ASTNode} is a boolean. 2688 * @internal 2689 */ public 2690 void convertL1ToL2() { 2691 libsbmlJNI.Model_convertL1ToL2(swigCPtr, this); 2692 } 2693 2694 2695/** 2696 * Predicate returning <code>true</code> if the 2697 * given {@link ASTNode} is a boolean. 2698 * <p> 2699 * Often times, this question can be answered with the {@link ASTNode}'s own 2700 * isBoolean() method, but if the AST is an expression that calls a 2701 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2702 * is needed for lookup context. 2703 * <p> 2704 * @return true if the given {@link ASTNode} is a boolean. 2705 * @internal 2706 */ public 2707 void convertL1ToL3() { 2708 libsbmlJNI.Model_convertL1ToL3(swigCPtr, this); 2709 } 2710 2711 2712/** 2713 * Predicate returning <code>true</code> if the 2714 * given {@link ASTNode} is a boolean. 2715 * <p> 2716 * Often times, this question can be answered with the {@link ASTNode}'s own 2717 * isBoolean() method, but if the AST is an expression that calls a 2718 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2719 * is needed for lookup context. 2720 * <p> 2721 * @return true if the given {@link ASTNode} is a boolean. 2722 * @internal 2723 */ public 2724 void convertL2ToL3() { 2725 libsbmlJNI.Model_convertL2ToL3(swigCPtr, this); 2726 } 2727 2728 2729/** 2730 * Predicate returning <code>true</code> if the 2731 * given {@link ASTNode} is a boolean. 2732 * <p> 2733 * Often times, this question can be answered with the {@link ASTNode}'s own 2734 * isBoolean() method, but if the AST is an expression that calls a 2735 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2736 * is needed for lookup context. 2737 * <p> 2738 * @return true if the given {@link ASTNode} is a boolean. 2739 * @internal 2740 */ public 2741 void convertL2ToL1(boolean strict) { 2742 libsbmlJNI.Model_convertL2ToL1__SWIG_0(swigCPtr, this, strict); 2743 } 2744 2745 2746/** 2747 * Predicate returning <code>true</code> if the 2748 * given {@link ASTNode} is a boolean. 2749 * <p> 2750 * Often times, this question can be answered with the {@link ASTNode}'s own 2751 * isBoolean() method, but if the AST is an expression that calls a 2752 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2753 * is needed for lookup context. 2754 * <p> 2755 * @return true if the given {@link ASTNode} is a boolean. 2756 * @internal 2757 */ public 2758 void convertL2ToL1() { 2759 libsbmlJNI.Model_convertL2ToL1__SWIG_1(swigCPtr, this); 2760 } 2761 2762 2763/** 2764 * Predicate returning <code>true</code> if the 2765 * given {@link ASTNode} is a boolean. 2766 * <p> 2767 * Often times, this question can be answered with the {@link ASTNode}'s own 2768 * isBoolean() method, but if the AST is an expression that calls a 2769 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2770 * is needed for lookup context. 2771 * <p> 2772 * @return true if the given {@link ASTNode} is a boolean. 2773 * @internal 2774 */ public 2775 void convertL3ToL1() { 2776 libsbmlJNI.Model_convertL3ToL1(swigCPtr, this); 2777 } 2778 2779 2780/** 2781 * Predicate returning <code>true</code> if the 2782 * given {@link ASTNode} is a boolean. 2783 * <p> 2784 * Often times, this question can be answered with the {@link ASTNode}'s own 2785 * isBoolean() method, but if the AST is an expression that calls a 2786 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2787 * is needed for lookup context. 2788 * <p> 2789 * @return true if the given {@link ASTNode} is a boolean. 2790 * @internal 2791 */ public 2792 void convertL3ToL2(boolean strict) { 2793 libsbmlJNI.Model_convertL3ToL2__SWIG_0(swigCPtr, this, strict); 2794 } 2795 2796 2797/** 2798 * Predicate returning <code>true</code> if the 2799 * given {@link ASTNode} is a boolean. 2800 * <p> 2801 * Often times, this question can be answered with the {@link ASTNode}'s own 2802 * isBoolean() method, but if the AST is an expression that calls a 2803 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2804 * is needed for lookup context. 2805 * <p> 2806 * @return true if the given {@link ASTNode} is a boolean. 2807 * @internal 2808 */ public 2809 void convertL3ToL2() { 2810 libsbmlJNI.Model_convertL3ToL2__SWIG_1(swigCPtr, this); 2811 } 2812 2813 2814/** 2815 * Predicate returning <code>true</code> if the 2816 * given {@link ASTNode} is a boolean. 2817 * <p> 2818 * Often times, this question can be answered with the {@link ASTNode}'s own 2819 * isBoolean() method, but if the AST is an expression that calls a 2820 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2821 * is needed for lookup context. 2822 * <p> 2823 * @return true if the given {@link ASTNode} is a boolean. 2824 * @internal 2825 */ public 2826 void addModifiers() { 2827 libsbmlJNI.Model_addModifiers(swigCPtr, this); 2828 } 2829 2830 2831/** 2832 * Predicate returning <code>true</code> if the 2833 * given {@link ASTNode} is a boolean. 2834 * <p> 2835 * Often times, this question can be answered with the {@link ASTNode}'s own 2836 * isBoolean() method, but if the AST is an expression that calls a 2837 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2838 * is needed for lookup context. 2839 * <p> 2840 * @return true if the given {@link ASTNode} is a boolean. 2841 * @internal 2842 */ public 2843 void addConstantAttribute() { 2844 libsbmlJNI.Model_addConstantAttribute(swigCPtr, this); 2845 } 2846 2847 2848/** 2849 * Predicate returning <code>true</code> if the 2850 * given {@link ASTNode} is a boolean. 2851 * <p> 2852 * Often times, this question can be answered with the {@link ASTNode}'s own 2853 * isBoolean() method, but if the AST is an expression that calls a 2854 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2855 * is needed for lookup context. 2856 * <p> 2857 * @return true if the given {@link ASTNode} is a boolean. 2858 * @internal 2859 */ public 2860 void setSpatialDimensions(double dims) { 2861 libsbmlJNI.Model_setSpatialDimensions__SWIG_0(swigCPtr, this, dims); 2862 } 2863 2864 2865/** 2866 * Predicate returning <code>true</code> if the 2867 * given {@link ASTNode} is a boolean. 2868 * <p> 2869 * Often times, this question can be answered with the {@link ASTNode}'s own 2870 * isBoolean() method, but if the AST is an expression that calls a 2871 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2872 * is needed for lookup context. 2873 * <p> 2874 * @return true if the given {@link ASTNode} is a boolean. 2875 * @internal 2876 */ public 2877 void setSpatialDimensions() { 2878 libsbmlJNI.Model_setSpatialDimensions__SWIG_1(swigCPtr, this); 2879 } 2880 2881 2882/** 2883 * Predicate returning <code>true</code> if the 2884 * given {@link ASTNode} is a boolean. 2885 * <p> 2886 * Often times, this question can be answered with the {@link ASTNode}'s own 2887 * isBoolean() method, but if the AST is an expression that calls a 2888 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2889 * is needed for lookup context. 2890 * <p> 2891 * @return true if the given {@link ASTNode} is a boolean. 2892 * @internal 2893 */ public 2894 void addDefinitionsForDefaultUnits() { 2895 libsbmlJNI.Model_addDefinitionsForDefaultUnits(swigCPtr, this); 2896 } 2897 2898 2899/** 2900 * Predicate returning <code>true</code> if the 2901 * given {@link ASTNode} is a boolean. 2902 * <p> 2903 * Often times, this question can be answered with the {@link ASTNode}'s own 2904 * isBoolean() method, but if the AST is an expression that calls a 2905 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2906 * is needed for lookup context. 2907 * <p> 2908 * @return true if the given {@link ASTNode} is a boolean. 2909 * @internal 2910 */ public 2911 void convertParametersToLocals(long level, long version) { 2912 libsbmlJNI.Model_convertParametersToLocals(swigCPtr, this, level, version); 2913 } 2914 2915 2916/** 2917 * Predicate returning <code>true</code> if the 2918 * given {@link ASTNode} is a boolean. 2919 * <p> 2920 * Often times, this question can be answered with the {@link ASTNode}'s own 2921 * isBoolean() method, but if the AST is an expression that calls a 2922 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2923 * is needed for lookup context. 2924 * <p> 2925 * @return true if the given {@link ASTNode} is a boolean. 2926 * @internal 2927 */ public 2928 void setSpeciesReferenceConstantValueAndStoichiometry() { 2929 libsbmlJNI.Model_setSpeciesReferenceConstantValueAndStoichiometry(swigCPtr, this); 2930 } 2931 2932 2933/** 2934 * Predicate returning <code>true</code> if the 2935 * given {@link ASTNode} is a boolean. 2936 * <p> 2937 * Often times, this question can be answered with the {@link ASTNode}'s own 2938 * isBoolean() method, but if the AST is an expression that calls a 2939 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2940 * is needed for lookup context. 2941 * <p> 2942 * @return true if the given {@link ASTNode} is a boolean. 2943 * @internal 2944 */ public 2945 void removeParameterRuleUnits(boolean strict) { 2946 libsbmlJNI.Model_removeParameterRuleUnits(swigCPtr, this, strict); 2947 } 2948 2949 2950/** 2951 * Predicate returning <code>true</code> if the 2952 * given {@link ASTNode} is a boolean. 2953 * <p> 2954 * Often times, this question can be answered with the {@link ASTNode}'s own 2955 * isBoolean() method, but if the AST is an expression that calls a 2956 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2957 * is needed for lookup context. 2958 * <p> 2959 * @return true if the given {@link ASTNode} is a boolean. 2960 * @internal 2961 */ public 2962 void convertStoichiometryMath() { 2963 libsbmlJNI.Model_convertStoichiometryMath(swigCPtr, this); 2964 } 2965 2966 2967/** 2968 * Predicate returning <code>true</code> if the 2969 * given {@link ASTNode} is a boolean. 2970 * <p> 2971 * Often times, this question can be answered with the {@link ASTNode}'s own 2972 * isBoolean() method, but if the AST is an expression that calls a 2973 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2974 * is needed for lookup context. 2975 * <p> 2976 * @return true if the given {@link ASTNode} is a boolean. 2977 * @internal 2978 */ public 2979 void assignRequiredValues() { 2980 libsbmlJNI.Model_assignRequiredValues(swigCPtr, this); 2981 } 2982 2983 2984/** 2985 * Predicate returning <code>true</code> if the 2986 * given {@link ASTNode} is a boolean. 2987 * <p> 2988 * Often times, this question can be answered with the {@link ASTNode}'s own 2989 * isBoolean() method, but if the AST is an expression that calls a 2990 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 2991 * is needed for lookup context. 2992 * <p> 2993 * @return true if the given {@link ASTNode} is a boolean. 2994 * @internal 2995 */ public 2996 void dealWithModelUnits() { 2997 libsbmlJNI.Model_dealWithModelUnits(swigCPtr, this); 2998 } 2999 3000 3001/** 3002 * Predicate returning <code>true</code> if the 3003 * given {@link ASTNode} is a boolean. 3004 * <p> 3005 * Often times, this question can be answered with the {@link ASTNode}'s own 3006 * isBoolean() method, but if the AST is an expression that calls a 3007 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 3008 * is needed for lookup context. 3009 * <p> 3010 * @return true if the given {@link ASTNode} is a boolean. 3011 * @internal 3012 */ public 3013 void dealWithStoichiometry() { 3014 libsbmlJNI.Model_dealWithStoichiometry(swigCPtr, this); 3015 } 3016 3017 3018/** 3019 * Predicate returning <code>true</code> if the 3020 * given {@link ASTNode} is a boolean. 3021 * <p> 3022 * Often times, this question can be answered with the {@link ASTNode}'s own 3023 * isBoolean() method, but if the AST is an expression that calls a 3024 * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model 3025 * is needed for lookup context. 3026 * <p> 3027 * @return true if the given {@link ASTNode} is a boolean. 3028 * @internal 3029 */ public 3030 void dealWithEvents(boolean strict) { 3031 libsbmlJNI.Model_dealWithEvents(swigCPtr, this, strict); 3032 } 3033 3034 3035/** 3036 * Sets this SBML object to child SBML objects (if any). 3037 * (Creates a child-parent relationship by the parent) 3038 * <p> 3039 * Subclasses must override this function if they define 3040 * one ore more child elements. 3041 * Basically, this function needs to be called in 3042 * constructor, copy constructor and assignment operator. 3043 * <p> 3044 * @see setSBMLDocument 3045 * @see enablePackageInternal 3046 * @internal 3047 */ public 3048 void connectToChild() { 3049 libsbmlJNI.Model_connectToChild(swigCPtr, this); 3050 } 3051 3052 3053/** 3054 * Returns the libSBML type code for this SBML object. 3055 * <p> 3056 * LibSBML attaches an identifying code to every 3057 * kind of SBML object. These are known as <em>SBML type codes</em>. In 3058 * other languages, the set of type codes is stored in an enumeration; in 3059 * the Java language interface for libSBML, the type codes are defined as 3060 * static integer constants in the interface class {@link 3061 * libsbmlConstants}. The names of the type codes all begin with the 3062 * characters <code>SBML_.</code> 3063 * <p> 3064 * @return the SBML type code for this object, or 3065 * {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (default). 3066 * <p> 3067 * @see #getElementName() 3068 */ public 3069 int getTypeCode() { 3070 return libsbmlJNI.Model_getTypeCode(swigCPtr, this); 3071 } 3072 3073 3074/** 3075 * Returns the XML element name of this object, which for {@link Model}, is 3076 * always <code>'model'.</code> 3077 * <p> 3078 * @return the name of this element, i.e., <code>'model'.</code> 3079 */ public 3080 String getElementName() { 3081 return libsbmlJNI.Model_getElementName(swigCPtr, this); 3082 } 3083 3084 3085/** 3086 * Populates the list of FormulaDataUnits with the units derived 3087 * for the model. The list contains elements of class 3088 * FormulaUnitsData. 3089 * <p> 3090 * The first element of the list refers to the default units 3091 * of 'substance per time' derived from the model and has the 3092 * unitReferenceId 'subs_per_time'. This facilitates the comparison of units 3093 * derived from mathematical formula with the expected units. 3094 * <p> 3095 * The next elements of the list record the units of the 3096 * compartments and species established from either explicitly 3097 * declared or default units. 3098 * <p> 3099 * The next elements record the units of any parameters. 3100 * <p> 3101 * Subsequent elements of the list record the units derived for 3102 * each mathematical expression encountered within the model. 3103 * <p> 3104 * @note This function is utilised by the {@link Unit} Consistency Validator. 3105 * The list is populated prior to running the validation and thus 3106 * the consistency of units can be checked by accessing the members 3107 * of the list and comparing the appropriate data. 3108 */ public 3109 void populateListFormulaUnitsData() { 3110 libsbmlJNI.Model_populateListFormulaUnitsData(swigCPtr, this); 3111 } 3112 3113 3114/** 3115 * Predicate returning <code>true</code> if 3116 * the list of FormulaUnitsData is populated. 3117 * <p> 3118 * @return <code>true</code> if the list of FormulaUnitsData is populated, 3119 * <code>false</code> otherwise. 3120 */ public 3121 boolean isPopulatedListFormulaUnitsData() { 3122 return libsbmlJNI.Model_isPopulatedListFormulaUnitsData(swigCPtr, this); 3123 } 3124 3125 3126/** 3127 * Predicate returning <code>true</code> if 3128 * all the required elements for this {@link Model} object 3129 * have been set. 3130 * <p> 3131 * @note The required elements for a {@link Model} object are: 3132 * listOfCompartments (L1 only); listOfSpecies (L1V1 only); 3133 * listOfReactions(L1V1 only) 3134 * <p> 3135 * @return a boolean value indicating whether all the required 3136 * elements for this object have been defined. 3137 */ public 3138 boolean hasRequiredElements() { 3139 return libsbmlJNI.Model_hasRequiredElements(swigCPtr, this); 3140 } 3141 3142 3143/** 3144 * Removes the nth {@link FunctionDefinition} object from this {@link Model} object and 3145 * returns a pointer to it. 3146 * <p> 3147 * The caller owns the returned object and is responsible for deleting it. 3148 * <p> 3149 * @param n the index of the {@link FunctionDefinition} object to remove 3150 * <p> 3151 * @return the {@link FunctionDefinition} object removed. As mentioned above, 3152 * the caller owns the returned item. <code>null</code> is returned if the given index 3153 * is out of range. 3154 * <p> 3155 */ public 3156 FunctionDefinition removeFunctionDefinition(long n) { 3157 long cPtr = libsbmlJNI.Model_removeFunctionDefinition__SWIG_0(swigCPtr, this, n); 3158 return (cPtr == 0) ? null : new FunctionDefinition(cPtr, true); 3159 } 3160 3161 3162/** 3163 * Removes the {@link FunctionDefinition} object with the given identifier from this {@link Model} 3164 * object and returns a pointer to it. 3165 * <p> 3166 * The caller owns the returned object and is responsible for deleting it. 3167 * If none of the {@link FunctionDefinition} objects in this {@link Model} object have the identifier 3168 * <code>sid</code>, then <code>null</code> is returned. 3169 * <p> 3170 * @param sid the identifier of the {@link FunctionDefinition} object to remove 3171 * <p> 3172 * @return the {@link FunctionDefinition} object removed. As mentioned above, the 3173 * caller owns the returned object. <code>null</code> is returned if no {@link FunctionDefinition} 3174 * object with the identifier exists in this {@link Model} object. 3175 */ public 3176 FunctionDefinition removeFunctionDefinition(String sid) { 3177 long cPtr = libsbmlJNI.Model_removeFunctionDefinition__SWIG_1(swigCPtr, this, sid); 3178 return (cPtr == 0) ? null : new FunctionDefinition(cPtr, true); 3179 } 3180 3181 3182/** 3183 * Removes the nth {@link UnitDefinition} object from this {@link Model} object and 3184 * returns a pointer to it. 3185 * <p> 3186 * The caller owns the returned object and is responsible for deleting it. 3187 * <p> 3188 * @param n the index of the {@link UnitDefinition} object to remove 3189 * <p> 3190 * @return the {@link UnitDefinition} object removed. As mentioned above, 3191 * the caller owns the returned item. <code>null</code> is returned if the given index 3192 * is out of range. 3193 * <p> 3194 */ public 3195 UnitDefinition removeUnitDefinition(long n) { 3196 long cPtr = libsbmlJNI.Model_removeUnitDefinition__SWIG_0(swigCPtr, this, n); 3197 return (cPtr == 0) ? null : new UnitDefinition(cPtr, true); 3198 } 3199 3200 3201/** 3202 * Removes the {@link UnitDefinition} object with the given identifier from this {@link Model} 3203 * object and returns a pointer to it. 3204 * <p> 3205 * The caller owns the returned object and is responsible for deleting it. 3206 * If none of the {@link UnitDefinition} objects in this {@link Model} object have the identifier 3207 * <code>sid</code>, then <code>null</code> is returned. 3208 * <p> 3209 * @param sid the identifier of the {@link UnitDefinition} object to remove 3210 * <p> 3211 * @return the {@link UnitDefinition} object removed. As mentioned above, the 3212 * caller owns the returned object. <code>null</code> is returned if no {@link UnitDefinition} 3213 * object with the identifier exists in this {@link Model} object. 3214 */ public 3215 UnitDefinition removeUnitDefinition(String sid) { 3216 long cPtr = libsbmlJNI.Model_removeUnitDefinition__SWIG_1(swigCPtr, this, sid); 3217 return (cPtr == 0) ? null : new UnitDefinition(cPtr, true); 3218 } 3219 3220 3221/** 3222 * Removes the nth {@link CompartmentType} object from this {@link Model} object and 3223 * returns a pointer to it. 3224 * <p> 3225 * The caller owns the returned object and is responsible for deleting it. 3226 * <p> 3227 * @param n the index of the {@link CompartmentType} object to remove 3228 * <p> 3229 * @return the ComapartmentType object removed. As mentioned above, 3230 * the caller owns the returned item. <code>null</code> is returned if the given index 3231 * is out of range. 3232 * <p> 3233 */ public 3234 CompartmentType removeCompartmentType(long n) { 3235 long cPtr = libsbmlJNI.Model_removeCompartmentType__SWIG_0(swigCPtr, this, n); 3236 return (cPtr == 0) ? null : new CompartmentType(cPtr, true); 3237 } 3238 3239 3240/** 3241 * Removes the {@link CompartmentType} object with the given identifier from this {@link Model} 3242 * object and returns a pointer to it. 3243 * <p> 3244 * The caller owns the returned object and is responsible for deleting it. 3245 * If none of the {@link CompartmentType} objects in this {@link Model} object have the identifier 3246 * <code>sid</code>, then <code>null</code> is returned. 3247 * <p> 3248 * @param sid the identifier of the object to remove 3249 * <p> 3250 * @return the {@link CompartmentType} object removed. As mentioned above, the 3251 * caller owns the returned object. <code>null</code> is returned if no {@link CompartmentType} 3252 * object with the identifier exists in this {@link Model} object. 3253 */ public 3254 CompartmentType removeCompartmentType(String sid) { 3255 long cPtr = libsbmlJNI.Model_removeCompartmentType__SWIG_1(swigCPtr, this, sid); 3256 return (cPtr == 0) ? null : new CompartmentType(cPtr, true); 3257 } 3258 3259 3260/** 3261 * Removes the nth {@link SpeciesType} object from this {@link Model} object and 3262 * returns a pointer to it. 3263 * <p> 3264 * The caller owns the returned object and is responsible for deleting it. 3265 * <p> 3266 * @param n the index of the {@link SpeciesType} object to remove 3267 * <p> 3268 * @return the {@link SpeciesType} object removed. As mentioned above, 3269 * the caller owns the returned item. <code>null</code> is returned if the given index 3270 * is out of range. 3271 * <p> 3272 */ public 3273 SpeciesType removeSpeciesType(long n) { 3274 long cPtr = libsbmlJNI.Model_removeSpeciesType__SWIG_0(swigCPtr, this, n); 3275 return (cPtr == 0) ? null : new SpeciesType(cPtr, true); 3276 } 3277 3278 3279/** 3280 * Removes the {@link SpeciesType} object with the given identifier from this {@link Model} 3281 * object and returns a pointer to it. 3282 * <p> 3283 * The caller owns the returned object and is responsible for deleting it. 3284 * If none of the {@link SpeciesType} objects in this {@link Model} object have the identifier 3285 * <code>sid</code>, then <code>null</code> is returned. 3286 * <p> 3287 * @param sid the identifier of the {@link SpeciesType} object to remove 3288 * <p> 3289 * @return the {@link SpeciesType} object removed. As mentioned above, the 3290 * caller owns the returned object. <code>null</code> is returned if no {@link SpeciesType} 3291 * object with the identifier exists in this {@link Model} object. 3292 * <p> 3293 */ public 3294 SpeciesType removeSpeciesType(String sid) { 3295 long cPtr = libsbmlJNI.Model_removeSpeciesType__SWIG_1(swigCPtr, this, sid); 3296 return (cPtr == 0) ? null : new SpeciesType(cPtr, true); 3297 } 3298 3299 3300/** 3301 * Removes the nth {@link Compartment} object from this {@link Model} object and 3302 * returns a pointer to it. 3303 * <p> 3304 * The caller owns the returned object and is responsible for deleting it. 3305 * <p> 3306 * @param n the index of the {@link Compartment} object to remove 3307 * <p> 3308 * @return the {@link Compartment} object removed. As mentioned above, 3309 * the caller owns the returned item. <code>null</code> is returned if the given index 3310 * is out of range. 3311 * <p> 3312 */ public 3313 Compartment removeCompartment(long n) { 3314 long cPtr = libsbmlJNI.Model_removeCompartment__SWIG_0(swigCPtr, this, n); 3315 return (cPtr == 0) ? null : new Compartment(cPtr, true); 3316 } 3317 3318 3319/** 3320 * Removes the {@link Compartment} object with the given identifier from this {@link Model} 3321 * object and returns a pointer to it. 3322 * <p> 3323 * The caller owns the returned object and is responsible for deleting it. 3324 * If none of the {@link Compartment} objects in this {@link Model} object have the identifier 3325 * <code>sid</code>, then <code>null</code> is returned. 3326 * <p> 3327 * @param sid the identifier of the {@link Compartment} object to remove 3328 * <p> 3329 * @return the {@link Compartment} object removed. As mentioned above, the 3330 * caller owns the returned object. <code>null</code> is returned if no {@link Compartment} 3331 * object with the identifier exists in this {@link Model} object. 3332 */ public 3333 Compartment removeCompartment(String sid) { 3334 long cPtr = libsbmlJNI.Model_removeCompartment__SWIG_1(swigCPtr, this, sid); 3335 return (cPtr == 0) ? null : new Compartment(cPtr, true); 3336 } 3337 3338 3339/** 3340 * Removes the nth {@link Species} object from this {@link Model} object and 3341 * returns a pointer to it. 3342 * <p> 3343 * The caller owns the returned object and is responsible for deleting it. 3344 * <p> 3345 * @param n the index of the {@link Species} object to remove 3346 * <p> 3347 * @return the {@link Species} object removed. As mentioned above, 3348 * the caller owns the returned item. <code>null</code> is returned if the given index 3349 * is out of range. 3350 * <p> 3351 */ public 3352 Species removeSpecies(long n) { 3353 long cPtr = libsbmlJNI.Model_removeSpecies__SWIG_0(swigCPtr, this, n); 3354 return (cPtr == 0) ? null : new Species(cPtr, true); 3355 } 3356 3357 3358/** 3359 * Removes the {@link Species} object with the given identifier from this {@link Model} 3360 * object and returns a pointer to it. 3361 * <p> 3362 * The caller owns the returned object and is responsible for deleting it. 3363 * If none of the {@link Species} objects in this {@link Model} object have the identifier 3364 * <code>sid</code>, then <code>null</code> is returned. 3365 * <p> 3366 * @param sid the identifier of the {@link Species} object to remove 3367 * <p> 3368 * @return the {@link Species} object removed. As mentioned above, the 3369 * caller owns the returned object. <code>null</code> is returned if no {@link Species} 3370 * object with the identifier exists in this {@link Model} object. 3371 * <p> 3372 */ public 3373 Species removeSpecies(String sid) { 3374 long cPtr = libsbmlJNI.Model_removeSpecies__SWIG_1(swigCPtr, this, sid); 3375 return (cPtr == 0) ? null : new Species(cPtr, true); 3376 } 3377 3378 3379/** 3380 * Removes the nth {@link Parameter} object from this {@link Model} object and 3381 * returns a pointer to it. 3382 * <p> 3383 * The caller owns the returned object and is responsible for deleting it. 3384 * <p> 3385 * @param n the index of the {@link Parameter} object to remove 3386 * <p> 3387 * @return the {@link Parameter} object removed. As mentioned above, 3388 * the caller owns the returned item. <code>null</code> is returned if the given index 3389 * is out of range. 3390 * <p> 3391 */ public 3392 Parameter removeParameter(long n) { 3393 long cPtr = libsbmlJNI.Model_removeParameter__SWIG_0(swigCPtr, this, n); 3394 return (cPtr == 0) ? null : new Parameter(cPtr, true); 3395 } 3396 3397 3398/** 3399 * Removes the {@link Parameter} object with the given identifier from this {@link Model} 3400 * object and returns a pointer to it. 3401 * <p> 3402 * The caller owns the returned object and is responsible for deleting it. 3403 * If none of the {@link Parameter} objects in this {@link Model} object have the identifier 3404 * <code>sid</code>, then <code>null</code> is returned. 3405 * <p> 3406 * @param sid the identifier of the {@link Parameter} object to remove 3407 * <p> 3408 * @return the {@link Parameter} object removed. As mentioned above, the 3409 * caller owns the returned object. <code>null</code> is returned if no {@link Parameter} 3410 * object with the identifier exists in this {@link Model} object. 3411 */ public 3412 Parameter removeParameter(String sid) { 3413 long cPtr = libsbmlJNI.Model_removeParameter__SWIG_1(swigCPtr, this, sid); 3414 return (cPtr == 0) ? null : new Parameter(cPtr, true); 3415 } 3416 3417 3418/** 3419 * Removes the nth {@link InitialAssignment} object from this {@link Model} object and 3420 * returns a pointer to it. 3421 * <p> 3422 * The caller owns the returned object and is responsible for deleting it. 3423 * <p> 3424 * @param n the index of the {@link InitialAssignment} object to remove 3425 * <p> 3426 * @return the {@link InitialAssignment} object removed. As mentioned above, 3427 * the caller owns the returned item. <code>null</code> is returned if the given index 3428 * is out of range. 3429 * <p> 3430 */ public 3431 InitialAssignment removeInitialAssignment(long n) { 3432 long cPtr = libsbmlJNI.Model_removeInitialAssignment__SWIG_0(swigCPtr, this, n); 3433 return (cPtr == 0) ? null : new InitialAssignment(cPtr, true); 3434 } 3435 3436 3437/** 3438 * Removes the {@link InitialAssignment} object with the given 'symbol' attribute 3439 * from this {@link Model} object and returns a pointer to it. 3440 * <p> 3441 * The caller owns the returned object and is responsible for deleting it. 3442 * If none of the {@link InitialAssignment} objects in this {@link Model} object have the 3443 * 'symbol' attribute <code>symbol</code>, then <code>null</code> is returned. 3444 * <p> 3445 * @param symbol the 'symbol' attribute of the {@link InitialAssignment} object to remove 3446 * <p> 3447 * @return the {@link InitialAssignment} object removed. As mentioned above, the 3448 * caller owns the returned object. <code>null</code> is returned if no {@link InitialAssignment} 3449 * object with the 'symbol' attribute exists in this {@link Model} object. 3450 */ public 3451 InitialAssignment removeInitialAssignment(String symbol) { 3452 long cPtr = libsbmlJNI.Model_removeInitialAssignment__SWIG_1(swigCPtr, this, symbol); 3453 return (cPtr == 0) ? null : new InitialAssignment(cPtr, true); 3454 } 3455 3456 3457/** 3458 * Removes the nth {@link Rule} object from this {@link Model} object and 3459 * returns a pointer to it. 3460 * <p> 3461 * The caller owns the returned object and is responsible for deleting it. 3462 * <p> 3463 * @param n the index of the {@link Rule} object to remove 3464 * <p> 3465 * @return the {@link Rule} object removed. As mentioned above, 3466 * the caller owns the returned item. <code>null</code> is returned if the given index 3467 * is out of range. 3468 * <p> 3469 */ public 3470 Rule removeRule(long n) { 3471 return (Rule) libsbml.DowncastSBase(libsbmlJNI.Model_removeRule__SWIG_0(swigCPtr, this, n), true); 3472} 3473 3474 3475/** 3476 * Removes the {@link Rule} object with the given 'variable' attribute from this {@link Model} 3477 * object and returns a pointer to it. 3478 * <p> 3479 * The caller owns the returned object and is responsible for deleting it. 3480 * If none of the {@link Rule} objects in this {@link Model} object have the 'variable' attribute 3481 * <code>variable</code>, then <code>null</code> is returned. 3482 * <p> 3483 * @param variable the 'variable' attribute of the {@link Rule} object to remove 3484 * <p> 3485 * @return the {@link Rule} object removed. As mentioned above, the 3486 * caller owns the returned object. <code>null</code> is returned if no {@link Rule} 3487 * object with the 'variable' attribute exists in this {@link Model} object. 3488 */ public 3489 Rule removeRule(String variable) { 3490 return (Rule) libsbml.DowncastSBase(libsbmlJNI.Model_removeRule__SWIG_1(swigCPtr, this, variable), true); 3491} 3492 3493 3494/** 3495 * Removes the nth {@link Constraint} object from this {@link Model} object and 3496 * returns a pointer to it. 3497 * <p> 3498 * The caller owns the returned object and is responsible for deleting it. 3499 * <p> 3500 * @param n the index of the {@link Constraint} object to remove 3501 * <p> 3502 * @return the {@link Constraint} object removed. As mentioned above, 3503 * the caller owns the returned item. <code>null</code> is returned if the given index 3504 * is out of range. 3505 * <p> 3506 */ public 3507 Constraint removeConstraint(long n) { 3508 long cPtr = libsbmlJNI.Model_removeConstraint(swigCPtr, this, n); 3509 return (cPtr == 0) ? null : new Constraint(cPtr, true); 3510 } 3511 3512 3513/** 3514 * Removes the nth {@link Reaction} object from this {@link Model} object and 3515 * returns a pointer to it. 3516 * <p> 3517 * The caller owns the returned object and is responsible for deleting it. 3518 * <p> 3519 * @param n the index of the {@link Reaction} object to remove 3520 * <p> 3521 * @return the {@link Reaction} object removed. As mentioned above, 3522 * the caller owns the returned item. <code>null</code> is returned if the given index 3523 * is out of range. 3524 * <p> 3525 */ public 3526 Reaction removeReaction(long n) { 3527 long cPtr = libsbmlJNI.Model_removeReaction__SWIG_0(swigCPtr, this, n); 3528 return (cPtr == 0) ? null : new Reaction(cPtr, true); 3529 } 3530 3531 3532/** 3533 * Removes the {@link Reaction} object with the given identifier from this {@link Model} 3534 * object and returns a pointer to it. 3535 * <p> 3536 * The caller owns the returned object and is responsible for deleting it. 3537 * If none of the {@link Reaction} objects in this {@link Model} object have the identifier 3538 * <code>sid</code>, then <code>null</code> is returned. 3539 * <p> 3540 * @param sid the identifier of the {@link Reaction} object to remove 3541 * <p> 3542 * @return the {@link Reaction} object removed. As mentioned above, the 3543 * caller owns the returned object. <code>null</code> is returned if no {@link Reaction} 3544 * object with the identifier exists in this {@link Model} object. 3545 * <p> 3546 */ public 3547 Reaction removeReaction(String sid) { 3548 long cPtr = libsbmlJNI.Model_removeReaction__SWIG_1(swigCPtr, this, sid); 3549 return (cPtr == 0) ? null : new Reaction(cPtr, true); 3550 } 3551 3552 3553/** 3554 * Removes the nth {@link Event} object from this {@link Model} object and 3555 * returns a pointer to it. 3556 * <p> 3557 * The caller owns the returned object and is responsible for deleting it. 3558 * <p> 3559 * @param n the index of the {@link Event} object to remove 3560 * <p> 3561 * @return the {@link Event} object removed. As mentioned above, 3562 * the caller owns the returned item. <code>null</code> is returned if the given index 3563 * is out of range. 3564 * <p> 3565 */ public 3566 Event removeEvent(long n) { 3567 long cPtr = libsbmlJNI.Model_removeEvent__SWIG_0(swigCPtr, this, n); 3568 return (cPtr == 0) ? null : new Event(cPtr, true); 3569 } 3570 3571 3572/** 3573 * Removes the {@link Event} object with the given identifier from this {@link Model} 3574 * object and returns a pointer to it. 3575 * <p> 3576 * The caller owns the returned object and is responsible for deleting it. 3577 * If none of the {@link Event} objects in this {@link Model} object have the identifier 3578 * <code>sid</code>, then <code>null</code> is returned. 3579 * <p> 3580 * @param sid the identifier of the {@link Event} object to remove 3581 * <p> 3582 * @return the {@link Event} object removed. As mentioned above, the 3583 * caller owns the returned object. <code>null</code> is returned if no {@link Event} 3584 * object with the identifier exists in this {@link Model} object. 3585 * <p> 3586 */ public 3587 Event removeEvent(String sid) { 3588 long cPtr = libsbmlJNI.Model_removeEvent__SWIG_1(swigCPtr, this, sid); 3589 return (cPtr == 0) ? null : new Event(cPtr, true); 3590 } 3591 3592 3593/** 3594 * Takes the contents of the passed-in {@link Model}, makes copies of everything, 3595 * and appends those copies to the appropriate places in this {@link Model}. Also 3596 * calls 'appendFrom' on all plugin objects. 3597 * <p> 3598 * @param model the {@link Model} to merge with this one. 3599 * <p> 3600 */ public 3601 int appendFrom(Model model) { 3602 return libsbmlJNI.Model_appendFrom(swigCPtr, this, Model.getCPtr(model), model); 3603 } 3604 3605 3606/** 3607 * Enables/Disables the given package with this element and child elements 3608 * (if any). (This is an internal implementation for enablePackage 3609 * function) 3610 * <p> 3611 * @note Subclasses of the SBML Core package in which one or more child 3612 * elements are defined must override this function. 3613 * @internal 3614 */ public 3615 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 3616 libsbmlJNI.Model_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 3617 } 3618 3619}