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