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 * <span class="pkg-marker pkg-color-layout"><a href="group__layout.html">layout</a></span>
013
014 Each {@link Layout} object stores a set of layout information
015 * for objects in the {@link Model}.
016 <p>
017 * The {@link Layout} class stores layout information for some or all elements of the
018 * SBML model as well as additional objects that need not be connected to the
019 * model. The {@link Layout} has two attributes: id and name. Additionally, a
020 * {@link Dimensions} element specifies the size of the layout.  The actual layout
021 * elements are contained in several lists, namely: a
022 * {@link ListOfCompartmentGlyphs}, a {@link ListOfSpeciesGlyphs}, a {@link ListOfReactionGlyphs}, a
023 * {@link ListOfTextGlyphs}, and a ListOfAdditionalGraphicalObjects. Each of these
024 * lists can only occur once, and, if present, are not allowed to be empty.
025 */
026
027public class Layout extends SBase {
028   private long swigCPtr;
029
030   protected Layout(long cPtr, boolean cMemoryOwn)
031   {
032     super(libsbmlJNI.Layout_SWIGUpcast(cPtr), cMemoryOwn);
033     swigCPtr = cPtr;
034   }
035
036   protected static long getCPtr(Layout obj)
037   {
038     return (obj == null) ? 0 : obj.swigCPtr;
039   }
040
041   protected static long getCPtrAndDisown (Layout obj)
042   {
043     long ptr = 0;
044
045     if (obj != null)
046     {
047       ptr             = obj.swigCPtr;
048       obj.swigCMemOwn = false;
049     }
050
051     return ptr;
052   }
053
054  protected void finalize() {
055    delete();
056  }
057
058  public synchronized void delete() {
059    if (swigCPtr != 0) {
060      if (swigCMemOwn) {
061        swigCMemOwn = false;
062        libsbmlJNI.delete_Layout(swigCPtr);
063      }
064      swigCPtr = 0;
065    }
066    super.delete();
067  }
068
069  
070/**
071   * Creates a new {@link Layout} with the given level, version, and package version.
072   */ public
073 Layout(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
074    this(libsbmlJNI.new_Layout__SWIG_0(level, version, pkgVersion), true);
075  }
076
077  
078/**
079   * Creates a new {@link Layout} with the given level, version, and package version.
080   */ public
081 Layout(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
082    this(libsbmlJNI.new_Layout__SWIG_1(level, version), true);
083  }
084
085  
086/**
087   * Creates a new {@link Layout} with the given level, version, and package version.
088   */ public
089 Layout(long level) throws org.sbml.libsbml.SBMLConstructorException {
090    this(libsbmlJNI.new_Layout__SWIG_2(level), true);
091  }
092
093  
094/**
095   * Creates a new {@link Layout} with the given level, version, and package version.
096   */ public
097 Layout() throws org.sbml.libsbml.SBMLConstructorException {
098    this(libsbmlJNI.new_Layout__SWIG_3(), true);
099  }
100
101  
102/**
103   * Creates a new {@link Layout} with the given {@link LayoutPkgNamespaces} object.
104   */ public
105 Layout(LayoutPkgNamespaces layoutns) throws org.sbml.libsbml.SBMLConstructorException {
106    this(libsbmlJNI.new_Layout__SWIG_4(LayoutPkgNamespaces.getCPtr(layoutns), layoutns), true);
107  }
108
109  
110/**
111   * Creates a new {@link Layout} with the given <code>id</code> and dimensions.
112   <p>
113   * (FOR BACKWARD COMPATIBILITY)
114   */ public
115 Layout(LayoutPkgNamespaces layoutns, String id, Dimensions dimensions) throws org.sbml.libsbml.SBMLConstructorException {
116    this(libsbmlJNI.new_Layout__SWIG_5(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, id, Dimensions.getCPtr(dimensions), dimensions), true);
117  }
118
119  
120/**
121   * Creates a new {@link Layout} from the given {@link XMLNode}
122   * (only for SBML Level2)
123   <p>
124   * (FOR BACKWARD COMPATIBILITY)
125   */ public
126 Layout(XMLNode node, long l2version) throws org.sbml.libsbml.SBMLConstructorException {
127    this(libsbmlJNI.new_Layout__SWIG_6(XMLNode.getCPtr(node), node, l2version), true);
128  }
129
130  
131/**
132   * Creates a new {@link Layout} from the given {@link XMLNode}
133   * (only for SBML Level2)
134   <p>
135   * (FOR BACKWARD COMPATIBILITY)
136   */ public
137 Layout(XMLNode node) throws org.sbml.libsbml.SBMLConstructorException {
138    this(libsbmlJNI.new_Layout__SWIG_7(XMLNode.getCPtr(node), node), true);
139  }
140
141  
142/**
143   * Copy constructor.
144   */ public
145 Layout(Layout source) throws org.sbml.libsbml.SBMLConstructorException {
146    this(libsbmlJNI.new_Layout__SWIG_8(Layout.getCPtr(source), source), true);
147  }
148
149  
150/**
151   * Does nothing since no defaults are defined for {@link Layout}.
152   */ public
153 void initDefaults() {
154    libsbmlJNI.Layout_initDefaults(swigCPtr, this);
155  }
156
157  
158/**
159   * Returns the value of the 'id' attribute of this {@link Layout}.
160   */ public
161 String getId() {
162    return libsbmlJNI.Layout_getId(swigCPtr, this);
163  }
164
165  
166/**
167   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
168   * {@link Layout}'s 'id' attribute has been set.
169   */ public
170 boolean isSetId() {
171    return libsbmlJNI.Layout_isSetId(swigCPtr, this);
172  }
173
174  
175/**
176   * Sets the value of the 'id' attribute of this {@link Layout}.
177   */ public
178 int setId(String id) {
179    return libsbmlJNI.Layout_setId(swigCPtr, this, id);
180  }
181
182  
183/**
184   * Unsets the value of the 'id' attribute of this {@link Layout}.
185   */ public
186 int unsetId() {
187    return libsbmlJNI.Layout_unsetId(swigCPtr, this);
188  }
189
190  
191/**
192   * Returns the value of the 'name' attribute of this {@link Layout}.
193   */ public
194 String getName() {
195    return libsbmlJNI.Layout_getName(swigCPtr, this);
196  }
197
198  
199/**
200   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
201   * {@link Layout}'s 'name' attribute has been set.
202   */ public
203 boolean isSetName() {
204    return libsbmlJNI.Layout_isSetName(swigCPtr, this);
205  }
206
207  
208/**
209   * Sets the value of the 'name' attribute of this {@link Layout}.
210   */ public
211 int setName(String name) {
212    return libsbmlJNI.Layout_setName(swigCPtr, this, name);
213  }
214
215  
216/**
217   * Unsets the value of the 'name' attribute of this {@link Layout}.
218   */ public
219 int unsetName() {
220    return libsbmlJNI.Layout_unsetName(swigCPtr, this);
221  }
222
223  
224/**
225   * Returns the dimensions of the layout.
226   */ public
227 Dimensions getDimensions() {
228    long cPtr = libsbmlJNI.Layout_getDimensions(swigCPtr, this);
229    return (cPtr == 0) ? null : new Dimensions(cPtr, false);
230  }
231
232  
233/**
234   * Sets the dimensions of the layout.
235   */ public
236 void setDimensions(Dimensions dimensions) {
237    libsbmlJNI.Layout_setDimensions(swigCPtr, this, Dimensions.getCPtr(dimensions), dimensions);
238  }
239
240  
241/**
242   * Predicate returning true if the dimensions has been set
243   */ public
244 boolean getDimensionsExplicitlySet() {
245    return libsbmlJNI.Layout_getDimensionsExplicitlySet(swigCPtr, this);
246  }
247
248  
249/**
250   * Returns the {@link ListOf} object that holds all compartment glyphs.
251   */ public
252 ListOfCompartmentGlyphs getListOfCompartmentGlyphs() {
253    long cPtr = libsbmlJNI.Layout_getListOfCompartmentGlyphs(swigCPtr, this);
254    return (cPtr == 0) ? null : new ListOfCompartmentGlyphs(cPtr, false);
255  }
256
257  
258/**
259   * Returns the {@link ListOf} object that holds all species glyphs.
260   */ public
261 ListOfSpeciesGlyphs getListOfSpeciesGlyphs() {
262    long cPtr = libsbmlJNI.Layout_getListOfSpeciesGlyphs(swigCPtr, this);
263    return (cPtr == 0) ? null : new ListOfSpeciesGlyphs(cPtr, false);
264  }
265
266  
267/**
268   * Returns the {@link ListOf} object that holds all reaction glyphs.
269   */ public
270 ListOfReactionGlyphs getListOfReactionGlyphs() {
271    long cPtr = libsbmlJNI.Layout_getListOfReactionGlyphs(swigCPtr, this);
272    return (cPtr == 0) ? null : new ListOfReactionGlyphs(cPtr, false);
273  }
274
275  
276/**
277   * Returns the {@link ListOf} object that holds all text glyphs.
278   */ public
279 ListOfTextGlyphs getListOfTextGlyphs() {
280    long cPtr = libsbmlJNI.Layout_getListOfTextGlyphs(swigCPtr, this);
281    return (cPtr == 0) ? null : new ListOfTextGlyphs(cPtr, false);
282  }
283
284  
285/**
286   * Returns the {@link ListOf} object that holds all additional graphical objects.
287   */ public
288 ListOfGraphicalObjects getListOfAdditionalGraphicalObjects() {
289    long cPtr = libsbmlJNI.Layout_getListOfAdditionalGraphicalObjects(swigCPtr, this);
290    return (cPtr == 0) ? null : new ListOfGraphicalObjects(cPtr, false);
291  }
292
293  
294/**
295   * Returns the compartment glyph with the given index.
296   * If the index is invalid, <code>null</code> is returned.
297   */ public
298 CompartmentGlyph getCompartmentGlyph(long index) {
299    long cPtr = libsbmlJNI.Layout_getCompartmentGlyph__SWIG_0(swigCPtr, this, index);
300    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, false);
301  }
302
303  
304/**
305   * Returns the species glyph with the given index.
306   * If the index is invalid, <code>null</code> is returned.
307   */ public
308 SpeciesGlyph getSpeciesGlyph(long index) {
309    long cPtr = libsbmlJNI.Layout_getSpeciesGlyph__SWIG_0(swigCPtr, this, index);
310    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, false);
311  }
312
313  
314/**
315   * Returns the reaction glyph with the given index.
316   * If the index is invalid, <code>null</code> is returned.
317   */ public
318 ReactionGlyph getReactionGlyph(long index) {
319    long cPtr = libsbmlJNI.Layout_getReactionGlyph__SWIG_0(swigCPtr, this, index);
320    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, false);
321  }
322
323  
324/**
325   * Returns the text glyph with the given index.
326   * If the index is invalid, <code>null</code> is returned.
327   */ public
328 TextGlyph getTextGlyph(long index) {
329    long cPtr = libsbmlJNI.Layout_getTextGlyph__SWIG_0(swigCPtr, this, index);
330    return (cPtr == 0) ? null : new TextGlyph(cPtr, false);
331  }
332
333  
334/**
335   * Returns the additional graphical object with the given index.
336   * If the index is invalid, <code>null</code> is returned.
337   */ public
338 GraphicalObject getAdditionalGraphicalObject(long index) {
339    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_getAdditionalGraphicalObject__SWIG_0(swigCPtr, this, index), false);
340}
341
342  
343/**
344   * Returns the general glyph with the given index.
345   * If the index is invalid, <code>null</code> is returned.
346   */ public
347 GeneralGlyph getGeneralGlyph(long index) {
348    long cPtr = libsbmlJNI.Layout_getGeneralGlyph__SWIG_0(swigCPtr, this, index);
349    return (cPtr == 0) ? null : new GeneralGlyph(cPtr, false);
350  }
351
352  
353/**
354   * Returns the compartment glyph that has the given <code>id</code>, or <code>null</code> if no
355   * compartment glyph has the id.
356   */ public
357 CompartmentGlyph getCompartmentGlyph(String id) {
358    long cPtr = libsbmlJNI.Layout_getCompartmentGlyph__SWIG_2(swigCPtr, this, id);
359    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, false);
360  }
361
362  
363/**
364   * Returns the species glyph that has the given <code>id</code>, or <code>null</code> if no species
365   * glyph has the id.
366   */ public
367 SpeciesGlyph getSpeciesGlyph(String id) {
368    long cPtr = libsbmlJNI.Layout_getSpeciesGlyph__SWIG_2(swigCPtr, this, id);
369    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, false);
370  }
371
372  
373/**
374   * Returns the reaction glyph that has the given <code>id</code>, or <code>null</code> if no
375   * reaction glyph has the id.
376   */ public
377 ReactionGlyph getReactionGlyph(String id) {
378    long cPtr = libsbmlJNI.Layout_getReactionGlyph__SWIG_2(swigCPtr, this, id);
379    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, false);
380  }
381
382  
383/**
384   * Returns the text glyph that has the given <code>id</code>, or <code>null</code> if no text glyph
385   * has the id.
386   */ public
387 TextGlyph getTextGlyph(String id) {
388    long cPtr = libsbmlJNI.Layout_getTextGlyph__SWIG_2(swigCPtr, this, id);
389    return (cPtr == 0) ? null : new TextGlyph(cPtr, false);
390  }
391
392  
393/**
394   * Returns the additional graphical object that has the given <code>id</code>, or <code>null</code>
395   * if no graphical object has the id.
396   */ public
397 GraphicalObject getAdditionalGraphicalObject(String id) {
398    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_getAdditionalGraphicalObject__SWIG_2(swigCPtr, this, id), false);
399}
400
401  
402/**
403   * Returns the general glyph that has the given <code>id</code>, or <code>null</code>
404   * if no graphical object has the id.
405   */ public
406 GeneralGlyph getGeneralGlyph(String id) {
407    long cPtr = libsbmlJNI.Layout_getGeneralGlyph__SWIG_2(swigCPtr, this, id);
408    return (cPtr == 0) ? null : new GeneralGlyph(cPtr, false);
409  }
410
411  
412/**
413   * Adds a new compartment glyph.
414   */ public
415 void addCompartmentGlyph(CompartmentGlyph glyph) {
416    libsbmlJNI.Layout_addCompartmentGlyph(swigCPtr, this, CompartmentGlyph.getCPtr(glyph), glyph);
417  }
418
419  
420/**
421   * Adds a new species glyph.
422   */ public
423 void addSpeciesGlyph(SpeciesGlyph glyph) {
424    libsbmlJNI.Layout_addSpeciesGlyph(swigCPtr, this, SpeciesGlyph.getCPtr(glyph), glyph);
425  }
426
427  
428/**
429   * Adds a new reaction glyph.
430   */ public
431 void addReactionGlyph(ReactionGlyph glyph) {
432    libsbmlJNI.Layout_addReactionGlyph(swigCPtr, this, ReactionGlyph.getCPtr(glyph), glyph);
433  }
434
435  
436/**
437   * Adds a new text glyph.
438   */ public
439 void addTextGlyph(TextGlyph glyph) {
440    libsbmlJNI.Layout_addTextGlyph(swigCPtr, this, TextGlyph.getCPtr(glyph), glyph);
441  }
442
443  
444/**
445   * Adds a new additional graphical object glyph.
446   */ public
447 void addAdditionalGraphicalObject(GraphicalObject glyph) {
448    libsbmlJNI.Layout_addAdditionalGraphicalObject(swigCPtr, this, GraphicalObject.getCPtr(glyph), glyph);
449  }
450
451  
452/**
453   * Adds a new general glyph.
454   */ public
455 void addGeneralGlyph(GeneralGlyph glyph) {
456    libsbmlJNI.Layout_addGeneralGlyph(swigCPtr, this, GeneralGlyph.getCPtr(glyph), glyph);
457  }
458
459  
460/**
461   * Returns the number of compartment glyphs for the layout.
462   */ public
463 long getNumCompartmentGlyphs() {
464    return libsbmlJNI.Layout_getNumCompartmentGlyphs(swigCPtr, this);
465  }
466
467  
468/**
469   * Returns the number of species glyphs for the layout.
470   */ public
471 long getNumSpeciesGlyphs() {
472    return libsbmlJNI.Layout_getNumSpeciesGlyphs(swigCPtr, this);
473  }
474
475  
476/**
477   * Returns the number of reaction glyphs for the layout.
478   */ public
479 long getNumReactionGlyphs() {
480    return libsbmlJNI.Layout_getNumReactionGlyphs(swigCPtr, this);
481  }
482
483  
484/**
485   * Returns the number of text glyphs for the layout.
486   */ public
487 long getNumTextGlyphs() {
488    return libsbmlJNI.Layout_getNumTextGlyphs(swigCPtr, this);
489  }
490
491  
492/**
493   * Returns the number of additional graphical objects for the layout.
494   */ public
495 long getNumAdditionalGraphicalObjects() {
496    return libsbmlJNI.Layout_getNumAdditionalGraphicalObjects(swigCPtr, this);
497  }
498
499  
500/**
501   * Returns the number of general glyphs for the layout.
502   */ public
503 long getNumGeneralGlyphs() {
504    return libsbmlJNI.Layout_getNumGeneralGlyphs(swigCPtr, this);
505  }
506
507  
508/**
509   * Creates a {@link CompartmentGlyph} object, adds it to the end of the
510   * compartment glyph objects list and returns a pointer to the newly
511   * created object.
512   */ public
513 CompartmentGlyph createCompartmentGlyph() {
514    long cPtr = libsbmlJNI.Layout_createCompartmentGlyph(swigCPtr, this);
515    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, false);
516  }
517
518  
519/**
520   * Creates a {@link SpeciesGlyph} object, adds it to the end of the species glyph
521   * objects list and returns a pointer to the newly created object.
522   */ public
523 SpeciesGlyph createSpeciesGlyph() {
524    long cPtr = libsbmlJNI.Layout_createSpeciesGlyph(swigCPtr, this);
525    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, false);
526  }
527
528  
529/**
530   * Creates a {@link ReactionGlyph} object, adds it to the end of the reaction
531   * glyph objects list and returns a pointer to the newly created
532   * object.
533   */ public
534 ReactionGlyph createReactionGlyph() {
535    long cPtr = libsbmlJNI.Layout_createReactionGlyph(swigCPtr, this);
536    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, false);
537  }
538
539  
540/**
541   * Creates a {@link GeneralGlyph} object, adds it to the end of the additional 
542   * objects list and returns a reference to the newly created object.
543   */ public
544 GeneralGlyph createGeneralGlyph() {
545    long cPtr = libsbmlJNI.Layout_createGeneralGlyph(swigCPtr, this);
546    return (cPtr == 0) ? null : new GeneralGlyph(cPtr, false);
547  }
548
549  
550/**
551   * Creates a {@link TextGlyph} object, adds it to the end of the text glyph
552   * objects list and returns a pointer to the newly created object.
553   */ public
554 TextGlyph createTextGlyph() {
555    long cPtr = libsbmlJNI.Layout_createTextGlyph(swigCPtr, this);
556    return (cPtr == 0) ? null : new TextGlyph(cPtr, false);
557  }
558
559  
560/**
561   * Creates a {@link GraphicalObject} object, adds it to the end of the additional
562   * graphical objects list and returns a pointer to the newly created
563   * object.
564   */ public
565 GraphicalObject createAdditionalGraphicalObject() {
566    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_createAdditionalGraphicalObject(swigCPtr, this), false);
567}
568
569  
570/**
571   * Creates a new {@link SpeciesReferenceGlyph} for the last {@link ReactionGlyph} and
572   * adds it to its list of {@link SpeciesReferenceGlyph} objects.  A pointer to
573   * the newly created object is returned.
574   */ public
575 SpeciesReferenceGlyph createSpeciesReferenceGlyph() {
576    long cPtr = libsbmlJNI.Layout_createSpeciesReferenceGlyph(swigCPtr, this);
577    return (cPtr == 0) ? null : new SpeciesReferenceGlyph(cPtr, false);
578  }
579
580  
581/**
582   * Creates a new {@link LineSegment} for the {@link Curve} object of the last
583   * {@link ReactionGlyph} or the last {@link SpeciesReferenceGlyph} in the last
584   * {@link ReactionGlyph} and adds it to its list of {@link SpeciesReferenceGlyph}
585   * objects.  A pointer to the newly created object is returned.
586   */ public
587 LineSegment createLineSegment() {
588    return (LineSegment) libsbml.DowncastSBase(libsbmlJNI.Layout_createLineSegment(swigCPtr, this), false);
589}
590
591  
592/**
593   * Creates a new {@link CubicBezier} for the {@link Curve} object of the last
594   * {@link ReactionGlyph} or the last {@link SpeciesReferenceGlyph} in the last
595   * {@link ReactionGlyph} and adds it to its list of {@link SpeciesReferenceGlyph}
596   * objects.  A pointer to the newly created object is returned.
597   */ public
598 CubicBezier createCubicBezier() {
599    long cPtr = libsbmlJNI.Layout_createCubicBezier(swigCPtr, this);
600    return (cPtr == 0) ? null : new CubicBezier(cPtr, false);
601  }
602
603  
604/**
605   * Removes the compartment glyph with the given index from the layout.
606   * A pointer to the compartment glyph that was removed is returned.
607   * If no compartment glyph has been removed, <code>null</code> is returned.
608   */ public
609 CompartmentGlyph removeCompartmentGlyph(long index) {
610    long cPtr = libsbmlJNI.Layout_removeCompartmentGlyph__SWIG_0(swigCPtr, this, index);
611    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, true);
612  }
613
614  
615/**
616   * Removes the species glyph with the given index from the layout.
617   * A pointer to the species glyph that was removed is returned.
618   * If no species glyph has been removed, <code>null</code> is returned.
619   */ public
620 SpeciesGlyph removeSpeciesGlyph(long index) {
621    long cPtr = libsbmlJNI.Layout_removeSpeciesGlyph__SWIG_0(swigCPtr, this, index);
622    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, true);
623  }
624
625  
626/**
627   * Removes the reaction glyph with the given index from the layout.
628   * A pointer to the reaction glyph that was removed is returned.
629   * If no reaction glyph has been removed, <code>null</code> is returned.
630   */ public
631 ReactionGlyph removeReactionGlyph(long index) {
632    long cPtr = libsbmlJNI.Layout_removeReactionGlyph__SWIG_0(swigCPtr, this, index);
633    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, true);
634  }
635
636  
637/**
638   * Removes the text glyph with the given index from the layout.
639   * A pointer to the text glyph that was removed is returned.
640   * If no text glyph has been removed, <code>null</code> is returned.
641   */ public
642 TextGlyph removeTextGlyph(long index) {
643    long cPtr = libsbmlJNI.Layout_removeTextGlyph__SWIG_0(swigCPtr, this, index);
644    return (cPtr == 0) ? null : new TextGlyph(cPtr, true);
645  }
646
647  
648/**
649   * Removes the graphical object with the given index from the layout.
650   * A pointer to the graphical object that was removed is returned.
651   * If no graphical object has been removed, <code>null</code> is returned.
652   */ public
653 GraphicalObject removeAdditionalGraphicalObject(long index) {
654    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_removeAdditionalGraphicalObject__SWIG_0(swigCPtr, this, index), true);
655}
656
657  
658/**
659   * Remove the compartment glyph with the given <code>id</code>.
660   * A pointer to the removed compartment glyph is returned.
661   * If no compartment glyph has been removed, <code>null</code> is returned.
662   */ public
663 CompartmentGlyph removeCompartmentGlyph(String id) {
664    long cPtr = libsbmlJNI.Layout_removeCompartmentGlyph__SWIG_1(swigCPtr, this, id);
665    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, true);
666  }
667
668  
669/**
670   * Remove the species glyph with the given <code>id</code>.
671   * A pointer to the removed species glyph is returned.
672   * If no species glyph has been removed, <code>null</code> is returned.
673   */ public
674 SpeciesGlyph removeSpeciesGlyph(String id) {
675    long cPtr = libsbmlJNI.Layout_removeSpeciesGlyph__SWIG_1(swigCPtr, this, id);
676    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, true);
677  }
678
679  
680/**
681   * Remove the reaction glyph with the given <code>id</code>.
682   * A pointer to the removed reaction glyph is returned.
683   * If no reaction glyph has been removed, <code>null</code> is returned.
684   */ public
685 ReactionGlyph removeReactionGlyph(String id) {
686    long cPtr = libsbmlJNI.Layout_removeReactionGlyph__SWIG_1(swigCPtr, this, id);
687    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, true);
688  }
689
690  
691/**
692   * Remove the species reference glyph with the given <code>id</code>.
693   * A pointer to the removed species reference glyph is returned.
694   * If no species reference glyph has been removed, <code>null</code> is returned.
695   */ public
696 SpeciesReferenceGlyph removeSpeciesReferenceGlyph(String id) {
697    long cPtr = libsbmlJNI.Layout_removeSpeciesReferenceGlyph(swigCPtr, this, id);
698    return (cPtr == 0) ? null : new SpeciesReferenceGlyph(cPtr, true);
699  }
700
701  
702/**
703   * Remove the text glyph with the given <code>id</code>.
704   * A pointer to the removed text glyph is returned.
705   * If no text glyph has been removed, <code>null</code> is returned.
706   */ public
707 TextGlyph removeTextGlyph(String id) {
708    long cPtr = libsbmlJNI.Layout_removeTextGlyph__SWIG_1(swigCPtr, this, id);
709    return (cPtr == 0) ? null : new TextGlyph(cPtr, true);
710  }
711
712  
713/**
714   * Remove the graphical object with the given <code>id</code>.
715   * A pointer to the removed graphical object is returned.
716   * If no graphical object has been removed, <code>null</code> is returned.
717   */ public
718 GraphicalObject removeAdditionalGraphicalObject(String id) {
719    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_removeAdditionalGraphicalObject__SWIG_1(swigCPtr, this, id), true);
720}
721
722  
723/**
724   * Returns the XML element name of
725   * this SBML object.
726   */ public
727 String getElementName() {
728    return libsbmlJNI.Layout_getElementName(swigCPtr, this);
729  }
730
731  
732/**
733   * Creates and returns a deep copy of this {@link Layout}.
734   <p>
735   * @return a (deep) copy of this {@link Layout}.
736   */ public
737 Layout cloneObject() {
738    long cPtr = libsbmlJNI.Layout_cloneObject(swigCPtr, this);
739    return (cPtr == 0) ? null : new Layout(cPtr, true);
740  }
741
742  
743/**
744   * Returns the libSBML type code of this object instance.
745   <p>
746   * <p>
747 * LibSBML attaches an identifying code to every kind of SBML object.  These
748 * are integer constants known as <em>SBML type codes</em>.  The names of all
749 * the codes begin with the characters &ldquo;<code>SBML_</code>&rdquo;. 
750 * In the Java language interface for libSBML, the
751 * type codes are defined as static integer constants in the interface class
752 * {@link libsbmlConstants}.    Note that different Level&nbsp;3 
753 * package plug-ins may use overlapping type codes; to identify the package
754 * to which a given object belongs, call the <code>getPackageName()</code>
755 * method on the object.
756   <p>
757   * @return the SBML type code for this object:
758   * {@link  libsbmlConstants#SBML_LAYOUT_LAYOUT SBML_LAYOUT_LAYOUT}
759   <p>
760   * <p>
761 * @warning <span class='warning'>The specific integer values of the possible
762 * type codes may be reused by different Level&nbsp;3 package plug-ins.
763 * Thus, to identifiy the correct code, <strong>it is necessary to invoke
764 * both getTypeCode() and getPackageName()</strong>.</span>
765   <p>
766   * @see #getElementName()
767   * @see #getPackageName()
768   */ public
769 int getTypeCode() {
770    return libsbmlJNI.Layout_getTypeCode(swigCPtr, this);
771  }
772
773  
774/**
775    * Creates an {@link XMLNode} object from this.
776    */ public
777 XMLNode toXML() {
778    return new XMLNode(libsbmlJNI.Layout_toXML(swigCPtr, this), true);
779  }
780
781  
782/**
783   * Sets this SBML object to child SBML objects (if any).
784   * (Creates a child-parent relationship by the parent)
785   <p>
786   * Subclasses must override this function if they define
787   * one ore more child elements.
788   * Basically, this function needs to be called in
789   * constructor, copy constructor, assignment operator.
790   <p>
791   * @see setSBMLDocument
792   * @see enablePackageInternal
793   * @internal
794   */ public
795 void connectToChild() {
796    libsbmlJNI.Layout_connectToChild(swigCPtr, this);
797  }
798
799  
800/**
801   * Enables/Disables the given package with this element and child
802   * elements (if any).
803   * (This is an internal implementation for enablePakcage function)
804   <p>
805   * @note Subclasses in which one or more child elements are defined
806   * must override this function.
807   * @internal
808   */ public
809 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
810    libsbmlJNI.Layout_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
811  }
812
813}