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 SBMLDocumentPlugin extends SBasePlugin {
012   private long swigCPtr;
013
014   protected SBMLDocumentPlugin(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.SBMLDocumentPlugin_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(SBMLDocumentPlugin obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (SBMLDocumentPlugin 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_SBMLDocumentPlugin(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  
054/**
055   *  Constructor
056   * <p>
057   * @param uri the URI of package 
058   * @param prefix the prefix for the given package
059   * @param sbmlns the {@link SBMLNamespaces} object for the package
060   */ public
061 SBMLDocumentPlugin(String uri, String prefix, SBMLNamespaces sbmlns) {
062    this(libsbmlJNI.new_SBMLDocumentPlugin__SWIG_0(uri, prefix, SBMLNamespaces.getCPtr(sbmlns), sbmlns), true);
063  }
064
065  
066/**
067   * Copy constructor. Creates a copy of this object.
068   */ public
069 SBMLDocumentPlugin(SBMLDocumentPlugin orig) {
070    this(libsbmlJNI.new_SBMLDocumentPlugin__SWIG_1(SBMLDocumentPlugin.getCPtr(orig), orig), true);
071  }
072
073  
074/**
075   * Creates and returns a deep copy of this {@link SBMLDocumentPlugin} object.
076   * <p>
077   * @return a (deep) copy of this object
078   */ public
079 SBasePlugin cloneObject() {
080    long cPtr = libsbmlJNI.SBMLDocumentPlugin_cloneObject(swigCPtr, this);
081    return (cPtr == 0) ? null : new SBMLDocumentPlugin(cPtr, true);
082  }
083
084  
085/**
086   * <p>
087   * Sets the bool value of 'required' attribute of corresponding package
088   * in {@link SBMLDocument} element.
089   * <p>
090   * @param value the bool value of 'required' attribute of corresponding 
091   * package in {@link SBMLDocument} element.
092   * <p>
093   * @return integer value indicating success/failure of the
094   * function.  The possible values
095   * returned by this function are:
096   * <ul>
097   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
098   * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
099   * </ul>
100   */ public
101 int setRequired(boolean value) {
102    return libsbmlJNI.SBMLDocumentPlugin_setRequired(swigCPtr, this, value);
103  }
104
105  
106/**
107   * <p>
108   * Returns the bool value of 'required' attribute of corresponding 
109   * package in {@link SBMLDocument} element.
110   * <p>
111   * @return the bool value of 'required' attribute of corresponding
112   * package in {@link SBMLDocument} element.
113   */ public
114 boolean getRequired() {
115    return libsbmlJNI.SBMLDocumentPlugin_getRequired(swigCPtr, this);
116  }
117
118  
119/**
120   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
121   * {@link SBMLDocumentPlugin}'s 'required' attribute has been set.
122   * <p>
123   * @return <code>true</code> if the 'required' attribute of this {@link SBMLDocument} has been
124   * set, <code>false</code> otherwise.
125   */ public
126 boolean isSetRequired() {
127    return libsbmlJNI.SBMLDocumentPlugin_isSetRequired(swigCPtr, this);
128  }
129
130  
131/**
132   * Unsets the value of the 'required' attribute of this {@link SBMLDocumentPlugin}.
133   * <p>
134   * @return integer value indicating success/failure of the
135   * function.   The possible values
136   * returned by this function are:
137   * <ul>
138   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
139   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
140   * </ul>
141   */ public
142 int unsetRequired() {
143    return libsbmlJNI.SBMLDocumentPlugin_unsetRequired(swigCPtr, this);
144  }
145
146  
147/**
148   * Unsets the value of the 'required' attribute of this {@link SBMLDocumentPlugin}.
149   * <p>
150   * @return integer value indicating success/failure of the
151   * function.   The possible values
152   * returned by this function are:
153   * <ul>
154   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
155   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
156   * </ul>
157   * @internal
158   */ public
159 boolean isFlatteningImplemented() {
160    return libsbmlJNI.SBMLDocumentPlugin_isFlatteningImplemented(swigCPtr, this);
161  }
162
163  
164/**
165   * Unsets the value of the 'required' attribute of this {@link SBMLDocumentPlugin}.
166   * <p>
167   * @return integer value indicating success/failure of the
168   * function.   The possible values
169   * returned by this function are:
170   * <ul>
171   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
172   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
173   * </ul>
174   * @internal
175   */ public
176 long checkConsistency() {
177    return libsbmlJNI.SBMLDocumentPlugin_checkConsistency(swigCPtr, this);
178  }
179
180}