001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 2.0.12
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
011/** 
012 *  Class to store the Level, Version and XML namespace
013 * information of an SBML extension package.
014 */
015
016public class RenderPkgNamespaces extends SBMLNamespaces {
017   private long swigCPtr;
018
019   protected RenderPkgNamespaces(long cPtr, boolean cMemoryOwn)
020   {
021     super(libsbmlJNI.RenderPkgNamespaces_SWIGUpcast(cPtr), cMemoryOwn);
022     swigCPtr = cPtr;
023   }
024
025   protected static long getCPtr(RenderPkgNamespaces obj)
026   {
027     return (obj == null) ? 0 : obj.swigCPtr;
028   }
029
030   protected static long getCPtrAndDisown (RenderPkgNamespaces obj)
031   {
032     long ptr = 0;
033
034     if (obj != null)
035     {
036       ptr             = obj.swigCPtr;
037       obj.swigCMemOwn = false;
038     }
039
040     return ptr;
041   }
042
043  protected void finalize() {
044    delete();
045  }
046
047  public synchronized void delete() {
048    if (swigCPtr != 0) {
049      if (swigCMemOwn) {
050        swigCMemOwn = false;
051        libsbmlJNI.delete_RenderPkgNamespaces(swigCPtr);
052      }
053      swigCPtr = 0;
054    }
055    super.delete();
056  }
057
058  
059/**
060   * Creates a new {@link SBMLExtensionNamespaces} object corresponding to the given SBML
061   * <code>level</code>, <code>version</code> and <code>package</code> version.
062   <p>
063   * @note {@link SBMLExtensionException} will be thrown if the extension module
064   *       that supports the combination of the given sbml level, sbml version, 
065   *       package name, and package version has not been registered.
066   <p>
067   * @param level   the SBML level
068   * @param version the SBML version
069   * @param pkgVersion the package version
070   * @param prefix  the prefix of the package namespace (e.g. 'layout', 'multi') 
071   *        to be added. The package's name will be used if the given string is empty 
072   *        (default).
073   */ public
074 RenderPkgNamespaces(long level, long version, long pkgVersion, String prefix) throws org.sbml.libsbml.SBMLConstructorException {
075    this(libsbmlJNI.new_RenderPkgNamespaces__SWIG_0(level, version, pkgVersion, prefix), true);
076  }
077
078  
079/**
080   * Creates a new {@link SBMLExtensionNamespaces} object corresponding to the given SBML
081   * <code>level</code>, <code>version</code> and <code>package</code> version.
082   <p>
083   * @note {@link SBMLExtensionException} will be thrown if the extension module
084   *       that supports the combination of the given sbml level, sbml version, 
085   *       package name, and package version has not been registered.
086   <p>
087   * @param level   the SBML level
088   * @param version the SBML version
089   * @param pkgVersion the package version
090   * @param prefix  the prefix of the package namespace (e.g. 'layout', 'multi') 
091   *        to be added. The package's name will be used if the given string is empty 
092   *        (default).
093   */ public
094 RenderPkgNamespaces(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
095    this(libsbmlJNI.new_RenderPkgNamespaces__SWIG_1(level, version, pkgVersion), true);
096  }
097
098  
099/**
100   * Creates a new {@link SBMLExtensionNamespaces} object corresponding to the given SBML
101   * <code>level</code>, <code>version</code> and <code>package</code> version.
102   <p>
103   * @note {@link SBMLExtensionException} will be thrown if the extension module
104   *       that supports the combination of the given sbml level, sbml version, 
105   *       package name, and package version has not been registered.
106   <p>
107   * @param level   the SBML level
108   * @param version the SBML version
109   * @param pkgVersion the package version
110   * @param prefix  the prefix of the package namespace (e.g. 'layout', 'multi') 
111   *        to be added. The package's name will be used if the given string is empty 
112   *        (default).
113   */ public
114 RenderPkgNamespaces(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
115    this(libsbmlJNI.new_RenderPkgNamespaces__SWIG_2(level, version), true);
116  }
117
118  
119/**
120   * Creates a new {@link SBMLExtensionNamespaces} object corresponding to the given SBML
121   * <code>level</code>, <code>version</code> and <code>package</code> version.
122   <p>
123   * @note {@link SBMLExtensionException} will be thrown if the extension module
124   *       that supports the combination of the given sbml level, sbml version, 
125   *       package name, and package version has not been registered.
126   <p>
127   * @param level   the SBML level
128   * @param version the SBML version
129   * @param pkgVersion the package version
130   * @param prefix  the prefix of the package namespace (e.g. 'layout', 'multi') 
131   *        to be added. The package's name will be used if the given string is empty 
132   *        (default).
133   */ public
134 RenderPkgNamespaces(long level) throws org.sbml.libsbml.SBMLConstructorException {
135    this(libsbmlJNI.new_RenderPkgNamespaces__SWIG_3(level), true);
136  }
137
138  
139/**
140   * Creates a new {@link SBMLExtensionNamespaces} object corresponding to the given SBML
141   * <code>level</code>, <code>version</code> and <code>package</code> version.
142   <p>
143   * @note {@link SBMLExtensionException} will be thrown if the extension module
144   *       that supports the combination of the given sbml level, sbml version, 
145   *       package name, and package version has not been registered.
146   <p>
147   * @param level   the SBML level
148   * @param version the SBML version
149   * @param pkgVersion the package version
150   * @param prefix  the prefix of the package namespace (e.g. 'layout', 'multi') 
151   *        to be added. The package's name will be used if the given string is empty 
152   *        (default).
153   */ public
154 RenderPkgNamespaces() throws org.sbml.libsbml.SBMLConstructorException {
155    this(libsbmlJNI.new_RenderPkgNamespaces__SWIG_4(), true);
156  }
157
158  
159/**
160   * Copy constructor; creates a copy of a {@link SBMLExtensionNamespaces}.
161   <p>
162   * @param orig the {@link SBMLExtensionNamespaces} instance to copy.
163   */ public
164 RenderPkgNamespaces(RenderPkgNamespaces orig) throws org.sbml.libsbml.SBMLConstructorException {
165    this(libsbmlJNI.new_RenderPkgNamespaces__SWIG_5(RenderPkgNamespaces.getCPtr(orig), orig), true);
166  }
167
168  
169/**
170   * Creates and returns a deep copy of this {@link SBMLNamespaces}.
171   <p>
172   * @return a (deep) copy of this {@link SBMLNamespaces}.
173   */ public
174 SBMLNamespaces cloneObject() {
175    long cPtr = libsbmlJNI.RenderPkgNamespaces_cloneObject(swigCPtr, this);
176    return (cPtr == 0) ? null : new ISBMLExtensionNamespaces(cPtr, true);
177  }
178
179  
180/**
181   * Returns a string representing the SBML XML namespace of this
182   * object.
183   <p>
184   * @return a string representing the SBML namespace that reflects the
185   * SBML Level and Version of this object.
186   */ public
187 String getURI() {
188    return libsbmlJNI.RenderPkgNamespaces_getURI(swigCPtr, this);
189  }
190
191  public long getPackageVersion() {
192    return libsbmlJNI.RenderPkgNamespaces_getPackageVersion(swigCPtr, this);
193  }
194
195  
196/**
197   * Returns the name of the main package for this namespace.
198   <p>
199   * @return the name of the main package for this namespace.
200   * 'core' will be returned if this namespace is defined in the SBML 
201   * core. 
202   */ public
203 String getPackageName() {
204    return libsbmlJNI.RenderPkgNamespaces_getPackageName(swigCPtr, this);
205  }
206
207}