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