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 *  The trigger expression for an SBML <em>event</em>.
013 <p>
014 * An {@link Event} object defines when the event can occur, the variables that are
015 * affected by the event, and how the variables are affected.  The {@link Trigger}
016 * construct in SBML is used to define a mathematical expression that
017 * determines when an {@link Event} is <em>triggered</em>.
018 <p>
019 * A {@link Trigger} object in SBML Level&nbsp;2 and Level&nbsp;3 contains one
020 * subelement named 'math' containing a MathML expression.  The expression
021 * is evaluated as a value of type <code>boolean.</code>  The exact moment at which
022 * the expression evaluates to <code>true</code> is the time point when the {@link Event} is
023 * <em>triggered</em>.  In SBML Level&nbsp;3, {@link Trigger} has additional attributes
024 * that must be assigned values; they are discussed in a separate section
025 * below.
026 <p>
027 * In SBML Level&nbsp;2 and SBML Level&nbsp;3 Version&nbsp;1, the 'math'
028 * subelement is required, and it must evaluate to a <code>boolean</code> expression.
029 * In SBML Level&nbsp;3 Version&nbsp;2, those restrictions are relaxed:
030 * the 'math' element is optional, and numeric values are allowed in 
031 * Boolean contexts (a '0' is interpreted as <code>false</code>, and all other
032 * values are interpreted as <code>true</code>).  If a {@link Trigger} with no 'math'
033 * is present in an {@link Event}, that {@link Event} will never <em>trigger</em>, unless that
034 * missing information is included in an SBML Level&nbsp;3 package.
035 <p>
036 * An event only <em>triggers</em> when its {@link Trigger} expression makes the
037 * transition in value from <code>false</code> to <code>true.</code>  The event will also
038 * trigger at any subsequent time points when the trigger makes this
039 * transition; in other words, an event can be triggered multiple times
040 * during a simulation if its trigger condition makes the transition from
041 * <code>false</code> to <code>true</code> more than once.  In SBML Level&nbsp;3, the behavior
042 * at the very start of simulation (i.e., at <em>t = 0</em>, where
043 * <em>t</em> stands for time) is determined in part by the boolean flag
044 * 'initialValue'.  This and other additional features introduced in SBML
045 * Level&nbsp;3 are discussed further below.
046 <p>
047 * <h2>Version differences</h2>
048 <p>
049 * SBML Level&nbsp;3 Version&nbsp;1 introduces two required attributes
050 * on the {@link Trigger} object: 'persistent' and 'initialValue'.  The rest of
051 * this introduction describes these two attributes.
052 <p>
053 * <h3>The 'persistent' attribute on {@link Trigger}</h3>
054 <p>
055 * In the interval between when an {@link Event} object <em>triggers</em> (i.e.,
056 * its {@link Trigger} object expression transitions in value from <code>false</code> to
057 * <code>true</code>) and when its assignments are to be <em>executed</em>, conditions
058 * in the model may change such that the trigger expression transitions
059 * back from <code>true</code> to <code>false.</code>  Should the event's assignments still be
060 * made if this happens?  Answering this question is the purpose of the
061 * 'persistent' attribute on {@link Trigger}.
062 <p>
063 * If the boolean attribute 'persistent' has a value of <code>true</code>, then once
064 * the event is triggered, all of its assignments are always performed when
065 * the time of execution is reached.  The name <em>persistent</em> is meant to
066 * evoke the idea that the trigger expression does not have to be
067 * re-checked after it triggers if 'persistent'=<code>true.</code>  Conversely, if
068 * the attribute value is <code>false</code>, then the trigger expression is not
069 * assumed to persist: if the expression transitions in value back to
070 * <code>false</code> at any time between when the event triggered and when it is to be
071 * executed, the event is no longer considered to have triggered and its
072 * assignments are not executed.  (If the trigger expression transitions
073 * once more to <code>true</code> after that point, then the event is triggered, but
074 * this then constitutes a whole new event trigger-and-execute sequence.)
075 <p>
076 * The 'persistent' attribute can be especially useful when {@link Event} objects
077 * contain {@link Delay} objects, but it is relevant even in a model without delays
078 * if the model contains two or more events.  As explained in the
079 * introduction to this section, the operation of all events in SBML
080 * (delayed or not) is conceptually divided into two phases,
081 * <em>triggering</em> and <em>execution</em>; however, unless events have
082 * priorities associated with them, SBML does not mandate a particular
083 * ordering of event execution in the case of simultaneous events.  Models
084 * with multiple events can lead to situations where the execution of one
085 * event affects another event's trigger expression value.  If that other
086 * event has 'persistent'=<code>false</code>, and its trigger expression evaluates to
087 * <code>false</code> before it is to be executed, the event must not be executed
088 * after all.
089 <p>
090 * <h3>The 'initialValue' attribute on {@link Trigger}</h3>
091 <p>
092 * As mentioned above, an event <em>triggers</em> when the mathematical
093 * expression in its {@link Trigger} object transitions in value from <code>false</code> to
094 * <code>true.</code>  An unanswered question concerns what happens at the start of a
095 * simulation: can event triggers make this transition at <em>t = 0</em>,
096 * where <em>t</em> stands for time?
097 <p>
098 * In order to determine whether an event may trigger at <em>t = 0</em>, it
099 * is necessary to know what value the {@link Trigger} object's 'math' expression
100 * had immediately prior to <em>t = 0</em>.  This starting value of the
101 * trigger expression is determined by the value of the boolean attribute
102 * 'initialValue'.  A value of <code>true</code> means the trigger expression is
103 * taken to have the value <code>true</code> immediately prior to <em>t = 0</em>.  In
104 * that case, the trigger cannot transition in value from <code>false</code> to
105 * <code>true</code> at the moment simulation begins (because it has the value <code>true</code>
106 * both before and after <em>t = 0</em>), and can only make the transition
107 * from <code>false</code> to <code>true</code> sometime <em>after</em> <em>t = 0</em>.  (To do
108 * that, it would also first have to transition to <code>false</code> before it could
109 * make the transition from <code>false</code> back to <code>true.</code>)  Conversely, if
110 * 'initialValue'=<code>false</code>, then the trigger expression is assumed to start
111 * with the value <code>false</code>, and therefore may trigger at <em>t = 0</em> if
112 * the expression evaluates to <code>true</code> at that moment.
113 <p>
114 * @see Event
115 * @see Delay
116 * @see EventAssignment
117 */
118
119public class Trigger extends SBase {
120   private long swigCPtr;
121
122   protected Trigger(long cPtr, boolean cMemoryOwn)
123   {
124     super(libsbmlJNI.Trigger_SWIGUpcast(cPtr), cMemoryOwn);
125     swigCPtr = cPtr;
126   }
127
128   protected static long getCPtr(Trigger obj)
129   {
130     return (obj == null) ? 0 : obj.swigCPtr;
131   }
132
133   protected static long getCPtrAndDisown (Trigger obj)
134   {
135     long ptr = 0;
136
137     if (obj != null)
138     {
139       ptr             = obj.swigCPtr;
140       obj.swigCMemOwn = false;
141     }
142
143     return ptr;
144   }
145
146  protected void finalize() {
147    delete();
148  }
149
150  public synchronized void delete() {
151    if (swigCPtr != 0) {
152      if (swigCMemOwn) {
153        swigCMemOwn = false;
154        libsbmlJNI.delete_Trigger(swigCPtr);
155      }
156      swigCPtr = 0;
157    }
158    super.delete();
159  }
160
161  
162/**
163   * Creates a new {@link Trigger} using the given SBML <code>level</code> and <code>version</code>
164   * values.
165   <p>
166   * @param level a long integer, the SBML Level to assign to this {@link Trigger}.
167   <p>
168   * @param version a long integer, the SBML Version to assign to this
169   * {@link Trigger}.
170   <p>
171   * <p>
172 * @throws SBMLConstructorException
173 * Thrown if the given <code>level</code> and <code>version</code> combination are invalid
174 * or if this object is incompatible with the given level and version.
175   <p>
176   * <p>
177 * @note Attempting to add an object to an {@link SBMLDocument} having a different
178 * combination of SBML Level, Version and XML namespaces than the object
179 * itself will result in an error at the time a caller attempts to make the
180 * addition.  A parent object must have compatible Level, Version and XML
181 * namespaces.  (Strictly speaking, a parent may also have more XML
182 * namespaces than a child, but the reverse is not permitted.)  The
183 * restriction is necessary to ensure that an SBML model has a consistent
184 * overall structure.  This requires callers to manage their objects
185 * carefully, but the benefit is increased flexibility in how models can be
186 * created by permitting callers to create objects bottom-up if desired.  In
187 * situations where objects are not yet attached to parents (e.g.,
188 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
189 * libSBML determine such things as whether it is valid to assign a
190 * particular value to an attribute.
191   */ public
192 Trigger(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
193    this(libsbmlJNI.new_Trigger__SWIG_0(level, version), true);
194  }
195
196  
197/**
198   * Creates a new {@link Trigger} using the given {@link SBMLNamespaces} object
199   * <code>sbmlns</code>.
200   <p>
201   * <p>
202 * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
203 * information.  It is used to communicate the SBML Level, Version, and (in
204 * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
205 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
206 * {@link SBMLNamespaces} object somewhere in a program once, then hand that object
207 * as needed to object constructors that accept {@link SBMLNamespaces} as arguments. 
208   <p>
209   * @param sbmlns an {@link SBMLNamespaces} object.
210   <p>
211   * <p>
212 * @throws SBMLConstructorException
213 * Thrown if the given <code>sbmlns</code> is inconsistent or incompatible
214 * with this object.
215   <p>
216   * <p>
217 * @note Attempting to add an object to an {@link SBMLDocument} having a different
218 * combination of SBML Level, Version and XML namespaces than the object
219 * itself will result in an error at the time a caller attempts to make the
220 * addition.  A parent object must have compatible Level, Version and XML
221 * namespaces.  (Strictly speaking, a parent may also have more XML
222 * namespaces than a child, but the reverse is not permitted.)  The
223 * restriction is necessary to ensure that an SBML model has a consistent
224 * overall structure.  This requires callers to manage their objects
225 * carefully, but the benefit is increased flexibility in how models can be
226 * created by permitting callers to create objects bottom-up if desired.  In
227 * situations where objects are not yet attached to parents (e.g.,
228 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
229 * libSBML determine such things as whether it is valid to assign a
230 * particular value to an attribute.
231   */ public
232 Trigger(SBMLNamespaces sbmlns) throws org.sbml.libsbml.SBMLConstructorException {
233    this(libsbmlJNI.new_Trigger__SWIG_1(SBMLNamespaces.getCPtr(sbmlns), sbmlns), true);
234  }
235
236  
237/**
238   * Copy constructor; creates a copy of this {@link Trigger}.
239   <p>
240   * @param orig the object to copy.
241   */ public
242 Trigger(Trigger orig) throws org.sbml.libsbml.SBMLConstructorException {
243    this(libsbmlJNI.new_Trigger__SWIG_2(Trigger.getCPtr(orig), orig), true);
244  }
245
246  
247/**
248   * Creates and returns a deep copy of this {@link Trigger} object.
249   <p>
250   * @return the (deep) copy of this {@link Trigger} object.
251   */ public
252 Trigger cloneObject() {
253    long cPtr = libsbmlJNI.Trigger_cloneObject(swigCPtr, this);
254    return (cPtr == 0) ? null : new Trigger(cPtr, true);
255  }
256
257  
258/**
259   * Get the mathematical formula for the trigger and return it
260   * as an AST.
261   <p>
262   * @return the math of this {@link Trigger}, or <code>null</code> if the math is not set.
263   */ public
264 ASTNode getMath() {
265    long cPtr = libsbmlJNI.Trigger_getMath(swigCPtr, this);
266    return (cPtr == 0) ? null : new ASTNode(cPtr, false);
267  }
268
269  
270/**
271   * (SBML Level&nbsp;3 only) Get the value of the 'initialValue' attribute
272   * of this {@link Trigger}.
273   <p>
274   * @return the boolean value stored as the 'initialValue' attribute value
275   * in this {@link Trigger}.
276   <p>
277   * @note The attribute 'initialValue' is available in SBML Level&nbsp;3,
278   * but is not present in lower Levels of SBML.
279   */ public
280 boolean getInitialValue() {
281    return libsbmlJNI.Trigger_getInitialValue(swigCPtr, this);
282  }
283
284  
285/**
286   * (SBML Level&nbsp;3 only) Get the value of the 'persistent' attribute
287   * of this {@link Trigger}.
288   <p>
289   * @return the boolean value stored as the 'persistent' attribute value
290   * in this {@link Trigger}.
291   <p>
292   * @note The attribute 'persistent' is available in SBML Level&nbsp;3,
293   * but is not present in lower Levels of SBML.
294   */ public
295 boolean getPersistent() {
296    return libsbmlJNI.Trigger_getPersistent(swigCPtr, this);
297  }
298
299  
300/**
301   * Predicate to test whether the math for this trigger is set.
302   <p>
303   * @return <code>true</code> if the formula (meaning the 'math' subelement) of
304   * this {@link Trigger} is set, <code>false</code> otherwise.
305   */ public
306 boolean isSetMath() {
307    return libsbmlJNI.Trigger_isSetMath(swigCPtr, this);
308  }
309
310  
311/**
312   * (SBML Level&nbsp;3 only) Predicate to test whether the 'initialValue'
313   * attribute for this trigger is set.
314   <p>
315   * @return <code>true</code> if the initialValue attribute of
316   * this {@link Trigger} is set, <code>false</code> otherwise.
317   <p>
318   * @note The attribute 'initialValue' is available in SBML Level&nbsp;3,
319   * but is not present in lower Levels of SBML.
320   */ public
321 boolean isSetInitialValue() {
322    return libsbmlJNI.Trigger_isSetInitialValue(swigCPtr, this);
323  }
324
325  
326/**
327   * (SBML Level&nbsp;3 only) Predicate to test whether the 'persistent'
328   * attribute for this trigger is set.
329   <p>
330   * @return <code>true</code> if the persistent attribute of
331   * this {@link Trigger} is set, <code>false</code> otherwise.
332   <p>
333   * @note The attribute 'persistent' is available in SBML Level&nbsp;3,
334   * but is not present in lower Levels of SBML.
335   */ public
336 boolean isSetPersistent() {
337    return libsbmlJNI.Trigger_isSetPersistent(swigCPtr, this);
338  }
339
340  
341/**
342   * Sets the trigger expression of this {@link Trigger} instance to a copy of the given
343   * {@link ASTNode}.
344   <p>
345   * @param math an {@link ASTNode} representing a formula tree.
346   <p>
347   * <p>
348 * @return integer value indicating success/failure of the
349 * function.   The possible values
350 * returned by this function are:
351   * <ul>
352   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
353   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
354   * </ul>
355   */ public
356 int setMath(ASTNode math) {
357    return libsbmlJNI.Trigger_setMath(swigCPtr, this, ASTNode.getCPtr(math), math);
358  }
359
360  
361/**
362   * (SBML Level&nbsp;3 only) Sets the 'initialValue' attribute of this {@link Trigger} instance.
363   <p>
364   * @param initialValue a boolean representing the initialValue to be set.
365   <p>
366   * <p>
367 * @return integer value indicating success/failure of the
368 * function.   The possible values
369 * returned by this function are:
370   * <ul>
371   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
372   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
373   *
374   * </ul> <p>
375   * @note The attribute 'initialValue' is available in SBML Level&nbsp;3,
376   * but is not present in lower Levels of SBML.
377   */ public
378 int setInitialValue(boolean initialValue) {
379    return libsbmlJNI.Trigger_setInitialValue(swigCPtr, this, initialValue);
380  }
381
382  
383/**
384   * (SBML Level&nbsp;3 only) Sets the 'persistent' attribute of this {@link Trigger} instance.
385   <p>
386   * @param persistent a boolean representing the persistent value to be set.
387   <p>
388   * <p>
389 * @return integer value indicating success/failure of the
390 * function.   The possible values
391 * returned by this function are:
392   * <ul>
393   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
394   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
395   *
396   * </ul> <p>
397   * @note The attribute 'persistent' is available in SBML Level&nbsp;3,
398   * but is not present in lower Levels of SBML.
399   */ public
400 int setPersistent(boolean persistent) {
401    return libsbmlJNI.Trigger_setPersistent(swigCPtr, this, persistent);
402  }
403
404  
405/**
406   * (SBML Level&nbsp;3 only) Unsets the 'initialValue' attribute of this 
407   * {@link Trigger} instance.
408   <p>
409   * <p>
410 * @return integer value indicating success/failure of the
411 * function.   The possible values
412 * returned by this function are:
413   * <ul>
414   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
415   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
416   *
417   * </ul> <p>
418   * @note The attribute 'initialValue' is available in SBML Level&nbsp;3,
419   * but is not present in lower Levels of SBML.
420   */ public
421 int unsetInitialValue() {
422    return libsbmlJNI.Trigger_unsetInitialValue(swigCPtr, this);
423  }
424
425  
426/**
427   * (SBML Level&nbsp;3 only) Unsets the 'persistent' attribute of this 
428   * {@link Trigger} instance.
429   <p>
430   * <p>
431 * @return integer value indicating success/failure of the
432 * function.   The possible values
433 * returned by this function are:
434   * <ul>
435   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
436   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
437   *
438   * </ul> <p>
439   * @note The attribute 'persistent' is available in SBML Level&nbsp;3,
440   * but is not present in lower Levels of SBML.
441   */ public
442 int unsetPersistent() {
443    return libsbmlJNI.Trigger_unsetPersistent(swigCPtr, this);
444  }
445
446  
447/**
448   * Returns the libSBML type code of this object instance.
449   <p>
450   * <p>
451 * LibSBML attaches an identifying code to every kind of SBML object.  These
452 * are integer constants known as <em>SBML type codes</em>.  The names of all
453 * the codes begin with the characters <code>SBML_</code>.
454 * In the Java language interface for libSBML, the
455 * type codes are defined as static integer constants in the interface class
456 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
457 * package plug-ins may use overlapping type codes; to identify the package
458 * to which a given object belongs, call the 
459 * <code>{@link SBase#getPackageName()}
460 * </code>
461 * method on the object.
462   <p>
463   * @return the SBML type code for this object:
464   * {@link libsbmlConstants#SBML_TRIGGER SBML_TRIGGER} (default).
465   <p>
466   * <p>
467 * @warning <span class='warning'>The specific integer values of the possible
468 * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
469 * packages,  To fully identify the correct code, <strong>it is necessary to
470 * invoke both getTypeCode() and getPackageName()</strong>.</span>
471   <p>
472   * @see #getElementName()
473   * @see #getPackageName()
474   */ public
475 int getTypeCode() {
476    return libsbmlJNI.Trigger_getTypeCode(swigCPtr, this);
477  }
478
479  
480/**
481   * Returns the XML element name of this object, which for {@link Trigger}, is
482   * always <code>'trigger'.</code>
483   <p>
484   * @return the name of this element, i.e., <code>'trigger'.</code> 
485   */ public
486 String getElementName() {
487    return libsbmlJNI.Trigger_getElementName(swigCPtr, this);
488  }
489
490  
491/**
492   * <p>
493 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another
494 * value.
495 <p>
496 * <p>
497 * In SBML, object identifiers are of a data type called <code>SId</code>.
498 * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
499 * introduced for attribute values that refer to <code>SId</code> values; in
500 * previous Levels of SBML, this data type did not exist and attributes were
501 * simply described to as 'referring to an identifier', but the effective
502 * data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
503 * other methods of libSBML refer to the type <code>SIdRef</code> for all
504 * Levels of SBML, even if the corresponding SBML specification did not
505 * explicitly name the data type.
506 <p>
507 * This method works by looking at all attributes and (if appropriate)
508 * mathematical formulas in MathML content, comparing the referenced
509 * identifiers to the value of <code>oldid</code>.  If any matches are found, the
510 * matching values are replaced with <code>newid</code>.  The method does <em>not</em>
511 * descend into child elements.
512 <p>
513 * @param oldid the old identifier.
514 * @param newid the new identifier.
515   */ public
516 void renameSIdRefs(String oldid, String newid) {
517    libsbmlJNI.Trigger_renameSIdRefs(swigCPtr, this, oldid, newid);
518  }
519
520  
521/**
522   * <p>
523 * Replaces all uses of a given <code>UnitSIdRef</code> type attribute value with
524 * another value.
525 <p>
526 * <p>
527 * In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
528 * SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
529 * introduced for attribute values that refer to <code>UnitSId</code> values; in
530 * previous Levels of SBML, this data type did not exist and attributes were
531 * simply described to as 'referring to a unit identifier', but the effective
532 * data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
533 * other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
534 * Levels of SBML, even if the corresponding SBML specification did not
535 * explicitly name the data type.
536 <p>
537 * This method works by looking at all unit identifier attribute values
538 * (including, if appropriate, inside mathematical formulas), comparing the
539 * referenced unit identifiers to the value of <code>oldid</code>.  If any matches
540 * are found, the matching values are replaced with <code>newid</code>.  The method
541 * does <em>not</em> descend into child elements.
542 <p>
543 * @param oldid the old identifier.
544 * @param newid the new identifier.
545   */ public
546 void renameUnitSIdRefs(String oldid, String newid) {
547    libsbmlJNI.Trigger_renameUnitSIdRefs(swigCPtr, this, oldid, newid);
548  }
549
550  
551/** * @internal */ public
552 void replaceSIDWithFunction(String id, ASTNode function) {
553    libsbmlJNI.Trigger_replaceSIDWithFunction(swigCPtr, this, id, ASTNode.getCPtr(function), function);
554  }
555
556  
557/**
558   * Predicate returning <code>true</code> if
559   * all the required elements for this {@link Trigger} object
560   * have been set.
561   <p>
562   * @note The required elements for a {@link Trigger} object are:
563   * <ul>
564   * <li> 'math' inSBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1.  
565   *     (In SBML Level&nbsp;3 Version&nbsp;2+, it is no longer required.)
566   *
567   * </ul> <p>
568   * @return a boolean value indicating whether all the required
569   * elements for this object have been defined.
570   */ public
571 boolean hasRequiredElements() {
572    return libsbmlJNI.Trigger_hasRequiredElements(swigCPtr, this);
573  }
574
575  
576/**
577   * Predicate returning <code>true</code> if
578   * all the required attributes for this {@link Trigger} object
579   * have been set.
580   <p>
581   * The required attributes for a {@link Trigger} object are:
582   * <ul>
583   * <li> 'persistent' (required in SBML Level&nbsp;3)
584   * <li> 'initialValue' (required in SBML Level&nbsp;3)
585   *
586   * </ul> <p>
587   * @return a boolean value indicating whether all the required
588   * attributes for this object have been defined.
589   */ public
590 boolean hasRequiredAttributes() {
591    return libsbmlJNI.Trigger_hasRequiredAttributes(swigCPtr, this);
592  }
593
594  
595/**
596   * Finds this {@link Trigger}'s {@link Event} parent and calls unsetTrigger() on it, indirectly deleting itself.  Overridden from the {@link SBase} function since the parent is not a {@link ListOf}.
597   <p>
598   * <p>
599 * @return integer value indicating success/failure of the
600 * function.   The possible values
601 * returned by this function are:
602   * <ul>
603   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
604   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
605   * </ul>
606   */ public
607 int removeFromParentAndDelete() {
608    return libsbmlJNI.Trigger_removeFromParentAndDelete(swigCPtr, this);
609  }
610
611}