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 SpeciesReferenceGlyph extends GraphicalObject {
012   private long swigCPtr;
013
014   protected SpeciesReferenceGlyph(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.SpeciesReferenceGlyph_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(SpeciesReferenceGlyph obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (SpeciesReferenceGlyph 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_SpeciesReferenceGlyph(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  public SpeciesReferenceGlyph(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
054    this(libsbmlJNI.new_SpeciesReferenceGlyph__SWIG_0(level, version, pkgVersion), true);
055  }
056
057  public SpeciesReferenceGlyph(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
058    this(libsbmlJNI.new_SpeciesReferenceGlyph__SWIG_1(level, version), true);
059  }
060
061  public SpeciesReferenceGlyph(long level) throws org.sbml.libsbml.SBMLConstructorException {
062    this(libsbmlJNI.new_SpeciesReferenceGlyph__SWIG_2(level), true);
063  }
064
065  public SpeciesReferenceGlyph() throws org.sbml.libsbml.SBMLConstructorException {
066    this(libsbmlJNI.new_SpeciesReferenceGlyph__SWIG_3(), true);
067  }
068
069  public SpeciesReferenceGlyph(LayoutPkgNamespaces layoutns) throws org.sbml.libsbml.SBMLConstructorException {
070    this(libsbmlJNI.new_SpeciesReferenceGlyph__SWIG_4(LayoutPkgNamespaces.getCPtr(layoutns), layoutns), true);
071  }
072
073  public SpeciesReferenceGlyph(LayoutPkgNamespaces layoutns, String sid, String speciesReferenceId, String speciesGlyphId, int role) throws org.sbml.libsbml.SBMLConstructorException {
074    this(libsbmlJNI.new_SpeciesReferenceGlyph__SWIG_5(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, sid, speciesReferenceId, speciesGlyphId, role), true);
075  }
076
077  public SpeciesReferenceGlyph(XMLNode node, long l2version) throws org.sbml.libsbml.SBMLConstructorException {
078    this(libsbmlJNI.new_SpeciesReferenceGlyph__SWIG_6(XMLNode.getCPtr(node), node, l2version), true);
079  }
080
081  public SpeciesReferenceGlyph(XMLNode node) throws org.sbml.libsbml.SBMLConstructorException {
082    this(libsbmlJNI.new_SpeciesReferenceGlyph__SWIG_7(XMLNode.getCPtr(node), node), true);
083  }
084
085  public SpeciesReferenceGlyph(SpeciesReferenceGlyph source) throws org.sbml.libsbml.SBMLConstructorException {
086    this(libsbmlJNI.new_SpeciesReferenceGlyph__SWIG_8(SpeciesReferenceGlyph.getCPtr(source), source), true);
087  }
088
089  public String getSpeciesGlyphId() {
090    return libsbmlJNI.SpeciesReferenceGlyph_getSpeciesGlyphId(swigCPtr, this);
091  }
092
093  public void setSpeciesGlyphId(String speciesGlyphId) {
094    libsbmlJNI.SpeciesReferenceGlyph_setSpeciesGlyphId(swigCPtr, this, speciesGlyphId);
095  }
096
097  public String getSpeciesReferenceId() {
098    return libsbmlJNI.SpeciesReferenceGlyph_getSpeciesReferenceId(swigCPtr, this);
099  }
100
101  public void setSpeciesReferenceId(String id) {
102    libsbmlJNI.SpeciesReferenceGlyph_setSpeciesReferenceId(swigCPtr, this, id);
103  }
104
105  public String getRoleString() {
106    return libsbmlJNI.SpeciesReferenceGlyph_getRoleString(swigCPtr, this);
107  }
108
109  public int getRole() {
110    return libsbmlJNI.SpeciesReferenceGlyph_getRole(swigCPtr, this);
111  }
112
113  public void setRole(String role) {
114    libsbmlJNI.SpeciesReferenceGlyph_setRole__SWIG_0(swigCPtr, this, role);
115  }
116
117  public void setRole(int role) {
118    libsbmlJNI.SpeciesReferenceGlyph_setRole__SWIG_1(swigCPtr, this, role);
119  }
120
121  public Curve getCurve() {
122    long cPtr = libsbmlJNI.SpeciesReferenceGlyph_getCurve__SWIG_0(swigCPtr, this);
123    return (cPtr == 0) ? null : new Curve(cPtr, false);
124  }
125
126  public void setCurve(Curve curve) {
127    libsbmlJNI.SpeciesReferenceGlyph_setCurve(swigCPtr, this, Curve.getCPtr(curve), curve);
128  }
129
130  public boolean isSetCurve() {
131    return libsbmlJNI.SpeciesReferenceGlyph_isSetCurve(swigCPtr, this);
132  }
133
134  public boolean isSetSpeciesGlyphId() {
135    return libsbmlJNI.SpeciesReferenceGlyph_isSetSpeciesGlyphId(swigCPtr, this);
136  }
137
138  public boolean isSetSpeciesReferenceId() {
139    return libsbmlJNI.SpeciesReferenceGlyph_isSetSpeciesReferenceId(swigCPtr, this);
140  }
141
142  public boolean isSetRole() {
143    return libsbmlJNI.SpeciesReferenceGlyph_isSetRole(swigCPtr, this);
144  }
145
146  public void initDefaults() {
147    libsbmlJNI.SpeciesReferenceGlyph_initDefaults(swigCPtr, this);
148  }
149
150  public LineSegment createLineSegment() {
151    return (LineSegment) libsbml.DowncastSBase(libsbmlJNI.SpeciesReferenceGlyph_createLineSegment(swigCPtr, this), false);
152}
153
154  public CubicBezier createCubicBezier() {
155    long cPtr = libsbmlJNI.SpeciesReferenceGlyph_createCubicBezier(swigCPtr, this);
156    return (cPtr == 0) ? null : new CubicBezier(cPtr, false);
157  }
158
159  
160/**
161   * Returns the XML element name of this object.
162   * <p>
163   * This is overridden by subclasses to return a string appropriate to the
164   * SBML component.  For example, {@link Model} defines it as returning 
165   * <code>'model'</code>, {@link CompartmentType} defines it as returning <code>'compartmentType'</code>,
166   * and so on.
167   */ public
168 String getElementName() {
169    return libsbmlJNI.SpeciesReferenceGlyph_getElementName(swigCPtr, this);
170  }
171
172  
173/**
174   * Creates and returns a deep copy of this {@link SBase} object.
175   * <p>
176   * @return a (deep) copy of this {@link SBase} object.
177   */ public
178 SpeciesReferenceGlyph cloneObject() {
179    long cPtr = libsbmlJNI.SpeciesReferenceGlyph_cloneObject(swigCPtr, this);
180    return (cPtr == 0) ? null : new SpeciesReferenceGlyph(cPtr, true);
181  }
182
183  
184/**
185   * Returns the libSBML type code for this object.
186   * <p>
187   * This method may return the type code of this SBML object, or it may
188   * return {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN}.  This
189   * is because subclasses of {@link SBase} are not required to implement this
190   * method to return a type code.  This method is meant primarily for the
191   * LibSBML C interface, in which class and subclass information is not
192   * readily available.
193   * <p>
194   * @return the SBML object type code
195   * of this SBML object or
196   * {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (the default).
197   * <p>
198   * @see #getElementName()
199   * @see #getPackageName()
200   */ public
201 int getTypeCode() {
202    return libsbmlJNI.SpeciesReferenceGlyph_getTypeCode(swigCPtr, this);
203  }
204
205  public XMLNode toXML() {
206    return new XMLNode(libsbmlJNI.SpeciesReferenceGlyph_toXML(swigCPtr, this), true);
207  }
208
209  
210/**
211   * Sets this SBML object to child SBML objects (if any).
212   * (Creates a child-parent relationship by the parent)
213   * <p>
214   * Subclasses must override this function if they define
215   * one ore more child elements.
216   * Basically, this function needs to be called in
217   * constructor, copy constructor, assignment operator.
218   * <p>
219   * <p>
220   * @internal
221   */ public
222 void connectToChild() {
223    libsbmlJNI.SpeciesReferenceGlyph_connectToChild(swigCPtr, this);
224  }
225
226  
227/**
228   * Enables/Disables the given package with this element and child
229   * elements (if any).
230   * (This is an internal implementation for enablePackage function)
231   * <p>
232   * @note Subclasses in which one or more child elements are defined 
233   * must override this function.
234   * <p>
235   * <p>
236   * @see #connectToChild()
237   * @internal
238   */ public
239 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
240    libsbmlJNI.SpeciesReferenceGlyph_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
241  }
242
243}