001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.0.10
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 Spatial dimensions of a 2D or 3D shape.
015 <p>
016 * A dimension is specified via the required attributes width, height, and an
017 * optional attribute depth, all of which are of type double. If the
018 * attribute depth is not specified, the object is a two dimensional object.
019 * The width attribute of {@link Dimensions} specifies the size of the object in the
020 * direction of the positive x axis, the height attribute specifies the size
021 * of the object along the positive y axis and the depth attribute specifies
022 * the size of the object along the positive z axis. All sizes for {@link Dimensions}
023 * objects are positive values, and so the attributes are not allowed to take
024 * negative values.  The {@link Dimensions} class also has an optional attribute id
025 * of type SId. While not used in the &ldquo;layout&rdquo; package, it can be
026 * used by programs to refer to the elements.
027 */
028
029public class Dimensions extends SBase {
030   private long swigCPtr;
031
032   protected Dimensions(long cPtr, boolean cMemoryOwn)
033   {
034     super(libsbmlJNI.Dimensions_SWIGUpcast(cPtr), cMemoryOwn);
035     swigCPtr = cPtr;
036   }
037
038   protected static long getCPtr(Dimensions obj)
039   {
040     return (obj == null) ? 0 : obj.swigCPtr;
041   }
042
043   protected static long getCPtrAndDisown (Dimensions obj)
044   {
045     long ptr = 0;
046
047     if (obj != null)
048     {
049       ptr             = obj.swigCPtr;
050       obj.swigCMemOwn = false;
051     }
052
053     return ptr;
054   }
055
056  protected void finalize() {
057    delete();
058  }
059
060  public synchronized void delete() {
061    if (swigCPtr != 0) {
062      if (swigCMemOwn) {
063        swigCMemOwn = false;
064        libsbmlJNI.delete_Dimensions(swigCPtr);
065      }
066      swigCPtr = 0;
067    }
068    super.delete();
069  }
070
071  
072/**
073   * Creates a new {@link Dimensions} object with the given level, version, and package version
074   * and with all sizes set to 0.0.
075   <p>
076   * @param level the SBML Level.
077   * @param version the Version within the SBML Level.
078   * @param pkgVersion the version of the package.
079   <p>
080   * <p>
081 * @note Attempting to add an object to an {@link SBMLDocument} having a different
082 * combination of SBML Level, Version and XML namespaces than the object
083 * itself will result in an error at the time a caller attempts to make the
084 * addition.  A parent object must have compatible Level, Version and XML
085 * namespaces.  (Strictly speaking, a parent may also have more XML
086 * namespaces than a child, but the reverse is not permitted.)  The
087 * restriction is necessary to ensure that an SBML model has a consistent
088 * overall structure.  This requires callers to manage their objects
089 * carefully, but the benefit is increased flexibility in how models can be
090 * created by permitting callers to create objects bottom-up if desired.  In
091 * situations where objects are not yet attached to parents (e.g.,
092 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
093 * libSBML determine such things as whether it is valid to assign a
094 * particular value to an attribute.  For packages, this means that the 
095 * parent object to which this package element is being added must have
096 * been created with the package namespace, or that the package namespace
097 * was added to it, even if that parent is not a package object itself.
098   */ public
099 Dimensions(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
100    this(libsbmlJNI.new_Dimensions__SWIG_0(level, version, pkgVersion), true);
101  }
102
103  
104/**
105   * Creates a new {@link Dimensions} object with the given level, version, and package version
106   * and with all sizes set to 0.0.
107   <p>
108   * @param level the SBML Level.
109   * @param version the Version within the SBML Level.
110   * @param pkgVersion the version of the package.
111   <p>
112   * <p>
113 * @note Attempting to add an object to an {@link SBMLDocument} having a different
114 * combination of SBML Level, Version and XML namespaces than the object
115 * itself will result in an error at the time a caller attempts to make the
116 * addition.  A parent object must have compatible Level, Version and XML
117 * namespaces.  (Strictly speaking, a parent may also have more XML
118 * namespaces than a child, but the reverse is not permitted.)  The
119 * restriction is necessary to ensure that an SBML model has a consistent
120 * overall structure.  This requires callers to manage their objects
121 * carefully, but the benefit is increased flexibility in how models can be
122 * created by permitting callers to create objects bottom-up if desired.  In
123 * situations where objects are not yet attached to parents (e.g.,
124 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
125 * libSBML determine such things as whether it is valid to assign a
126 * particular value to an attribute.  For packages, this means that the 
127 * parent object to which this package element is being added must have
128 * been created with the package namespace, or that the package namespace
129 * was added to it, even if that parent is not a package object itself.
130   */ public
131 Dimensions(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
132    this(libsbmlJNI.new_Dimensions__SWIG_1(level, version), true);
133  }
134
135  
136/**
137   * Creates a new {@link Dimensions} object with the given level, version, and package version
138   * and with all sizes set to 0.0.
139   <p>
140   * @param level the SBML Level.
141   * @param version the Version within the SBML Level.
142   * @param pkgVersion the version of the package.
143   <p>
144   * <p>
145 * @note Attempting to add an object to an {@link SBMLDocument} having a different
146 * combination of SBML Level, Version and XML namespaces than the object
147 * itself will result in an error at the time a caller attempts to make the
148 * addition.  A parent object must have compatible Level, Version and XML
149 * namespaces.  (Strictly speaking, a parent may also have more XML
150 * namespaces than a child, but the reverse is not permitted.)  The
151 * restriction is necessary to ensure that an SBML model has a consistent
152 * overall structure.  This requires callers to manage their objects
153 * carefully, but the benefit is increased flexibility in how models can be
154 * created by permitting callers to create objects bottom-up if desired.  In
155 * situations where objects are not yet attached to parents (e.g.,
156 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
157 * libSBML determine such things as whether it is valid to assign a
158 * particular value to an attribute.  For packages, this means that the 
159 * parent object to which this package element is being added must have
160 * been created with the package namespace, or that the package namespace
161 * was added to it, even if that parent is not a package object itself.
162   */ public
163 Dimensions(long level) throws org.sbml.libsbml.SBMLConstructorException {
164    this(libsbmlJNI.new_Dimensions__SWIG_2(level), true);
165  }
166
167  
168/**
169   * Creates a new {@link Dimensions} object with the given level, version, and package version
170   * and with all sizes set to 0.0.
171   <p>
172   * @param level the SBML Level.
173   * @param version the Version within the SBML Level.
174   * @param pkgVersion the version of the package.
175   <p>
176   * <p>
177 * @note Attempting to add an object to an {@link SBMLDocument} having a different
178 * combination of SBML Level, Version and XML namespaces than the object
179 * itself will result in an error at the time a caller attempts to make the
180 * addition.  A parent object must have compatible Level, Version and XML
181 * namespaces.  (Strictly speaking, a parent may also have more XML
182 * namespaces than a child, but the reverse is not permitted.)  The
183 * restriction is necessary to ensure that an SBML model has a consistent
184 * overall structure.  This requires callers to manage their objects
185 * carefully, but the benefit is increased flexibility in how models can be
186 * created by permitting callers to create objects bottom-up if desired.  In
187 * situations where objects are not yet attached to parents (e.g.,
188 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
189 * libSBML determine such things as whether it is valid to assign a
190 * particular value to an attribute.  For packages, this means that the 
191 * parent object to which this package element is being added must have
192 * been created with the package namespace, or that the package namespace
193 * was added to it, even if that parent is not a package object itself.
194   */ public
195 Dimensions() throws org.sbml.libsbml.SBMLConstructorException {
196    this(libsbmlJNI.new_Dimensions__SWIG_3(), true);
197  }
198
199  
200/**
201   * Creates a new {@link Dimensions} object with the given {@link LayoutPkgNamespaces} object
202   * and with all sizes set to 0.0.
203   <p>
204   * <p>
205 * The package namespaces object used in this constructor is derived from a
206 * {@link SBMLNamespaces} object, which encapsulates SBML Level/Version/namespaces
207 * information.  It is used to communicate the SBML Level, Version, and 
208 * package version and name information used in addition to SBML Level&nbsp;3 Core.  A
209 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
210 * package namespace object somewhere in a program once, then hand that object
211 * as needed to object constructors of that package that accept it as and
212 * argument, such as this one.
213   <p>
214   * @param layoutns the {@link LayoutPkgNamespaces} object.
215   <p>
216   * <p>
217 * @note Attempting to add an object to an {@link SBMLDocument} having a different
218 * combination of SBML Level, Version and XML namespaces than the object
219 * itself will result in an error at the time a caller attempts to make the
220 * addition.  A parent object must have compatible Level, Version and XML
221 * namespaces.  (Strictly speaking, a parent may also have more XML
222 * namespaces than a child, but the reverse is not permitted.)  The
223 * restriction is necessary to ensure that an SBML model has a consistent
224 * overall structure.  This requires callers to manage their objects
225 * carefully, but the benefit is increased flexibility in how models can be
226 * created by permitting callers to create objects bottom-up if desired.  In
227 * situations where objects are not yet attached to parents (e.g.,
228 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
229 * libSBML determine such things as whether it is valid to assign a
230 * particular value to an attribute.  For packages, this means that the 
231 * parent object to which this package element is being added must have
232 * been created with the package namespace, or that the package namespace
233 * was added to it, even if that parent is not a package object itself.
234   */ public
235 Dimensions(LayoutPkgNamespaces layoutns) throws org.sbml.libsbml.SBMLConstructorException {
236    this(libsbmlJNI.new_Dimensions__SWIG_4(LayoutPkgNamespaces.getCPtr(layoutns), layoutns), true);
237  }
238
239  
240/**
241   * Copy constructor.
242   <p>
243   * @param orig the instance to copy.
244   */ public
245 Dimensions(Dimensions orig) throws org.sbml.libsbml.SBMLConstructorException {
246    this(libsbmlJNI.new_Dimensions__SWIG_5(Dimensions.getCPtr(orig), orig), true);
247  }
248
249  
250/**
251   * Creates a new {@link Dimensions} object with the given sizes.
252   */ public
253 Dimensions(LayoutPkgNamespaces layoutns, double w, double h, double d) throws org.sbml.libsbml.SBMLConstructorException {
254    this(libsbmlJNI.new_Dimensions__SWIG_6(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, w, h, d), true);
255  }
256
257  
258/**
259   * Creates a new {@link Dimensions} object with the given sizes.
260   */ public
261 Dimensions(LayoutPkgNamespaces layoutns, double w, double h) throws org.sbml.libsbml.SBMLConstructorException {
262    this(libsbmlJNI.new_Dimensions__SWIG_7(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, w, h), true);
263  }
264
265  
266/**
267   * Creates a new {@link Dimensions} object from the given {@link XMLNode}
268   */ public
269 Dimensions(XMLNode node, long l2version) throws org.sbml.libsbml.SBMLConstructorException {
270    this(libsbmlJNI.new_Dimensions__SWIG_8(XMLNode.getCPtr(node), node, l2version), true);
271  }
272
273  
274/**
275   * Creates a new {@link Dimensions} object from the given {@link XMLNode}
276   */ public
277 Dimensions(XMLNode node) throws org.sbml.libsbml.SBMLConstructorException {
278    this(libsbmlJNI.new_Dimensions__SWIG_9(XMLNode.getCPtr(node), node), true);
279  }
280
281  
282/**
283   * Returns the width.
284   <p>
285   * @return the width attribute as a double.
286   */ public
287 double width() {
288    return libsbmlJNI.Dimensions_width(swigCPtr, this);
289  }
290
291  
292/**
293   * Returns the height.
294   <p>
295   * @return the height attribute as a double.
296   */ public
297 double height() {
298    return libsbmlJNI.Dimensions_height(swigCPtr, this);
299  }
300
301  
302/**
303   * Returns the depth.
304   <p>
305   * @return the depth attribute as a double.
306   */ public
307 double depth() {
308    return libsbmlJNI.Dimensions_depth(swigCPtr, this);
309  }
310
311  
312/**
313   * Returns the width.
314   <p>
315   * @return the width attribute as a double.
316   */ public
317 double getWidth() {
318    return libsbmlJNI.Dimensions_getWidth(swigCPtr, this);
319  }
320
321  
322/**
323   * Returns the height.
324   <p>
325   * @return the height attribute as a double.
326   */ public
327 double getHeight() {
328    return libsbmlJNI.Dimensions_getHeight(swigCPtr, this);
329  }
330
331  
332/**
333   * Returns the depth.
334   <p>
335   * @return the depth attribute as a double.
336   */ public
337 double getDepth() {
338    return libsbmlJNI.Dimensions_getDepth(swigCPtr, this);
339  }
340
341  
342/**
343   * Sets the width to the given value.
344   <p>
345   * @param w the width to use.
346   */ public
347 void setWidth(double w) {
348    libsbmlJNI.Dimensions_setWidth(swigCPtr, this, w);
349  }
350
351  
352/**
353   * Sets the height to the given value.
354   <p>
355   * @param h the height to use.
356   */ public
357 void setHeight(double h) {
358    libsbmlJNI.Dimensions_setHeight(swigCPtr, this, h);
359  }
360
361  
362/**
363   * Sets the depth to the given value.  This will set
364   * the depth to be 'explicitly set'.
365   <p>
366   * @param d the depth to use.
367   */ public
368 void setDepth(double d) {
369    libsbmlJNI.Dimensions_setDepth(swigCPtr, this, d);
370  }
371
372  
373/**
374   * Sets all sizes of the {@link Dimensions} object to the given values.
375   * Using this function will set the depth to be 'explicitly
376   * set', even if the default is used.
377   <p>
378   * @param w the width to use.
379   * @param h the height to use.
380   * @param d the depth to use (defaults to 0.0).
381   */ public
382 void setBounds(double w, double h, double d) {
383    libsbmlJNI.Dimensions_setBounds__SWIG_0(swigCPtr, this, w, h, d);
384  }
385
386  
387/**
388   * Sets all sizes of the {@link Dimensions} object to the given values.
389   * Using this function will set the depth to be 'explicitly
390   * set', even if the default is used.
391   <p>
392   * @param w the width to use.
393   * @param h the height to use.
394   * @param d the depth to use (defaults to 0.0).
395   */ public
396 void setBounds(double w, double h) {
397    libsbmlJNI.Dimensions_setBounds__SWIG_1(swigCPtr, this, w, h);
398  }
399
400  
401/**
402   * Checks whether the depth has been explicitly set.
403   <p>
404   * @return a boolean value indicating whether the depth attribute 
405   * has been set explicitly or not.
406   */ public
407 boolean getDExplicitlySet() {
408    return libsbmlJNI.Dimensions_getDExplicitlySet(swigCPtr, this);
409  }
410
411  
412/**
413   * Sets the depth to 0.0.  This will set the depth to be
414   * 'explicitly set'.
415   */ public
416 void initDefaults() {
417    libsbmlJNI.Dimensions_initDefaults(swigCPtr, this);
418  }
419
420  
421/**
422   * Returns the value of the 'id' attribute of this {@link Dimensions}.
423   <p>
424   * @note Because of the inconsistent behavior of this function with 
425   * respect to assignments and rules, it is now recommended to
426   * use the getIdAttribute() function instead.
427   <p>
428   * <p>
429 * The identifier given by an object's 'id' attribute value
430 * is used to identify the object within the SBML model definition.
431 * Other objects can refer to the component using this identifier.  The
432 * data type of 'id' is always <code>SId</code> or a type derived
433 * from that, such as <code>UnitSId</code>, depending on the object in 
434 * question.  All data types are defined as follows:
435 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
436 *   letter .= 'a'..'z','A'..'Z'
437 *   digit  .= '0'..'9'
438 *   idChar .= letter | digit | '_'
439 *   SId    .= ( letter | '_' ) idChar*
440 * </pre>
441 <p>
442 * The characters <code>(</code> and <code>)</code> are used for grouping, the
443 * character <code>*</code> 'zero or more times', and the character
444 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
445 * determined by an exact character sequence match; i.e., comparisons must be
446 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
447 * <code>SIdRef</code>, and derived types.
448 <p>
449 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
450 * moved to {@link SBase} directly, instead of being defined individually for many
451 * (but not all) objects.  Libsbml has for a long time provided functions
452 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
453 * would fail or otherwise return empty strings if executed on any object 
454 * for which those attributes were not defined.  Now that all {@link SBase} objects 
455 * define those attributes, those functions now succeed for any object with 
456 * the appropriate level and version.
457 <p>
458 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
459 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
460 * functions (though not the setId() or unsetId() functions) would instead 
461 * reference the value of the 'variable' attribute (for the rules and event 
462 * assignments) or the 'symbol' attribute (for initial assignments).  
463 * The {@link AlgebraicRule} fell into this category as well, though because it 
464 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
465 * always return an empty string, and isSetId() would always return <code>false.</code>
466 * For this reason, four new functions are now provided 
467 * (getIdAttribute(), setIdAttribute(String), 
468 * isSetIdAttribute(), and unsetIdAttribute()) that will always
469 * act on the actual 'id' attribute, regardless of the object's type.  The
470 * new functions should be used instead of the old ones unless the old behavior
471 * is somehow necessary.
472 <p>
473 * Regardless of the level and version of the SBML, these functions allow
474 * client applications to use more generalized code in some situations 
475 * (for instance, when manipulating objects that are all known to have 
476 * identifiers).  If the object in question does not posess an 'id' attribute 
477 * according to the SBML specification for the Level and Version in use,
478 * libSBML will not allow the identifier to be set, nor will it read or 
479 * write 'id' attributes for those objects.
480   <p>
481   * @return the id of this {@link Dimensions}.
482   <p>
483   * @see #getIdAttribute()
484   * @see #setIdAttribute(String sid)
485   * @see #isSetIdAttribute()
486   * @see #unsetIdAttribute()
487   */ public
488 String getId() {
489    return libsbmlJNI.Dimensions_getId(swigCPtr, this);
490  }
491
492  
493/**
494   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
495   * {@link Dimensions}'s 'id' attribute has been set.
496   <p>
497   * <p>
498 * @note Because of the inconsistent behavior of this function with 
499 * respect to assignments and rules, it is now recommended to
500 * use the isSetIdAttribute() function instead.
501 <p>
502 * <p>
503 * The identifier given by an object's 'id' attribute value
504 * is used to identify the object within the SBML model definition.
505 * Other objects can refer to the component using this identifier.  The
506 * data type of 'id' is always <code>SId</code> or a type derived
507 * from that, such as <code>UnitSId</code>, depending on the object in 
508 * question.  All data types are defined as follows:
509 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
510 *   letter .= 'a'..'z','A'..'Z'
511 *   digit  .= '0'..'9'
512 *   idChar .= letter | digit | '_'
513 *   SId    .= ( letter | '_' ) idChar*
514 * </pre>
515 <p>
516 * The characters <code>(</code> and <code>)</code> are used for grouping, the
517 * character <code>*</code> 'zero or more times', and the character
518 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
519 * determined by an exact character sequence match; i.e., comparisons must be
520 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
521 * <code>SIdRef</code>, and derived types.
522 <p>
523 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
524 * moved to {@link SBase} directly, instead of being defined individually for many
525 * (but not all) objects.  Libsbml has for a long time provided functions
526 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
527 * would fail or otherwise return empty strings if executed on any object 
528 * for which those attributes were not defined.  Now that all {@link SBase} objects 
529 * define those attributes, those functions now succeed for any object with 
530 * the appropriate level and version.
531 <p>
532 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
533 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
534 * functions (though not the setId() or unsetId() functions) would instead 
535 * reference the value of the 'variable' attribute (for the rules and event 
536 * assignments) or the 'symbol' attribute (for initial assignments).  
537 * The {@link AlgebraicRule} fell into this category as well, though because it 
538 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
539 * always return an empty string, and isSetId() would always return <code>false.</code>
540 * For this reason, four new functions are now provided 
541 * (getIdAttribute(), setIdAttribute(String), 
542 * isSetIdAttribute(), and unsetIdAttribute()) that will always
543 * act on the actual 'id' attribute, regardless of the object's type.  The
544 * new functions should be used instead of the old ones unless the old behavior
545 * is somehow necessary.
546 <p>
547 * Regardless of the level and version of the SBML, these functions allow
548 * client applications to use more generalized code in some situations 
549 * (for instance, when manipulating objects that are all known to have 
550 * identifiers).  If the object in question does not posess an 'id' attribute 
551 * according to the SBML specification for the Level and Version in use,
552 * libSBML will not allow the identifier to be set, nor will it read or 
553 * write 'id' attributes for those objects.
554 <p>
555 * @return <code>true</code> if the 'id' attribute of this SBML object is
556 * set, <code>false</code> otherwise.
557 <p>
558 * @see #getIdAttribute()
559 * @see #setIdAttribute(String sid)
560 * @see #unsetIdAttribute()
561 * @see #isSetIdAttribute()
562   */ public
563 boolean isSetId() {
564    return libsbmlJNI.Dimensions_isSetId(swigCPtr, this);
565  }
566
567  
568/**
569   * Sets the value of the 'id' attribute of this {@link Dimensions}.
570   <p>
571   * <p>
572 * The string <code>sid</code> is copied.
573 <p>
574 * <p>
575 * The identifier given by an object's 'id' attribute value
576 * is used to identify the object within the SBML model definition.
577 * Other objects can refer to the component using this identifier.  The
578 * data type of 'id' is always <code>SId</code> or a type derived
579 * from that, such as <code>UnitSId</code>, depending on the object in 
580 * question.  All data types are defined as follows:
581 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
582 *   letter .= 'a'..'z','A'..'Z'
583 *   digit  .= '0'..'9'
584 *   idChar .= letter | digit | '_'
585 *   SId    .= ( letter | '_' ) idChar*
586 * </pre>
587 <p>
588 * The characters <code>(</code> and <code>)</code> are used for grouping, the
589 * character <code>*</code> 'zero or more times', and the character
590 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
591 * determined by an exact character sequence match; i.e., comparisons must be
592 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
593 * <code>SIdRef</code>, and derived types.
594 <p>
595 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
596 * moved to {@link SBase} directly, instead of being defined individually for many
597 * (but not all) objects.  Libsbml has for a long time provided functions
598 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
599 * would fail or otherwise return empty strings if executed on any object 
600 * for which those attributes were not defined.  Now that all {@link SBase} objects 
601 * define those attributes, those functions now succeed for any object with 
602 * the appropriate level and version.
603 <p>
604 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
605 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
606 * functions (though not the setId() or unsetId() functions) would instead 
607 * reference the value of the 'variable' attribute (for the rules and event 
608 * assignments) or the 'symbol' attribute (for initial assignments).  
609 * The {@link AlgebraicRule} fell into this category as well, though because it 
610 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
611 * always return an empty string, and isSetId() would always return <code>false.</code>
612 * For this reason, four new functions are now provided 
613 * (getIdAttribute(), setIdAttribute(String), 
614 * isSetIdAttribute(), and unsetIdAttribute()) that will always
615 * act on the actual 'id' attribute, regardless of the object's type.  The
616 * new functions should be used instead of the old ones unless the old behavior
617 * is somehow necessary.
618 <p>
619 * Regardless of the level and version of the SBML, these functions allow
620 * client applications to use more generalized code in some situations 
621 * (for instance, when manipulating objects that are all known to have 
622 * identifiers).  If the object in question does not posess an 'id' attribute 
623 * according to the SBML specification for the Level and Version in use,
624 * libSBML will not allow the identifier to be set, nor will it read or 
625 * write 'id' attributes for those objects.
626 <p>
627 * @param sid the string to use as the identifier of this object.
628 <p>
629 * <p>
630 * @return integer value indicating success/failure of the
631 * function.   The possible values
632 * returned by this function are:
633 * <ul>
634 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
635 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
636 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
637 *
638 * </ul> <p>
639 * @see #getIdAttribute()
640 * @see #setIdAttribute(String sid)
641 * @see #isSetIdAttribute()
642 * @see #unsetIdAttribute()
643   */ public
644 int setId(String sid) {
645    return libsbmlJNI.Dimensions_setId(swigCPtr, this, sid);
646  }
647
648  
649/**
650   * Unsets the value of the 'id' attribute of this {@link Dimensions}.
651   <p>
652   * <p>
653 * <p>
654 * The identifier given by an object's 'id' attribute value
655 * is used to identify the object within the SBML model definition.
656 * Other objects can refer to the component using this identifier.  The
657 * data type of 'id' is always <code>SId</code> or a type derived
658 * from that, such as <code>UnitSId</code>, depending on the object in 
659 * question.  All data types are defined as follows:
660 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
661 *   letter .= 'a'..'z','A'..'Z'
662 *   digit  .= '0'..'9'
663 *   idChar .= letter | digit | '_'
664 *   SId    .= ( letter | '_' ) idChar*
665 * </pre>
666 <p>
667 * The characters <code>(</code> and <code>)</code> are used for grouping, the
668 * character <code>*</code> 'zero or more times', and the character
669 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
670 * determined by an exact character sequence match; i.e., comparisons must be
671 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
672 * <code>SIdRef</code>, and derived types.
673 <p>
674 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
675 * moved to {@link SBase} directly, instead of being defined individually for many
676 * (but not all) objects.  Libsbml has for a long time provided functions
677 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
678 * would fail or otherwise return empty strings if executed on any object 
679 * for which those attributes were not defined.  Now that all {@link SBase} objects 
680 * define those attributes, those functions now succeed for any object with 
681 * the appropriate level and version.
682 <p>
683 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
684 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
685 * functions (though not the setId() or unsetId() functions) would instead 
686 * reference the value of the 'variable' attribute (for the rules and event 
687 * assignments) or the 'symbol' attribute (for initial assignments).  
688 * The {@link AlgebraicRule} fell into this category as well, though because it 
689 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
690 * always return an empty string, and isSetId() would always return <code>false.</code>
691 * For this reason, four new functions are now provided 
692 * (getIdAttribute(), setIdAttribute(String), 
693 * isSetIdAttribute(), and unsetIdAttribute()) that will always
694 * act on the actual 'id' attribute, regardless of the object's type.  The
695 * new functions should be used instead of the old ones unless the old behavior
696 * is somehow necessary.
697 <p>
698 * Regardless of the level and version of the SBML, these functions allow
699 * client applications to use more generalized code in some situations 
700 * (for instance, when manipulating objects that are all known to have 
701 * identifiers).  If the object in question does not posess an 'id' attribute 
702 * according to the SBML specification for the Level and Version in use,
703 * libSBML will not allow the identifier to be set, nor will it read or 
704 * write 'id' attributes for those objects.
705 <p>
706 * <p>
707 * @return integer value indicating success/failure of the
708 * function.   The possible values
709 * returned by this function are:
710 * <ul>
711 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
712 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
713 *
714 * </ul> <p>
715 * @see #getIdAttribute()
716 * @see #setIdAttribute(String sid)
717 * @see #isSetIdAttribute()
718 * @see #unsetIdAttribute()
719   */ public
720 int unsetId() {
721    return libsbmlJNI.Dimensions_unsetId(swigCPtr, this);
722  }
723
724  
725/**
726   * Returns the XML element name of
727   * this SBML object.
728   <p>
729   * @return the string of the name of this element.
730   */ public
731 String getElementName() {
732    return libsbmlJNI.Dimensions_getElementName(swigCPtr, this);
733  }
734
735  
736/**
737   * Creates and returns a deep copy of this {@link Dimensions}.
738   <p>
739   * @return a (deep) copy of this {@link Dimensions} object.
740   */ public
741 Dimensions cloneObject() {
742    long cPtr = libsbmlJNI.Dimensions_cloneObject(swigCPtr, this);
743    return (cPtr == 0) ? null : new Dimensions(cPtr, true);
744  }
745
746  
747/**
748   * Returns the libSBML type code of this object instance.
749   <p>
750   * <p>
751 * LibSBML attaches an identifying code to every kind of SBML object.  These
752 * are integer constants known as <em>SBML type codes</em>.  The names of all
753 * the codes begin with the characters <code>SBML_</code>.
754 * In the Java language interface for libSBML, the
755 * type codes are defined as static integer constants in the interface class
756 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
757 * package plug-ins may use overlapping type codes; to identify the package
758 * to which a given object belongs, call the <code>getPackageName()</code>
759 * method on the object.
760   <p>
761   * @return the SBML type code for this object:
762   * {@link libsbmlConstants#SBML_LAYOUT_DIMENSIONS SBML_LAYOUT_DIMENSIONS}.
763   <p>
764   * <p>
765 * @warning <span class='warning'>The specific integer values of the possible
766 * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
767 * packages,  To fully identify the correct code, <strong>it is necessary to
768 * invoke both getTypeCode() and getPackageName()</strong>.</span>
769   <p>
770   * @see #getElementName()
771   * @see #getPackageName()
772   */ public
773 int getTypeCode() {
774    return libsbmlJNI.Dimensions_getTypeCode(swigCPtr, this);
775  }
776
777  
778/**
779    * Creates an {@link XMLNode} object from this.
780    */ public
781 XMLNode toXML() {
782    return new XMLNode(libsbmlJNI.Dimensions_toXML(swigCPtr, this), true);
783  }
784
785}