001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.0.7
004 *
005 * Do not make changes to this file unless you know what you are doing--modify
006 * the SWIG interface file instead.
007 * ----------------------------------------------------------------------------- */
008
009package org.sbml.libsbml;
010
011/** 
012 * <span class="pkg-marker pkg-color-qual"><a href="group__qual.html">qual</a></span>
013
014 The output from a {@link QualitativeSpecies}.
015 <p>
016 * Each {@link Output} refers to a {@link QualitativeSpecies} that participates in (is
017 * affected by) the corresponding {@link Transition}. In Petri net models these are
018 * the output places of the transition.
019 <p>
020 * In a logical model, a {@link QualitativeSpecies} should be referenced in at most
021 * one {@link ListOfOutputs}, (that of the {@link Transition} defining the evolution of this
022 * species). When a {@link Transition} has several outputs, it is because the
023 * referenced species share the same regulators and the same logical rules.
024 */
025
026public class Output extends SBase {
027   private long swigCPtr;
028
029   protected Output(long cPtr, boolean cMemoryOwn)
030   {
031     super(libsbmlJNI.Output_SWIGUpcast(cPtr), cMemoryOwn);
032     swigCPtr = cPtr;
033   }
034
035   protected static long getCPtr(Output obj)
036   {
037     return (obj == null) ? 0 : obj.swigCPtr;
038   }
039
040   protected static long getCPtrAndDisown (Output obj)
041   {
042     long ptr = 0;
043
044     if (obj != null)
045     {
046       ptr             = obj.swigCPtr;
047       obj.swigCMemOwn = false;
048     }
049
050     return ptr;
051   }
052
053  protected void finalize() {
054    delete();
055  }
056
057  public synchronized void delete() {
058    if (swigCPtr != 0) {
059      if (swigCMemOwn) {
060        swigCMemOwn = false;
061        libsbmlJNI.delete_Output(swigCPtr);
062      }
063      swigCPtr = 0;
064    }
065    super.delete();
066  }
067
068  
069/**
070   * Creates a new {@link Output} with the given level, version, and package version.
071   <p>
072   * @param level a long integer, the SBML Level to assign to this {@link Output}
073   <p>
074   * @param version a long integer, the SBML Version to assign to this {@link Output}
075   <p>
076   * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Output}
077   */ public
078 Output(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
079    this(libsbmlJNI.new_Output__SWIG_0(level, version, pkgVersion), true);
080  }
081
082  
083/**
084   * Creates a new {@link Output} with the given level, version, and package version.
085   <p>
086   * @param level a long integer, the SBML Level to assign to this {@link Output}
087   <p>
088   * @param version a long integer, the SBML Version to assign to this {@link Output}
089   <p>
090   * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Output}
091   */ public
092 Output(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
093    this(libsbmlJNI.new_Output__SWIG_1(level, version), true);
094  }
095
096  
097/**
098   * Creates a new {@link Output} with the given level, version, and package version.
099   <p>
100   * @param level a long integer, the SBML Level to assign to this {@link Output}
101   <p>
102   * @param version a long integer, the SBML Version to assign to this {@link Output}
103   <p>
104   * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Output}
105   */ public
106 Output(long level) throws org.sbml.libsbml.SBMLConstructorException {
107    this(libsbmlJNI.new_Output__SWIG_2(level), true);
108  }
109
110  
111/**
112   * Creates a new {@link Output} with the given level, version, and package version.
113   <p>
114   * @param level a long integer, the SBML Level to assign to this {@link Output}
115   <p>
116   * @param version a long integer, the SBML Version to assign to this {@link Output}
117   <p>
118   * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Output}
119   */ public
120 Output() throws org.sbml.libsbml.SBMLConstructorException {
121    this(libsbmlJNI.new_Output__SWIG_3(), true);
122  }
123
124  
125/**
126   * Creates a new {@link Output} with the given {@link QualPkgNamespaces} object.
127   <p>
128   * @param qualns the {@link QualPkgNamespaces} object
129   */ public
130 Output(QualPkgNamespaces qualns) throws org.sbml.libsbml.SBMLConstructorException {
131    this(libsbmlJNI.new_Output__SWIG_4(QualPkgNamespaces.getCPtr(qualns), qualns), true);
132  }
133
134  
135/**
136   * Copy constructor for {@link Output}.
137   <p>
138   * @param orig the {@link Output} instance to copy.
139   */ public
140 Output(Output orig) throws org.sbml.libsbml.SBMLConstructorException {
141    this(libsbmlJNI.new_Output__SWIG_5(Output.getCPtr(orig), orig), true);
142  }
143
144  
145/**
146   * Creates and returns a deep copy of this {@link Output} object.
147   <p>
148   * @return a (deep) copy of this {@link Output} object.
149   */ public
150 Output cloneObject() {
151    long cPtr = libsbmlJNI.Output_cloneObject(swigCPtr, this);
152    return (cPtr == 0) ? null : new Output(cPtr, true);
153  }
154
155  
156/**
157   * Returns the value of the 'id' attribute of this {@link Output}.
158   <p>
159   * @return the value of the 'id' attribute of this {@link Output} as a string.
160   */ public
161 String getId() {
162    return libsbmlJNI.Output_getId(swigCPtr, this);
163  }
164
165  
166/**
167   * Returns the value of the 'qualitativeSpecies' attribute of this {@link Output}.
168   <p>
169   * @return the value of the 'qualitativeSpecies' attribute of this {@link Output} as a string.
170   */ public
171 String getQualitativeSpecies() {
172    return libsbmlJNI.Output_getQualitativeSpecies(swigCPtr, this);
173  }
174
175  
176/**
177   * Returns the value of the 'transitionEffect' attribute of this {@link Output}.
178   <p>
179   * @return the value of the 'transitionEffect' attribute of this {@link Output} as a string.
180   */ public
181 int getTransitionEffect() {
182    return libsbmlJNI.Output_getTransitionEffect(swigCPtr, this);
183  }
184
185  
186/**
187   * Returns the value of the 'name' attribute of this {@link Output}.
188   <p>
189   * @return the value of the 'name' attribute of this {@link Output} as a string.
190   */ public
191 String getName() {
192    return libsbmlJNI.Output_getName(swigCPtr, this);
193  }
194
195  
196/**
197   * Returns the value of the 'outputLevel' attribute of this {@link Output}.
198   <p>
199   * @return the value of the 'outputLevel' attribute of this {@link Output} as a integer.
200   */ public
201 int getOutputLevel() {
202    return libsbmlJNI.Output_getOutputLevel(swigCPtr, this);
203  }
204
205  
206/**
207   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
208   * {@link Output}'s 'id' attribute has been set.
209   <p>
210   * @return <code>true</code> if this {@link Output}'s 'id' attribute has been set,
211   * otherwise <code>false</code> is returned.
212   */ public
213 boolean isSetId() {
214    return libsbmlJNI.Output_isSetId(swigCPtr, this);
215  }
216
217  
218/**
219   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
220   * {@link Output}'s 'qualitativeSpecies' attribute has been set.
221   <p>
222   * @return <code>true</code> if this {@link Output}'s 'qualitativeSpecies' attribute has been set,
223   * otherwise <code>false</code> is returned.
224   */ public
225 boolean isSetQualitativeSpecies() {
226    return libsbmlJNI.Output_isSetQualitativeSpecies(swigCPtr, this);
227  }
228
229  
230/**
231   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
232   * {@link Output}'s 'transitionEffect' attribute has been set.
233   <p>
234   * @return <code>true</code> if this {@link Output}'s 'transitionEffect' attribute has been set,
235   * otherwise <code>false</code> is returned.
236   */ public
237 boolean isSetTransitionEffect() {
238    return libsbmlJNI.Output_isSetTransitionEffect(swigCPtr, this);
239  }
240
241  
242/**
243   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
244   * {@link Output}'s 'name' attribute has been set.
245   <p>
246   * @return <code>true</code> if this {@link Output}'s 'name' attribute has been set,
247   * otherwise <code>false</code> is returned.
248   */ public
249 boolean isSetName() {
250    return libsbmlJNI.Output_isSetName(swigCPtr, this);
251  }
252
253  
254/**
255   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
256   * {@link Output}'s 'outputLevel' attribute has been set.
257   <p>
258   * @return <code>true</code> if this {@link Output}'s 'outputLevel' attribute has been set,
259   * otherwise <code>false</code> is returned.
260   */ public
261 boolean isSetOutputLevel() {
262    return libsbmlJNI.Output_isSetOutputLevel(swigCPtr, this);
263  }
264
265  
266/**
267   * Sets the value of the 'id' attribute of this {@link Output}.
268   <p>
269   * @param id String value of the 'id' attribute to be set
270   <p>
271   * <p>
272 * @return integer value indicating success/failure of the
273 * function.   The possible values
274 * returned by this function are:
275   * <ul>
276   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
277   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
278   * </ul>
279   */ public
280 int setId(String id) {
281    return libsbmlJNI.Output_setId(swigCPtr, this, id);
282  }
283
284  
285/**
286   * Sets the value of the 'qualitativeSpecies' attribute of this {@link Output}.
287   <p>
288   * @param qualitativeSpecies String value of the 'qualitativeSpecies' attribute to be set
289   <p>
290   * <p>
291 * @return integer value indicating success/failure of the
292 * function.   The possible values
293 * returned by this function are:
294   * <ul>
295   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
296   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
297   * </ul>
298   */ public
299 int setQualitativeSpecies(String qualitativeSpecies) {
300    return libsbmlJNI.Output_setQualitativeSpecies(swigCPtr, this, qualitativeSpecies);
301  }
302
303  
304/**
305   * Sets the value of the 'transitionEffect' attribute of this {@link Output}.
306   <p>
307   * @param transitionEffect String value of the 'transitionEffect' attribute to be set
308   <p>
309   * <p>
310 * @return integer value indicating success/failure of the
311 * function.   The possible values
312 * returned by this function are:
313   * <ul>
314   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
315   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
316   * </ul>
317   */ public
318 int setTransitionEffect(int transitionEffect) {
319    return libsbmlJNI.Output_setTransitionEffect(swigCPtr, this, transitionEffect);
320  }
321
322  
323/**
324   * Sets the value of the 'name' attribute of this {@link Output}.
325   <p>
326   * @param name String value of the 'name' attribute to be set
327   <p>
328   * <p>
329 * @return integer value indicating success/failure of the
330 * function.   The possible values
331 * returned by this function are:
332   * <ul>
333   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
334   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
335   * </ul>
336   */ public
337 int setName(String name) {
338    return libsbmlJNI.Output_setName(swigCPtr, this, name);
339  }
340
341  
342/**
343   * Sets the value of the 'outputLevel' attribute of this {@link Output}.
344   <p>
345   * @param outputLevel int value of the 'outputLevel' attribute to be set
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_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
354   * </ul>
355   */ public
356 int setOutputLevel(int outputLevel) {
357    return libsbmlJNI.Output_setOutputLevel(swigCPtr, this, outputLevel);
358  }
359
360  
361/**
362   * Unsets the value of the 'id' attribute of this {@link Output}.
363   <p>
364   * <p>
365 * @return integer value indicating success/failure of the
366 * function.   The possible values
367 * returned by this function are:
368   * <ul>
369   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
370   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
371   * </ul>
372   */ public
373 int unsetId() {
374    return libsbmlJNI.Output_unsetId(swigCPtr, this);
375  }
376
377  
378/**
379   * Unsets the value of the 'qualitativeSpecies' attribute of this {@link Output}.
380   <p>
381   * <p>
382 * @return integer value indicating success/failure of the
383 * function.   The possible values
384 * returned by this function are:
385   * <ul>
386   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
387   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
388   * </ul>
389   */ public
390 int unsetQualitativeSpecies() {
391    return libsbmlJNI.Output_unsetQualitativeSpecies(swigCPtr, this);
392  }
393
394  
395/**
396   * Unsets the value of the 'transitionEffect' attribute of this {@link Output}.
397   <p>
398   * <p>
399 * @return integer value indicating success/failure of the
400 * function.   The possible values
401 * returned by this function are:
402   * <ul>
403   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
404   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
405   * </ul>
406   */ public
407 int unsetTransitionEffect() {
408    return libsbmlJNI.Output_unsetTransitionEffect(swigCPtr, this);
409  }
410
411  
412/**
413   * Unsets the value of the 'name' attribute of this {@link Output}.
414   <p>
415   * <p>
416 * @return integer value indicating success/failure of the
417 * function.   The possible values
418 * returned by this function are:
419   * <ul>
420   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
421   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
422   * </ul>
423   */ public
424 int unsetName() {
425    return libsbmlJNI.Output_unsetName(swigCPtr, this);
426  }
427
428  
429/**
430   * Unsets the value of the 'outputLevel' attribute of this {@link Output}.
431   <p>
432   * <p>
433 * @return integer value indicating success/failure of the
434 * function.   The possible values
435 * returned by this function are:
436   * <ul>
437   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
438   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
439   * </ul>
440   */ public
441 int unsetOutputLevel() {
442    return libsbmlJNI.Output_unsetOutputLevel(swigCPtr, this);
443  }
444
445  
446/**
447   * <p>
448 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another
449 * value.
450 <p>
451 * <p>
452 * In SBML, object identifiers are of a data type called <code>SId</code>.
453 * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
454 * introduced for attribute values that refer to <code>SId</code> values; in
455 * previous Levels of SBML, this data type did not exist and attributes were
456 * simply described to as 'referring to an identifier', but the effective
457 * data type was the same as <code>SIdRef</code>in Level&nbsp;3.  These and
458 * other methods of libSBML refer to the type <code>SIdRef</code> for all
459 * Levels of SBML, even if the corresponding SBML specification did not
460 * explicitly name the data type.
461 <p>
462 * This method works by looking at all attributes and (if appropriate)
463 * mathematical formulas in MathML content, comparing the referenced
464 * identifiers to the value of <code>oldid</code>.  If any matches are found, the
465 * matching values are replaced with <code>newid</code>.  The method does <em>not</em>
466 * descend into child elements.
467 <p>
468 * @param oldid the old identifier
469 * @param newid the new identifier
470   */ public
471 void renameSIdRefs(String oldid, String newid) {
472    libsbmlJNI.Output_renameSIdRefs(swigCPtr, this, oldid, newid);
473  }
474
475  
476/**
477   * Returns the XML name of this object.
478   <p>
479   * @return the name of this element.
480   */ public
481 String getElementName() {
482    return libsbmlJNI.Output_getElementName(swigCPtr, this);
483  }
484
485  
486/**
487   * Returns the libSBML type code of this object instance.
488   <p>
489   * <p>
490 * LibSBML attaches an identifying code to every kind of SBML object.  These
491 * are integer constants known as <em>SBML type codes</em>.  The names of all
492 * the codes begin with the characters <code>SBML_</code>.
493 * In the Java language interface for libSBML, the
494 * type codes are defined as static integer constants in the interface class
495 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
496 * package plug-ins may use overlapping type codes; to identify the package
497 * to which a given object belongs, call the <code>getPackageName()</code>
498 * method on the object.
499   <p>
500   * @return the SBML type code for this object:
501   * {@link libsbmlConstants#SBML_QUAL_OUTPUT SBML_QUAL_OUTPUT}
502   <p>
503   * <p>
504 * @warning <span class='warning'>The specific integer values of the possible
505 * type codes may be reused by different Level&nbsp;3 package plug-ins.
506 * Thus, to identifiy the correct code, <strong>it is necessary to invoke
507 * both getTypeCode() and getPackageName()</strong>.</span>
508   <p>
509   * @see #getElementName()
510   * @see #getPackageName()
511   */ public
512 int getTypeCode() {
513    return libsbmlJNI.Output_getTypeCode(swigCPtr, this);
514  }
515
516  
517/**
518   * Predicate returning <code>true</code> if all the required attributes
519   * for this {@link Output} object have been set.
520   <p>
521   * @note The required attributes for a {@link Output} object are:
522   * <ul>
523   * <li> 'qualitativeSpecies'
524   * <li> 'transitionEffect'
525   *
526   * </ul> <p>
527   * @return a boolean value indicating whether all the required
528   * attributes for this object have been defined.
529   */ public
530 boolean hasRequiredAttributes() {
531    return libsbmlJNI.Output_hasRequiredAttributes(swigCPtr, this);
532  }
533
534  
535/** * @internal */ public
536 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
537    libsbmlJNI.Output_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
538  }
539
540}