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 *  Abstract class for references to species in reactions.
013 <p>
014 * As mentioned in the description of {@link Reaction}, every species that enters
015 * into a given reaction must appear in that reaction's lists of reactants,
016 * products and/or modifiers.  In an SBML model, all species that may
017 * participate in any reaction are listed in the 'listOfSpecies' element of
018 * the top-level {@link Model} object.  Lists of products, reactants and modifiers
019 * in {@link Reaction} objects do not introduce new species, but rather, they refer
020 * back to those listed in the model's top-level 'listOfSpecies'.  For
021 * reactants and products, the connection is made using {@link SpeciesReference}
022 * objects; for modifiers, it is made using {@link ModifierSpeciesReference}
023 * objects.  {@link SimpleSpeciesReference} is an abstract type that serves as the
024 * parent class of both {@link SpeciesReference} and {@link ModifierSpeciesReference}.  It
025 * is used simply to hold the attributes and elements that are common to
026 * the latter two structures.
027 <p>
028 * The {@link SimpleSpeciesReference} structure has a mandatory attribute,
029 * 'species', which must be a text string conforming to the identifer
030 * syntax permitted in SBML.  This attribute is inherited by the
031 * {@link SpeciesReference} and {@link ModifierSpeciesReference} subclasses derived from
032 * {@link SimpleSpeciesReference}.  The value of the 'species' attribute must be
033 * the identifier of a species defined in the enclosing {@link Model}.  The species
034 * is thereby declared as participating in the reaction being defined.  The
035 * precise role of that species as a reactant, product, or modifier in the
036 * reaction is determined by the subclass of {@link SimpleSpeciesReference} (i.e.,
037 * either {@link SpeciesReference} or {@link ModifierSpeciesReference}) in which the
038 * identifier appears.
039 <p>
040 * {@link SimpleSpeciesReference} also contains an optional attribute, 'id',
041 * allowing instances to be referenced from other structures.  No SBML
042 * structures currently do this; however, such structures are anticipated
043 * in future SBML Levels.
044 */
045
046public class SimpleSpeciesReference extends SBase {
047   private long swigCPtr;
048
049   protected SimpleSpeciesReference(long cPtr, boolean cMemoryOwn)
050   {
051     super(libsbmlJNI.SimpleSpeciesReference_SWIGUpcast(cPtr), cMemoryOwn);
052     swigCPtr = cPtr;
053   }
054
055   protected static long getCPtr(SimpleSpeciesReference obj)
056   {
057     return (obj == null) ? 0 : obj.swigCPtr;
058   }
059
060   protected static long getCPtrAndDisown (SimpleSpeciesReference obj)
061   {
062     long ptr = 0;
063
064     if (obj != null)
065     {
066       ptr             = obj.swigCPtr;
067       obj.swigCMemOwn = false;
068     }
069
070     return ptr;
071   }
072
073  protected void finalize() {
074    delete();
075  }
076
077  public synchronized void delete() {
078    if (swigCPtr != 0) {
079      if (swigCMemOwn) {
080        swigCMemOwn = false;
081        libsbmlJNI.delete_SimpleSpeciesReference(swigCPtr);
082      }
083      swigCPtr = 0;
084    }
085    super.delete();
086  }
087
088  
089/**
090   * Returns the value of the 'id' attribute of this {@link SimpleSpeciesReference}.
091   <p>
092   * @note Because of the inconsistent behavior of this function with 
093   * respect to assignments and rules, it is now recommended to
094   * use the getIdAttribute() function instead.
095   <p>
096   * <p>
097 * The identifier given by an object's 'id' attribute value
098 * is used to identify the object within the SBML model definition.
099 * Other objects can refer to the component using this identifier.  The
100 * data type of 'id' is always <code>SId</code> or a type derived
101 * from that, such as <code>UnitSId</code>, depending on the object in 
102 * question.  All data types are defined as follows:
103 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
104 *   letter .= 'a'..'z','A'..'Z'
105 *   digit  .= '0'..'9'
106 *   idChar .= letter | digit | '_'
107 *   SId    .= ( letter | '_' ) idChar*
108 * </pre>
109 <p>
110 * The characters <code>(</code> and <code>)</code> are used for grouping, the
111 * character <code>*</code> 'zero or more times', and the character
112 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
113 * determined by an exact character sequence match; i.e., comparisons must be
114 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
115 * <code>SIdRef</code>, and derived types.
116 <p>
117 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
118 * moved to {@link SBase} directly, instead of being defined individually for many
119 * (but not all) objects.  Libsbml has for a long time provided functions
120 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
121 * would fail or otherwise return empty strings if executed on any object 
122 * for which those attributes were not defined.  Now that all {@link SBase} objects 
123 * define those attributes, those functions now succeed for any object with 
124 * the appropriate level and version.
125 <p>
126 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
127 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
128 * functions (though not the setId() or unsetId() functions) would instead 
129 * reference the value of the 'variable' attribute (for the rules and event 
130 * assignments) or the 'symbol' attribute (for initial assignments).  
131 * The {@link AlgebraicRule} fell into this category as well, though because it 
132 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
133 * always return an empty string, and isSetId() would always return <code>false.</code>
134 * For this reason, four new functions are now provided 
135 * (getIdAttribute(), setIdAttribute(String), 
136 * isSetIdAttribute(), and unsetIdAttribute()) that will always
137 * act on the actual 'id' attribute, regardless of the object's type.  The
138 * new functions should be used instead of the old ones unless the old behavior
139 * is somehow necessary.
140 <p>
141 * Regardless of the level and version of the SBML, these functions allow
142 * client applications to use more generalized code in some situations 
143 * (for instance, when manipulating objects that are all known to have 
144 * identifiers).  If the object in question does not posess an 'id' attribute 
145 * according to the SBML specification for the Level and Version in use,
146 * libSBML will not allow the identifier to be set, nor will it read or 
147 * write 'id' attributes for those objects.
148   <p>
149   * @return the id of this {@link SimpleSpeciesReference}.
150   <p>
151   * @see #getIdAttribute()
152   * @see #setIdAttribute(String sid)
153   * @see #isSetIdAttribute()
154   * @see #unsetIdAttribute()
155   */ public
156 String getId() {
157    return libsbmlJNI.SimpleSpeciesReference_getId(swigCPtr, this);
158  }
159
160  
161/**
162   * Returns the value of the 'name' attribute of this {@link SimpleSpeciesReference} object.
163   <p>
164   * <p>
165 * <p>
166 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
167 * moved to {@link SBase} directly, instead of being defined individually for many
168 * (but not all) objects.  Libsbml has for a long time provided functions
169 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
170 * would fail or otherwise return empty strings if executed on any object 
171 * for which those attributes were not defined.  Now that all {@link SBase} objects 
172 * define those attributes, those functions now succeed for any object with 
173 * the appropriate level and version.
174 <p>
175 * The 'name' attribute is
176 * optional and is not intended to be used for cross-referencing purposes
177 * within a model.  Its purpose instead is to provide a human-readable
178 * label for the component.  The data type of 'name' is the type
179 * <code>string</code> defined in XML Schema.  SBML imposes no
180 * restrictions as to the content of 'name' attributes beyond those
181 * restrictions defined by the <code>string</code> type in XML Schema.
182 <p>
183 * The recommended practice for handling 'name' is as follows.  If a
184 * software tool has the capability for displaying the content of 'name'
185 * attributes, it should display this content to the user as a
186 * component's label instead of the component's 'id'.  If the user
187 * interface does not have this capability (e.g., because it cannot
188 * display or use special characters in symbol names), or if the 'name'
189 * attribute is missing on a given component, then the user interface
190 * should display the value of the 'id' attribute instead.  (Script
191 * language interpreters are especially likely to display 'id' instead of
192 * 'name'.)
193 <p>
194 * As a consequence of the above, authors of systems that automatically
195 * generate the values of 'id' attributes should be aware some systems
196 * may display the 'id''s to the user.  Authors therefore may wish to
197 * take some care to have their software create 'id' values that are: (a)
198 * reasonably easy for humans to type and read; and (b) likely to be
199 * meaningful, for example by making the 'id' attribute be an abbreviated
200 * form of the name attribute value.
201 <p>
202 * An additional point worth mentioning is although there are
203 * restrictions on the uniqueness of 'id' values, there are no
204 * restrictions on the uniqueness of 'name' values in a model.  This
205 * allows software applications leeway in assigning component identifiers.
206 <p>
207 * Regardless of the level and version of the SBML, these functions allow
208 * client applications to use more generalized code in some situations 
209 * (for instance, when manipulating objects that are all known to have 
210 * names).  If the object in question does not posess a 'name' attribute 
211 * according to the SBML specification for the Level and Version in use,
212 * libSBML will not allow the name to be set, nor will it read or 
213 * write 'name' attributes for those objects.
214 <p>
215 * @return the name of this SBML object, or the empty string if not set or unsettable.
216 <p>
217 * @see #getIdAttribute()
218 * @see #isSetName()
219 * @see #setName(String sid)
220 * @see #unsetName()
221   */ public
222 String getName() {
223    return libsbmlJNI.SimpleSpeciesReference_getName(swigCPtr, this);
224  }
225
226  
227/**
228   * Get the value of the 'species' attribute.
229   <p>
230   * @return the value of the attribute 'species' for this
231   * {@link SimpleSpeciesReference}.
232   */ public
233 String getSpecies() {
234    return libsbmlJNI.SimpleSpeciesReference_getSpecies(swigCPtr, this);
235  }
236
237  
238/**
239   * Predicate returning <code>true</code> if this
240   * {@link SimpleSpeciesReference}'s 'id' attribute is set.
241   <p>
242   * <p>
243 * @note Because of the inconsistent behavior of this function with 
244 * respect to assignments and rules, it is now recommended to
245 * use the isSetIdAttribute() function instead.
246 <p>
247 * <p>
248 * The identifier given by an object's 'id' attribute value
249 * is used to identify the object within the SBML model definition.
250 * Other objects can refer to the component using this identifier.  The
251 * data type of 'id' is always <code>SId</code> or a type derived
252 * from that, such as <code>UnitSId</code>, depending on the object in 
253 * question.  All data types are defined as follows:
254 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
255 *   letter .= 'a'..'z','A'..'Z'
256 *   digit  .= '0'..'9'
257 *   idChar .= letter | digit | '_'
258 *   SId    .= ( letter | '_' ) idChar*
259 * </pre>
260 <p>
261 * The characters <code>(</code> and <code>)</code> are used for grouping, the
262 * character <code>*</code> 'zero or more times', and the character
263 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
264 * determined by an exact character sequence match; i.e., comparisons must be
265 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
266 * <code>SIdRef</code>, and derived types.
267 <p>
268 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
269 * moved to {@link SBase} directly, instead of being defined individually for many
270 * (but not all) objects.  Libsbml has for a long time provided functions
271 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
272 * would fail or otherwise return empty strings if executed on any object 
273 * for which those attributes were not defined.  Now that all {@link SBase} objects 
274 * define those attributes, those functions now succeed for any object with 
275 * the appropriate level and version.
276 <p>
277 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
278 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
279 * functions (though not the setId() or unsetId() functions) would instead 
280 * reference the value of the 'variable' attribute (for the rules and event 
281 * assignments) or the 'symbol' attribute (for initial assignments).  
282 * The {@link AlgebraicRule} fell into this category as well, though because it 
283 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
284 * always return an empty string, and isSetId() would always return <code>false.</code>
285 * For this reason, four new functions are now provided 
286 * (getIdAttribute(), setIdAttribute(String), 
287 * isSetIdAttribute(), and unsetIdAttribute()) that will always
288 * act on the actual 'id' attribute, regardless of the object's type.  The
289 * new functions should be used instead of the old ones unless the old behavior
290 * is somehow necessary.
291 <p>
292 * Regardless of the level and version of the SBML, these functions allow
293 * client applications to use more generalized code in some situations 
294 * (for instance, when manipulating objects that are all known to have 
295 * identifiers).  If the object in question does not posess an 'id' attribute 
296 * according to the SBML specification for the Level and Version in use,
297 * libSBML will not allow the identifier to be set, nor will it read or 
298 * write 'id' attributes for those objects.
299 <p>
300 * @return <code>true</code> if the 'id' attribute of this SBML object is
301 * set, <code>false</code> otherwise.
302 <p>
303 * @see #getIdAttribute()
304 * @see #setIdAttribute(String sid)
305 * @see #unsetIdAttribute()
306 * @see #isSetIdAttribute()
307   */ public
308 boolean isSetId() {
309    return libsbmlJNI.SimpleSpeciesReference_isSetId(swigCPtr, this);
310  }
311
312  
313/**
314   * Predicate returning <code>true</code> if this
315   * {@link SimpleSpeciesReference}'s 'name' attribute is set.
316   <p>
317   * <p>
318 * <p>
319 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
320 * moved to {@link SBase} directly, instead of being defined individually for many
321 * (but not all) objects.  Libsbml has for a long time provided functions
322 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
323 * would fail or otherwise return empty strings if executed on any object 
324 * for which those attributes were not defined.  Now that all {@link SBase} objects 
325 * define those attributes, those functions now succeed for any object with 
326 * the appropriate level and version.
327 <p>
328 * The 'name' attribute is
329 * optional and is not intended to be used for cross-referencing purposes
330 * within a model.  Its purpose instead is to provide a human-readable
331 * label for the component.  The data type of 'name' is the type
332 * <code>string</code> defined in XML Schema.  SBML imposes no
333 * restrictions as to the content of 'name' attributes beyond those
334 * restrictions defined by the <code>string</code> type in XML Schema.
335 <p>
336 * The recommended practice for handling 'name' is as follows.  If a
337 * software tool has the capability for displaying the content of 'name'
338 * attributes, it should display this content to the user as a
339 * component's label instead of the component's 'id'.  If the user
340 * interface does not have this capability (e.g., because it cannot
341 * display or use special characters in symbol names), or if the 'name'
342 * attribute is missing on a given component, then the user interface
343 * should display the value of the 'id' attribute instead.  (Script
344 * language interpreters are especially likely to display 'id' instead of
345 * 'name'.)
346 <p>
347 * As a consequence of the above, authors of systems that automatically
348 * generate the values of 'id' attributes should be aware some systems
349 * may display the 'id''s to the user.  Authors therefore may wish to
350 * take some care to have their software create 'id' values that are: (a)
351 * reasonably easy for humans to type and read; and (b) likely to be
352 * meaningful, for example by making the 'id' attribute be an abbreviated
353 * form of the name attribute value.
354 <p>
355 * An additional point worth mentioning is although there are
356 * restrictions on the uniqueness of 'id' values, there are no
357 * restrictions on the uniqueness of 'name' values in a model.  This
358 * allows software applications leeway in assigning component identifiers.
359 <p>
360 * Regardless of the level and version of the SBML, these functions allow
361 * client applications to use more generalized code in some situations 
362 * (for instance, when manipulating objects that are all known to have 
363 * names).  If the object in question does not posess a 'name' attribute 
364 * according to the SBML specification for the Level and Version in use,
365 * libSBML will not allow the name to be set, nor will it read or 
366 * write 'name' attributes for those objects.
367 <p>
368 * @return <code>true</code> if the 'name' attribute of this SBML object is
369 * set, <code>false</code> otherwise.
370 <p>
371 * @see #getName()
372 * @see #setName(String sid)
373 * @see #unsetName()
374   */ public
375 boolean isSetName() {
376    return libsbmlJNI.SimpleSpeciesReference_isSetName(swigCPtr, this);
377  }
378
379  
380/**
381   * Predicate returning <code>true</code> if this
382   * {@link SimpleSpeciesReference}'s 'species' attribute is set.
383   <p>
384   * @return <code>true</code> if the 'species' attribute of this
385   * {@link SimpleSpeciesReference} is set, <code>false</code> otherwise.
386   */ public
387 boolean isSetSpecies() {
388    return libsbmlJNI.SimpleSpeciesReference_isSetSpecies(swigCPtr, this);
389  }
390
391  
392/**
393   * Sets the 'species' attribute of this {@link SimpleSpeciesReference}.
394   <p>
395   * The identifier string passed in <code>sid</code> is copied.
396   <p>
397   * @param sid the identifier of a species defined in the enclosing
398   * {@link Model}'s {@link ListOfSpecies}.
399   <p>
400   * <p>
401 * @return integer value indicating success/failure of the
402 * function.   The possible values
403 * returned by this function are:
404   * <ul>
405   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
406   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
407   * </ul>
408   */ public
409 int setSpecies(String sid) {
410    return libsbmlJNI.SimpleSpeciesReference_setSpecies(swigCPtr, this, sid);
411  }
412
413  
414/**
415   * Sets the value of the 'id' attribute of this {@link SimpleSpeciesReference}.
416   <p>
417   * <p>
418 * The string <code>sid</code> is copied.
419 <p>
420 * <p>
421 * The identifier given by an object's 'id' attribute value
422 * is used to identify the object within the SBML model definition.
423 * Other objects can refer to the component using this identifier.  The
424 * data type of 'id' is always <code>SId</code> or a type derived
425 * from that, such as <code>UnitSId</code>, depending on the object in 
426 * question.  All data types are defined as follows:
427 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
428 *   letter .= 'a'..'z','A'..'Z'
429 *   digit  .= '0'..'9'
430 *   idChar .= letter | digit | '_'
431 *   SId    .= ( letter | '_' ) idChar*
432 * </pre>
433 <p>
434 * The characters <code>(</code> and <code>)</code> are used for grouping, the
435 * character <code>*</code> 'zero or more times', and the character
436 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
437 * determined by an exact character sequence match; i.e., comparisons must be
438 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
439 * <code>SIdRef</code>, and derived types.
440 <p>
441 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
442 * moved to {@link SBase} directly, instead of being defined individually for many
443 * (but not all) objects.  Libsbml has for a long time provided functions
444 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
445 * would fail or otherwise return empty strings if executed on any object 
446 * for which those attributes were not defined.  Now that all {@link SBase} objects 
447 * define those attributes, those functions now succeed for any object with 
448 * the appropriate level and version.
449 <p>
450 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
451 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
452 * functions (though not the setId() or unsetId() functions) would instead 
453 * reference the value of the 'variable' attribute (for the rules and event 
454 * assignments) or the 'symbol' attribute (for initial assignments).  
455 * The {@link AlgebraicRule} fell into this category as well, though because it 
456 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
457 * always return an empty string, and isSetId() would always return <code>false.</code>
458 * For this reason, four new functions are now provided 
459 * (getIdAttribute(), setIdAttribute(String), 
460 * isSetIdAttribute(), and unsetIdAttribute()) that will always
461 * act on the actual 'id' attribute, regardless of the object's type.  The
462 * new functions should be used instead of the old ones unless the old behavior
463 * is somehow necessary.
464 <p>
465 * Regardless of the level and version of the SBML, these functions allow
466 * client applications to use more generalized code in some situations 
467 * (for instance, when manipulating objects that are all known to have 
468 * identifiers).  If the object in question does not posess an 'id' attribute 
469 * according to the SBML specification for the Level and Version in use,
470 * libSBML will not allow the identifier to be set, nor will it read or 
471 * write 'id' attributes for those objects.
472 <p>
473 * @param sid the string to use as the identifier of this object.
474 <p>
475 * <p>
476 * @return integer value indicating success/failure of the
477 * function.   The possible values
478 * returned by this function are:
479 * <ul>
480 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
481 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
482 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
483 *
484 * </ul> <p>
485 * @see #getIdAttribute()
486 * @see #setIdAttribute(String sid)
487 * @see #isSetIdAttribute()
488 * @see #unsetIdAttribute()
489   */ public
490 int setId(String sid) {
491    return libsbmlJNI.SimpleSpeciesReference_setId(swigCPtr, this, sid);
492  }
493
494  
495/**
496   * Sets the value of the 'name' attribute of this {@link SimpleSpeciesReference}.
497   <p>
498   * <p>
499 * The string in <code>name</code> is copied.
500 <p>
501 * @param name the new name for the SBML object.
502 <p>
503 * <p>
504 * @return integer value indicating success/failure of the
505 * function.   The possible values
506 * returned by this function are:
507 * <ul>
508 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
509 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
510 *
511 * </ul>
512   */ public
513 int setName(String name) {
514    return libsbmlJNI.SimpleSpeciesReference_setName(swigCPtr, this, name);
515  }
516
517  
518/**
519   * Unsets the value of the 'id' attribute of this {@link SimpleSpeciesReference}.
520   <p>
521   * <p>
522 * <p>
523 * The identifier given by an object's 'id' attribute value
524 * is used to identify the object within the SBML model definition.
525 * Other objects can refer to the component using this identifier.  The
526 * data type of 'id' is always <code>SId</code> or a type derived
527 * from that, such as <code>UnitSId</code>, depending on the object in 
528 * question.  All data types are defined as follows:
529 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
530 *   letter .= 'a'..'z','A'..'Z'
531 *   digit  .= '0'..'9'
532 *   idChar .= letter | digit | '_'
533 *   SId    .= ( letter | '_' ) idChar*
534 * </pre>
535 <p>
536 * The characters <code>(</code> and <code>)</code> are used for grouping, the
537 * character <code>*</code> 'zero or more times', and the character
538 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
539 * determined by an exact character sequence match; i.e., comparisons must be
540 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
541 * <code>SIdRef</code>, and derived types.
542 <p>
543 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
544 * moved to {@link SBase} directly, instead of being defined individually for many
545 * (but not all) objects.  Libsbml has for a long time provided functions
546 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
547 * would fail or otherwise return empty strings if executed on any object 
548 * for which those attributes were not defined.  Now that all {@link SBase} objects 
549 * define those attributes, those functions now succeed for any object with 
550 * the appropriate level and version.
551 <p>
552 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
553 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
554 * functions (though not the setId() or unsetId() functions) would instead 
555 * reference the value of the 'variable' attribute (for the rules and event 
556 * assignments) or the 'symbol' attribute (for initial assignments).  
557 * The {@link AlgebraicRule} fell into this category as well, though because it 
558 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
559 * always return an empty string, and isSetId() would always return <code>false.</code>
560 * For this reason, four new functions are now provided 
561 * (getIdAttribute(), setIdAttribute(String), 
562 * isSetIdAttribute(), and unsetIdAttribute()) that will always
563 * act on the actual 'id' attribute, regardless of the object's type.  The
564 * new functions should be used instead of the old ones unless the old behavior
565 * is somehow necessary.
566 <p>
567 * Regardless of the level and version of the SBML, these functions allow
568 * client applications to use more generalized code in some situations 
569 * (for instance, when manipulating objects that are all known to have 
570 * identifiers).  If the object in question does not posess an 'id' attribute 
571 * according to the SBML specification for the Level and Version in use,
572 * libSBML will not allow the identifier to be set, nor will it read or 
573 * write 'id' attributes for those objects.
574 <p>
575 * <p>
576 * @return integer value indicating success/failure of the
577 * function.   The possible values
578 * returned by this function are:
579 * <ul>
580 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
581 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
582 *
583 * </ul> <p>
584 * @see #getIdAttribute()
585 * @see #setIdAttribute(String sid)
586 * @see #isSetIdAttribute()
587 * @see #unsetIdAttribute()
588   */ public
589 int unsetId() {
590    return libsbmlJNI.SimpleSpeciesReference_unsetId(swigCPtr, this);
591  }
592
593  
594/**
595   * Unsets the value of the 'name' attribute of this {@link SimpleSpeciesReference}.
596   <p>
597   * <p>
598 * <p>
599 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
600 * moved to {@link SBase} directly, instead of being defined individually for many
601 * (but not all) objects.  Libsbml has for a long time provided functions
602 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
603 * would fail or otherwise return empty strings if executed on any object 
604 * for which those attributes were not defined.  Now that all {@link SBase} objects 
605 * define those attributes, those functions now succeed for any object with 
606 * the appropriate level and version.
607 <p>
608 * The 'name' attribute is
609 * optional and is not intended to be used for cross-referencing purposes
610 * within a model.  Its purpose instead is to provide a human-readable
611 * label for the component.  The data type of 'name' is the type
612 * <code>string</code> defined in XML Schema.  SBML imposes no
613 * restrictions as to the content of 'name' attributes beyond those
614 * restrictions defined by the <code>string</code> type in XML Schema.
615 <p>
616 * The recommended practice for handling 'name' is as follows.  If a
617 * software tool has the capability for displaying the content of 'name'
618 * attributes, it should display this content to the user as a
619 * component's label instead of the component's 'id'.  If the user
620 * interface does not have this capability (e.g., because it cannot
621 * display or use special characters in symbol names), or if the 'name'
622 * attribute is missing on a given component, then the user interface
623 * should display the value of the 'id' attribute instead.  (Script
624 * language interpreters are especially likely to display 'id' instead of
625 * 'name'.)
626 <p>
627 * As a consequence of the above, authors of systems that automatically
628 * generate the values of 'id' attributes should be aware some systems
629 * may display the 'id''s to the user.  Authors therefore may wish to
630 * take some care to have their software create 'id' values that are: (a)
631 * reasonably easy for humans to type and read; and (b) likely to be
632 * meaningful, for example by making the 'id' attribute be an abbreviated
633 * form of the name attribute value.
634 <p>
635 * An additional point worth mentioning is although there are
636 * restrictions on the uniqueness of 'id' values, there are no
637 * restrictions on the uniqueness of 'name' values in a model.  This
638 * allows software applications leeway in assigning component identifiers.
639 <p>
640 * Regardless of the level and version of the SBML, these functions allow
641 * client applications to use more generalized code in some situations 
642 * (for instance, when manipulating objects that are all known to have 
643 * names).  If the object in question does not posess a 'name' attribute 
644 * according to the SBML specification for the Level and Version in use,
645 * libSBML will not allow the name to be set, nor will it read or 
646 * write 'name' attributes for those objects.
647 <p>
648 * <p>
649 * @return integer value indicating success/failure of the
650 * function.   The possible values
651 * returned by this function are:
652 * <ul>
653 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
654 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
655 *
656 * </ul> <p>
657 * @see #getName()
658 * @see #setName(String sid)
659 * @see #isSetName()
660   */ public
661 int unsetName() {
662    return libsbmlJNI.SimpleSpeciesReference_unsetName(swigCPtr, this);
663  }
664
665  
666/**
667   * Unsets the value of the 'species' attribute of this {@link SimpleSpeciesReference}.
668   <p>
669   * <p>
670 * @return integer value indicating success/failure of the
671 * function.   The possible values
672 * returned by this function are:
673   * <ul>
674   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
675   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
676   * </ul>
677   */ public
678 int unsetSpecies() {
679    return libsbmlJNI.SimpleSpeciesReference_unsetSpecies(swigCPtr, this);
680  }
681
682  
683/**
684   * Predicate returning <code>true</code> if this
685   * is a {@link ModifierSpeciesReference}.
686   <p>
687   * @return <code>true</code> if this {@link SimpleSpeciesReference}'s subclass is
688   * ModiferSpeciesReference, <code>false</code> if it is a plain {@link SpeciesReference}.
689   */ public
690 boolean isModifier() {
691    return libsbmlJNI.SimpleSpeciesReference_isModifier(swigCPtr, this);
692  }
693
694  
695/**
696   * <p>
697 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another
698 * value.
699 <p>
700 * <p>
701 * In SBML, object identifiers are of a data type called <code>SId</code>.
702 * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
703 * introduced for attribute values that refer to <code>SId</code> values; in
704 * previous Levels of SBML, this data type did not exist and attributes were
705 * simply described to as 'referring to an identifier', but the effective
706 * data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
707 * other methods of libSBML refer to the type <code>SIdRef</code> for all
708 * Levels of SBML, even if the corresponding SBML specification did not
709 * explicitly name the data type.
710 <p>
711 * This method works by looking at all attributes and (if appropriate)
712 * mathematical formulas in MathML content, comparing the referenced
713 * identifiers to the value of <code>oldid</code>.  If any matches are found, the
714 * matching values are replaced with <code>newid</code>.  The method does <em>not</em>
715 * descend into child elements.
716 <p>
717 * @param oldid the old identifier.
718 * @param newid the new identifier.
719   */ public
720 void renameSIdRefs(String oldid, String newid) {
721    libsbmlJNI.SimpleSpeciesReference_renameSIdRefs(swigCPtr, this, oldid, newid);
722  }
723
724}