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