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