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
011public class ReactionGlyph extends GraphicalObject {
012   private long swigCPtr;
013
014   protected ReactionGlyph(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.ReactionGlyph_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(ReactionGlyph obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (ReactionGlyph obj)
026   {
027     long ptr = 0;
028
029     if (obj != null)
030     {
031       ptr             = obj.swigCPtr;
032       obj.swigCMemOwn = false;
033     }
034
035     return ptr;
036   }
037
038  protected void finalize() {
039    delete();
040  }
041
042  public synchronized void delete() {
043    if (swigCPtr != 0) {
044      if (swigCMemOwn) {
045        swigCMemOwn = false;
046        libsbmlJNI.delete_ReactionGlyph(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  public ReactionGlyph(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
054    this(libsbmlJNI.new_ReactionGlyph__SWIG_0(level, version, pkgVersion), true);
055  }
056
057  public ReactionGlyph(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
058    this(libsbmlJNI.new_ReactionGlyph__SWIG_1(level, version), true);
059  }
060
061  public ReactionGlyph(long level) throws org.sbml.libsbml.SBMLConstructorException {
062    this(libsbmlJNI.new_ReactionGlyph__SWIG_2(level), true);
063  }
064
065  public ReactionGlyph() throws org.sbml.libsbml.SBMLConstructorException {
066    this(libsbmlJNI.new_ReactionGlyph__SWIG_3(), true);
067  }
068
069  public ReactionGlyph(LayoutPkgNamespaces layoutns) throws org.sbml.libsbml.SBMLConstructorException {
070    this(libsbmlJNI.new_ReactionGlyph__SWIG_4(LayoutPkgNamespaces.getCPtr(layoutns), layoutns), true);
071  }
072
073  public ReactionGlyph(LayoutPkgNamespaces layoutns, String id) throws org.sbml.libsbml.SBMLConstructorException {
074    this(libsbmlJNI.new_ReactionGlyph__SWIG_5(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, id), true);
075  }
076
077  public ReactionGlyph(LayoutPkgNamespaces layoutns, String id, String reactionId) throws org.sbml.libsbml.SBMLConstructorException {
078    this(libsbmlJNI.new_ReactionGlyph__SWIG_6(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, id, reactionId), true);
079  }
080
081  public ReactionGlyph(XMLNode node, long l2version) throws org.sbml.libsbml.SBMLConstructorException {
082    this(libsbmlJNI.new_ReactionGlyph__SWIG_7(XMLNode.getCPtr(node), node, l2version), true);
083  }
084
085  public ReactionGlyph(XMLNode node) throws org.sbml.libsbml.SBMLConstructorException {
086    this(libsbmlJNI.new_ReactionGlyph__SWIG_8(XMLNode.getCPtr(node), node), true);
087  }
088
089  public ReactionGlyph(ReactionGlyph source) throws org.sbml.libsbml.SBMLConstructorException {
090    this(libsbmlJNI.new_ReactionGlyph__SWIG_9(ReactionGlyph.getCPtr(source), source), true);
091  }
092
093  public String getReactionId() {
094    return libsbmlJNI.ReactionGlyph_getReactionId(swigCPtr, this);
095  }
096
097  public int setReactionId(String id) {
098    return libsbmlJNI.ReactionGlyph_setReactionId(swigCPtr, this, id);
099  }
100
101  public boolean isSetReactionId() {
102    return libsbmlJNI.ReactionGlyph_isSetReactionId(swigCPtr, this);
103  }
104
105  public ListOfSpeciesReferenceGlyphs getListOfSpeciesReferenceGlyphs() {
106    long cPtr = libsbmlJNI.ReactionGlyph_getListOfSpeciesReferenceGlyphs(swigCPtr, this);
107    return (cPtr == 0) ? null : new ListOfSpeciesReferenceGlyphs(cPtr, false);
108  }
109
110  public SpeciesReferenceGlyph getSpeciesReferenceGlyph(long index) {
111    long cPtr = libsbmlJNI.ReactionGlyph_getSpeciesReferenceGlyph__SWIG_0(swigCPtr, this, index);
112    return (cPtr == 0) ? null : new SpeciesReferenceGlyph(cPtr, false);
113  }
114
115  public void addSpeciesReferenceGlyph(SpeciesReferenceGlyph glyph) {
116    libsbmlJNI.ReactionGlyph_addSpeciesReferenceGlyph(swigCPtr, this, SpeciesReferenceGlyph.getCPtr(glyph), glyph);
117  }
118
119  public long getNumSpeciesReferenceGlyphs() {
120    return libsbmlJNI.ReactionGlyph_getNumSpeciesReferenceGlyphs(swigCPtr, this);
121  }
122
123  public void initDefaults() {
124    libsbmlJNI.ReactionGlyph_initDefaults(swigCPtr, this);
125  }
126
127  public Curve getCurve() {
128    long cPtr = libsbmlJNI.ReactionGlyph_getCurve__SWIG_0(swigCPtr, this);
129    return (cPtr == 0) ? null : new Curve(cPtr, false);
130  }
131
132  public void setCurve(Curve curve) {
133    libsbmlJNI.ReactionGlyph_setCurve(swigCPtr, this, Curve.getCPtr(curve), curve);
134  }
135
136  public boolean isSetCurve() {
137    return libsbmlJNI.ReactionGlyph_isSetCurve(swigCPtr, this);
138  }
139
140  public SpeciesReferenceGlyph createSpeciesReferenceGlyph() {
141    long cPtr = libsbmlJNI.ReactionGlyph_createSpeciesReferenceGlyph(swigCPtr, this);
142    return (cPtr == 0) ? null : new SpeciesReferenceGlyph(cPtr, false);
143  }
144
145  public LineSegment createLineSegment() {
146    return (LineSegment) libsbml.DowncastSBase(libsbmlJNI.ReactionGlyph_createLineSegment(swigCPtr, this), false);
147}
148
149  public CubicBezier createCubicBezier() {
150    long cPtr = libsbmlJNI.ReactionGlyph_createCubicBezier(swigCPtr, this);
151    return (cPtr == 0) ? null : new CubicBezier(cPtr, false);
152  }
153
154  public SpeciesReferenceGlyph removeSpeciesReferenceGlyph(long index) {
155    long cPtr = libsbmlJNI.ReactionGlyph_removeSpeciesReferenceGlyph__SWIG_0(swigCPtr, this, index);
156    return (cPtr == 0) ? null : new SpeciesReferenceGlyph(cPtr, true);
157  }
158
159  public SpeciesReferenceGlyph removeSpeciesReferenceGlyph(String id) {
160    long cPtr = libsbmlJNI.ReactionGlyph_removeSpeciesReferenceGlyph__SWIG_1(swigCPtr, this, id);
161    return (cPtr == 0) ? null : new SpeciesReferenceGlyph(cPtr, true);
162  }
163
164  public long getIndexForSpeciesReferenceGlyph(String id) {
165    return libsbmlJNI.ReactionGlyph_getIndexForSpeciesReferenceGlyph(swigCPtr, this, id);
166  }
167
168  
169/**
170   * Returns the XML element name of this object.
171   * <p>
172   * This is overridden by subclasses to return a string appropriate to the
173   * SBML component.  For example, {@link Model} defines it as returning 
174   * <code>'model'</code>, {@link CompartmentType} defines it as returning <code>'compartmentType'</code>,
175   * and so on.
176   */ public
177 String getElementName() {
178    return libsbmlJNI.ReactionGlyph_getElementName(swigCPtr, this);
179  }
180
181  
182/**
183   * Creates and returns a deep copy of this {@link SBase} object.
184   * <p>
185   * @return a (deep) copy of this {@link SBase} object.
186   */ public
187 ReactionGlyph cloneObject() {
188    long cPtr = libsbmlJNI.ReactionGlyph_cloneObject(swigCPtr, this);
189    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, true);
190  }
191
192  
193/**
194   * Returns the libSBML type code for this object.
195   * <p>
196   * This method may return the type code of this SBML object, or it may
197   * return {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN}.  This
198   * is because subclasses of {@link SBase} are not required to implement this
199   * method to return a type code.  This method is meant primarily for the
200   * LibSBML C interface, in which class and subclass information is not
201   * readily available.
202   * <p>
203   * @return the SBML object type code
204   * of this SBML object or
205   * {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (the default).
206   * <p>
207   * @see #getElementName()
208   * @see #getPackageName()
209   */ public
210 int getTypeCode() {
211    return libsbmlJNI.ReactionGlyph_getTypeCode(swigCPtr, this);
212  }
213
214  public XMLNode toXML() {
215    return new XMLNode(libsbmlJNI.ReactionGlyph_toXML(swigCPtr, this), true);
216  }
217
218  
219/**
220   * Sets this SBML object to child SBML objects (if any).
221   * (Creates a child-parent relationship by the parent)
222   * <p>
223   * Subclasses must override this function if they define
224   * one ore more child elements.
225   * Basically, this function needs to be called in
226   * constructor, copy constructor, assignment operator.
227   * <p>
228   * <p>
229   * @internal
230   */ public
231 void connectToChild() {
232    libsbmlJNI.ReactionGlyph_connectToChild(swigCPtr, this);
233  }
234
235  
236/**
237   * Enables/Disables the given package with this element and child
238   * elements (if any).
239   * (This is an internal implementation for enablePackage function)
240   * <p>
241   * @note Subclasses in which one or more child elements are defined 
242   * must override this function.
243   * <p>
244   * <p>
245   * @see #connectToChild()
246   * @internal
247   */ public
248 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
249    libsbmlJNI.ReactionGlyph_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
250  }
251
252}