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 *  An SBML parameter: a named symbol with a value.
013 <p>
014 * A {@link Parameter} is used in SBML to define a symbol associated with a value;
015 * this symbol can then be used in mathematical formulas in a model.  By
016 * default, parameters have constant value for the duration of a
017 * simulation, and for this reason are called <em>parameters</em> instead of 
018 * <em>variables</em> in SBML, although it is crucial to understand that <em>SBML
019 * parameters represent both concepts</em>.  Whether a given SBML
020 * parameter is intended to be constant or variable is indicated by the
021 * value of its 'constant' attribute.
022 <p>
023 * SBML's {@link Parameter} has a required attribute, 'id', that gives the
024 * parameter a unique identifier by which other parts of an SBML model
025 * definition can refer to it.  A parameter can also have an optional
026 * 'name' attribute of type <code>string.</code>  Identifiers and names must be used
027 * according to the guidelines described in the SBML specifications.
028 <p>
029 * The optional attribute 'value' determines the value (of type <code>double</code>)
030 * assigned to the parameter.  A missing value for 'value' implies that
031 * the value either is unknown, or to be obtained from an external source,
032 * or determined by an initial assignment.  The unit of measurement
033 * associated with the value of the parameter can be specified using the
034 * optional attribute 'units'.  Here we only mention briefly some notable
035 * points about the possible unit choices, but readers are urged to consult
036 * the SBML specification documents for more information:
037 * <ul>
038 <p>
039 * <li> In SBML Level&nbsp;3, there are no constraints on the units that
040 * can be assigned to parameters in a model; there are also no units to
041 * inherit from the enclosing {@link Model} object (unlike the case for, e.g.,
042 * {@link Species} and {@link Compartment}).
043 <p>
044 * <li> In SBML Level&nbsp;2, the value assigned to the parameter's 'units'
045 * attribute must be chosen from one of the following possibilities: one of
046 * the base unit identifiers defined in SBML; one of the built-in unit
047 * identifiers <code>'substance'</code>, <code>'time'</code>, <code>'volume'</code>, <code>'area'</code> or
048 * <code>'length'</code>; or the identifier of a new unit defined in the list of unit
049 * definitions in the enclosing {@link Model} structure.  There are no constraints
050 * on the units that can be chosen from these sets.  There are no default
051 * units for parameters.
052 * </ul>
053 <p>
054 * The {@link Parameter} structure has another boolean attribute named 'constant'
055 * that is used to indicate whether the parameter's value can vary during a
056 * simulation.  (In SBML Level&nbsp;3, the attribute is mandatory and must
057 * be given a value; in SBML Levels below Level&nbsp;3, the attribute is
058 * optional.)  A value of <code>true</code> indicates the parameter's value cannot be
059 * changed by any construct except {@link InitialAssignment}.  Conversely, if the
060 * value of 'constant' is <code>false</code>, other constructs in SBML, such as rules
061 * and events, can change the value of the parameter.
062 <p>
063 * SBML Level&nbsp;3 uses a separate object class, {@link LocalParameter}, for
064 * parameters that are local to a {@link Reaction}'s {@link KineticLaw}.  In Levels prior
065 * to SBML Level&nbsp;3, the {@link Parameter} class is used both for definitions
066 * of global parameters, as well as reaction-local parameters stored in a
067 * list within {@link KineticLaw} objects.  {@link Parameter} objects that are local to a
068 * reaction (that is, those defined within the {@link KineticLaw} structure of a
069 * {@link Reaction}) cannot be changed by rules and therefore are <em>implicitly
070 * always constant</em>; consequently, in SBML Level&nbsp;2, parameter
071 * definitions within {@link Reaction} structures should <em>not</em> have their
072 * 'constant' attribute set to <code>false.</code>
073 <p>
074 * What if a global parameter has its 'constant' attribute set to <code>false</code>,
075 * but the model does not contain any rules, events or other constructs
076 * that ever change its value over time?  Although the model may be
077 * suspect, this situation is not strictly an error.  A value of <code>false</code>
078 * for 'constant' only indicates that a parameter <em>can</em> change value, not
079 * that it <em>must</em>.
080 <p>
081 * As with all other major SBML components, {@link Parameter} is derived from
082 * {@link SBase}, and the methods defined on {@link SBase} are available on {@link Parameter}.
083 <p>
084 * @note The use of the term <em>parameter</em> in SBML sometimes leads to
085 * confusion among readers who have a particular notion of what something
086 * called 'parameter' should be.  It has been the source of heated debate,
087 * but despite this, no one has yet found an adequate replacement term that
088 * does not have different connotations to different people and hence leads
089 * to confusion among <em>some</em> subset of users.  Perhaps it would have been
090 * better to have two constructs, one called <em>constants</em> and the other
091 * called <em>variables</em>.  The current approach in SBML is simply more
092 * parsimonious, using a single {@link Parameter} construct with the boolean flag
093 * 'constant' indicating which flavor it is.  In any case, readers are
094 * implored to look past their particular definition of a <em>parameter</em> and
095 * simply view SBML's {@link Parameter} as a single mechanism for defining both
096 * constants and (additional) variables in a model.  (We write 
097 * <em>additional</em> because the species in a model are usually considered to be
098 * the central variables.)  After all, software tools are not required to
099 * expose to users the actual names of particular SBML constructs, and
100 * thus tools can present to their users whatever terms their designers
101 * feel best matches their target audience.
102 <p>
103 * In SBML Level&nbsp;3 Version&nbsp;2, many restrictions were lifted 
104 * requiring only Boolean values in Boolean contexts, and numeric
105 * values in numeric contexts.  This means that a {@link Parameter} may now
106 * be used as a Boolean, despite canonically having a numeric value.
107 * To be consistent, one should always assign it a value of <code>true</code>
108 * or <code>false</code>, and use it in Boolean contexts exclusively.  It would
109 * be appropriate to give it an {@link SBO} value of 602 ('Logical parameter')
110 * if one chooses to do this.
111 <p>
112 * @see ListOfParameters
113 */
114
115public class Parameter extends SBase {
116   private long swigCPtr;
117
118   protected Parameter(long cPtr, boolean cMemoryOwn)
119   {
120     super(libsbmlJNI.Parameter_SWIGUpcast(cPtr), cMemoryOwn);
121     swigCPtr = cPtr;
122   }
123
124   protected static long getCPtr(Parameter obj)
125   {
126     return (obj == null) ? 0 : obj.swigCPtr;
127   }
128
129   protected static long getCPtrAndDisown (Parameter obj)
130   {
131     long ptr = 0;
132
133     if (obj != null)
134     {
135       ptr             = obj.swigCPtr;
136       obj.swigCMemOwn = false;
137     }
138
139     return ptr;
140   }
141
142  protected void finalize() {
143    delete();
144  }
145
146  public synchronized void delete() {
147    if (swigCPtr != 0) {
148      if (swigCMemOwn) {
149        swigCMemOwn = false;
150        libsbmlJNI.delete_Parameter(swigCPtr);
151      }
152      swigCPtr = 0;
153    }
154    super.delete();
155  }
156
157  
158/**
159   * Creates a new {@link Parameter} using the given SBML <code>level</code> and <code>version</code>
160   * values.
161   <p>
162   * @param level a long integer, the SBML Level to assign to this {@link Parameter}.
163   <p>
164   * @param version a long integer, the SBML Version to assign to this
165   * {@link Parameter}.
166   <p>
167   * <p>
168 * @throws SBMLConstructorException
169 * Thrown if the given <code>level</code> and <code>version</code> combination are invalid
170 * or if this object is incompatible with the given level and version.
171   <p>
172   * <p>
173 * @note Attempting to add an object to an {@link SBMLDocument} having a different
174 * combination of SBML Level, Version and XML namespaces than the object
175 * itself will result in an error at the time a caller attempts to make the
176 * addition.  A parent object must have compatible Level, Version and XML
177 * namespaces.  (Strictly speaking, a parent may also have more XML
178 * namespaces than a child, but the reverse is not permitted.)  The
179 * restriction is necessary to ensure that an SBML model has a consistent
180 * overall structure.  This requires callers to manage their objects
181 * carefully, but the benefit is increased flexibility in how models can be
182 * created by permitting callers to create objects bottom-up if desired.  In
183 * situations where objects are not yet attached to parents (e.g.,
184 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
185 * libSBML determine such things as whether it is valid to assign a
186 * particular value to an attribute.
187   */ public
188 Parameter(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
189    this(libsbmlJNI.new_Parameter__SWIG_0(level, version), true);
190  }
191
192  
193/**
194   * Creates a new {@link Parameter} using the given {@link SBMLNamespaces} object
195   * <code>sbmlns</code>.
196   <p>
197   * <p>
198 * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
199 * information.  It is used to communicate the SBML Level, Version, and (in
200 * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
201 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
202 * {@link SBMLNamespaces} object somewhere in a program once, then hand that object
203 * as needed to object constructors that accept {@link SBMLNamespaces} as arguments. 
204   <p>
205   * It is worth emphasizing that although this constructor does not take
206   * an identifier argument, in SBML Level&nbsp;2 and beyond, the 'id'
207   * (identifier) attribute of a {@link Parameter} is required to have a value.
208   * Thus, callers are cautioned to assign a value after calling this
209   * constructor if no identifier is provided as an argument.  Setting the
210   * identifier can be accomplished using the method
211   * setId(String id).
212   <p>
213   * @param sbmlns an {@link SBMLNamespaces} object.
214   <p>
215   * <p>
216 * @throws SBMLConstructorException
217 * Thrown if the given <code>sbmlns</code> is inconsistent or incompatible
218 * with this 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.
235   */ public
236 Parameter(SBMLNamespaces sbmlns) throws org.sbml.libsbml.SBMLConstructorException {
237    this(libsbmlJNI.new_Parameter__SWIG_1(SBMLNamespaces.getCPtr(sbmlns), sbmlns), true);
238  }
239
240  
241/**
242   * Copy constructor; creates a copy of a {@link Parameter}.
243   <p>
244   * @param orig the {@link Parameter} instance to copy.
245     */ public
246 Parameter(Parameter orig) throws org.sbml.libsbml.SBMLConstructorException {
247    this(libsbmlJNI.new_Parameter__SWIG_2(Parameter.getCPtr(orig), orig), true);
248  }
249
250  
251/**
252   * Creates and returns a deep copy of this {@link Parameter} object.
253   <p>
254   * @return the (deep) copy of this {@link Parameter} object.
255   */ public
256 Parameter cloneObject() {
257    long cPtr = libsbmlJNI.Parameter_cloneObject(swigCPtr, this);
258    return (cPtr == 0) ? null : new Parameter(cPtr, true);
259  }
260
261  
262/**
263   * Initializes the fields of this {@link Parameter} object to 'typical' defaults
264   * values.
265   <p>
266   * The SBML {@link Parameter} component has slightly different aspects and
267   * default attribute values in different SBML Levels and Versions.  Many
268   * SBML object classes defined by libSBML have an initDefaults() method
269   * to set the values to certain common defaults, based mostly on what
270   * they are in SBML Level&nbsp;2.  In the case of {@link Parameter}, this method
271   * only sets the value of the 'constant' attribute to <code>true.</code>
272   <p>
273   * @see #getConstant()
274   * @see #isSetConstant()
275   * @see #setConstant(boolean)
276   */ public
277 void initDefaults() {
278    libsbmlJNI.Parameter_initDefaults(swigCPtr, this);
279  }
280
281  
282/**
283   * Returns the value of the 'id' attribute of this {@link Parameter}.
284   <p>
285   * @note Because of the inconsistent behavior of this function with 
286   * respect to assignments and rules, it is now recommended to
287   * use the getIdAttribute() function instead.
288   <p>
289   * <p>
290 * The identifier given by an object's 'id' attribute value
291 * is used to identify the object within the SBML model definition.
292 * Other objects can refer to the component using this identifier.  The
293 * data type of 'id' is always <code>SId</code> or a type derived
294 * from that, such as <code>UnitSId</code>, depending on the object in 
295 * question.  All data types are defined as follows:
296 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
297 *   letter .= 'a'..'z','A'..'Z'
298 *   digit  .= '0'..'9'
299 *   idChar .= letter | digit | '_'
300 *   SId    .= ( letter | '_' ) idChar*
301 * </pre>
302 <p>
303 * The characters <code>(</code> and <code>)</code> are used for grouping, the
304 * character <code>*</code> 'zero or more times', and the character
305 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
306 * determined by an exact character sequence match; i.e., comparisons must be
307 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
308 * <code>SIdRef</code>, and derived types.
309 <p>
310 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
311 * moved to {@link SBase} directly, instead of being defined individually for many
312 * (but not all) objects.  Libsbml has for a long time provided functions
313 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
314 * would fail or otherwise return empty strings if executed on any object 
315 * for which those attributes were not defined.  Now that all {@link SBase} objects 
316 * define those attributes, those functions now succeed for any object with 
317 * the appropriate level and version.
318 <p>
319 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
320 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
321 * functions (though not the setId() or unsetId() functions) would instead 
322 * reference the value of the 'variable' attribute (for the rules and event 
323 * assignments) or the 'symbol' attribute (for initial assignments).  
324 * The {@link AlgebraicRule} fell into this category as well, though because it 
325 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
326 * always return an empty string, and isSetId() would always return <code>false.</code>
327 * For this reason, four new functions are now provided 
328 * (getIdAttribute(), setIdAttribute(String), 
329 * isSetIdAttribute(), and unsetIdAttribute()) that will always
330 * act on the actual 'id' attribute, regardless of the object's type.  The
331 * new functions should be used instead of the old ones unless the old behavior
332 * is somehow necessary.
333 <p>
334 * Regardless of the level and version of the SBML, these functions allow
335 * client applications to use more generalized code in some situations 
336 * (for instance, when manipulating objects that are all known to have 
337 * identifiers).  If the object in question does not posess an 'id' attribute 
338 * according to the SBML specification for the Level and Version in use,
339 * libSBML will not allow the identifier to be set, nor will it read or 
340 * write 'id' attributes for those objects.
341   <p>
342   * @return the id of this {@link Parameter}.
343   <p>
344   * @see #getIdAttribute()
345   * @see #setIdAttribute(String sid)
346   * @see #isSetIdAttribute()
347   * @see #unsetIdAttribute()
348   */ public
349 String getId() {
350    return libsbmlJNI.Parameter_getId(swigCPtr, this);
351  }
352
353  
354/**
355   * Returns the value of the 'name' attribute of this {@link Parameter} object.
356   <p>
357   * <p>
358 * <p>
359 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
360 * moved to {@link SBase} directly, instead of being defined individually for many
361 * (but not all) objects.  Libsbml has for a long time provided functions
362 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
363 * would fail or otherwise return empty strings if executed on any object 
364 * for which those attributes were not defined.  Now that all {@link SBase} objects 
365 * define those attributes, those functions now succeed for any object with 
366 * the appropriate level and version.
367 <p>
368 * The 'name' attribute is
369 * optional and is not intended to be used for cross-referencing purposes
370 * within a model.  Its purpose instead is to provide a human-readable
371 * label for the component.  The data type of 'name' is the type
372 * <code>string</code> defined in XML Schema.  SBML imposes no
373 * restrictions as to the content of 'name' attributes beyond those
374 * restrictions defined by the <code>string</code> type in XML Schema.
375 <p>
376 * The recommended practice for handling 'name' is as follows.  If a
377 * software tool has the capability for displaying the content of 'name'
378 * attributes, it should display this content to the user as a
379 * component's label instead of the component's 'id'.  If the user
380 * interface does not have this capability (e.g., because it cannot
381 * display or use special characters in symbol names), or if the 'name'
382 * attribute is missing on a given component, then the user interface
383 * should display the value of the 'id' attribute instead.  (Script
384 * language interpreters are especially likely to display 'id' instead of
385 * 'name'.)
386 <p>
387 * As a consequence of the above, authors of systems that automatically
388 * generate the values of 'id' attributes should be aware some systems
389 * may display the 'id''s to the user.  Authors therefore may wish to
390 * take some care to have their software create 'id' values that are: (a)
391 * reasonably easy for humans to type and read; and (b) likely to be
392 * meaningful, for example by making the 'id' attribute be an abbreviated
393 * form of the name attribute value.
394 <p>
395 * An additional point worth mentioning is although there are
396 * restrictions on the uniqueness of 'id' values, there are no
397 * restrictions on the uniqueness of 'name' values in a model.  This
398 * allows software applications leeway in assigning component identifiers.
399 <p>
400 * Regardless of the level and version of the SBML, these functions allow
401 * client applications to use more generalized code in some situations 
402 * (for instance, when manipulating objects that are all known to have 
403 * names).  If the object in question does not posess a 'name' attribute 
404 * according to the SBML specification for the Level and Version in use,
405 * libSBML will not allow the name to be set, nor will it read or 
406 * write 'name' attributes for those objects.
407 <p>
408 * @return the name of this SBML object, or the empty string if not set or unsettable.
409 <p>
410 * @see #getIdAttribute()
411 * @see #isSetName()
412 * @see #setName(String sid)
413 * @see #unsetName()
414   */ public
415 String getName() {
416    return libsbmlJNI.Parameter_getName(swigCPtr, this);
417  }
418
419  
420/**
421   * Gets the numerical value of this {@link Parameter}.
422   <p>
423   * @return the value of the 'value' attribute of this {@link Parameter}, as a
424   * number of type <code>double.</code>
425   <p>
426   * @note <b>It is crucial</b> that callers not blindly call
427   * {@link Parameter#getValue()} without first using {@link Parameter#isSetValue()} to
428   * determine whether a value has ever been set.  Otherwise, the value
429   * return by {@link Parameter#getValue()} may not actually represent a value
430   * assigned to the parameter.  The reason is simply that the data type
431   * <code>double</code> in a program always has <em>some</em> value.  A separate test is
432   * needed to determine whether the value is a true model value, or
433   * uninitialized data in a computer's memory location.
434   <p>
435   * @see #isSetValue()
436   * @see #setValue(double value)
437   * @see #getUnits()
438   */ public
439 double getValue() {
440    return libsbmlJNI.Parameter_getValue(swigCPtr, this);
441  }
442
443  
444/**
445   * Gets the units defined for this {@link Parameter}.
446   <p>
447   * The value of an SBML parameter's 'units' attribute establishes the
448   * unit of measurement associated with the parameter's value.
449   <p>
450   * @return the value of the 'units' attribute of this {@link Parameter}, as a
451   * string.  An empty string indicates that no units have been assigned.
452   <p>
453   * <p>
454 * @note There is an important distinction to be made between <em>no units
455 * assigned</em>, and assuming a value without units has any specific unit
456 * such as <code>dimensionless</code>.  In SBML, default units are never
457 * attributed to numbers, and numbers without units are not automatically
458 * assumed to have the unit <code>dimensionless</code>.  Please consult the
459 * relevant SBML specification document for a more in-depth explanation of
460 * this topic and the SBML unit system.
461   <p>
462   * @see #isSetUnits()
463   * @see #setUnits(String)
464   * @see #getValue()
465   */ public
466 String getUnits() {
467    return libsbmlJNI.Parameter_getUnits(swigCPtr, this);
468  }
469
470  
471/**
472   * Gets the value of the 'constant' attribute of this {@link Parameter} instance.
473   <p>
474   * @return <code>true</code> if this {@link Parameter} is declared as being constant,
475   * <code>false</code> otherwise.
476   <p>
477   * <p>
478 * @note Readers who view the documentation for {@link LocalParameter} may be
479 * confused about the presence of this method.  LibSBML derives
480 * {@link LocalParameter} from {@link Parameter}; however, this does not precisely match
481 * the object hierarchy defined by SBML Level&nbsp;3, where
482 * {@link LocalParameter} is derived directly from {@link SBase} and not {@link Parameter}.  We
483 * believe this arrangement makes it easier for libSBML users to program
484 * applications that work with both SBML Level&nbsp;2 and SBML
485 * Level&nbsp;3, but programmers should also keep in mind this difference
486 * exists.  A side-effect of libSBML's scheme is that certain methods on
487 * {@link LocalParameter} that are inherited from {@link Parameter} do not actually have
488 * relevance to {@link LocalParameter} objects.  An example of this is the
489 * methods pertaining to {@link Parameter}'s attribute 'constant' (i.e.,
490 * isSetConstant(), setConstant(), and getConstant()).
491   <p>
492   * @see #isSetConstant()
493   * @see #setConstant(boolean)
494   */ public
495 boolean getConstant() {
496    return libsbmlJNI.Parameter_getConstant(swigCPtr, this);
497  }
498
499  
500/**
501   * Predicate returning <code>true</code> if this
502   * {@link Parameter}'s 'id' attribute is set.
503   <p>
504   * <p>
505 * @note Because of the inconsistent behavior of this function with 
506 * respect to assignments and rules, it is now recommended to
507 * use the isSetIdAttribute() function instead.
508 <p>
509 * <p>
510 * The identifier given by an object's 'id' attribute value
511 * is used to identify the object within the SBML model definition.
512 * Other objects can refer to the component using this identifier.  The
513 * data type of 'id' is always <code>SId</code> or a type derived
514 * from that, such as <code>UnitSId</code>, depending on the object in 
515 * question.  All data types are defined as follows:
516 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
517 *   letter .= 'a'..'z','A'..'Z'
518 *   digit  .= '0'..'9'
519 *   idChar .= letter | digit | '_'
520 *   SId    .= ( letter | '_' ) idChar*
521 * </pre>
522 <p>
523 * The characters <code>(</code> and <code>)</code> are used for grouping, the
524 * character <code>*</code> 'zero or more times', and the character
525 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
526 * determined by an exact character sequence match; i.e., comparisons must be
527 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
528 * <code>SIdRef</code>, and derived types.
529 <p>
530 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
531 * moved to {@link SBase} directly, instead of being defined individually for many
532 * (but not all) objects.  Libsbml has for a long time provided functions
533 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
534 * would fail or otherwise return empty strings if executed on any object 
535 * for which those attributes were not defined.  Now that all {@link SBase} objects 
536 * define those attributes, those functions now succeed for any object with 
537 * the appropriate level and version.
538 <p>
539 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
540 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
541 * functions (though not the setId() or unsetId() functions) would instead 
542 * reference the value of the 'variable' attribute (for the rules and event 
543 * assignments) or the 'symbol' attribute (for initial assignments).  
544 * The {@link AlgebraicRule} fell into this category as well, though because it 
545 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
546 * always return an empty string, and isSetId() would always return <code>false.</code>
547 * For this reason, four new functions are now provided 
548 * (getIdAttribute(), setIdAttribute(String), 
549 * isSetIdAttribute(), and unsetIdAttribute()) that will always
550 * act on the actual 'id' attribute, regardless of the object's type.  The
551 * new functions should be used instead of the old ones unless the old behavior
552 * is somehow necessary.
553 <p>
554 * Regardless of the level and version of the SBML, these functions allow
555 * client applications to use more generalized code in some situations 
556 * (for instance, when manipulating objects that are all known to have 
557 * identifiers).  If the object in question does not posess an 'id' attribute 
558 * according to the SBML specification for the Level and Version in use,
559 * libSBML will not allow the identifier to be set, nor will it read or 
560 * write 'id' attributes for those objects.
561 <p>
562 * @return <code>true</code> if the 'id' attribute of this SBML object is
563 * set, <code>false</code> otherwise.
564 <p>
565 * @see #getIdAttribute()
566 * @see #setIdAttribute(String sid)
567 * @see #unsetIdAttribute()
568 * @see #isSetIdAttribute()
569   */ public
570 boolean isSetId() {
571    return libsbmlJNI.Parameter_isSetId(swigCPtr, this);
572  }
573
574  
575/**
576   * Predicate returning <code>true</code> if this
577   * {@link Parameter}'s 'name' attribute is set.
578   <p>
579   * <p>
580 * <p>
581 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
582 * moved to {@link SBase} directly, instead of being defined individually for many
583 * (but not all) objects.  Libsbml has for a long time provided functions
584 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
585 * would fail or otherwise return empty strings if executed on any object 
586 * for which those attributes were not defined.  Now that all {@link SBase} objects 
587 * define those attributes, those functions now succeed for any object with 
588 * the appropriate level and version.
589 <p>
590 * The 'name' attribute is
591 * optional and is not intended to be used for cross-referencing purposes
592 * within a model.  Its purpose instead is to provide a human-readable
593 * label for the component.  The data type of 'name' is the type
594 * <code>string</code> defined in XML Schema.  SBML imposes no
595 * restrictions as to the content of 'name' attributes beyond those
596 * restrictions defined by the <code>string</code> type in XML Schema.
597 <p>
598 * The recommended practice for handling 'name' is as follows.  If a
599 * software tool has the capability for displaying the content of 'name'
600 * attributes, it should display this content to the user as a
601 * component's label instead of the component's 'id'.  If the user
602 * interface does not have this capability (e.g., because it cannot
603 * display or use special characters in symbol names), or if the 'name'
604 * attribute is missing on a given component, then the user interface
605 * should display the value of the 'id' attribute instead.  (Script
606 * language interpreters are especially likely to display 'id' instead of
607 * 'name'.)
608 <p>
609 * As a consequence of the above, authors of systems that automatically
610 * generate the values of 'id' attributes should be aware some systems
611 * may display the 'id''s to the user.  Authors therefore may wish to
612 * take some care to have their software create 'id' values that are: (a)
613 * reasonably easy for humans to type and read; and (b) likely to be
614 * meaningful, for example by making the 'id' attribute be an abbreviated
615 * form of the name attribute value.
616 <p>
617 * An additional point worth mentioning is although there are
618 * restrictions on the uniqueness of 'id' values, there are no
619 * restrictions on the uniqueness of 'name' values in a model.  This
620 * allows software applications leeway in assigning component identifiers.
621 <p>
622 * Regardless of the level and version of the SBML, these functions allow
623 * client applications to use more generalized code in some situations 
624 * (for instance, when manipulating objects that are all known to have 
625 * names).  If the object in question does not posess a 'name' attribute 
626 * according to the SBML specification for the Level and Version in use,
627 * libSBML will not allow the name to be set, nor will it read or 
628 * write 'name' attributes for those objects.
629 <p>
630 * @return <code>true</code> if the 'name' attribute of this SBML object is
631 * set, <code>false</code> otherwise.
632 <p>
633 * @see #getName()
634 * @see #setName(String sid)
635 * @see #unsetName()
636   */ public
637 boolean isSetName() {
638    return libsbmlJNI.Parameter_isSetName(swigCPtr, this);
639  }
640
641  
642/**
643   * Predicate returning <code>true</code> if the
644   * 'value' attribute of this {@link Parameter} is set.
645   <p>
646   * In SBML definitions after SBML Level&nbsp;1 Version&nbsp;1,
647   * parameter values are optional and have no defaults.  If a model read
648   * from a file does not contain a setting for the 'value' attribute of a
649   * parameter, its value is considered unset; it does not default to any
650   * particular value.  Similarly, when a {@link Parameter} object is created in
651   * libSBML, it has no value until given a value.  The
652   * {@link Parameter#isSetValue()} method allows calling applications to
653   * determine whether a given parameter's value has ever been set.
654   <p>
655   * In SBML Level&nbsp;1 Version&nbsp;1, parameters are required to have
656   * values and therefore, the value of a {@link Parameter} <b>should always be
657   * set</b>.  In Level&nbsp;1 Version&nbsp;2 and beyond, the value is
658   * optional and as such, the 'value' attribute may or may not be set.
659   <p>
660   * @return <code>true</code> if the value of this {@link Parameter} is set,
661   * <code>false</code> otherwise.
662   <p>
663   * @see #getValue()
664   * @see #setValue(double value)
665   */ public
666 boolean isSetValue() {
667    return libsbmlJNI.Parameter_isSetValue(swigCPtr, this);
668  }
669
670  
671/**
672   * Predicate returning <code>true</code> if the
673   * 'units' attribute of this {@link Parameter} is set.
674   <p>
675   * @return <code>true</code> if the 'units' attribute of this {@link Parameter} is
676   * set, <code>false</code> otherwise.
677   <p>
678   * <p>
679 * @note There is an important distinction to be made between <em>no units
680 * assigned</em>, and assuming a value without units has any specific unit
681 * such as <code>dimensionless</code>.  In SBML, default units are never
682 * attributed to numbers, and numbers without units are not automatically
683 * assumed to have the unit <code>dimensionless</code>.  Please consult the
684 * relevant SBML specification document for a more in-depth explanation of
685 * this topic and the SBML unit system.
686   */ public
687 boolean isSetUnits() {
688    return libsbmlJNI.Parameter_isSetUnits(swigCPtr, this);
689  }
690
691  
692/**
693   * Predicate returning <code>true</code> if the
694   * 'constant' attribute of this {@link Parameter} is set.
695   <p>
696   * @return <code>true</code> if the 'constant' attribute of this {@link Parameter} is
697   * set, <code>false</code> otherwise.
698   <p>
699   * <p>
700 * @note Readers who view the documentation for {@link LocalParameter} may be
701 * confused about the presence of this method.  LibSBML derives
702 * {@link LocalParameter} from {@link Parameter}; however, this does not precisely match
703 * the object hierarchy defined by SBML Level&nbsp;3, where
704 * {@link LocalParameter} is derived directly from {@link SBase} and not {@link Parameter}.  We
705 * believe this arrangement makes it easier for libSBML users to program
706 * applications that work with both SBML Level&nbsp;2 and SBML
707 * Level&nbsp;3, but programmers should also keep in mind this difference
708 * exists.  A side-effect of libSBML's scheme is that certain methods on
709 * {@link LocalParameter} that are inherited from {@link Parameter} do not actually have
710 * relevance to {@link LocalParameter} objects.  An example of this is the
711 * methods pertaining to {@link Parameter}'s attribute 'constant' (i.e.,
712 * isSetConstant(), setConstant(), and getConstant()).
713   <p>
714   * @see #getConstant()
715   * @see #setConstant(boolean)
716   */ public
717 boolean isSetConstant() {
718    return libsbmlJNI.Parameter_isSetConstant(swigCPtr, this);
719  }
720
721  
722/**
723   * Sets the value of the 'id' attribute of this {@link Parameter}.
724   <p>
725   * <p>
726 * The string <code>sid</code> is copied.
727 <p>
728 * <p>
729 * The identifier given by an object's 'id' attribute value
730 * is used to identify the object within the SBML model definition.
731 * Other objects can refer to the component using this identifier.  The
732 * data type of 'id' is always <code>SId</code> or a type derived
733 * from that, such as <code>UnitSId</code>, depending on the object in 
734 * question.  All data types are defined as follows:
735 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
736 *   letter .= 'a'..'z','A'..'Z'
737 *   digit  .= '0'..'9'
738 *   idChar .= letter | digit | '_'
739 *   SId    .= ( letter | '_' ) idChar*
740 * </pre>
741 <p>
742 * The characters <code>(</code> and <code>)</code> are used for grouping, the
743 * character <code>*</code> 'zero or more times', and the character
744 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
745 * determined by an exact character sequence match; i.e., comparisons must be
746 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
747 * <code>SIdRef</code>, and derived types.
748 <p>
749 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
750 * moved to {@link SBase} directly, instead of being defined individually for many
751 * (but not all) objects.  Libsbml has for a long time provided functions
752 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
753 * would fail or otherwise return empty strings if executed on any object 
754 * for which those attributes were not defined.  Now that all {@link SBase} objects 
755 * define those attributes, those functions now succeed for any object with 
756 * the appropriate level and version.
757 <p>
758 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
759 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
760 * functions (though not the setId() or unsetId() functions) would instead 
761 * reference the value of the 'variable' attribute (for the rules and event 
762 * assignments) or the 'symbol' attribute (for initial assignments).  
763 * The {@link AlgebraicRule} fell into this category as well, though because it 
764 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
765 * always return an empty string, and isSetId() would always return <code>false.</code>
766 * For this reason, four new functions are now provided 
767 * (getIdAttribute(), setIdAttribute(String), 
768 * isSetIdAttribute(), and unsetIdAttribute()) that will always
769 * act on the actual 'id' attribute, regardless of the object's type.  The
770 * new functions should be used instead of the old ones unless the old behavior
771 * is somehow necessary.
772 <p>
773 * Regardless of the level and version of the SBML, these functions allow
774 * client applications to use more generalized code in some situations 
775 * (for instance, when manipulating objects that are all known to have 
776 * identifiers).  If the object in question does not posess an 'id' attribute 
777 * according to the SBML specification for the Level and Version in use,
778 * libSBML will not allow the identifier to be set, nor will it read or 
779 * write 'id' attributes for those objects.
780 <p>
781 * @param sid the string to use as the identifier of this object.
782 <p>
783 * <p>
784 * @return integer value indicating success/failure of the
785 * function.   The possible values
786 * returned by this function are:
787 * <ul>
788 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
789 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
790 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
791 *
792 * </ul> <p>
793 * @see #getIdAttribute()
794 * @see #setIdAttribute(String sid)
795 * @see #isSetIdAttribute()
796 * @see #unsetIdAttribute()
797   */ public
798 int setId(String sid) {
799    return libsbmlJNI.Parameter_setId(swigCPtr, this, sid);
800  }
801
802  
803/**
804   * Sets the value of the 'name' attribute of this {@link Parameter}.
805   <p>
806   * The string in <code>name</code> is copied.
807   <p>
808   * @param name the new name for the {@link Parameter}.
809   <p>
810   * <p>
811 * @return integer value indicating success/failure of the
812 * function.   The possible values
813 * returned by this function are:
814   * <ul>
815   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
816   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
817   * </ul>
818   */ public
819 int setName(String name) {
820    return libsbmlJNI.Parameter_setName(swigCPtr, this, name);
821  }
822
823  
824/**
825   * Sets the 'value' attribute of this {@link Parameter} to the given <code>double</code>
826   * value and marks the attribute as set.
827   <p>
828   * @param value a <code>double</code>, the value to assign.
829   <p>
830   * <p>
831 * @return integer value indicating success/failure of the
832 * function.   The possible values
833 * returned by this function are:
834   * <ul>
835   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
836   * </ul>
837   */ public
838 int setValue(double value) {
839    return libsbmlJNI.Parameter_setValue(swigCPtr, this, value);
840  }
841
842  
843/**
844   * Sets the 'units' attribute of this {@link Parameter} to a copy of the given
845   * units identifier <code>units</code>.
846   <p>
847   * @param units a string, the identifier of the units to assign to this
848   * {@link Parameter} instance.
849   <p>
850   * <p>
851 * @return integer value indicating success/failure of the
852 * function.   The possible values
853 * returned by this function are:
854   * <ul>
855   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
856   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
857   * </ul>
858   */ public
859 int setUnits(String units) {
860    return libsbmlJNI.Parameter_setUnits(swigCPtr, this, units);
861  }
862
863  
864/**
865   * Sets the 'constant' attribute of this {@link Parameter} to the given boolean
866   * <code>flag</code>.
867   <p>
868   * @param flag a boolean, the value for the 'constant' attribute of this
869   * {@link Parameter} instance.
870   <p>
871   * <p>
872 * @return integer value indicating success/failure of the
873 * function.   The possible values
874 * returned by this function are:
875   * <ul>
876   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
877   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
878   *
879   * </ul> <p>
880   * <p>
881 * @note Readers who view the documentation for {@link LocalParameter} may be
882 * confused about the presence of this method.  LibSBML derives
883 * {@link LocalParameter} from {@link Parameter}; however, this does not precisely match
884 * the object hierarchy defined by SBML Level&nbsp;3, where
885 * {@link LocalParameter} is derived directly from {@link SBase} and not {@link Parameter}.  We
886 * believe this arrangement makes it easier for libSBML users to program
887 * applications that work with both SBML Level&nbsp;2 and SBML
888 * Level&nbsp;3, but programmers should also keep in mind this difference
889 * exists.  A side-effect of libSBML's scheme is that certain methods on
890 * {@link LocalParameter} that are inherited from {@link Parameter} do not actually have
891 * relevance to {@link LocalParameter} objects.  An example of this is the
892 * methods pertaining to {@link Parameter}'s attribute 'constant' (i.e.,
893 * isSetConstant(), setConstant(), and getConstant()).
894   <p>
895   * @see #getConstant()
896   * @see #isSetConstant()
897   */ public
898 int setConstant(boolean flag) {
899    return libsbmlJNI.Parameter_setConstant(swigCPtr, this, flag);
900  }
901
902  
903/**
904   * Unsets the value of the 'name' attribute of this {@link Parameter}.
905   <p>
906   * <p>
907 * <p>
908 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
909 * moved to {@link SBase} directly, instead of being defined individually for many
910 * (but not all) objects.  Libsbml has for a long time provided functions
911 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
912 * would fail or otherwise return empty strings if executed on any object 
913 * for which those attributes were not defined.  Now that all {@link SBase} objects 
914 * define those attributes, those functions now succeed for any object with 
915 * the appropriate level and version.
916 <p>
917 * The 'name' attribute is
918 * optional and is not intended to be used for cross-referencing purposes
919 * within a model.  Its purpose instead is to provide a human-readable
920 * label for the component.  The data type of 'name' is the type
921 * <code>string</code> defined in XML Schema.  SBML imposes no
922 * restrictions as to the content of 'name' attributes beyond those
923 * restrictions defined by the <code>string</code> type in XML Schema.
924 <p>
925 * The recommended practice for handling 'name' is as follows.  If a
926 * software tool has the capability for displaying the content of 'name'
927 * attributes, it should display this content to the user as a
928 * component's label instead of the component's 'id'.  If the user
929 * interface does not have this capability (e.g., because it cannot
930 * display or use special characters in symbol names), or if the 'name'
931 * attribute is missing on a given component, then the user interface
932 * should display the value of the 'id' attribute instead.  (Script
933 * language interpreters are especially likely to display 'id' instead of
934 * 'name'.)
935 <p>
936 * As a consequence of the above, authors of systems that automatically
937 * generate the values of 'id' attributes should be aware some systems
938 * may display the 'id''s to the user.  Authors therefore may wish to
939 * take some care to have their software create 'id' values that are: (a)
940 * reasonably easy for humans to type and read; and (b) likely to be
941 * meaningful, for example by making the 'id' attribute be an abbreviated
942 * form of the name attribute value.
943 <p>
944 * An additional point worth mentioning is although there are
945 * restrictions on the uniqueness of 'id' values, there are no
946 * restrictions on the uniqueness of 'name' values in a model.  This
947 * allows software applications leeway in assigning component identifiers.
948 <p>
949 * Regardless of the level and version of the SBML, these functions allow
950 * client applications to use more generalized code in some situations 
951 * (for instance, when manipulating objects that are all known to have 
952 * names).  If the object in question does not posess a 'name' attribute 
953 * according to the SBML specification for the Level and Version in use,
954 * libSBML will not allow the name to be set, nor will it read or 
955 * write 'name' attributes for those objects.
956 <p>
957 * <p>
958 * @return integer value indicating success/failure of the
959 * function.   The possible values
960 * returned by this function are:
961 * <ul>
962 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
963 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
964 *
965 * </ul> <p>
966 * @see #getName()
967 * @see #setName(String sid)
968 * @see #isSetName()
969   */ public
970 int unsetName() {
971    return libsbmlJNI.Parameter_unsetName(swigCPtr, this);
972  }
973
974  
975/**
976   * Unsets the value of the 'constant' attribute of this {@link Parameter} object.
977   <p>
978   * <p>
979 * @return integer value indicating success/failure of the
980 * function.   The possible values
981 * returned by this function are:
982   * <ul>
983   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
984   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
985   *
986   * </ul> <p>
987   * @see #isSetConstant()
988   * @see #setConstant(boolean)
989   * @see #getConstant()
990   */ public
991 int unsetConstant() {
992    return libsbmlJNI.Parameter_unsetConstant(swigCPtr, this);
993  }
994
995  
996/**
997   * Unsets the 'value' attribute of this {@link Parameter} instance.
998   <p>
999   * <p>
1000 * @return integer value indicating success/failure of the
1001 * function.   This particular
1002 * function only does one thing irrespective of user input or 
1003 * object state, and thus will only return a single value:
1004   * <ul>
1005   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1006   *
1007   * </ul> <p>
1008   * In SBML Level&nbsp;1 Version&nbsp;1, parameters are required to have
1009   * values and therefore, the value of a {@link Parameter} <b>should always be
1010   * set</b>.  In SBML Level&nbsp;1 Version&nbsp;2 and beyond, the value
1011   * is optional and as such, the 'value' attribute may or may not be set.
1012   */ public
1013 int unsetValue() {
1014    return libsbmlJNI.Parameter_unsetValue(swigCPtr, this);
1015  }
1016
1017  
1018/**
1019   * Unsets the 'units' attribute of this {@link Parameter} instance.
1020   <p>
1021   * <p>
1022 * @return integer value indicating success/failure of the
1023 * function.   The possible values
1024 * returned by this function are:
1025   * <ul>
1026   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1027   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1028   * </ul>
1029   */ public
1030 int unsetUnits() {
1031    return libsbmlJNI.Parameter_unsetUnits(swigCPtr, this);
1032  }
1033
1034  
1035/**
1036   * Constructs and returns a {@link UnitDefinition} that corresponds to the units
1037   * of this {@link Parameter}'s value.
1038   <p>
1039   * Parameters in SBML have an attribute ('units') for declaring the units
1040   * of measurement intended for the parameter's value.  <b>No defaults are
1041   * defined</b> by SBML in the absence of a definition for 'units'.  This
1042   * method returns a {@link UnitDefinition} object based on the units declared for
1043   * this {@link Parameter} using its 'units' attribute, or it returns <code>null</code> if
1044   * no units have been declared.
1045   <p>
1046   * Note that unit declarations for {@link Parameter} objects are specified in
1047   * terms of the <em>identifier</em> of a unit (e.g., using setUnits()), but
1048   * <em>this</em> method returns a {@link UnitDefinition} object, not a unit
1049   * identifier.  It does this by constructing an appropriate
1050   * {@link UnitDefinition}.For SBML Level&nbsp;2 models, it will do this even when
1051   * the value of the 'units' attribute is one of the special SBML
1052   * Level&nbsp;2 unit identifiers <code>'substance'</code>, <code>'volume'</code>, <code>'area'</code>,
1053   * <code>'length'</code> or <code>'time'.</code>  Callers may find this useful in conjunction
1054   * with the helper methods provided by the {@link UnitDefinition} class for
1055   * comparing different {@link UnitDefinition} objects.
1056   <p>
1057   * @return a {@link UnitDefinition} that expresses the units of this 
1058   * {@link Parameter}, or <code>null</code> if one cannot be constructed.
1059   <p>
1060   * @note The libSBML system for unit analysis depends on the model as a
1061   * whole.  In cases where the {@link Parameter} object has not yet been added to
1062   * a model, or the model itself is incomplete, unit analysis is not
1063   * possible, and consequently this method will return <code>null.</code>
1064   <p>
1065   * @see #isSetUnits()
1066   */ public
1067 UnitDefinition getDerivedUnitDefinition() {
1068    long cPtr = libsbmlJNI.Parameter_getDerivedUnitDefinition__SWIG_0(swigCPtr, this);
1069    return (cPtr == 0) ? null : new UnitDefinition(cPtr, false);
1070  }
1071
1072  
1073/**
1074   * Returns the libSBML type code for this SBML object.
1075   <p>
1076   * <p>
1077 * LibSBML attaches an identifying code to every kind of SBML object.  These
1078 * are integer constants known as <em>SBML type codes</em>.  The names of all
1079 * the codes begin with the characters <code>SBML_</code>.
1080 * In the Java language interface for libSBML, the
1081 * type codes are defined as static integer constants in the interface class
1082 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
1083 * package plug-ins may use overlapping type codes; to identify the package
1084 * to which a given object belongs, call the 
1085 * <code>{@link SBase#getPackageName()}
1086 * </code>
1087 * method on the object.
1088   <p>
1089   * @return the SBML type code for this object:
1090   * {@link libsbmlConstants#SBML_PARAMETER SBML_PARAMETER} (default).
1091   <p>
1092   * <p>
1093 * @warning <span class='warning'>The specific integer values of the possible
1094 * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
1095 * packages,  To fully identify the correct code, <strong>it is necessary to
1096 * invoke both getTypeCode() and getPackageName()</strong>.</span>
1097   <p>
1098   * @see #getElementName()
1099   * @see #getPackageName()
1100   */ public
1101 int getTypeCode() {
1102    return libsbmlJNI.Parameter_getTypeCode(swigCPtr, this);
1103  }
1104
1105  
1106/**
1107   * Returns the XML element name of this object, which for {@link Parameter}, is
1108   * always <code>'parameter'.</code>
1109   <p>
1110   * @return the name of this element, i.e., <code>'parameter'.</code>
1111   */ public
1112 String getElementName() {
1113    return libsbmlJNI.Parameter_getElementName(swigCPtr, this);
1114  }
1115
1116  
1117/**
1118   * Predicate returning <code>true</code> if
1119   * all the required attributes for this {@link Parameter} object
1120   * have been set.
1121   <p>
1122   * The required attributes for a {@link Parameter} object are:
1123   * <ul>
1124   * <li> 'id' (or 'name' in SBML Level&nbsp;1)
1125   * <li> 'value' (required in Level&nbsp;1, optional otherwise)
1126   *
1127   * </ul> <p>
1128   * @return <code>true</code> if the required attributes have been set, <code>false</code>
1129   * otherwise.
1130   */ public
1131 boolean hasRequiredAttributes() {
1132    return libsbmlJNI.Parameter_hasRequiredAttributes(swigCPtr, this);
1133  }
1134
1135  
1136/**
1137   * Renames all the <code>UnitSIdRef</code> attributes on this element.
1138   <p>
1139   * <p>
1140 * In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
1141 * SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
1142 * introduced for attribute values that refer to <code>UnitSId</code> values; in
1143 * previous Levels of SBML, this data type did not exist and attributes were
1144 * simply described to as 'referring to a unit identifier', but the effective
1145 * data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
1146 * other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
1147 * Levels of SBML, even if the corresponding SBML specification did not
1148 * explicitly name the data type.
1149   <p>
1150   * This method works by looking at all unit identifier attribute values
1151   * (including, if appropriate, inside mathematical formulas), comparing the
1152   * unit identifiers to the value of <code>oldid</code>.  If any matches are found,
1153   * the matching identifiers are replaced with <code>newid</code>.  The method does
1154   * <em>not</em> descend into child elements.
1155   <p>
1156   * @param oldid the old identifier.
1157   * @param newid the new identifier.
1158   */ public
1159 void renameUnitSIdRefs(String oldid, String newid) {
1160    libsbmlJNI.Parameter_renameUnitSIdRefs(swigCPtr, this, oldid, newid);
1161  }
1162
1163  
1164/** * @internal */ public
1165 void setCalculatingUnits(boolean calculatingUnits) {
1166    libsbmlJNI.Parameter_setCalculatingUnits(swigCPtr, this, calculatingUnits);
1167  }
1168
1169}