001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 2.0.11 004 * 005 * Do not make changes to this file unless you know what you are doing--modify 006 * the SWIG interface file instead. 007 * ----------------------------------------------------------------------------- */ 008 009package org.sbml.libsbml; 010 011/** 012 * 013 * Implementation of SBML's Event construct. 014 * <p> 015 * An SBML {@link Event} object defines when the event can occur, the variables 016 * that are affected by it, how the variables are affected, and the event's 017 * relationship to other events. The effect of the event can optionally be 018 * delayed after the occurrence of the condition which invokes it. 019 * <p> 020 * The operation of {@link Event} is divided into two phases (even when the event 021 * is not delayed): one when the event is <em>triggered</em>, and the other when 022 * the event is <em>executed</em>. {@link Trigger} objects define the conditions for 023 * triggering an event, {@link Delay} objects define when the event is actually 024 * executed, {@link EventAssignment} objects define the effects of executing the 025 * event, and (in SBML Level 3) {@link Priority} objects influence the order 026 * of {@link EventAssignment} performance in cases of simultaneous events. Please 027 * consult the descriptions of {@link Trigger}, {@link Delay}, {@link EventAssignment} and {@link Priority} 028 * for more information. 029 * <p> 030 * <h2>SBML Level/Version differences</h2> 031 * <p> 032 * <h3>SBML Level 3</h3> 033 * <p> 034 * SBML Level 3 introduces several changes to the structure and components 035 * of Events compared to SBML Level 2. These changes fall into two 036 * main categories: changes to what is optional or required, and additions 037 * of new attributes and elements. 038 * <ul> 039 * <li> The attribute 'useValuesFromTriggerTime' on {@link Event} is mandatory (it 040 * was optional in Level 2); 041 * <li> {@link Event}'s 'listOfEventAssignments' element (of class 042 * {@link ListOfEventAssignments}) is optional (it was mandatory in Level 2); 043 * <li> {@link Event}'s 'priority' element (of class {@link Priority}) is new in 044 * Level 3; and 045 * <li> The {@link Trigger} object gains new mandatory attributes (described as part 046 * of the definition of {@link Trigger}). 047 * </ul> 048 * <p> 049 * The changes to the attributes of {@link Event} are described below; the changes 050 * to {@link Trigger} and {@link Priority} are described in their respective sections. 051 * <p> 052 * <h3>SBML Level 2</h3> 053 * <p> 054 * In SBML Level 2 versions before Version 4, the semantics of 055 * {@link Event} time delays were defined such that the expressions in the event's 056 * assignments were always evaluated at the time the event was 057 * <em>triggered</em>. This definition made it difficult to define an event 058 * whose assignment formulas were meant to be evaluated at the time the 059 * event was <em>executed</em> (i.e., after the time period defined by the 060 * value of the {@link Delay} element). In SBML Level 2 Version 4 and in 061 * Level 3, the attribute 'useValuesFromTriggerTime' on {@link Event} allows a 062 * model to indicate the time at which the event's assignments are intended 063 * the values of the assignment formulas are computed at the moment the 064 * event is triggered, not after the delay. If 'useValuesFromTriggerTime'= 065 * <code>false</code>, it means that the formulas in the event's assignments are to be 066 * computed <em>after</em> the delay, at the time the event is executed. 067 * <p> 068 * The definition of {@link Event} in SBML Level 2 Versions 1 and 2 includes 069 * an additional attribute called 'timeUnits', which allowed the time units 070 * of the {@link Delay} to be set explicitly. Later Versions of SBML Level 2 071 * as well as SBML Level 3 do not define this attribute. LibSBML 072 * supports this attribute for compatibility with previous versions of SBML 073 * Level 2; however, if a model in SBML Level 3 or Level 2 074 * Versions 3–4 format sets the attribute, the 075 * consistency-checking method {@link SBMLDocument#checkConsistency()} will report 076 * an error. 077 * <p> 078 * The attribute 'useValuesFromTriggerTime' was introduced in SBML 079 * Level 2 Version 4. Models defined in prior Versions of SBML 080 * Level 2 cannot use this attribute, and 081 * {@link SBMLDocument#checkConsistency()} will report an error if they do. 082 * <p> 083 * <h2>Semantics of events in SBML Level 3 Version 1</h2> 084 * <p> 085 * The detailed semantics of events are described in the specification 086 * documents for each SBML Level/Version. Here we include the description 087 * from the SBML Level 1 Version 1. 088 * Any transition of a {@link Trigger} object's 'math' formula from the value 089 * <code>false</code> to <code>true</code> will cause the enclosing {@link Event} object to 090 * <em>trigger</em>. Such a transition is not possible at the very start 091 * of a simulation (i.e., at time <em>t = 0</em>) unless the {@link Trigger} 092 * object's 'initialValue' attribute has a value of <code>false</code>; this defines 093 * the value of the trigger formula to be <code>false</code> immediately prior to the 094 * start of simulation, thereby giving it the potential to change in value 095 * from <code>false</code> to <code>true</code> when the formula is evaluated at <em>t = 096 * 0</em>. If 'initialValue'=<code>true</code>, then the trigger expression cannot 097 * transition from <code>false</code> to <code>true</code> at <em>t = 0</em> but may do so at 098 * some time <em>t > 0</em>. 099 * <p> 100 * Consider an {@link Event} object definition <EM>E</EM> with delay <em>d</em> in 101 * which the {@link Trigger} object's 'math' formula makes a transition in value 102 * from <code>false</code> to <code>true</code> at times <em>t<sub>1</sub></em> and 103 * <em>t<sub>2</sub></em>. The {@link EventAssignment} within the {@link Event} object 104 * will have effect at <em>t<sub>1</sub> + d</em> and 105 * <em>t<sub>2</sub> + d</em> irrespective of the relative times of 106 * <em>t<sub>1</sub></em> and <em>t<sub>2</sub></em>. For example, events 107 * can 'overlap' so that <em>t<sub>1</sub> < t<sub>2</sub> < 108 * t<sub>1</sub> + d</em> still causes an event assignments to occur at 109 * <em>t<sub>1</sub> + d</em> and <em>t<sub>2</sub> + d</em>. 110 * <p> 111 * It is entirely possible for two events to be executed simultaneously, 112 * and it is possible for events to trigger other events (i.e., an event 113 * assignment can cause an event to trigger). This leads to several 114 * points: 115 * <ul> 116 * <p> 117 * <li> A software package should retest all event triggers after executing 118 * an event assignment in order to account for the possibility that the 119 * assignment causes another event trigger to transition from <code>false</code> to 120 * <code>true.</code> This check should be made after each individual {@link Event} object's 121 * execution, even when several events are to be executed simultaneously. 122 * <p> 123 * <li> Any {@link Event} object whose {@link Trigger} 'persistent' attribute has the value 124 * <code>false</code> must have its trigger expression reevaluated continuously 125 * between when the event is triggered and when it is executed. If 126 * its trigger expression ever evaluates to <code>false</code>, it must be removed 127 * from the queue of events pending execution and treated as any other 128 * event whose trigger expression evaluates to <code>false.</code> 129 * <p> 130 * <li> Although the precise time at which events are executed is not 131 * resolved beyond the given execution point in simulated time, it is 132 * assumed that the order in which the events occur <em>is</em> resolved. 133 * This order can be significant in determining the overall outcome of a 134 * given simulation. When an event <EM>X</EM> <em>triggers</em> another 135 * event <EM>Y</EM> and event <EM>Y</EM> has zero delay, then event 136 * <EM>Y</EM> is added to the existing set of simultaneous events that are 137 * pending <em>execution</em>. Events <EM>X</EM> and <EM>Y</EM> form a 138 * cascade of events at the same point in simulation time. An event such 139 * as <EM>Y</EM> may have a special priority if it contains a {@link Priority} 140 * subobject. 141 * <p> 142 * <li> All events in a model are open to being in a cascade. The position 143 * of an event in the event queue does not affect whether it can be in the 144 * cascade: event <EM>Y</EM> can be triggered whether it is before or after 145 * <EM>X</EM> in the queue of events pending execution. A cascade of 146 * events can be potentially infinite (never terminate); when this occurs a 147 * simulator should indicate this has occurred—it is incorrect for a 148 * simulator to break a cascade arbitrarily and continue the simulation 149 * without at least indicating that the infinite cascade occurred. 150 * <p> 151 * <li> Simultaneous events having no defined priorities are executed in an 152 * undefined order. This does not mean that the behavior of the simulation 153 * is completely undefined; merely that the <em>order</em> of execution of 154 * these particular events is undefined. A given simulator may use any 155 * algorithm to choose an order as long as every event is executed exactly 156 * once. 157 * <p> 158 * <li> Events with defined priorities are executed in the order implied by 159 * their {@link Priority} 'math' formula values, with events having higher 160 * priorities being executed ahead of events with lower priorities, and 161 * events with identical priorities being executed in a random order with 162 * respect to one another (as determined at run-time by some random 163 * algorithm equivalent to coin-flipping). Newly-triggered events that are 164 * to be executed immediately (i.e., if they define no delays) should be 165 * inserted into the queue of events pending execution according to their 166 * priorities: events with higher priority values value must be inserted 167 * ahead of events with lower priority values and after any pending events 168 * with even higher priorities, and inserted randomly among pending events 169 * with the same priority values. Events without {@link Priority} objects must be 170 * inserted into the queue in some fashion, but the algorithm used to place 171 * it in the queue is undefined. Similarly, there is no restriction on the 172 * order of a newly-inserted event with a defined {@link Priority} with respect to 173 * any other pending {@link Event} without a defined {@link Priority}. 174 * <p> 175 * <li> A model variable that is the target of one or more event 176 * assignments can change more than once when simultaneous events are 177 * processed at some time point <em>t</em>. The model's behavior (output) 178 * for such a variable is the value of the variable at the end of 179 * processing all the simultaneous events at time <em>t</em>. 180 * <p> 181 * </ul> 182 * <p> 183 * @see Trigger 184 * @see Priority 185 * @see Delay 186 * @see EventAssignment 187 * <p> 188 * <p> 189 * <!-- leave this next break as-is to work around some doxygen bug --> 190 */ 191 192public class Event extends SBase { 193 private long swigCPtr; 194 195 protected Event(long cPtr, boolean cMemoryOwn) 196 { 197 super(libsbmlJNI.Event_SWIGUpcast(cPtr), cMemoryOwn); 198 swigCPtr = cPtr; 199 } 200 201 protected static long getCPtr(Event obj) 202 { 203 return (obj == null) ? 0 : obj.swigCPtr; 204 } 205 206 protected static long getCPtrAndDisown (Event obj) 207 { 208 long ptr = 0; 209 210 if (obj != null) 211 { 212 ptr = obj.swigCPtr; 213 obj.swigCMemOwn = false; 214 } 215 216 return ptr; 217 } 218 219 protected void finalize() { 220 delete(); 221 } 222 223 public synchronized void delete() { 224 if (swigCPtr != 0) { 225 if (swigCMemOwn) { 226 swigCMemOwn = false; 227 libsbmlJNI.delete_Event(swigCPtr); 228 } 229 swigCPtr = 0; 230 } 231 super.delete(); 232 } 233 234 235/** 236 * Creates a new {@link Event} using the given SBML <code>level</code> and <code>version</code> 237 * values. 238 * <p> 239 * @param level a long integer, the SBML Level to assign to this {@link Event} 240 * <p> 241 * @param version a long integer, the SBML Version to assign to this 242 * {@link Event} 243 * <p> 244 * @throws SBMLConstructorException 245 * Thrown if the given <code>level</code> and <code>version</code> combination, or this kind 246 * of SBML object, are either invalid or mismatched with respect to the 247 * parent {@link SBMLDocument} object. 248 * <p> 249 * @note Upon the addition of an {@link Event} object to an {@link SBMLDocument} (e.g., 250 * using {@link Model#addEvent(Event e)}), the SBML Level, SBML Version and XML 251 * namespace of the document <em>override</em> the values used when creating 252 * the {@link Event} object via this constructor. This is necessary to ensure 253 * that an SBML document is a consistent structure. Nevertheless, the 254 * ability to supply the values at the time of creation of an {@link Event} is an 255 * important aid to producing valid SBML. Knowledge of the intented SBML 256 * Level and Version determine whether it is valid to assign a particular 257 * value to an attribute, or whether it is valid to add an object to an 258 * existing {@link SBMLDocument}. 259 */ public 260 Event(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 261 this(libsbmlJNI.new_Event__SWIG_0(level, version), true); 262 } 263 264 265/** 266 * Creates a new {@link Event} using the given {@link SBMLNamespaces} object 267 * <code>sbmlns</code>. 268 * <p> 269 * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces 270 * information. It is used to communicate the SBML Level, Version, and 271 * (in Level 3) packages used in addition to SBML Level 3 Core. 272 * A common approach to using this class constructor is to create an 273 * {@link SBMLNamespaces} object somewhere in a program, once, then pass it to 274 * object constructors such as this one when needed. 275 * <p> 276 * @param sbmlns an {@link SBMLNamespaces} object. 277 * <p> 278 * @throws SBMLConstructorException 279 * Thrown if the given <code>level</code> and <code>version</code> combination, or this kind 280 * of SBML object, are either invalid or mismatched with respect to the 281 * parent {@link SBMLDocument} object. 282 * <p> 283 * @note Upon the addition of an {@link Event} object to an {@link SBMLDocument} (e.g., 284 * using {@link Model#addEvent(Event e)}), the SBML XML namespace of the document 285 * <em>overrides</em> the value used when creating the {@link Event} object via this 286 * constructor. This is necessary to ensure that an SBML document is a 287 * consistent structure. Nevertheless, the ability to supply the values 288 * at the time of creation of a {@link Event} is an important aid to producing 289 * valid SBML. Knowledge of the intented SBML Level and Version 290 * determine whether it is valid to assign a particular value to an 291 * attribute, or whether it is valid to add an object to an existing 292 * {@link SBMLDocument}. 293 */ public 294 Event(SBMLNamespaces sbmlns) throws org.sbml.libsbml.SBMLConstructorException { 295 this(libsbmlJNI.new_Event__SWIG_1(SBMLNamespaces.getCPtr(sbmlns), sbmlns), true); 296 } 297 298 299/** 300 * Copy constructor; creates a copy of this {@link Event}. 301 * <p> 302 * @param orig the object to copy. 303 * <p> 304 * @throws SBMLConstructorException 305 * Thrown if the argument <code>orig</code> is <code>null.</code> 306 */ public 307 Event(Event orig) throws org.sbml.libsbml.SBMLConstructorException { 308 this(libsbmlJNI.new_Event__SWIG_2(Event.getCPtr(orig), orig), true); 309 } 310 311 312/** 313 * Creates and returns a deep copy of this {@link Event}. 314 * <p> 315 * @return a (deep) copy of this {@link Event}. 316 */ public 317 Event cloneObject() { 318 long cPtr = libsbmlJNI.Event_cloneObject(swigCPtr, this); 319 return (cPtr == 0) ? null : new Event(cPtr, true); 320 } 321 322 323/** 324 * Returns the first child element found that has the given <code>id</code> in the model-wide SId namespace, or <code>null</code> if no such object is found. 325 * <p> 326 * @param id string representing the id of objects to find 327 * <p> 328 * @return pointer to the first element found with the given <code>id</code>. 329 */ public 330 SBase getElementBySId(String id) { 331 return libsbml.DowncastSBase(libsbmlJNI.Event_getElementBySId(swigCPtr, this, id), false); 332} 333 334 335/** 336 * Returns the first child element it can find with the given <code>metaid</code>, or <code>null</code> if no such object is found. 337 * <p> 338 * @param metaid string representing the metaid of objects to find 339 * <p> 340 * @return pointer to the first element found with the given <code>metaid</code>. 341 */ public 342 SBase getElementByMetaId(String metaid) { 343 return libsbml.DowncastSBase(libsbmlJNI.Event_getElementByMetaId(swigCPtr, this, metaid), false); 344} 345 346 347/** 348 * Returns the value of the 'id' attribute of this {@link Event}. 349 * <p> 350 * @return the id of this {@link Event}. 351 */ public 352 String getId() { 353 return libsbmlJNI.Event_getId(swigCPtr, this); 354 } 355 356 357/** 358 * Returns the value of the 'name' attribute of this {@link Event}. 359 * <p> 360 * @return the name of this {@link Event}. 361 */ public 362 String getName() { 363 return libsbmlJNI.Event_getName(swigCPtr, this); 364 } 365 366 367/** 368 * Get the event trigger portion of this {@link Event}. 369 * <p> 370 * @return the {@link Trigger} object of this {@link Event}. 371 */ public 372 Trigger getTrigger() { 373 long cPtr = libsbmlJNI.Event_getTrigger__SWIG_0(swigCPtr, this); 374 return (cPtr == 0) ? null : new Trigger(cPtr, false); 375 } 376 377 378/** 379 * Get the assignment delay portion of this {@link Event}, if there is one. 380 * <p> 381 * @return the delay of this {@link Event} if one is defined, or <code>null</code> if none 382 * is defined. 383 */ public 384 Delay getDelay() { 385 long cPtr = libsbmlJNI.Event_getDelay__SWIG_0(swigCPtr, this); 386 return (cPtr == 0) ? null : new Delay(cPtr, false); 387 } 388 389 390/** 391 * (SBML Level 3 only) Get the event priority portion of this 392 * {@link Event}. 393 * <p> 394 * @return the {@link Priority} object of this {@link Event}. 395 * <p> 396 * @note The element 'priority' is available in SBML Level 3 397 * Version 1 Core, but is not present in lower Levels of SBML. 398 */ public 399 Priority getPriority() { 400 long cPtr = libsbmlJNI.Event_getPriority__SWIG_0(swigCPtr, this); 401 return (cPtr == 0) ? null : new Priority(cPtr, false); 402 } 403 404 405/** 406 * Get the value of the 'timeUnits' attribute of this {@link Event}, if it has one. 407 * <p> 408 * @return the value of the attribute 'timeUnits' as a string. 409 * <p> 410 * @warning Definitions of {@link Event} in SBML Level 2 Versions 1 411 * and 2 included the additional attribute called 'timeUnits', but 412 * it was removed in SBML Level 2 Version 3. LibSBML supports 413 * this attribute for compatibility with previous versions of SBML 414 * Level 2, but its use is discouraged since models in Level 2 415 * Versions 3 and 4 cannot contain it. If a Version 3 416 * or 4 model sets the attribute, the consistency-checking method 417 * {@link SBMLDocument#checkConsistency()} will report an error. 418 */ public 419 String getTimeUnits() { 420 return libsbmlJNI.Event_getTimeUnits(swigCPtr, this); 421 } 422 423 424/** 425 * Get the value of the 'useValuesFromTriggerTime' attribute of this {@link Event}. 426 * <p> 427 * The optional {@link Delay} on {@link Event} means there are two times to consider when 428 * computing the results of an event: the time at which the event is 429 * <em>triggered</em>, and the time at which assignments are 430 * <em>executed</em>. It is also possible to distinguish between the 431 * time at which the {@link EventAssignment}'s expression is calculated, and the 432 * time at which the assignment is made: the expression could be 433 * evaluated at the same time the assignments are performed, i.e., when 434 * the event is <em>executed</em>, but it could also be defined to be 435 * evaluated at the time the event is <em>triggered</em>. 436 * <p> 437 * In SBML Level 2 versions prior to Version 4, the semantics 438 * of {@link Event} time delays were defined such that the expressions in the 439 * event's assignments were always evaluated at the time the event was 440 * <em>triggered</em>. This definition made it difficult to define an 441 * event whose assignment formulas were meant to be evaluated at the time 442 * the event was <em>executed</em> (i.e., after the time period defined 443 * by the value of the {@link Delay} element). In SBML Level 2 444 * Version 4, the attribute 'useValuesFromTriggerTime' on {@link Event} 445 * allows a model to indicate the time at which the event's assignments 446 * are intended to be evaluated. In SBML Level 2, the attribute has 447 * a default value of <code>true</code>, which corresponds to the interpretation of 448 * event assignments prior to Version 4: the values of the 449 * assignment formulas are computed at the moment the event is triggered, 450 * not after the delay. If 'useValuesFromTriggerTime'=<code>false</code>, it means 451 * that the formulas in the event's assignments are to be computed after 452 * the delay, at the time the event is executed. In SBML Level 3, 453 * the attribute is mandatory, not optional, and all events must specify 454 * a value for it. 455 * <p> 456 * @return the value of the attribute 'useValuesFromTriggerTime' as a boolean. 457 * <p> 458 * @warning The attribute 'useValuesFromTriggerTime' was introduced in 459 * SBML Level 2 Version 4. It is not valid in models defined 460 * using SBML Level 2 versions prior to Version 4. If a 461 * Level 2 Version 1–3 model sets the attribute, the 462 * consistency-checking method {@link SBMLDocument#checkConsistency()} will 463 * report an error. 464 */ public 465 boolean getUseValuesFromTriggerTime() { 466 return libsbmlJNI.Event_getUseValuesFromTriggerTime(swigCPtr, this); 467 } 468 469 470/** 471 * Predicate returning <code>true</code> if this 472 * {@link Event}'s 'id' attribute is set. 473 * <p> 474 * @return <code>true</code> if the 'id' attribute of this {@link Event} is 475 * set, <code>false</code> otherwise. 476 */ public 477 boolean isSetId() { 478 return libsbmlJNI.Event_isSetId(swigCPtr, this); 479 } 480 481 482/** 483 * Predicate returning <code>true</code> if this 484 * {@link Event}'s 'name' attribute is set. 485 * <p> 486 * @return <code>true</code> if the 'name' attribute of this {@link Event} is 487 * set, <code>false</code> otherwise. 488 */ public 489 boolean isSetName() { 490 return libsbmlJNI.Event_isSetName(swigCPtr, this); 491 } 492 493 494/** 495 * Predicate for testing whether the trigger for this {@link Event} is set. 496 * <p> 497 * @return <code>true</code> if the trigger of this {@link Event} is set, <code>false</code> 498 * otherwise. 499 */ public 500 boolean isSetTrigger() { 501 return libsbmlJNI.Event_isSetTrigger(swigCPtr, this); 502 } 503 504 505/** 506 * Predicate for testing whether the delay for this {@link Event} is set. 507 * <p> 508 * @return <code>true</code> if the delay of this {@link Event} is set, <code>false</code> 509 * otherwise. 510 */ public 511 boolean isSetDelay() { 512 return libsbmlJNI.Event_isSetDelay(swigCPtr, this); 513 } 514 515 516/** 517 * (SBML Level 3 only) Predicate for testing whether the priority 518 * for this {@link Event} is set. 519 * <p> 520 * @return <code>true</code> if the priority of this {@link Event} is set, <code>false</code> 521 * otherwise. 522 * <p> 523 * @note The element 'priority' is available in SBML Level 3 524 * Version 1 Core, but is not present in lower Levels of SBML. 525 */ public 526 boolean isSetPriority() { 527 return libsbmlJNI.Event_isSetPriority(swigCPtr, this); 528 } 529 530 531/** 532 * Predicate for testing whether the 'timeUnits' attribute of this {@link Event} 533 * is set. 534 * <p> 535 * @return <code>true</code> if the 'timeUnits' attribute of this {@link Event} is 536 * set, <code>false</code> otherwise. 537 * <p> 538 * @warning Definitions of {@link Event} in SBML Level 2 Versions 1 539 * and 2 included the additional attribute called 'timeUnits', but 540 * it was removed in SBML Level 2 Version 3. LibSBML supports 541 * this attribute for compatibility with previous versions of SBML 542 * Level 2, but its use is discouraged since models in Level 2 543 * Versions 3 and 4 cannot contain it. If a Version 3 544 * or 4 model sets the attribute, the consistency-checking method 545 * {@link SBMLDocument#checkConsistency()} will report an error. 546 */ public 547 boolean isSetTimeUnits() { 548 return libsbmlJNI.Event_isSetTimeUnits(swigCPtr, this); 549 } 550 551 552/** 553 * Predicate for testing whether the 'useValuesFromTriggerTime' attribute of this {@link Event} 554 * is set. 555 * <p> 556 * @return <code>true</code> if the 'useValuesFromTriggerTime' attribute of this {@link Event} is 557 * set, <code>false</code> otherwise. 558 * <p> 559 * @note In SBML Level 2, this attribute is optional and has a default value of 560 * <code>true</code>, whereas in Level 3 Version 1, this optional is mandatory and 561 * has no default value. 562 */ public 563 boolean isSetUseValuesFromTriggerTime() { 564 return libsbmlJNI.Event_isSetUseValuesFromTriggerTime(swigCPtr, this); 565 } 566 567 568/** 569 * Sets the value of the 'id' attribute of this {@link Event}. 570 * <p> 571 * The string <code>sid</code> is copied. Note that SBML has strict requirements 572 * for the syntax of identifiers. The following is a summary of the definition of the SBML identifier type 573<code>SId</code>, which defines the permitted syntax of identifiers. We 574express the syntax using an extended form of BNF notation: 575<pre style='margin-left: 2em; border: none; font-weight: bold; font-size: 13px; color: black'> 576letter .= 'a'..'z','A'..'Z' 577digit .= '0'..'9' 578idChar .= letter | digit | '_' 579SId .= ( letter | '_' ) idChar* 580</pre> 581The characters <code>(</code> and <code>)</code> are used for grouping, the 582character <code>*</code> 'zero or more times', and the character 583<code>|</code> indicates logical 'or'. The equality of SBML identifiers is 584determined by an exact character sequence match; i.e., comparisons must be 585performed in a case-sensitive manner. In addition, there are a few 586conditions for the uniqueness of identifiers in an SBML model. Please 587consult the SBML specifications for the exact formulations. 588<p> 589 590 * <p> 591 * @param sid the string to use as the identifier of this {@link Event} 592 * <p> 593 * @return integer value indicating success/failure of the 594 * function. The possible values 595 * returned by this function are: 596 * <ul> 597 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 598 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 599 * </ul> 600 */ public 601 int setId(String sid) { 602 return libsbmlJNI.Event_setId(swigCPtr, this, sid); 603 } 604 605 606/** 607 * Sets the value of the 'name' attribute of this {@link Event}. 608 * <p> 609 * The string in <code>name</code> is copied. 610 * <p> 611 * @param name the new name for the {@link Event} 612 * <p> 613 * @return integer value indicating success/failure of the 614 * function. The possible values 615 * returned by this function are: 616 * <ul> 617 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 618 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 619 * </ul> 620 */ public 621 int setName(String name) { 622 return libsbmlJNI.Event_setName(swigCPtr, this, name); 623 } 624 625 626/** 627 * Sets the trigger definition of this {@link Event} to a copy of the given 628 * {@link Trigger} object instance. 629 * <p> 630 * @param trigger the {@link Trigger} object instance to use. 631 * <p> 632 * @return integer value indicating success/failure of the 633 * function. The possible values 634 * returned by this function are: 635 * <ul> 636 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 637 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 638 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 639 * </ul> 640 */ public 641 int setTrigger(Trigger trigger) { 642 return libsbmlJNI.Event_setTrigger(swigCPtr, this, Trigger.getCPtr(trigger), trigger); 643 } 644 645 646/** 647 * Sets the delay definition of this {@link Event} to a copy of the given {@link Delay} 648 * object instance. 649 * <p> 650 * @param delay the {@link Delay} object instance to use 651 * <p> 652 * @return integer value indicating success/failure of the 653 * function. The possible values 654 * returned by this function are: 655 * <ul> 656 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 657 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 658 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 659 * </ul> 660 */ public 661 int setDelay(Delay delay) { 662 return libsbmlJNI.Event_setDelay(swigCPtr, this, Delay.getCPtr(delay), delay); 663 } 664 665 666/** 667 * (SBML Level 3 only) Sets the priority definition of this {@link Event} 668 * to a copy of the given {@link Priority} object instance. 669 * <p> 670 * @param priority the {@link Priority} object instance to use 671 * <p> 672 * @return integer value indicating success/failure of the 673 * function. The possible values 674 * returned by this function are: 675 * <ul> 676 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 677 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 678 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 679 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 680 * </ul> 681 * <p> 682 * @note The element 'priority' is available in SBML Level 3 683 * Version 1 Core, but is not present in lower Levels of SBML. 684 */ public 685 int setPriority(Priority priority) { 686 return libsbmlJNI.Event_setPriority(swigCPtr, this, Priority.getCPtr(priority), priority); 687 } 688 689 690/** 691 * Sets the 'timeUnits' attribute of this {@link Event} to a copy of <code>sid</code>. 692 * <p> 693 * @param sid the identifier of the time units to use. 694 * <p> 695 * @warning Definitions of {@link Event} in SBML Level 2 Versions 1 696 * and 2 included the additional attribute called 'timeUnits', but 697 * it was removed in SBML Level 2 Version 3. LibSBML supports 698 * this attribute for compatibility with previous versions of SBML 699 * Level 2, but its use is discouraged since models in Level 2 700 * Versions 3 and 4 cannot contain it. If a Version 3 701 * or 4 model sets the attribute, the consistency-checking method 702 * {@link SBMLDocument#checkConsistency()} will report an error. 703 * <p> 704 * @return integer value indicating success/failure of the 705 * function. The possible values 706 * returned by this function are: 707 * <ul> 708 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 709 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 710 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 711 * </ul> 712 */ public 713 int setTimeUnits(String sid) { 714 return libsbmlJNI.Event_setTimeUnits(swigCPtr, this, sid); 715 } 716 717 718/** 719 * Sets the 'useValuesFromTriggerTime' attribute of this {@link Event} to a <code>value</code>. 720 * <p> 721 * The optional {@link Delay} on {@link Event} means there are two times to consider when 722 * computing the results of an event: the time at which the event is 723 * <em>triggered</em>, and the time at which assignments are 724 * <em>executed</em>. It is also possible to distinguish between the 725 * time at which the {@link EventAssignment}'s expression is calculated, and the 726 * time at which the assignment is made: the expression could be 727 * evaluated at the same time the assignments are performed, i.e., when 728 * the event is <em>executed</em>, but it could also be defined to be 729 * evaluated at the time the event is <em>triggered</em>. 730 * <p> 731 * In SBML Level 2 versions prior to Version 4, the semantics 732 * of {@link Event} time delays were defined such that the expressions in the 733 * event's assignments were always evaluated at the time the event was 734 * <em>triggered</em>. This definition made it difficult to define an 735 * event whose assignment formulas were meant to be evaluated at the time 736 * the event was <em>executed</em> (i.e., after the time period defined 737 * by the value of the {@link Delay} element). In SBML Level 2 738 * Version 4, the attribute 'useValuesFromTriggerTime' on {@link Event} 739 * allows a model to indicate the time at which the event's assignments 740 * are intended to be evaluated. In SBML Level 2, the attribute has 741 * a default value of <code>true</code>, which corresponds to the interpretation of 742 * event assignments prior to Version 4: the values of the 743 * assignment formulas are computed at the moment the event is triggered, 744 * not after the delay. If 'useValuesFromTriggerTime'=<code>false</code>, it means 745 * that the formulas in the event's assignments are to be computed after 746 * the delay, at the time the event is executed. In SBML Level 3, 747 * the attribute is mandatory, not optional, and all events must specify 748 * a value for it. 749 * <p> 750 * @param value the value of useValuesFromTriggerTime to use. 751 * <p> 752 * @return integer value indicating success/failure of the 753 * function. The possible values 754 * returned by this function are: 755 * <ul> 756 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 757 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 758 * </ul> 759 * <p> 760 * @warning The attribute 'useValuesFromTriggerTime' was introduced in 761 * SBML Level 2 Version 4. It is not valid in models defined 762 * using SBML Level 2 versions prior to Version 4. If a 763 * Version 1– 3 model sets the attribute, the 764 * consistency-checking method {@link SBMLDocument#checkConsistency()} will 765 * report an error. 766 */ public 767 int setUseValuesFromTriggerTime(boolean value) { 768 return libsbmlJNI.Event_setUseValuesFromTriggerTime(swigCPtr, this, value); 769 } 770 771 772/** 773 * Unsets the value of the 'id' attribute of this {@link Event}. 774 * <p> 775 * @return integer value indicating success/failure of the 776 * function. The possible values 777 * returned by this function are: 778 * <ul> 779 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 780 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 781 * </ul> 782 */ public 783 int unsetId() { 784 return libsbmlJNI.Event_unsetId(swigCPtr, this); 785 } 786 787 788/** 789 * Unsets the value of the 'name' attribute of this {@link Event}. 790 * <p> 791 * @return integer value indicating success/failure of the 792 * function. The possible values 793 * returned by this function are: 794 * <ul> 795 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 796 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 797 * </ul> 798 */ public 799 int unsetName() { 800 return libsbmlJNI.Event_unsetName(swigCPtr, this); 801 } 802 803 804/** 805 * Unsets the {@link Delay} of this {@link Event}. 806 * <p> 807 * @return integer value indicating success/failure of the 808 * function. The possible values 809 * returned by this function are: 810 * <ul> 811 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 812 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 813 * </ul> 814 */ public 815 int unsetDelay() { 816 return libsbmlJNI.Event_unsetDelay(swigCPtr, this); 817 } 818 819 820/** 821 * (SBML Level 3 only) Unsets the {@link Priority} of this {@link Event}. 822 * <p> 823 * @return integer value indicating success/failure of the 824 * function. The possible values 825 * returned by this function are: 826 * <ul> 827 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 828 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 829 * </ul> 830 * <p> 831 * @note The element 'priority' is available in SBML Level 3 832 * Version 1 Core, but is not present in lower Levels of SBML. 833 */ public 834 int unsetPriority() { 835 return libsbmlJNI.Event_unsetPriority(swigCPtr, this); 836 } 837 838 839/** 840 * Unsets the {@link Trigger} of this {@link Event}. 841 * <p> 842 * @return integer value indicating success/failure of the 843 * function. The possible values 844 * returned by this function are: 845 * <ul> 846 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 847 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 848 * </ul> 849 * <p> 850 * @note The element 'priority' is available in SBML Level 3 851 * Version 1 Core, but is not present in lower Levels of SBML. 852 */ public 853 int unsetTrigger() { 854 return libsbmlJNI.Event_unsetTrigger(swigCPtr, this); 855 } 856 857 858/** 859 * Unsets the 'timeUnits' attribute of this {@link Event}. 860 * <p> 861 * @return integer value indicating success/failure of the 862 * function. The possible values 863 * returned by this function are: 864 * <ul> 865 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 866 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE } 867 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 868 * </ul> 869 * <p> 870 * @warning Definitions of {@link Event} in SBML Level 2 Versions 1 and 2 871 * included the attribute called 'timeUnits', but it was removed in SBML 872 * Level 2 Version 3. LibSBML supports this attribute for 873 * compatibility with previous versions of SBML Level 2, but its use 874 * is discouraged since models in Level 2 Version 3 and 875 * Version 4 cannot contain it. If a Version 3 or 4 model 876 * sets this attribute, the consistency-checking method 877 * {@link SBMLDocument#checkConsistency()} will report an error. 878 */ public 879 int unsetTimeUnits() { 880 return libsbmlJNI.Event_unsetTimeUnits(swigCPtr, this); 881 } 882 883 884/** 885 * Appends a copy of the given {@link EventAssignment} to this {@link Event}. 886 * <p> 887 * @param ea the {@link EventAssignment} object to add. 888 * <p> 889 * @return integer value indicating success/failure of the 890 * function. The possible values 891 * returned by this function are: 892 * <ul> 893 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 894 * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH } 895 * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH } 896 * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID } 897 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 898 * </ul> 899 * <p> 900 * @note This method should be used with some caution. The fact that 901 * this method <em>copies</em> the object passed to it means that the caller 902 * will be left holding a physically different object instance than the 903 * one contained in this {@link Event}. Changes made to the original object 904 * instance (such as resetting attribute values) will <em>not affect the 905 * instance in the {@link Event}</em>. In addition, the caller should make sure 906 * to free the original object if it is no longer being used, or else a 907 * memory leak will result. Please see {@link Event#createEventAssignment()} 908 * for a method that does not lead to these issues. 909 * <p> 910 * @see #createEventAssignment() 911 */ public 912 int addEventAssignment(EventAssignment ea) { 913 return libsbmlJNI.Event_addEventAssignment(swigCPtr, this, EventAssignment.getCPtr(ea), ea); 914 } 915 916 917/** 918 * Creates a new, empty {@link EventAssignment}, adds it to this {@link Event}'s list of 919 * event assignments and returns the {@link EventAssignment}. 920 * <p> 921 * @return the newly created {@link EventAssignment} object instance 922 * <p> 923 * @see #addEventAssignment(EventAssignment ea) 924 */ public 925 EventAssignment createEventAssignment() { 926 long cPtr = libsbmlJNI.Event_createEventAssignment(swigCPtr, this); 927 return (cPtr == 0) ? null : new EventAssignment(cPtr, false); 928 } 929 930 931/** 932 * Creates a new, empty {@link Trigger}, adds it to this {@link Event} and 933 * returns the {@link Trigger}. 934 * <p> 935 * @return the newly created {@link Trigger} object instance 936 */ public 937 Trigger createTrigger() { 938 long cPtr = libsbmlJNI.Event_createTrigger(swigCPtr, this); 939 return (cPtr == 0) ? null : new Trigger(cPtr, false); 940 } 941 942 943/** 944 * Creates a new, empty {@link Delay}, adds it to this {@link Event} and 945 * returns the {@link Delay}. 946 * <p> 947 * @return the newly created {@link Delay} object instance 948 */ public 949 Delay createDelay() { 950 long cPtr = libsbmlJNI.Event_createDelay(swigCPtr, this); 951 return (cPtr == 0) ? null : new Delay(cPtr, false); 952 } 953 954 955/** 956 * (SBML Level 3 only) Creates a new, empty {@link Priority}, adds it to this 957 * {@link Event} and returns the {@link Priority}. 958 * <p> 959 * @return the newly created {@link Priority} object instance 960 * <p> 961 * @note The element 'priority' is available in SBML Level 3 962 * Version 1 Core, but is not present in lower Levels of SBML. 963 */ public 964 Priority createPriority() { 965 long cPtr = libsbmlJNI.Event_createPriority(swigCPtr, this); 966 return (cPtr == 0) ? null : new Priority(cPtr, false); 967 } 968 969 970/** 971 * Returns the list of event assignments for this {@link Event}. 972 * <p> 973 * @return the list of EventAssignments for this {@link Event}. 974 */ public 975 ListOfEventAssignments getListOfEventAssignments() { 976 long cPtr = libsbmlJNI.Event_getListOfEventAssignments__SWIG_0(swigCPtr, this); 977 return (cPtr == 0) ? null : new ListOfEventAssignments(cPtr, false); 978 } 979 980 981/** 982 * Return a specific {@link EventAssignment} object of this {@link Event}. 983 * <p> 984 * @param n an integer, the index of the {@link EventAssignment} object to return 985 * <p> 986 * @return the <code>n</code>th {@link EventAssignment} of this {@link Event}. 987 */ public 988 EventAssignment getEventAssignment(long n) { 989 long cPtr = libsbmlJNI.Event_getEventAssignment__SWIG_0(swigCPtr, this, n); 990 return (cPtr == 0) ? null : new EventAssignment(cPtr, false); 991 } 992 993 994/** 995 * Return the event assignment indicated by the given <code>variable</code>. 996 * <p> 997 * @param variable a string, the identifier of the variable whose 998 * {@link EventAssignment} is being sought. 999 * <p> 1000 * @return the {@link EventAssignment} for the given <code>variable</code>, or <code>null</code> if 1001 * no such {@link EventAssignment} exits. 1002 */ public 1003 EventAssignment getEventAssignment(String variable) { 1004 long cPtr = libsbmlJNI.Event_getEventAssignment__SWIG_2(swigCPtr, this, variable); 1005 return (cPtr == 0) ? null : new EventAssignment(cPtr, false); 1006 } 1007 1008 1009/** 1010 * Returns the number of {@link EventAssignment} objects attached to this 1011 * {@link Event}. 1012 * <p> 1013 * @return the number of EventAssignments in this {@link Event}. 1014 */ public 1015 long getNumEventAssignments() { 1016 return libsbmlJNI.Event_getNumEventAssignments(swigCPtr, this); 1017 } 1018 1019 1020/** 1021 * Removes the nth {@link EventAssignment} object from this {@link Event} object and 1022 * returns a pointer to it. 1023 * <p> 1024 * The caller owns the returned object and is responsible for deleting it. 1025 * <p> 1026 * @param n the index of the {@link EventAssignment} object to remove 1027 * <p> 1028 * @return the {@link EventAssignment} object removed. As mentioned above, 1029 * the caller owns the returned item. <code>null</code> is returned if the given index 1030 * is out of range. 1031 * <p> 1032 */ public 1033 EventAssignment removeEventAssignment(long n) { 1034 long cPtr = libsbmlJNI.Event_removeEventAssignment__SWIG_0(swigCPtr, this, n); 1035 return (cPtr == 0) ? null : new EventAssignment(cPtr, true); 1036 } 1037 1038 1039/** 1040 * Removes the {@link EventAssignment} object with the given 'variable' attribute 1041 * from this {@link Event} object and returns a pointer to it. 1042 * <p> 1043 * The caller owns the returned object and is responsible for deleting it. 1044 * If none of the {@link EventAssignment} objects in this {@link Event} object have the 1045 * 'variable' attribute <code>variable</code>, then <code>null</code> is returned. 1046 * <p> 1047 * @param variable the 'variable' attribute of the {@link EventAssignment} object 1048 * to remove 1049 * <p> 1050 * @return the {@link EventAssignment} object removed. As mentioned above, the 1051 * caller owns the returned object. <code>null</code> is returned if no {@link EventAssignment} 1052 * object with the 'variable' attribute exists in this {@link Event} object. 1053 */ public 1054 EventAssignment removeEventAssignment(String variable) { 1055 long cPtr = libsbmlJNI.Event_removeEventAssignment__SWIG_1(swigCPtr, this, variable); 1056 return (cPtr == 0) ? null : new EventAssignment(cPtr, true); 1057 } 1058 1059 1060/** 1061 * Sets this SBML object to child SBML objects (if any). 1062 * (Creates a child-parent relationship by the parent) 1063 * <p> 1064 * Subclasses must override this function if they define 1065 * one ore more child elements. 1066 * Basically, this function needs to be called in 1067 * constructor, copy constructor and assignment operator. 1068 * <p> 1069 * @see setSBMLDocument 1070 * @see enablePackageInternal 1071 * @internal 1072 */ public 1073 void connectToChild() { 1074 libsbmlJNI.Event_connectToChild(swigCPtr, this); 1075 } 1076 1077 1078/** 1079 * Enables/Disables the given package with this element and child 1080 * elements (if any). 1081 * (This is an internal implementation for enablePackage function) 1082 * <p> 1083 * @note Subclasses of the SBML Core package in which one or more child 1084 * elements are defined must override this function. 1085 * @internal 1086 */ public 1087 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 1088 libsbmlJNI.Event_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 1089 } 1090 1091 1092/** 1093 * Returns the libSBML type code of this object instance. 1094 * <p> 1095 * LibSBML attaches an identifying code to every 1096 * kind of SBML object. These are known as <em>SBML type codes</em>. In 1097 * other languages, the set of type codes is stored in an enumeration; in 1098 * the Java language interface for libSBML, the type codes are defined as 1099 * static integer constants in the interface class {@link 1100 * libsbmlConstants}. The names of the type codes all begin with the 1101 * characters <code>SBML_.</code> 1102 * <p> 1103 * @return the SBML type code for this object, or {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (default). 1104 * <p> 1105 * @see #getElementName() 1106 */ public 1107 int getTypeCode() { 1108 return libsbmlJNI.Event_getTypeCode(swigCPtr, this); 1109 } 1110 1111 1112/** 1113 * Returns the XML element name of this object, which for {@link Event}, is 1114 * always <code>'event'.</code> 1115 * <p> 1116 * @return the name of this element, i.e., <code>'event'.</code> 1117 */ public 1118 String getElementName() { 1119 return libsbmlJNI.Event_getElementName(swigCPtr, this); 1120 } 1121 1122 1123/** 1124 * Predicate returning <code>true</code> if all the required attributes for this 1125 * {@link Event} object have been set. 1126 * <p> 1127 * @note The required attributes for a {@link Event} object are: 1128 * <ul> 1129 * <li> 'useValuesfromTriggerTime' (required in SBML Level 3) 1130 * </ul> 1131 */ public 1132 boolean hasRequiredAttributes() { 1133 return libsbmlJNI.Event_hasRequiredAttributes(swigCPtr, this); 1134 } 1135 1136 1137/** 1138 * Predicate returning <code>true</code> if 1139 * all the required elements for this {@link Event} object 1140 * have been set. 1141 * <p> 1142 * @note The required elements for a {@link Event} object are: 1143 * <ul> 1144 * <li> 'trigger' 1145 * <li> 'listOfEventAssignments' (required in SBML Level 2, optional in Level 3) 1146 * </ul> 1147 */ public 1148 boolean hasRequiredElements() { 1149 return libsbmlJNI.Event_hasRequiredElements(swigCPtr, this); 1150 } 1151 1152}