001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.0.7
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 GroupsModelPlugin extends SBasePlugin {
012   private long swigCPtr;
013
014   protected GroupsModelPlugin(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.GroupsModelPlugin_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(GroupsModelPlugin obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (GroupsModelPlugin 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_GroupsModelPlugin(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  
054/**
055   * Creates a new GroupsModelPlugin
056   */ public
057 GroupsModelPlugin(String uri, String prefix, GroupsPkgNamespaces groupsns) {
058    this(libsbmlJNI.new_GroupsModelPlugin__SWIG_0(uri, prefix, GroupsPkgNamespaces.getCPtr(groupsns), groupsns), true);
059  }
060
061  
062/**
063   * Copy constructor for GroupsModelPlugin.
064   <p>
065   * @param orig; the GroupsModelPlugin instance to copy.
066   */ public
067 GroupsModelPlugin(GroupsModelPlugin orig) {
068    this(libsbmlJNI.new_GroupsModelPlugin__SWIG_1(GroupsModelPlugin.getCPtr(orig), orig), true);
069  }
070
071  
072/**
073   * Creates and returns a deep copy of this GroupsModelPlugin object.
074   <p>
075   * @return a (deep) copy of this {@link SBase} object
076   */ public
077 SBasePlugin cloneObject() {
078    long cPtr = libsbmlJNI.GroupsModelPlugin_cloneObject(swigCPtr, this);
079    return (cPtr == 0) ? null : new GroupsModelPlugin(cPtr, true);
080  }
081
082  
083/** * @internal */ public
084 SBase createObject(XMLInputStream stream) {
085  return libsbml.DowncastSBase(libsbmlJNI.GroupsModelPlugin_createObject(swigCPtr, this, XMLInputStream.getCPtr(stream), stream), false);
086}
087
088  
089/** * @internal */ public
090 boolean hasRequiredElements() {
091    return libsbmlJNI.GroupsModelPlugin_hasRequiredElements(swigCPtr, this);
092  }
093
094  
095/** * @internal */ public
096 ListOfGroups getListOfGroups() {
097    long cPtr = libsbmlJNI.GroupsModelPlugin_getListOfGroups__SWIG_0(swigCPtr, this);
098    return (cPtr == 0) ? null : new ListOfGroups(cPtr, false);
099  }
100
101  
102/** * @internal */ public
103 Group getGroup(long n) {
104    long cPtr = libsbmlJNI.GroupsModelPlugin_getGroup__SWIG_0(swigCPtr, this, n);
105    return (cPtr == 0) ? null : new Group(cPtr, false);
106  }
107
108  
109/** * @internal */ public
110 Group getGroup(String sid) {
111    long cPtr = libsbmlJNI.GroupsModelPlugin_getGroup__SWIG_2(swigCPtr, this, sid);
112    return (cPtr == 0) ? null : new Group(cPtr, false);
113  }
114
115  
116/** * @internal */ public
117 int addGroup(Group group) {
118    return libsbmlJNI.GroupsModelPlugin_addGroup(swigCPtr, this, Group.getCPtr(group), group);
119  }
120
121  
122/** * @internal */ public
123 Group createGroup() {
124    long cPtr = libsbmlJNI.GroupsModelPlugin_createGroup(swigCPtr, this);
125    return (cPtr == 0) ? null : new Group(cPtr, false);
126  }
127
128  
129/** * @internal */ public
130 Group removeGroup(long n) {
131    long cPtr = libsbmlJNI.GroupsModelPlugin_removeGroup__SWIG_0(swigCPtr, this, n);
132    return (cPtr == 0) ? null : new Group(cPtr, true);
133  }
134
135  
136/** * @internal */ public
137 Group removeGroup(String sid) {
138    long cPtr = libsbmlJNI.GroupsModelPlugin_removeGroup__SWIG_1(swigCPtr, this, sid);
139    return (cPtr == 0) ? null : new Group(cPtr, true);
140  }
141
142  
143/** * @internal */ public
144 long getNumGroups() {
145    return libsbmlJNI.GroupsModelPlugin_getNumGroups(swigCPtr, this);
146  }
147
148  
149/** * @internal */ public
150 void connectToParent(SBase sbase) {
151    libsbmlJNI.GroupsModelPlugin_connectToParent(swigCPtr, this, SBase.getCPtr(sbase), sbase);
152  }
153
154  
155/** * @internal */ public
156 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
157    libsbmlJNI.GroupsModelPlugin_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
158  }
159
160}