001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 3.0.8 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 * Set of SBML Level + Version + namespace triples. 013 <p> 014 * <p style='color: #777; font-style: italic'> 015This class of objects is defined by libSBML only and has no direct 016equivalent in terms of SBML components. This class is not prescribed by 017the SBML specifications, although it is used to implement features 018defined in SBML. 019</p> 020 021 <p> 022 * {@link SBMLExtensionNamespaces} is a template class. It is extended from 023 * {@link SBMLNamespaces} and is meant to be used by package extensions to store the 024 * SBML Level, Version within a Level, and package version of the SBML 025 * Level 3 package implemented by a libSBML package extension. 026 <p> 027 * <p> 028 * <h2>Basic principles of SBML package extensions in libSBML</h2> 029 <p> 030 * SBML Level 3's package structure permits modular extensions to the 031 * core SBML format. In libSBML, support for SBML Level 3 packages is 032 * provided through optional <em>package extensions</em> that can be plugged 033 * into libSBML at the time it is built/compiled. Users of libSBML can thus 034 * choose which extensions are enabled in their software applications. 035 <p> 036 * LibSBML defines a number of classes that developers of package extensions 037 * can use to implement support for an SBML Level 3 package. These 038 * classes make it easier to extend libSBML objects with new attributes 039 * and/or subobjects as needed by a particular Level 3 package. 040 * Three overall categories of classes make up libSBML's facilities for 041 * implementing package extensions. There are (1) classes that serve as base 042 * classes meant to be subclassed, (2) template classes meant to be 043 * instantiated rather than subclassed, and (3) support classes that provide 044 * utility features. A given package implementation for libSBML will take 045 * the form of code using these and other libSBML classes, placed in a 046 * subdirectory of <code>src/sbml/packages/</code>. 047 <p> 048 * The basic libSBML distribution includes a number of package extensions 049 * implementing support for officially-endorsed SBML Level 3 packages; 050 * among these are <em>Flux Balance Constraints</em> ('fbc'), 051 * <em>Hierarchical Model Composition</em> ('comp'), <em>Layout</em> 052 * ('layout'), and <em>Qualitative Models</em> ('qual'). They can serve as 053 * working examples for developers working to implement other packages. 054 <p> 055 * Extensions in libSBML can currently only be implemented in C++ or C; 056 * there is no mechanism to implement them first in languages such as 057 * Java or Python. However, once implemented in C++ or C, language 058 * interfaces can be generated semi-automatically using the framework in 059 * place in libSBML. (The approach is based on using <a target='_blank' 060 * href='http://www.swig.org'>SWIG</a> and facilities in libSBML's build 061 * system.) 062 */ 063 064public class GroupsPkgNamespaces extends SBMLNamespaces { 065 private long swigCPtr; 066 067 protected GroupsPkgNamespaces(long cPtr, boolean cMemoryOwn) 068 { 069 super(libsbmlJNI.GroupsPkgNamespaces_SWIGUpcast(cPtr), cMemoryOwn); 070 swigCPtr = cPtr; 071 } 072 073 protected static long getCPtr(GroupsPkgNamespaces obj) 074 { 075 return (obj == null) ? 0 : obj.swigCPtr; 076 } 077 078 protected static long getCPtrAndDisown (GroupsPkgNamespaces obj) 079 { 080 long ptr = 0; 081 082 if (obj != null) 083 { 084 ptr = obj.swigCPtr; 085 obj.swigCMemOwn = false; 086 } 087 088 return ptr; 089 } 090 091 protected void finalize() { 092 delete(); 093 } 094 095 public synchronized void delete() { 096 if (swigCPtr != 0) { 097 if (swigCMemOwn) { 098 swigCMemOwn = false; 099 libsbmlJNI.delete_GroupsPkgNamespaces(swigCPtr); 100 } 101 swigCPtr = 0; 102 } 103 super.delete(); 104 } 105 106 public GroupsPkgNamespaces(long level, long version, long pkgVersion, String prefix) throws org.sbml.libsbml.SBMLConstructorException { 107 this(libsbmlJNI.new_GroupsPkgNamespaces__SWIG_0(level, version, pkgVersion, prefix), true); 108 } 109 110 public GroupsPkgNamespaces(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException { 111 this(libsbmlJNI.new_GroupsPkgNamespaces__SWIG_1(level, version, pkgVersion), true); 112 } 113 114 public GroupsPkgNamespaces(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 115 this(libsbmlJNI.new_GroupsPkgNamespaces__SWIG_2(level, version), true); 116 } 117 118 public GroupsPkgNamespaces(long level) throws org.sbml.libsbml.SBMLConstructorException { 119 this(libsbmlJNI.new_GroupsPkgNamespaces__SWIG_3(level), true); 120 } 121 122 public GroupsPkgNamespaces() throws org.sbml.libsbml.SBMLConstructorException { 123 this(libsbmlJNI.new_GroupsPkgNamespaces__SWIG_4(), true); 124 } 125 126 public GroupsPkgNamespaces(GroupsPkgNamespaces orig) throws org.sbml.libsbml.SBMLConstructorException { 127 this(libsbmlJNI.new_GroupsPkgNamespaces__SWIG_5(GroupsPkgNamespaces.getCPtr(orig), orig), true); 128 } 129 130 131/** 132 * Creates and returns a deep copy of this {@link SBMLNamespaces} object. 133 <p> 134 * @return the (deep) copy of this {@link SBMLNamespaces} object. 135 */ public 136 SBMLNamespaces cloneObject() { 137 long cPtr = libsbmlJNI.GroupsPkgNamespaces_cloneObject(swigCPtr, this); 138 return (cPtr == 0) ? null : new ISBMLExtensionNamespaces(cPtr, true); 139 } 140 141 142/** 143 * Returns a string representing the SBML XML namespace of this 144 * object. 145 <p> 146 * @return a string representing the SBML namespace that reflects the 147 * SBML Level and Version of this object. 148 */ public 149 String getURI() { 150 return libsbmlJNI.GroupsPkgNamespaces_getURI(swigCPtr, this); 151 } 152 153 public long getPackageVersion() { 154 return libsbmlJNI.GroupsPkgNamespaces_getPackageVersion(swigCPtr, this); 155 } 156 157 158/** 159 * Returns the name of the main package for this namespace. 160 <p> 161 * @return the name of the main package for this namespace. 162 * 'core' will be returned if this namespace is defined in the SBML 163 * core. 164 */ public 165 String getPackageName() { 166 return libsbmlJNI.GroupsPkgNamespaces_getPackageName(swigCPtr, this); 167 } 168 169}