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