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-layout"><a href="group__layout.html">layout</a></span>
013
014 The layout of a diagram of an SBML model.
015 <p>
016 * The {@link Layout} class stores layout information for some or all elements of the
017 * SBML model as well as additional objects that need not be connected to the
018 * model. The {@link Layout} has two attributes: id and name. Additionally, a
019 * {@link Dimensions} element specifies the size of the layout.  The actual layout
020 * elements are contained in several lists, namely: a
021 * {@link ListOfCompartmentGlyphs}, a {@link ListOfSpeciesGlyphs}, a {@link ListOfReactionGlyphs}, a
022 * {@link ListOfTextGlyphs}, and a ListOfAdditionalGraphicalObjects. Each of these
023 * lists can only occur once, and, if present, are not allowed to be empty.
024 */
025
026public class Layout extends SBase {
027   private long swigCPtr;
028
029   protected Layout(long cPtr, boolean cMemoryOwn)
030   {
031     super(libsbmlJNI.Layout_SWIGUpcast(cPtr), cMemoryOwn);
032     swigCPtr = cPtr;
033   }
034
035   protected static long getCPtr(Layout obj)
036   {
037     return (obj == null) ? 0 : obj.swigCPtr;
038   }
039
040   protected static long getCPtrAndDisown (Layout obj)
041   {
042     long ptr = 0;
043
044     if (obj != null)
045     {
046       ptr             = obj.swigCPtr;
047       obj.swigCMemOwn = false;
048     }
049
050     return ptr;
051   }
052
053  protected void finalize() {
054    delete();
055  }
056
057  public synchronized void delete() {
058    if (swigCPtr != 0) {
059      if (swigCMemOwn) {
060        swigCMemOwn = false;
061        libsbmlJNI.delete_Layout(swigCPtr);
062      }
063      swigCPtr = 0;
064    }
065    super.delete();
066  }
067
068  
069/**
070   * Creates a new {@link Layout} with the given level, version, and package version.
071   <p>
072   * @param level the SBML Level.
073   * @param version the Version within the SBML Level.
074   * @param pkgVersion the version of the package.
075   <p>
076   * <p>
077 * @note Attempting to add an object to an {@link SBMLDocument} having a different
078 * combination of SBML Level, Version and XML namespaces than the object
079 * itself will result in an error at the time a caller attempts to make the
080 * addition.  A parent object must have compatible Level, Version and XML
081 * namespaces.  (Strictly speaking, a parent may also have more XML
082 * namespaces than a child, but the reverse is not permitted.)  The
083 * restriction is necessary to ensure that an SBML model has a consistent
084 * overall structure.  This requires callers to manage their objects
085 * carefully, but the benefit is increased flexibility in how models can be
086 * created by permitting callers to create objects bottom-up if desired.  In
087 * situations where objects are not yet attached to parents (e.g.,
088 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
089 * libSBML determine such things as whether it is valid to assign a
090 * particular value to an attribute.  For packages, this means that the 
091 * parent object to which this package element is being added must have
092 * been created with the package namespace, or that the package namespace
093 * was added to it, even if that parent is not a package object itself.
094   */ public
095 Layout(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
096    this(libsbmlJNI.new_Layout__SWIG_0(level, version, pkgVersion), true);
097  }
098
099  
100/**
101   * Creates a new {@link Layout} with the given level, version, and package version.
102   <p>
103   * @param level the SBML Level.
104   * @param version the Version within the SBML Level.
105   * @param pkgVersion the version of the package.
106   <p>
107   * <p>
108 * @note Attempting to add an object to an {@link SBMLDocument} having a different
109 * combination of SBML Level, Version and XML namespaces than the object
110 * itself will result in an error at the time a caller attempts to make the
111 * addition.  A parent object must have compatible Level, Version and XML
112 * namespaces.  (Strictly speaking, a parent may also have more XML
113 * namespaces than a child, but the reverse is not permitted.)  The
114 * restriction is necessary to ensure that an SBML model has a consistent
115 * overall structure.  This requires callers to manage their objects
116 * carefully, but the benefit is increased flexibility in how models can be
117 * created by permitting callers to create objects bottom-up if desired.  In
118 * situations where objects are not yet attached to parents (e.g.,
119 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
120 * libSBML determine such things as whether it is valid to assign a
121 * particular value to an attribute.  For packages, this means that the 
122 * parent object to which this package element is being added must have
123 * been created with the package namespace, or that the package namespace
124 * was added to it, even if that parent is not a package object itself.
125   */ public
126 Layout(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
127    this(libsbmlJNI.new_Layout__SWIG_1(level, version), true);
128  }
129
130  
131/**
132   * Creates a new {@link Layout} with the given level, version, and package version.
133   <p>
134   * @param level the SBML Level.
135   * @param version the Version within the SBML Level.
136   * @param pkgVersion the version of the package.
137   <p>
138   * <p>
139 * @note Attempting to add an object to an {@link SBMLDocument} having a different
140 * combination of SBML Level, Version and XML namespaces than the object
141 * itself will result in an error at the time a caller attempts to make the
142 * addition.  A parent object must have compatible Level, Version and XML
143 * namespaces.  (Strictly speaking, a parent may also have more XML
144 * namespaces than a child, but the reverse is not permitted.)  The
145 * restriction is necessary to ensure that an SBML model has a consistent
146 * overall structure.  This requires callers to manage their objects
147 * carefully, but the benefit is increased flexibility in how models can be
148 * created by permitting callers to create objects bottom-up if desired.  In
149 * situations where objects are not yet attached to parents (e.g.,
150 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
151 * libSBML determine such things as whether it is valid to assign a
152 * particular value to an attribute.  For packages, this means that the 
153 * parent object to which this package element is being added must have
154 * been created with the package namespace, or that the package namespace
155 * was added to it, even if that parent is not a package object itself.
156   */ public
157 Layout(long level) throws org.sbml.libsbml.SBMLConstructorException {
158    this(libsbmlJNI.new_Layout__SWIG_2(level), true);
159  }
160
161  
162/**
163   * Creates a new {@link Layout} with the given level, version, and package version.
164   <p>
165   * @param level the SBML Level.
166   * @param version the Version within the SBML Level.
167   * @param pkgVersion the version of the package.
168   <p>
169   * <p>
170 * @note Attempting to add an object to an {@link SBMLDocument} having a different
171 * combination of SBML Level, Version and XML namespaces than the object
172 * itself will result in an error at the time a caller attempts to make the
173 * addition.  A parent object must have compatible Level, Version and XML
174 * namespaces.  (Strictly speaking, a parent may also have more XML
175 * namespaces than a child, but the reverse is not permitted.)  The
176 * restriction is necessary to ensure that an SBML model has a consistent
177 * overall structure.  This requires callers to manage their objects
178 * carefully, but the benefit is increased flexibility in how models can be
179 * created by permitting callers to create objects bottom-up if desired.  In
180 * situations where objects are not yet attached to parents (e.g.,
181 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
182 * libSBML determine such things as whether it is valid to assign a
183 * particular value to an attribute.  For packages, this means that the 
184 * parent object to which this package element is being added must have
185 * been created with the package namespace, or that the package namespace
186 * was added to it, even if that parent is not a package object itself.
187   */ public
188 Layout() throws org.sbml.libsbml.SBMLConstructorException {
189    this(libsbmlJNI.new_Layout__SWIG_3(), true);
190  }
191
192  
193/**
194   * Creates a new {@link Layout} with the given {@link LayoutPkgNamespaces} object.
195   <p>
196   * <p>
197 * The package namespaces object used in this constructor is derived from a
198 * {@link SBMLNamespaces} object, which encapsulates SBML Level/Version/namespaces
199 * information.  It is used to communicate the SBML Level, Version, and 
200 * package version and name information used in addition to SBML Level&nbsp;3 Core.  A
201 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
202 * package namespace object somewhere in a program once, then hand that object
203 * as needed to object constructors of that package that accept it as and
204 * argument, such as this one.
205   <p>
206   * @param layoutns the {@link LayoutPkgNamespaces} object.
207   <p>
208   * <p>
209 * @note Attempting to add an object to an {@link SBMLDocument} having a different
210 * combination of SBML Level, Version and XML namespaces than the object
211 * itself will result in an error at the time a caller attempts to make the
212 * addition.  A parent object must have compatible Level, Version and XML
213 * namespaces.  (Strictly speaking, a parent may also have more XML
214 * namespaces than a child, but the reverse is not permitted.)  The
215 * restriction is necessary to ensure that an SBML model has a consistent
216 * overall structure.  This requires callers to manage their objects
217 * carefully, but the benefit is increased flexibility in how models can be
218 * created by permitting callers to create objects bottom-up if desired.  In
219 * situations where objects are not yet attached to parents (e.g.,
220 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
221 * libSBML determine such things as whether it is valid to assign a
222 * particular value to an attribute.  For packages, this means that the 
223 * parent object to which this package element is being added must have
224 * been created with the package namespace, or that the package namespace
225 * was added to it, even if that parent is not a package object itself.
226   */ public
227 Layout(LayoutPkgNamespaces layoutns) throws org.sbml.libsbml.SBMLConstructorException {
228    this(libsbmlJNI.new_Layout__SWIG_4(LayoutPkgNamespaces.getCPtr(layoutns), layoutns), true);
229  }
230
231  
232/**
233   * Creates a new {@link Layout} with the given <code>id</code> and dimensions.
234   <p>
235   * (FOR BACKWARD COMPATIBILITY)
236   */ public
237 Layout(LayoutPkgNamespaces layoutns, String id, Dimensions dimensions) throws org.sbml.libsbml.SBMLConstructorException {
238    this(libsbmlJNI.new_Layout__SWIG_5(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, id, Dimensions.getCPtr(dimensions), dimensions), true);
239  }
240
241  
242/**
243   * Creates a new {@link Layout} from the given {@link XMLNode}
244   * (only for SBML Level2)
245   <p>
246   * (FOR BACKWARD COMPATIBILITY)
247   */ public
248 Layout(XMLNode node, long l2version) throws org.sbml.libsbml.SBMLConstructorException {
249    this(libsbmlJNI.new_Layout__SWIG_6(XMLNode.getCPtr(node), node, l2version), true);
250  }
251
252  
253/**
254   * Creates a new {@link Layout} from the given {@link XMLNode}
255   * (only for SBML Level2)
256   <p>
257   * (FOR BACKWARD COMPATIBILITY)
258   */ public
259 Layout(XMLNode node) throws org.sbml.libsbml.SBMLConstructorException {
260    this(libsbmlJNI.new_Layout__SWIG_7(XMLNode.getCPtr(node), node), true);
261  }
262
263  
264/**
265   * Copy constructor.
266   <p>
267   * @param source the instance to copy.
268   */ public
269 Layout(Layout source) throws org.sbml.libsbml.SBMLConstructorException {
270    this(libsbmlJNI.new_Layout__SWIG_8(Layout.getCPtr(source), source), true);
271  }
272
273  
274/**
275   * Does nothing since no defaults are defined for {@link Layout}.
276   */ public
277 void initDefaults() {
278    libsbmlJNI.Layout_initDefaults(swigCPtr, this);
279  }
280
281  
282/**
283   * Returns the value of the 'id' attribute of this {@link Layout}.
284   <p>
285   * @note Because of the inconsistent behavior of this function with 
286   * respect to assignments and rules, it is now recommended to
287   * use the getIdAttribute() function instead.
288   <p>
289   * <p>
290 * The identifier given by an object's 'id' attribute value
291 * is used to identify the object within the SBML model definition.
292 * Other objects can refer to the component using this identifier.  The
293 * data type of 'id' is always <code>SId</code> or a type derived
294 * from that, such as <code>UnitSId</code>, depending on the object in 
295 * question.  All data types are defined as follows:
296 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
297 *   letter .= 'a'..'z','A'..'Z'
298 *   digit  .= '0'..'9'
299 *   idChar .= letter | digit | '_'
300 *   SId    .= ( letter | '_' ) idChar*
301 * </pre>
302 <p>
303 * The characters <code>(</code> and <code>)</code> are used for grouping, the
304 * character <code>*</code> 'zero or more times', and the character
305 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
306 * determined by an exact character sequence match; i.e., comparisons must be
307 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
308 * <code>SIdRef</code>, and derived types.
309 <p>
310 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
311 * moved to {@link SBase} directly, instead of being defined individually for many
312 * (but not all) objects.  Libsbml has for a long time provided functions
313 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
314 * would fail or otherwise return empty strings if executed on any object 
315 * for which those attributes were not defined.  Now that all {@link SBase} objects 
316 * define those attributes, those functions now succeed for any object with 
317 * the appropriate level and version.
318 <p>
319 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
320 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
321 * functions (though not the setId() or unsetId() functions) would instead 
322 * reference the value of the 'variable' attribute (for the rules and event 
323 * assignments) or the 'symbol' attribute (for initial assignments).  
324 * The {@link AlgebraicRule} fell into this category as well, though because it 
325 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
326 * always return an empty string, and isSetId() would always return <code>false.</code>
327 * For this reason, four new functions are now provided 
328 * (getIdAttribute(), setIdAttribute(String), 
329 * isSetIdAttribute(), and unsetIdAttribute()) that will always
330 * act on the actual 'id' attribute, regardless of the object's type.  The
331 * new functions should be used instead of the old ones unless the old behavior
332 * is somehow necessary.
333 <p>
334 * Regardless of the level and version of the SBML, these functions allow
335 * client applications to use more generalized code in some situations 
336 * (for instance, when manipulating objects that are all known to have 
337 * identifiers).  If the object in question does not posess an 'id' attribute 
338 * according to the SBML specification for the Level and Version in use,
339 * libSBML will not allow the identifier to be set, nor will it read or 
340 * write 'id' attributes for those objects.
341   <p>
342   * @return the id of this {@link Layout}.
343   <p>
344   * @see #getIdAttribute()
345   * @see #setIdAttribute(String sid)
346   * @see #isSetIdAttribute()
347   * @see #unsetIdAttribute()
348   */ public
349 String getId() {
350    return libsbmlJNI.Layout_getId(swigCPtr, this);
351  }
352
353  
354/**
355   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
356   * {@link Layout}'s 'id' attribute has been set.
357   <p>
358   * <p>
359 * @note Because of the inconsistent behavior of this function with 
360 * respect to assignments and rules, it is now recommended to
361 * use the isSetIdAttribute() function instead.
362 <p>
363 * <p>
364 * The identifier given by an object's 'id' attribute value
365 * is used to identify the object within the SBML model definition.
366 * Other objects can refer to the component using this identifier.  The
367 * data type of 'id' is always <code>SId</code> or a type derived
368 * from that, such as <code>UnitSId</code>, depending on the object in 
369 * question.  All data types are defined as follows:
370 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
371 *   letter .= 'a'..'z','A'..'Z'
372 *   digit  .= '0'..'9'
373 *   idChar .= letter | digit | '_'
374 *   SId    .= ( letter | '_' ) idChar*
375 * </pre>
376 <p>
377 * The characters <code>(</code> and <code>)</code> are used for grouping, the
378 * character <code>*</code> 'zero or more times', and the character
379 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
380 * determined by an exact character sequence match; i.e., comparisons must be
381 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
382 * <code>SIdRef</code>, and derived types.
383 <p>
384 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
385 * moved to {@link SBase} directly, instead of being defined individually for many
386 * (but not all) objects.  Libsbml has for a long time provided functions
387 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
388 * would fail or otherwise return empty strings if executed on any object 
389 * for which those attributes were not defined.  Now that all {@link SBase} objects 
390 * define those attributes, those functions now succeed for any object with 
391 * the appropriate level and version.
392 <p>
393 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
394 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
395 * functions (though not the setId() or unsetId() functions) would instead 
396 * reference the value of the 'variable' attribute (for the rules and event 
397 * assignments) or the 'symbol' attribute (for initial assignments).  
398 * The {@link AlgebraicRule} fell into this category as well, though because it 
399 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
400 * always return an empty string, and isSetId() would always return <code>false.</code>
401 * For this reason, four new functions are now provided 
402 * (getIdAttribute(), setIdAttribute(String), 
403 * isSetIdAttribute(), and unsetIdAttribute()) that will always
404 * act on the actual 'id' attribute, regardless of the object's type.  The
405 * new functions should be used instead of the old ones unless the old behavior
406 * is somehow necessary.
407 <p>
408 * Regardless of the level and version of the SBML, these functions allow
409 * client applications to use more generalized code in some situations 
410 * (for instance, when manipulating objects that are all known to have 
411 * identifiers).  If the object in question does not posess an 'id' attribute 
412 * according to the SBML specification for the Level and Version in use,
413 * libSBML will not allow the identifier to be set, nor will it read or 
414 * write 'id' attributes for those objects.
415 <p>
416 * @return <code>true</code> if the 'id' attribute of this SBML object is
417 * set, <code>false</code> otherwise.
418 <p>
419 * @see #getIdAttribute()
420 * @see #setIdAttribute(String sid)
421 * @see #unsetIdAttribute()
422 * @see #isSetIdAttribute()
423   */ public
424 boolean isSetId() {
425    return libsbmlJNI.Layout_isSetId(swigCPtr, this);
426  }
427
428  
429/**
430   * Sets the value of the 'id' attribute of this {@link Layout}.
431   <p>
432   * <p>
433 * The string <code>sid</code> is copied.
434 <p>
435 * <p>
436 * The identifier given by an object's 'id' attribute value
437 * is used to identify the object within the SBML model definition.
438 * Other objects can refer to the component using this identifier.  The
439 * data type of 'id' is always <code>SId</code> or a type derived
440 * from that, such as <code>UnitSId</code>, depending on the object in 
441 * question.  All data types are defined as follows:
442 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
443 *   letter .= 'a'..'z','A'..'Z'
444 *   digit  .= '0'..'9'
445 *   idChar .= letter | digit | '_'
446 *   SId    .= ( letter | '_' ) idChar*
447 * </pre>
448 <p>
449 * The characters <code>(</code> and <code>)</code> are used for grouping, the
450 * character <code>*</code> 'zero or more times', and the character
451 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
452 * determined by an exact character sequence match; i.e., comparisons must be
453 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
454 * <code>SIdRef</code>, and derived types.
455 <p>
456 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
457 * moved to {@link SBase} directly, instead of being defined individually for many
458 * (but not all) objects.  Libsbml has for a long time provided functions
459 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
460 * would fail or otherwise return empty strings if executed on any object 
461 * for which those attributes were not defined.  Now that all {@link SBase} objects 
462 * define those attributes, those functions now succeed for any object with 
463 * the appropriate level and version.
464 <p>
465 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
466 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
467 * functions (though not the setId() or unsetId() functions) would instead 
468 * reference the value of the 'variable' attribute (for the rules and event 
469 * assignments) or the 'symbol' attribute (for initial assignments).  
470 * The {@link AlgebraicRule} fell into this category as well, though because it 
471 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
472 * always return an empty string, and isSetId() would always return <code>false.</code>
473 * For this reason, four new functions are now provided 
474 * (getIdAttribute(), setIdAttribute(String), 
475 * isSetIdAttribute(), and unsetIdAttribute()) that will always
476 * act on the actual 'id' attribute, regardless of the object's type.  The
477 * new functions should be used instead of the old ones unless the old behavior
478 * is somehow necessary.
479 <p>
480 * Regardless of the level and version of the SBML, these functions allow
481 * client applications to use more generalized code in some situations 
482 * (for instance, when manipulating objects that are all known to have 
483 * identifiers).  If the object in question does not posess an 'id' attribute 
484 * according to the SBML specification for the Level and Version in use,
485 * libSBML will not allow the identifier to be set, nor will it read or 
486 * write 'id' attributes for those objects.
487 <p>
488 * @param sid the string to use as the identifier of this object.
489 <p>
490 * <p>
491 * @return integer value indicating success/failure of the
492 * function.   The possible values
493 * returned by this function are:
494 * <ul>
495 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
496 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
497 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
498 *
499 * </ul> <p>
500 * @see #getIdAttribute()
501 * @see #setIdAttribute(String sid)
502 * @see #isSetIdAttribute()
503 * @see #unsetIdAttribute()
504   */ public
505 int setId(String sid) {
506    return libsbmlJNI.Layout_setId(swigCPtr, this, sid);
507  }
508
509  
510/**
511   * Unsets the value of the 'id' attribute of this {@link Layout}.
512   <p>
513   * <p>
514 * <p>
515 * The identifier given by an object's 'id' attribute value
516 * is used to identify the object within the SBML model definition.
517 * Other objects can refer to the component using this identifier.  The
518 * data type of 'id' is always <code>SId</code> or a type derived
519 * from that, such as <code>UnitSId</code>, depending on the object in 
520 * question.  All data types are defined as follows:
521 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
522 *   letter .= 'a'..'z','A'..'Z'
523 *   digit  .= '0'..'9'
524 *   idChar .= letter | digit | '_'
525 *   SId    .= ( letter | '_' ) idChar*
526 * </pre>
527 <p>
528 * The characters <code>(</code> and <code>)</code> are used for grouping, the
529 * character <code>*</code> 'zero or more times', and the character
530 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
531 * determined by an exact character sequence match; i.e., comparisons must be
532 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
533 * <code>SIdRef</code>, and derived types.
534 <p>
535 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
536 * moved to {@link SBase} directly, instead of being defined individually for many
537 * (but not all) objects.  Libsbml has for a long time provided functions
538 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
539 * would fail or otherwise return empty strings if executed on any object 
540 * for which those attributes were not defined.  Now that all {@link SBase} objects 
541 * define those attributes, those functions now succeed for any object with 
542 * the appropriate level and version.
543 <p>
544 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
545 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
546 * functions (though not the setId() or unsetId() functions) would instead 
547 * reference the value of the 'variable' attribute (for the rules and event 
548 * assignments) or the 'symbol' attribute (for initial assignments).  
549 * The {@link AlgebraicRule} fell into this category as well, though because it 
550 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
551 * always return an empty string, and isSetId() would always return <code>false.</code>
552 * For this reason, four new functions are now provided 
553 * (getIdAttribute(), setIdAttribute(String), 
554 * isSetIdAttribute(), and unsetIdAttribute()) that will always
555 * act on the actual 'id' attribute, regardless of the object's type.  The
556 * new functions should be used instead of the old ones unless the old behavior
557 * is somehow necessary.
558 <p>
559 * Regardless of the level and version of the SBML, these functions allow
560 * client applications to use more generalized code in some situations 
561 * (for instance, when manipulating objects that are all known to have 
562 * identifiers).  If the object in question does not posess an 'id' attribute 
563 * according to the SBML specification for the Level and Version in use,
564 * libSBML will not allow the identifier to be set, nor will it read or 
565 * write 'id' attributes for those objects.
566 <p>
567 * <p>
568 * @return integer value indicating success/failure of the
569 * function.   The possible values
570 * returned by this function are:
571 * <ul>
572 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
573 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
574 *
575 * </ul> <p>
576 * @see #getIdAttribute()
577 * @see #setIdAttribute(String sid)
578 * @see #isSetIdAttribute()
579 * @see #unsetIdAttribute()
580   */ public
581 int unsetId() {
582    return libsbmlJNI.Layout_unsetId(swigCPtr, this);
583  }
584
585  
586/**
587   * Returns the value of the 'name' attribute of this {@link Layout} object.
588   <p>
589   * <p>
590 * <p>
591 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
592 * moved to {@link SBase} directly, instead of being defined individually for many
593 * (but not all) objects.  Libsbml has for a long time provided functions
594 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
595 * would fail or otherwise return empty strings if executed on any object 
596 * for which those attributes were not defined.  Now that all {@link SBase} objects 
597 * define those attributes, those functions now succeed for any object with 
598 * the appropriate level and version.
599 <p>
600 * The 'name' attribute is
601 * optional and is not intended to be used for cross-referencing purposes
602 * within a model.  Its purpose instead is to provide a human-readable
603 * label for the component.  The data type of 'name' is the type
604 * <code>string</code> defined in XML Schema.  SBML imposes no
605 * restrictions as to the content of 'name' attributes beyond those
606 * restrictions defined by the <code>string</code> type in XML Schema.
607 <p>
608 * The recommended practice for handling 'name' is as follows.  If a
609 * software tool has the capability for displaying the content of 'name'
610 * attributes, it should display this content to the user as a
611 * component's label instead of the component's 'id'.  If the user
612 * interface does not have this capability (e.g., because it cannot
613 * display or use special characters in symbol names), or if the 'name'
614 * attribute is missing on a given component, then the user interface
615 * should display the value of the 'id' attribute instead.  (Script
616 * language interpreters are especially likely to display 'id' instead of
617 * 'name'.)
618 <p>
619 * As a consequence of the above, authors of systems that automatically
620 * generate the values of 'id' attributes should be aware some systems
621 * may display the 'id''s to the user.  Authors therefore may wish to
622 * take some care to have their software create 'id' values that are: (a)
623 * reasonably easy for humans to type and read; and (b) likely to be
624 * meaningful, for example by making the 'id' attribute be an abbreviated
625 * form of the name attribute value.
626 <p>
627 * An additional point worth mentioning is although there are
628 * restrictions on the uniqueness of 'id' values, there are no
629 * restrictions on the uniqueness of 'name' values in a model.  This
630 * allows software applications leeway in assigning component identifiers.
631 <p>
632 * Regardless of the level and version of the SBML, these functions allow
633 * client applications to use more generalized code in some situations 
634 * (for instance, when manipulating objects that are all known to have 
635 * names).  If the object in question does not posess a 'name' attribute 
636 * according to the SBML specification for the Level and Version in use,
637 * libSBML will not allow the name to be set, nor will it read or 
638 * write 'name' attributes for those objects.
639 <p>
640 * @return the name of this SBML object, or the empty string if not set or unsettable.
641 <p>
642 * @see #getIdAttribute()
643 * @see #isSetName()
644 * @see #setName(String sid)
645 * @see #unsetName()
646   */ public
647 String getName() {
648    return libsbmlJNI.Layout_getName(swigCPtr, this);
649  }
650
651  
652/**
653   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
654   * {@link Layout}'s 'name' attribute has been set.
655   <p>
656   * <p>
657 * <p>
658 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
659 * moved to {@link SBase} directly, instead of being defined individually for many
660 * (but not all) objects.  Libsbml has for a long time provided functions
661 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
662 * would fail or otherwise return empty strings if executed on any object 
663 * for which those attributes were not defined.  Now that all {@link SBase} objects 
664 * define those attributes, those functions now succeed for any object with 
665 * the appropriate level and version.
666 <p>
667 * The 'name' attribute is
668 * optional and is not intended to be used for cross-referencing purposes
669 * within a model.  Its purpose instead is to provide a human-readable
670 * label for the component.  The data type of 'name' is the type
671 * <code>string</code> defined in XML Schema.  SBML imposes no
672 * restrictions as to the content of 'name' attributes beyond those
673 * restrictions defined by the <code>string</code> type in XML Schema.
674 <p>
675 * The recommended practice for handling 'name' is as follows.  If a
676 * software tool has the capability for displaying the content of 'name'
677 * attributes, it should display this content to the user as a
678 * component's label instead of the component's 'id'.  If the user
679 * interface does not have this capability (e.g., because it cannot
680 * display or use special characters in symbol names), or if the 'name'
681 * attribute is missing on a given component, then the user interface
682 * should display the value of the 'id' attribute instead.  (Script
683 * language interpreters are especially likely to display 'id' instead of
684 * 'name'.)
685 <p>
686 * As a consequence of the above, authors of systems that automatically
687 * generate the values of 'id' attributes should be aware some systems
688 * may display the 'id''s to the user.  Authors therefore may wish to
689 * take some care to have their software create 'id' values that are: (a)
690 * reasonably easy for humans to type and read; and (b) likely to be
691 * meaningful, for example by making the 'id' attribute be an abbreviated
692 * form of the name attribute value.
693 <p>
694 * An additional point worth mentioning is although there are
695 * restrictions on the uniqueness of 'id' values, there are no
696 * restrictions on the uniqueness of 'name' values in a model.  This
697 * allows software applications leeway in assigning component identifiers.
698 <p>
699 * Regardless of the level and version of the SBML, these functions allow
700 * client applications to use more generalized code in some situations 
701 * (for instance, when manipulating objects that are all known to have 
702 * names).  If the object in question does not posess a 'name' attribute 
703 * according to the SBML specification for the Level and Version in use,
704 * libSBML will not allow the name to be set, nor will it read or 
705 * write 'name' attributes for those objects.
706 <p>
707 * @return <code>true</code> if the 'name' attribute of this SBML object is
708 * set, <code>false</code> otherwise.
709 <p>
710 * @see #getName()
711 * @see #setName(String sid)
712 * @see #unsetName()
713   */ public
714 boolean isSetName() {
715    return libsbmlJNI.Layout_isSetName(swigCPtr, this);
716  }
717
718  
719/**
720   * Sets the value of the 'name' attribute of this {@link Layout}.
721   <p>
722   * <p>
723 * The string in <code>name</code> is copied.
724 <p>
725 * @param name the new name for the SBML object.
726 <p>
727 * <p>
728 * @return integer value indicating success/failure of the
729 * function.   The possible values
730 * returned by this function are:
731 * <ul>
732 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
733 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
734 *
735 * </ul>
736   */ public
737 int setName(String name) {
738    return libsbmlJNI.Layout_setName(swigCPtr, this, name);
739  }
740
741  
742/**
743   * Unsets the value of the 'name' attribute of this {@link Layout}.
744   <p>
745   * <p>
746 * <p>
747 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
748 * moved to {@link SBase} directly, instead of being defined individually for many
749 * (but not all) objects.  Libsbml has for a long time provided functions
750 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
751 * would fail or otherwise return empty strings if executed on any object 
752 * for which those attributes were not defined.  Now that all {@link SBase} objects 
753 * define those attributes, those functions now succeed for any object with 
754 * the appropriate level and version.
755 <p>
756 * The 'name' attribute is
757 * optional and is not intended to be used for cross-referencing purposes
758 * within a model.  Its purpose instead is to provide a human-readable
759 * label for the component.  The data type of 'name' is the type
760 * <code>string</code> defined in XML Schema.  SBML imposes no
761 * restrictions as to the content of 'name' attributes beyond those
762 * restrictions defined by the <code>string</code> type in XML Schema.
763 <p>
764 * The recommended practice for handling 'name' is as follows.  If a
765 * software tool has the capability for displaying the content of 'name'
766 * attributes, it should display this content to the user as a
767 * component's label instead of the component's 'id'.  If the user
768 * interface does not have this capability (e.g., because it cannot
769 * display or use special characters in symbol names), or if the 'name'
770 * attribute is missing on a given component, then the user interface
771 * should display the value of the 'id' attribute instead.  (Script
772 * language interpreters are especially likely to display 'id' instead of
773 * 'name'.)
774 <p>
775 * As a consequence of the above, authors of systems that automatically
776 * generate the values of 'id' attributes should be aware some systems
777 * may display the 'id''s to the user.  Authors therefore may wish to
778 * take some care to have their software create 'id' values that are: (a)
779 * reasonably easy for humans to type and read; and (b) likely to be
780 * meaningful, for example by making the 'id' attribute be an abbreviated
781 * form of the name attribute value.
782 <p>
783 * An additional point worth mentioning is although there are
784 * restrictions on the uniqueness of 'id' values, there are no
785 * restrictions on the uniqueness of 'name' values in a model.  This
786 * allows software applications leeway in assigning component identifiers.
787 <p>
788 * Regardless of the level and version of the SBML, these functions allow
789 * client applications to use more generalized code in some situations 
790 * (for instance, when manipulating objects that are all known to have 
791 * names).  If the object in question does not posess a 'name' attribute 
792 * according to the SBML specification for the Level and Version in use,
793 * libSBML will not allow the name to be set, nor will it read or 
794 * write 'name' attributes for those objects.
795 <p>
796 * <p>
797 * @return integer value indicating success/failure of the
798 * function.   The possible values
799 * returned by this function are:
800 * <ul>
801 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
802 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
803 *
804 * </ul> <p>
805 * @see #getName()
806 * @see #setName(String sid)
807 * @see #isSetName()
808   */ public
809 int unsetName() {
810    return libsbmlJNI.Layout_unsetName(swigCPtr, this);
811  }
812
813  
814/**
815   * Returns the dimensions of the layout.
816   */ public
817 Dimensions getDimensions() {
818    long cPtr = libsbmlJNI.Layout_getDimensions(swigCPtr, this);
819    return (cPtr == 0) ? null : new Dimensions(cPtr, false);
820  }
821
822  
823/**
824   * Sets the dimensions of the layout.
825   */ public
826 void setDimensions(Dimensions dimensions) {
827    libsbmlJNI.Layout_setDimensions(swigCPtr, this, Dimensions.getCPtr(dimensions), dimensions);
828  }
829
830  
831/**
832   * Predicate returning true if the dimensions has been set
833   */ public
834 boolean getDimensionsExplicitlySet() {
835    return libsbmlJNI.Layout_getDimensionsExplicitlySet(swigCPtr, this);
836  }
837
838  
839/**
840   * Returns the {@link ListOf} object that holds all compartment glyphs.
841   */ public
842 ListOfCompartmentGlyphs getListOfCompartmentGlyphs() {
843    long cPtr = libsbmlJNI.Layout_getListOfCompartmentGlyphs(swigCPtr, this);
844    return (cPtr == 0) ? null : new ListOfCompartmentGlyphs(cPtr, false);
845  }
846
847  
848/**
849   * Returns the {@link ListOf} object that holds all species glyphs.
850   */ public
851 ListOfSpeciesGlyphs getListOfSpeciesGlyphs() {
852    long cPtr = libsbmlJNI.Layout_getListOfSpeciesGlyphs(swigCPtr, this);
853    return (cPtr == 0) ? null : new ListOfSpeciesGlyphs(cPtr, false);
854  }
855
856  
857/**
858   * Returns the {@link ListOf} object that holds all reaction glyphs.
859   */ public
860 ListOfReactionGlyphs getListOfReactionGlyphs() {
861    long cPtr = libsbmlJNI.Layout_getListOfReactionGlyphs(swigCPtr, this);
862    return (cPtr == 0) ? null : new ListOfReactionGlyphs(cPtr, false);
863  }
864
865  
866/**
867   * Returns the {@link ListOf} object that holds all text glyphs.
868   */ public
869 ListOfTextGlyphs getListOfTextGlyphs() {
870    long cPtr = libsbmlJNI.Layout_getListOfTextGlyphs(swigCPtr, this);
871    return (cPtr == 0) ? null : new ListOfTextGlyphs(cPtr, false);
872  }
873
874  
875/**
876   * Returns the {@link ListOf} object that holds all additional graphical objects.
877   */ public
878 ListOfGraphicalObjects getListOfAdditionalGraphicalObjects() {
879    long cPtr = libsbmlJNI.Layout_getListOfAdditionalGraphicalObjects(swigCPtr, this);
880    return (cPtr == 0) ? null : new ListOfGraphicalObjects(cPtr, false);
881  }
882
883  
884/**
885   * Returns the compartment glyph with the given index.
886   * If the index is invalid, <code>null</code> is returned.
887   */ public
888 CompartmentGlyph getCompartmentGlyph(long index) {
889    long cPtr = libsbmlJNI.Layout_getCompartmentGlyph__SWIG_0(swigCPtr, this, index);
890    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, false);
891  }
892
893  
894/**
895   * Returns the species glyph with the given index.
896   * If the index is invalid, <code>null</code> is returned.
897   */ public
898 SpeciesGlyph getSpeciesGlyph(long index) {
899    long cPtr = libsbmlJNI.Layout_getSpeciesGlyph__SWIG_0(swigCPtr, this, index);
900    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, false);
901  }
902
903  
904/**
905   * Returns the reaction glyph with the given index.
906   * If the index is invalid, <code>null</code> is returned.
907   */ public
908 ReactionGlyph getReactionGlyph(long index) {
909    long cPtr = libsbmlJNI.Layout_getReactionGlyph__SWIG_0(swigCPtr, this, index);
910    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, false);
911  }
912
913  
914/**
915   * Returns the text glyph with the given index.
916   * If the index is invalid, <code>null</code> is returned.
917   */ public
918 TextGlyph getTextGlyph(long index) {
919    long cPtr = libsbmlJNI.Layout_getTextGlyph__SWIG_0(swigCPtr, this, index);
920    return (cPtr == 0) ? null : new TextGlyph(cPtr, false);
921  }
922
923  
924/**
925   * Returns the additional graphical object with the given index.
926   * If the index is invalid, <code>null</code> is returned.
927   */ public
928 GraphicalObject getAdditionalGraphicalObject(long index) {
929    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_getAdditionalGraphicalObject__SWIG_0(swigCPtr, this, index), false);
930}
931
932  
933/**
934   * Returns the general glyph with the given index.
935   * If the index is invalid, <code>null</code> is returned.
936   */ public
937 GeneralGlyph getGeneralGlyph(long index) {
938    long cPtr = libsbmlJNI.Layout_getGeneralGlyph__SWIG_0(swigCPtr, this, index);
939    return (cPtr == 0) ? null : new GeneralGlyph(cPtr, false);
940  }
941
942  
943/**
944   * Returns the compartment glyph that has the given <code>id</code>, or <code>null</code> if no
945   * compartment glyph has the id.
946   */ public
947 CompartmentGlyph getCompartmentGlyph(String id) {
948    long cPtr = libsbmlJNI.Layout_getCompartmentGlyph__SWIG_2(swigCPtr, this, id);
949    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, false);
950  }
951
952  
953/**
954   * Returns the species glyph that has the given <code>id</code>, or <code>null</code> if no species
955   * glyph has the id.
956   */ public
957 SpeciesGlyph getSpeciesGlyph(String id) {
958    long cPtr = libsbmlJNI.Layout_getSpeciesGlyph__SWIG_2(swigCPtr, this, id);
959    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, false);
960  }
961
962  
963/**
964   * Returns the reaction glyph that has the given <code>id</code>, or <code>null</code> if no
965   * reaction glyph has the id.
966   */ public
967 ReactionGlyph getReactionGlyph(String id) {
968    long cPtr = libsbmlJNI.Layout_getReactionGlyph__SWIG_2(swigCPtr, this, id);
969    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, false);
970  }
971
972  
973/**
974   * Returns the text glyph that has the given <code>id</code>, or <code>null</code> if no text glyph
975   * has the id.
976   */ public
977 TextGlyph getTextGlyph(String id) {
978    long cPtr = libsbmlJNI.Layout_getTextGlyph__SWIG_2(swigCPtr, this, id);
979    return (cPtr == 0) ? null : new TextGlyph(cPtr, false);
980  }
981
982  
983/**
984   * Returns the additional graphical object that has the given <code>id</code>, or <code>null</code>
985   * if no graphical object has the id.
986   */ public
987 GraphicalObject getAdditionalGraphicalObject(String id) {
988    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_getAdditionalGraphicalObject__SWIG_2(swigCPtr, this, id), false);
989}
990
991  
992/**
993   * Returns the general glyph that has the given <code>id</code>, or <code>null</code>
994   * if no graphical object has the id.
995   */ public
996 GeneralGlyph getGeneralGlyph(String id) {
997    long cPtr = libsbmlJNI.Layout_getGeneralGlyph__SWIG_2(swigCPtr, this, id);
998    return (cPtr == 0) ? null : new GeneralGlyph(cPtr, false);
999  }
1000
1001  
1002/**
1003   * Adds a new compartment glyph.
1004   */ public
1005 int addCompartmentGlyph(CompartmentGlyph glyph) {
1006    return libsbmlJNI.Layout_addCompartmentGlyph(swigCPtr, this, CompartmentGlyph.getCPtr(glyph), glyph);
1007  }
1008
1009  
1010/**
1011   * Adds a new species glyph.
1012   */ public
1013 int addSpeciesGlyph(SpeciesGlyph glyph) {
1014    return libsbmlJNI.Layout_addSpeciesGlyph(swigCPtr, this, SpeciesGlyph.getCPtr(glyph), glyph);
1015  }
1016
1017  
1018/**
1019   * Adds a new reaction glyph.
1020   */ public
1021 int addReactionGlyph(ReactionGlyph glyph) {
1022    return libsbmlJNI.Layout_addReactionGlyph(swigCPtr, this, ReactionGlyph.getCPtr(glyph), glyph);
1023  }
1024
1025  
1026/**
1027   * Adds a new text glyph.
1028   */ public
1029 int addTextGlyph(TextGlyph glyph) {
1030    return libsbmlJNI.Layout_addTextGlyph(swigCPtr, this, TextGlyph.getCPtr(glyph), glyph);
1031  }
1032
1033  
1034/**
1035   * Adds a new additional graphical object glyph.
1036   */ public
1037 int addAdditionalGraphicalObject(GraphicalObject glyph) {
1038    return libsbmlJNI.Layout_addAdditionalGraphicalObject(swigCPtr, this, GraphicalObject.getCPtr(glyph), glyph);
1039  }
1040
1041  
1042/**
1043   * Adds a new general glyph.
1044   */ public
1045 int addGeneralGlyph(GeneralGlyph glyph) {
1046    return libsbmlJNI.Layout_addGeneralGlyph(swigCPtr, this, GeneralGlyph.getCPtr(glyph), glyph);
1047  }
1048
1049  
1050/**
1051   * Returns the number of compartment glyphs for the layout.
1052   */ public
1053 long getNumCompartmentGlyphs() {
1054    return libsbmlJNI.Layout_getNumCompartmentGlyphs(swigCPtr, this);
1055  }
1056
1057  
1058/**
1059   * Returns the number of species glyphs for the layout.
1060   */ public
1061 long getNumSpeciesGlyphs() {
1062    return libsbmlJNI.Layout_getNumSpeciesGlyphs(swigCPtr, this);
1063  }
1064
1065  
1066/**
1067   * Returns the number of reaction glyphs for the layout.
1068   */ public
1069 long getNumReactionGlyphs() {
1070    return libsbmlJNI.Layout_getNumReactionGlyphs(swigCPtr, this);
1071  }
1072
1073  
1074/**
1075   * Returns the number of text glyphs for the layout.
1076   */ public
1077 long getNumTextGlyphs() {
1078    return libsbmlJNI.Layout_getNumTextGlyphs(swigCPtr, this);
1079  }
1080
1081  
1082/**
1083   * Returns the number of additional graphical objects for the layout.
1084   */ public
1085 long getNumAdditionalGraphicalObjects() {
1086    return libsbmlJNI.Layout_getNumAdditionalGraphicalObjects(swigCPtr, this);
1087  }
1088
1089  
1090/**
1091   * Returns the number of general glyphs for the layout.
1092   */ public
1093 long getNumGeneralGlyphs() {
1094    return libsbmlJNI.Layout_getNumGeneralGlyphs(swigCPtr, this);
1095  }
1096
1097  
1098/**
1099   * Creates a {@link CompartmentGlyph} object, adds it to the end of the
1100   * compartment glyph objects list and returns a pointer to the newly
1101   * created object.
1102   */ public
1103 CompartmentGlyph createCompartmentGlyph() {
1104    long cPtr = libsbmlJNI.Layout_createCompartmentGlyph(swigCPtr, this);
1105    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, false);
1106  }
1107
1108  
1109/**
1110   * Creates a {@link SpeciesGlyph} object, adds it to the end of the species glyph
1111   * objects list and returns a pointer to the newly created object.
1112   */ public
1113 SpeciesGlyph createSpeciesGlyph() {
1114    long cPtr = libsbmlJNI.Layout_createSpeciesGlyph(swigCPtr, this);
1115    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, false);
1116  }
1117
1118  
1119/**
1120   * Creates a {@link ReactionGlyph} object, adds it to the end of the reaction
1121   * glyph objects list and returns a pointer to the newly created
1122   * object.
1123   */ public
1124 ReactionGlyph createReactionGlyph() {
1125    long cPtr = libsbmlJNI.Layout_createReactionGlyph(swigCPtr, this);
1126    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, false);
1127  }
1128
1129  
1130/**
1131   * Creates a {@link GeneralGlyph} object, adds it to the end of the additional 
1132   * objects list and returns a reference to the newly created object.
1133   */ public
1134 GeneralGlyph createGeneralGlyph() {
1135    long cPtr = libsbmlJNI.Layout_createGeneralGlyph(swigCPtr, this);
1136    return (cPtr == 0) ? null : new GeneralGlyph(cPtr, false);
1137  }
1138
1139  
1140/**
1141   * Creates a {@link TextGlyph} object, adds it to the end of the text glyph
1142   * objects list and returns a pointer to the newly created object.
1143   */ public
1144 TextGlyph createTextGlyph() {
1145    long cPtr = libsbmlJNI.Layout_createTextGlyph(swigCPtr, this);
1146    return (cPtr == 0) ? null : new TextGlyph(cPtr, false);
1147  }
1148
1149  
1150/**
1151   * Creates a {@link GraphicalObject} object, adds it to the end of the additional
1152   * graphical objects list and returns a pointer to the newly created
1153   * object.
1154   */ public
1155 GraphicalObject createAdditionalGraphicalObject() {
1156    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_createAdditionalGraphicalObject(swigCPtr, this), false);
1157}
1158
1159  
1160/**
1161   * Creates a new {@link SpeciesReferenceGlyph} for the last {@link ReactionGlyph} and
1162   * adds it to its list of {@link SpeciesReferenceGlyph} objects.  A pointer to
1163   * the newly created object is returned.
1164   */ public
1165 SpeciesReferenceGlyph createSpeciesReferenceGlyph() {
1166    long cPtr = libsbmlJNI.Layout_createSpeciesReferenceGlyph(swigCPtr, this);
1167    return (cPtr == 0) ? null : new SpeciesReferenceGlyph(cPtr, false);
1168  }
1169
1170  
1171/**
1172   * Creates a new {@link LineSegment} for the {@link Curve} object of the last
1173   * {@link ReactionGlyph} or the last {@link SpeciesReferenceGlyph} in the last
1174   * {@link ReactionGlyph} and adds it to its list of {@link SpeciesReferenceGlyph}
1175   * objects.  A pointer to the newly created object is returned.
1176   */ public
1177 LineSegment createLineSegment() {
1178    return (LineSegment) libsbml.DowncastSBase(libsbmlJNI.Layout_createLineSegment(swigCPtr, this), false);
1179}
1180
1181  
1182/**
1183   * Creates a new {@link CubicBezier} for the {@link Curve} object of the last
1184   * {@link ReactionGlyph} or the last {@link SpeciesReferenceGlyph} in the last
1185   * {@link ReactionGlyph} and adds it to its list of {@link SpeciesReferenceGlyph}
1186   * objects.  A pointer to the newly created object is returned.
1187   */ public
1188 CubicBezier createCubicBezier() {
1189    long cPtr = libsbmlJNI.Layout_createCubicBezier(swigCPtr, this);
1190    return (cPtr == 0) ? null : new CubicBezier(cPtr, false);
1191  }
1192
1193  
1194/**
1195   * Removes the compartment glyph with the given index from the layout.
1196   * A pointer to the compartment glyph that was removed is returned.
1197   * If no compartment glyph has been removed, <code>null</code> is returned.
1198   */ public
1199 CompartmentGlyph removeCompartmentGlyph(long index) {
1200    long cPtr = libsbmlJNI.Layout_removeCompartmentGlyph__SWIG_0(swigCPtr, this, index);
1201    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, true);
1202  }
1203
1204  
1205/**
1206   * Removes the species glyph with the given index from the layout.
1207   * A pointer to the species glyph that was removed is returned.
1208   * If no species glyph has been removed, <code>null</code> is returned.
1209   */ public
1210 SpeciesGlyph removeSpeciesGlyph(long index) {
1211    long cPtr = libsbmlJNI.Layout_removeSpeciesGlyph__SWIG_0(swigCPtr, this, index);
1212    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, true);
1213  }
1214
1215  
1216/**
1217   * Removes the reaction glyph with the given index from the layout.
1218   * A pointer to the reaction glyph that was removed is returned.
1219   * If no reaction glyph has been removed, <code>null</code> is returned.
1220   */ public
1221 ReactionGlyph removeReactionGlyph(long index) {
1222    long cPtr = libsbmlJNI.Layout_removeReactionGlyph__SWIG_0(swigCPtr, this, index);
1223    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, true);
1224  }
1225
1226  
1227/**
1228   * Removes the text glyph with the given index from the layout.
1229   * A pointer to the text glyph that was removed is returned.
1230   * If no text glyph has been removed, <code>null</code> is returned.
1231   */ public
1232 TextGlyph removeTextGlyph(long index) {
1233    long cPtr = libsbmlJNI.Layout_removeTextGlyph__SWIG_0(swigCPtr, this, index);
1234    return (cPtr == 0) ? null : new TextGlyph(cPtr, true);
1235  }
1236
1237  
1238/**
1239   * Removes the graphical object with the given index from the layout.
1240   * A pointer to the graphical object that was removed is returned.
1241   * If no graphical object has been removed, <code>null</code> is returned.
1242   */ public
1243 GraphicalObject removeAdditionalGraphicalObject(long index) {
1244    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_removeAdditionalGraphicalObject__SWIG_0(swigCPtr, this, index), true);
1245}
1246
1247  
1248/**
1249   * Remove the compartment glyph with the given <code>id</code>.
1250   * A pointer to the removed compartment glyph is returned.
1251   * If no compartment glyph has been removed, <code>null</code> is returned.
1252   */ public
1253 CompartmentGlyph removeCompartmentGlyph(String id) {
1254    long cPtr = libsbmlJNI.Layout_removeCompartmentGlyph__SWIG_1(swigCPtr, this, id);
1255    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, true);
1256  }
1257
1258  
1259/**
1260   * Remove the species glyph with the given <code>id</code>.
1261   * A pointer to the removed species glyph is returned.
1262   * If no species glyph has been removed, <code>null</code> is returned.
1263   */ public
1264 SpeciesGlyph removeSpeciesGlyph(String id) {
1265    long cPtr = libsbmlJNI.Layout_removeSpeciesGlyph__SWIG_1(swigCPtr, this, id);
1266    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, true);
1267  }
1268
1269  
1270/**
1271   * Remove the reaction glyph with the given <code>id</code>.
1272   * A pointer to the removed reaction glyph is returned.
1273   * If no reaction glyph has been removed, <code>null</code> is returned.
1274   */ public
1275 ReactionGlyph removeReactionGlyph(String id) {
1276    long cPtr = libsbmlJNI.Layout_removeReactionGlyph__SWIG_1(swigCPtr, this, id);
1277    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, true);
1278  }
1279
1280  
1281/**
1282   * Remove the species reference glyph with the given <code>id</code>.
1283   * A pointer to the removed species reference glyph is returned.
1284   * If no species reference glyph has been removed, <code>null</code> is returned.
1285   */ public
1286 SpeciesReferenceGlyph removeSpeciesReferenceGlyph(String id) {
1287    long cPtr = libsbmlJNI.Layout_removeSpeciesReferenceGlyph(swigCPtr, this, id);
1288    return (cPtr == 0) ? null : new SpeciesReferenceGlyph(cPtr, true);
1289  }
1290
1291  
1292/**
1293   * Remove the text glyph with the given <code>id</code>.
1294   * A pointer to the removed text glyph is returned.
1295   * If no text glyph has been removed, <code>null</code> is returned.
1296   */ public
1297 TextGlyph removeTextGlyph(String id) {
1298    long cPtr = libsbmlJNI.Layout_removeTextGlyph__SWIG_1(swigCPtr, this, id);
1299    return (cPtr == 0) ? null : new TextGlyph(cPtr, true);
1300  }
1301
1302  
1303/**
1304   * Remove the graphical object with the given <code>id</code>.
1305   * A pointer to the removed graphical object is returned.
1306   * If no graphical object has been removed, <code>null</code> is returned.
1307   */ public
1308 GraphicalObject removeAdditionalGraphicalObject(String id) {
1309    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_removeAdditionalGraphicalObject__SWIG_1(swigCPtr, this, id), true);
1310}
1311
1312  
1313/**
1314   * Returns the XML element name of
1315   * this SBML object.
1316   <p>
1317   * @return the string of the name of this element.
1318   */ public
1319 String getElementName() {
1320    return libsbmlJNI.Layout_getElementName(swigCPtr, this);
1321  }
1322
1323  
1324/**
1325   * Creates and returns a deep copy of this {@link Layout}.
1326   <p>
1327   * @return a (deep) copy of this {@link Layout}.
1328   */ public
1329 Layout cloneObject() {
1330    long cPtr = libsbmlJNI.Layout_cloneObject(swigCPtr, this);
1331    return (cPtr == 0) ? null : new Layout(cPtr, true);
1332  }
1333
1334  
1335/**
1336   * Returns the libSBML type code of this object instance.
1337   <p>
1338   * <p>
1339 * LibSBML attaches an identifying code to every kind of SBML object.  These
1340 * are integer constants known as <em>SBML type codes</em>.  The names of all
1341 * the codes begin with the characters <code>SBML_</code>.
1342 * In the Java language interface for libSBML, the
1343 * type codes are defined as static integer constants in the interface class
1344 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
1345 * package plug-ins may use overlapping type codes; to identify the package
1346 * to which a given object belongs, call the 
1347 * <code>{@link SBase#getPackageName()}
1348 * </code>
1349 * method on the object.
1350   <p>
1351   * @return the SBML type code for this object:
1352   * {@link libsbmlConstants#SBML_LAYOUT_LAYOUT SBML_LAYOUT_LAYOUT}.
1353   <p>
1354   * <p>
1355 * @warning <span class='warning'>The specific integer values of the possible
1356 * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
1357 * packages,  To fully identify the correct code, <strong>it is necessary to
1358 * invoke both getTypeCode() and getPackageName()</strong>.</span>
1359   <p>
1360   * @see #getElementName()
1361   * @see #getPackageName()
1362   */ public
1363 int getTypeCode() {
1364    return libsbmlJNI.Layout_getTypeCode(swigCPtr, this);
1365  }
1366
1367  
1368/**
1369    * Creates an {@link XMLNode} object from this.
1370    */ public
1371 XMLNode toXML() {
1372    return new XMLNode(libsbmlJNI.Layout_toXML(swigCPtr, this), true);
1373  }
1374
1375  public void connectToChild() {
1376    libsbmlJNI.Layout_connectToChild(swigCPtr, this);
1377  }
1378
1379  
1380/** * @internal */ public
1381 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
1382    libsbmlJNI.Layout_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
1383  }
1384
1385}