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