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