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