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 Deletion extends SBaseRef {
012   private long swigCPtr;
013
014   protected Deletion(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.Deletion_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(Deletion obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (Deletion 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_Deletion(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  public Deletion(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
054    this(libsbmlJNI.new_Deletion__SWIG_0(level, version, pkgVersion), true);
055  }
056
057  public Deletion(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
058    this(libsbmlJNI.new_Deletion__SWIG_1(level, version), true);
059  }
060
061  public Deletion(long level) throws org.sbml.libsbml.SBMLConstructorException {
062    this(libsbmlJNI.new_Deletion__SWIG_2(level), true);
063  }
064
065  public Deletion() throws org.sbml.libsbml.SBMLConstructorException {
066    this(libsbmlJNI.new_Deletion__SWIG_3(), true);
067  }
068
069  public Deletion(CompPkgNamespaces compns) throws org.sbml.libsbml.SBMLConstructorException {
070    this(libsbmlJNI.new_Deletion__SWIG_4(CompPkgNamespaces.getCPtr(compns), compns), true);
071  }
072
073  public Deletion(Deletion source) throws org.sbml.libsbml.SBMLConstructorException {
074    this(libsbmlJNI.new_Deletion__SWIG_5(Deletion.getCPtr(source), source), true);
075  }
076
077  
078/**
079   * Creates and returns a deep copy of this {@link SBase} object.
080   * <p>
081   * @return a (deep) copy of this {@link SBase} object.
082   */ public
083 SBase cloneObject() {
084    long cPtr = libsbmlJNI.Deletion_cloneObject(swigCPtr, this);
085    return (cPtr == 0) ? null : new Deletion(cPtr, true);
086  }
087
088  
089/**
090   * Predicate returning <code>true</code> if this
091   * object has a {@link ModelHistory} object attached to it.
092   * <p>
093   * @return <code>true</code> if the {@link ModelHistory} of this object is set, 
094   * <code>false</code> otherwise.
095   * <p>
096   * @note In SBML Level&nbsp;2, model history annotations were only
097   * permitted on the {@link Model} element.  In SBML Level&nbsp;3, they are
098   * permitted on all SBML components derived from {@link SBase}.
099   * @internal
100   */ public
101 int setId(String id) {
102    return libsbmlJNI.Deletion_setId(swigCPtr, this, id);
103  }
104
105  
106/**
107   * Returns the value of the 'metaid' attribute of this object.
108   * <p>
109   * The optional attribute named 'metaid', present on every major SBML
110   * component type, is for supporting metadata annotations using RDF
111   * (Resource Description Format).  The attribute value has the data type
112   * <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML
113   * identifier type, which means each 'metaid' value must be globally
114   * unique within an SBML file.  (Importantly, this uniqueness criterion
115   * applies across any attribute with type <a
116   * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the
117   * 'metaid' attribute used by SBML&mdash;something to be aware of if your
118   * application-specific XML content inside the 'annotation' subelement
119   * happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
120   * The 'metaid' value serves to identify a model
121   * component for purposes such as referencing that component from
122   * metadata placed within 'annotation' subelements.
123   * <p>
124   * @return the meta-identifier of this SBML object, as a string.
125   * <p>
126   * @see #isSetMetaId()
127   * @see #setMetaId(String metaid)
128   * @internal
129   */ public
130 String getId() {
131    return libsbmlJNI.Deletion_getId(swigCPtr, this);
132  }
133
134  
135/**
136   * Predicate returning <code>true</code> if this object's 'metaid' attribute is set.
137   * <p>
138   * The optional attribute named 'metaid', present on every major SBML
139   * component type, is for supporting metadata annotations using RDF
140   * (Resource Description Format). The attribute value has the data type
141   * <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML
142   * identifier type, which means each 'metaid' value must be globally
143   * unique within an SBML file.  (Importantly, this uniqueness criterion
144   * applies across any attribute with type <a
145   * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the
146   * 'metaid' attribute used by SBML&mdash;something to be aware of if your
147   * application-specific XML content inside the 'annotation' subelement
148   * happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
149   * The 'metaid' value serves to identify a model component for purposes
150   * such as referencing that component from metadata placed within
151   * 'annotation' subelements.
152   * <p>
153   * @return <code>true</code> if the 'metaid' attribute of this SBML object is
154   * set, <code>false</code> otherwise.
155   * <p>
156   * @see #getMetaId()
157   * @see #setMetaId(String metaid)
158   * @internal
159   */ public
160 boolean isSetId() {
161    return libsbmlJNI.Deletion_isSetId(swigCPtr, this);
162  }
163
164  
165/**
166   * Unsets the value of the 'id' attribute of this SBML object.
167   * <p>
168   * Most (but not all) objects in SBML include two common attributes: 'id'
169   * and 'name'.  The identifier given by an object's 'id' attribute value
170   * is used to identify the object within the SBML model definition.
171   * Other objects can refer to the component using this identifier.  The
172   * data type of 'id' is always either <code>Sid</code> or
173   * <code>UnitSId</code>, depending on the object in question.  Both
174   * data types are defined as follows:
175   * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
176   *   letter .= 'a'..'z','A'..'Z'
177   *   digit  .= '0'..'9'
178   *   idChar .= letter | digit | '_'
179   *   SId    .= ( letter | '_' ) idChar*
180   * </pre>
181   * <p>
182   * The equality of <code>SId</code> and <code>UnitSId</code> type values
183   * in SBML is determined by an exact character sequence match; i.e.,
184   * comparisons of these identifiers must be performed in a case-sensitive
185   * manner.  This applies to all uses of <code>SId</code> and
186   * <code>UnitSId</code>.
187   * <p>
188   * @return integer value indicating success/failure of the
189   * function.  The possible values returned by this function are:
190   * <ul>
191   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
192   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
193   * </ul>
194   */ public
195 int unsetId() {
196    return libsbmlJNI.Deletion_unsetId(swigCPtr, this);
197  }
198
199  
200/**
201   * Predicate returning <code>true</code> if this
202   * object has a {@link ModelHistory} object attached to it.
203   * <p>
204   * @return <code>true</code> if the {@link ModelHistory} of this object is set, 
205   * <code>false</code> otherwise.
206   * <p>
207   * @note In SBML Level&nbsp;2, model history annotations were only
208   * permitted on the {@link Model} element.  In SBML Level&nbsp;3, they are
209   * permitted on all SBML components derived from {@link SBase}.
210   * @internal
211   */ public
212 int setName(String name) {
213    return libsbmlJNI.Deletion_setName(swigCPtr, this, name);
214  }
215
216  
217/**
218   * Returns the value of the 'metaid' attribute of this object.
219   * <p>
220   * The optional attribute named 'metaid', present on every major SBML
221   * component type, is for supporting metadata annotations using RDF
222   * (Resource Description Format).  The attribute value has the data type
223   * <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML
224   * identifier type, which means each 'metaid' value must be globally
225   * unique within an SBML file.  (Importantly, this uniqueness criterion
226   * applies across any attribute with type <a
227   * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the
228   * 'metaid' attribute used by SBML&mdash;something to be aware of if your
229   * application-specific XML content inside the 'annotation' subelement
230   * happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
231   * The 'metaid' value serves to identify a model
232   * component for purposes such as referencing that component from
233   * metadata placed within 'annotation' subelements.
234   * <p>
235   * @return the meta-identifier of this SBML object, as a string.
236   * <p>
237   * @see #isSetMetaId()
238   * @see #setMetaId(String metaid)
239   * @internal
240   */ public
241 String getName() {
242    return libsbmlJNI.Deletion_getName(swigCPtr, this);
243  }
244
245  
246/**
247   * Predicate returning <code>true</code> if this object's 'metaid' attribute is set.
248   * <p>
249   * The optional attribute named 'metaid', present on every major SBML
250   * component type, is for supporting metadata annotations using RDF
251   * (Resource Description Format). The attribute value has the data type
252   * <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML
253   * identifier type, which means each 'metaid' value must be globally
254   * unique within an SBML file.  (Importantly, this uniqueness criterion
255   * applies across any attribute with type <a
256   * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the
257   * 'metaid' attribute used by SBML&mdash;something to be aware of if your
258   * application-specific XML content inside the 'annotation' subelement
259   * happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
260   * The 'metaid' value serves to identify a model component for purposes
261   * such as referencing that component from metadata placed within
262   * 'annotation' subelements.
263   * <p>
264   * @return <code>true</code> if the 'metaid' attribute of this SBML object is
265   * set, <code>false</code> otherwise.
266   * <p>
267   * @see #getMetaId()
268   * @see #setMetaId(String metaid)
269   * @internal
270   */ public
271 boolean isSetName() {
272    return libsbmlJNI.Deletion_isSetName(swigCPtr, this);
273  }
274
275  
276/**
277   * Unsets the value of the 'name' attribute of this SBML object.
278   * <p>
279   * Most (but not all) objects in SBML include two common attributes: 'id'
280   * and 'name'.  In contrast to the 'id' attribute, the 'name' attribute is
281   * optional and is not intended to be used for cross-referencing purposes
282   * within a model.  Its purpose instead is to provide a human-readable
283   * label for the component.  The data type of 'name' is the type
284   * <code>string</code> defined in XML Schema.  SBML imposes no
285   * restrictions as to the content of 'name' attributes beyond those
286   * restrictions defined by the <code>string</code> type in XML Schema.
287   * <p>
288   * The recommended practice for handling 'name' is as follows.  If a
289   * software tool has the capability for displaying the content of 'name'
290   * attributes, it should display this content to the user as a
291   * component's label instead of the component's 'id'.  If the user
292   * interface does not have this capability (e.g., because it cannot
293   * display or use special characters in symbol names), or if the 'name'
294   * attribute is missing on a given component, then the user interface
295   * should display the value of the 'id' attribute instead.  (Script
296   * language interpreters are especially likely to display 'id' instead of
297   * 'name'.)
298   * <p>
299   * As a consequence of the above, authors of systems that automatically
300   * generate the values of 'id' attributes should be aware some systems
301   * may display the 'id''s to the user.  Authors therefore may wish to
302   * take some care to have their software create 'id' values that are: (a)
303   * reasonably easy for humans to type and read; and (b) likely to be
304   * meaningful, for example by making the 'id' attribute be an abbreviated
305   * form of the name attribute value.
306   * <p>
307   * An additional point worth mentioning is although there are
308   * restrictions on the uniqueness of 'id' values, there are no
309   * restrictions on the uniqueness of 'name' values in a model.  This
310   * allows software applications leeway in assigning component identifiers.
311   * <p>
312   * @return integer value indicating success/failure of the
313   * function.  The possible values returned by this function are:
314   * <ul>
315   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
316   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
317   * </ul>
318   */ public
319 int unsetName() {
320    return libsbmlJNI.Deletion_unsetName(swigCPtr, this);
321  }
322
323  
324/**
325   * Returns the XML element name of this object.
326   * <p>
327   * This is overridden by subclasses to return a string appropriate to the
328   * SBML component.  For example, {@link Model} defines it as returning 
329   * <code>'model'</code>, {@link CompartmentType} defines it as returning <code>'compartmentType'</code>,
330   * and so on.
331   */ public
332 String getElementName() {
333    return libsbmlJNI.Deletion_getElementName(swigCPtr, this);
334  }
335
336  
337/**
338   * Returns the libSBML type code for this object.
339   * <p>
340   * This method may return the type code of this SBML object, or it may
341   * return {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN}.  This
342   * is because subclasses of {@link SBase} are not required to implement this
343   * method to return a type code.  This method is meant primarily for the
344   * LibSBML C interface, in which class and subclass information is not
345   * readily available.
346   * <p>
347   * @return the SBML object type code
348   * of this SBML object or
349   * {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (the default).
350   * <p>
351   * @see #getElementName()
352   * @see #getPackageName()
353   */ public
354 int getTypeCode() {
355    return libsbmlJNI.Deletion_getTypeCode(swigCPtr, this);
356  }
357
358  public int saveReferencedElement() {
359    return libsbmlJNI.Deletion_saveReferencedElement(swigCPtr, this);
360  }
361
362  public boolean acceptComp(SWIGTYPE_p_CompVisitor v) {
363    return libsbmlJNI.Deletion_acceptComp(swigCPtr, this, SWIGTYPE_p_CompVisitor.getCPtr(v));
364  }
365
366}