001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.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 * <span class="pkg-marker pkg-color-fbc"><a href="group__fbc.html">fbc</a></span>
013 Extension of {@link SBMLDocument} for the &ldquo;fbc&rdquo; package.
014 <p>
015 * The {@link FbcSBMLDocumentPlugin} class inherits from the {@link SBMLDocumentPlugin}
016 * class, and codifies the extensions to the {@link SBMLDocument} class defined in
017 * the SBML Level&nbsp;3 <a href='../../../extensions-summary.html#fbc'>Flux Balance Constraints</a> (&ldquo;fbc&rdquo;) package.  This
018 * extension defines a required flag named 'required', which indicates
019 * whether &ldquo;fbc&rdquo; constructs can be used to change the core
020 * mathematical interpretation of the {@link Model} defined in the SBML input.  Since
021 * &ldquo;fbc&rdquo; constructs cannot, this attribute must be set to the
022 * value <code>'false'.</code>
023 */
024
025public class FbcSBMLDocumentPlugin extends SBMLDocumentPlugin {
026   private long swigCPtr;
027
028   protected FbcSBMLDocumentPlugin(long cPtr, boolean cMemoryOwn)
029   {
030     super(libsbmlJNI.FbcSBMLDocumentPlugin_SWIGUpcast(cPtr), cMemoryOwn);
031     swigCPtr = cPtr;
032   }
033
034   protected static long getCPtr(FbcSBMLDocumentPlugin obj)
035   {
036     return (obj == null) ? 0 : obj.swigCPtr;
037   }
038
039   protected static long getCPtrAndDisown (FbcSBMLDocumentPlugin obj)
040   {
041     long ptr = 0;
042
043     if (obj != null)
044     {
045       ptr             = obj.swigCPtr;
046       obj.swigCMemOwn = false;
047     }
048
049     return ptr;
050   }
051
052  protected void finalize() {
053    delete();
054  }
055
056  public synchronized void delete() {
057    if (swigCPtr != 0) {
058      if (swigCMemOwn) {
059        swigCMemOwn = false;
060        libsbmlJNI.delete_FbcSBMLDocumentPlugin(swigCPtr);
061      }
062      swigCPtr = 0;
063    }
064    super.delete();
065  }
066
067  
068/**
069   * Creates a new {@link FbcSBMLDocumentPlugin} object using the given parameters.
070   <p>
071   * <p>
072 * In the XML representation of an SBML document, XML namespaces are used to
073 * identify the origin of each XML construct used.  XML namespaces are
074 * identified by their unique resource identifiers (URIs).  The core SBML
075 * specifications stipulate the namespaces that must be used for core SBML
076 * constructs; for example, all XML elements that belong to SBML Level&nbsp;3
077 * Version&nbsp;1 Core must be placed in the XML namespace identified by the URI
078 * <code>'http://www.sbml.org/sbml/level3/version1/core'</code>.  Individual
079 * SBML Level&nbsp;3 packages define their own XML namespaces; for example,
080 * all elements belonging to the SBML Level&nbsp;3 Layout Version&nbsp;1
081 * package must be placed in the XML namespace
082 * <code>'http://www.sbml.org/sbml/level3/version1/layout/version1/'</code>.
083   <p>
084   * <p>
085 * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
086 * information.  It is used to communicate the SBML Level, Version, and (in
087 * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
088 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
089 * {@link SBMLNamespaces} object somewhere in a program once, then hand that object
090 * as needed to object constructors that accept {@link SBMLNamespaces} as arguments.
091   <p>
092   * @param uri the URI of the SBML Level&nbsp;3 package implemented by
093   * this libSBML package extension.
094   <p>
095   * @param prefix the XML namespace prefix being used for the package.
096   <p>
097   * @param fbcns the namespaces object for the package.
098   */ public
099 FbcSBMLDocumentPlugin(String uri, String prefix, FbcPkgNamespaces fbcns) {
100    this(libsbmlJNI.new_FbcSBMLDocumentPlugin__SWIG_0(uri, prefix, FbcPkgNamespaces.getCPtr(fbcns), fbcns), true);
101  }
102
103  
104/**
105   * Copy constructor for {@link FbcSBMLDocumentPlugin}.
106   <p>
107   * @param orig the {@link FbcSBMLDocumentPlugin} instance to copy.
108   */ public
109 FbcSBMLDocumentPlugin(FbcSBMLDocumentPlugin orig) {
110    this(libsbmlJNI.new_FbcSBMLDocumentPlugin__SWIG_1(FbcSBMLDocumentPlugin.getCPtr(orig), orig), true);
111  }
112
113  
114/**
115   * Creates and returns a deep copy of this {@link FbcSBMLDocumentPlugin} object.
116   <p>
117   * @return a (deep) copy of this {@link FbcSBMLDocumentPlugin} object.
118   */ public
119 SBasePlugin cloneObject() {
120    long cPtr = libsbmlJNI.FbcSBMLDocumentPlugin_cloneObject(swigCPtr, this);
121    return (cPtr == 0) ? null : new FbcSBMLDocumentPlugin(cPtr, true);
122  }
123
124  
125/** * @internal */ public
126 boolean isCompFlatteningImplemented() {
127    return libsbmlJNI.FbcSBMLDocumentPlugin_isCompFlatteningImplemented(swigCPtr, this);
128  }
129
130  
131/** * @internal */ public
132 long checkConsistency() {
133    return libsbmlJNI.FbcSBMLDocumentPlugin_checkConsistency(swigCPtr, this);
134  }
135
136}