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
011/** 
012 * 
013 * Class to store level, version and namespace information of SBML extension
014 *        package.
015 * <p>
016 */
017
018public class CompPkgNamespaces extends SBMLNamespaces {
019   private long swigCPtr;
020
021   protected CompPkgNamespaces(long cPtr, boolean cMemoryOwn)
022   {
023     super(libsbmlJNI.CompPkgNamespaces_SWIGUpcast(cPtr), cMemoryOwn);
024     swigCPtr = cPtr;
025   }
026
027   protected static long getCPtr(CompPkgNamespaces obj)
028   {
029     return (obj == null) ? 0 : obj.swigCPtr;
030   }
031
032   protected static long getCPtrAndDisown (CompPkgNamespaces obj)
033   {
034     long ptr = 0;
035
036     if (obj != null)
037     {
038       ptr             = obj.swigCPtr;
039       obj.swigCMemOwn = false;
040     }
041
042     return ptr;
043   }
044
045  protected void finalize() {
046    delete();
047  }
048
049  public synchronized void delete() {
050    if (swigCPtr != 0) {
051      if (swigCMemOwn) {
052        swigCMemOwn = false;
053        libsbmlJNI.delete_CompPkgNamespaces(swigCPtr);
054      }
055      swigCPtr = 0;
056    }
057    super.delete();
058  }
059
060  public CompPkgNamespaces(long level, long version, long pkgVersion, String prefix) throws org.sbml.libsbml.SBMLConstructorException {
061    this(libsbmlJNI.new_CompPkgNamespaces__SWIG_0(level, version, pkgVersion, prefix), true);
062  }
063
064  public CompPkgNamespaces(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
065    this(libsbmlJNI.new_CompPkgNamespaces__SWIG_1(level, version, pkgVersion), true);
066  }
067
068  public CompPkgNamespaces(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
069    this(libsbmlJNI.new_CompPkgNamespaces__SWIG_2(level, version), true);
070  }
071
072  public CompPkgNamespaces(long level) throws org.sbml.libsbml.SBMLConstructorException {
073    this(libsbmlJNI.new_CompPkgNamespaces__SWIG_3(level), true);
074  }
075
076  public CompPkgNamespaces() throws org.sbml.libsbml.SBMLConstructorException {
077    this(libsbmlJNI.new_CompPkgNamespaces__SWIG_4(), true);
078  }
079
080  
081/**
082   * Copy constructor; creates a copy of a {@link SBMLExtensionNamespaces}.
083   * <p>
084   * @param orig the {@link SBMLExtensionNamespaces} instance to copy.
085   */ public
086 CompPkgNamespaces(CompPkgNamespaces orig) throws org.sbml.libsbml.SBMLConstructorException {
087    this(libsbmlJNI.new_CompPkgNamespaces__SWIG_5(CompPkgNamespaces.getCPtr(orig), orig), true);
088  }
089
090  
091/**
092   * Creates and returns a deep copy of this {@link SBMLNamespaces}.
093   * <p>
094   * @return a (deep) copy of this {@link SBMLNamespaces}.
095   */ public
096 SBMLNamespaces cloneObject() {
097    long cPtr = libsbmlJNI.CompPkgNamespaces_cloneObject(swigCPtr, this);
098    return (cPtr == 0) ? null : new ISBMLExtensionNamespaces(cPtr, true);
099  }
100
101  
102/**
103   * Returns a string representing the SBML XML namespace of this
104   * object.
105   * <p>
106   * @return a string representing the SBML namespace that reflects the
107   * SBML Level and Version of this object.
108   */ public
109 String getURI() {
110    return libsbmlJNI.CompPkgNamespaces_getURI(swigCPtr, this);
111  }
112
113  public long getPackageVersion() {
114    return libsbmlJNI.CompPkgNamespaces_getPackageVersion(swigCPtr, this);
115  }
116
117  
118/**
119   * Returns the name of the main package for this namespace.
120   * <p>
121   * @return the name of the main package for this namespace.
122   * 'core' will be returned if this namespace is defined in the SBML 
123   * core. 
124   */ public
125 String getPackageName() {
126    return libsbmlJNI.CompPkgNamespaces_getPackageName(swigCPtr, this);
127  }
128
129}