public class SimpleSpeciesReference extends SBase
As mentioned in the description of Reaction
, every species that enters
into a given reaction must appear in that reaction's lists of reactants,
products and/or modifiers. In an SBML model, all species that may
participate in any reaction are listed in the 'listOfSpecies' element of
the top-level Model
object. Lists of products, reactants and modifiers
in Reaction
objects do not introduce new species, but rather, they refer
back to those listed in the model's top-level 'listOfSpecies'. For
reactants and products, the connection is made using SpeciesReference
objects for modifiers, it is made using ModifierSpeciesReference
objects. SimpleSpeciesReference
is an abstract type that serves as the
parent class of both SpeciesReference
and ModifierSpeciesReference
. It
is used simply to hold the attributes and elements that are common to
the latter two structures.
The SimpleSpeciesReference
structure has a mandatory attribute,
'species', which must be a text string conforming to the identifer
syntax permitted in SBML. This attribute is inherited by the
SpeciesReference
and ModifierSpeciesReference
subclasses derived from
SimpleSpeciesReference
. The value of the 'species' attribute must be
the identifier of a species defined in the enclosing Model
. The species
is thereby declared as participating in the reaction being defined. The
precise role of that species as a reactant, product, or modifier in the
reaction is determined by the subclass of SimpleSpeciesReference
(i.e.,
either SpeciesReference
or ModifierSpeciesReference
) in which the
identifier appears.
SimpleSpeciesReference
also contains an optional attribute, 'id',
allowing instances to be referenced from other structures. No SBML
structures currently do this however, such structures are anticipated
in future SBML Levels.
Modifier and Type | Method and Description |
---|---|
void |
delete()
Explicitly deletes the underlying native object.
|
String |
getId()
Returns the value of the 'id' attribute of this
SimpleSpeciesReference . |
String |
getName()
Returns the value of the 'name' attribute of this
SimpleSpeciesReference . |
String |
getSpecies()
Get the value of the 'species' attribute.
|
boolean |
isModifier()
Predicate returning
true if this
is a ModifierSpeciesReference . |
boolean |
isSetId()
Predicate returning
true if this
SimpleSpeciesReference 's 'id' attribute is set. |
boolean |
isSetName()
Predicate returning
true if this
SimpleSpeciesReference 's 'name' attribute is set. |
boolean |
isSetSpecies()
Predicate returning
true if this
SimpleSpeciesReference 's 'species' attribute is set. |
void |
renameSIdRefs(String oldid,
String newid)
Renames all the SIdRef attributes on this element, including any found in MathML
|
int |
setId(String sid)
Sets the value of the 'id' attribute of this
SimpleSpeciesReference . |
int |
setName(String name)
Sets the value of the 'name' attribute of this
SimpleSpeciesReference . |
int |
setSpecies(String sid)
Sets the 'species' attribute of this
SimpleSpeciesReference . |
int |
unsetId()
Unsets the value of the 'id' attribute of this
SimpleSpeciesReference . |
int |
unsetName()
Unsets the value of the 'name' attribute of this
SimpleSpeciesReference . |
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, cloneObject, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getElementByMetaId, getElementBySId, getElementName, getLevel, getLine, getListOfAllElements, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getTypeCode, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm
public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the SimpleSpeciesReference.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke SimpleSpeciesReference.delete()
themselves.
public String getId()
SimpleSpeciesReference
.
getId
 in class SBase
SimpleSpeciesReference
.SBase.isSetMetaId()
,
SBase.setMetaId(String metaid)
public String getName()
SimpleSpeciesReference
.
getName
 in class SBase
SimpleSpeciesReference
.SBase.isSetMetaId()
,
SBase.setMetaId(String metaid)
public String getSpecies()
SimpleSpeciesReference
.public boolean isModifier()
true
if this
is a ModifierSpeciesReference
.
true
if this SimpleSpeciesReference
's subclass is
ModiferSpeciesReference, false
if it is a plain SpeciesReference
.public boolean isSetId()
true
if this
SimpleSpeciesReference
's 'id' attribute is set.
isSetId
 in class SBase
true
if the 'id' attribute of this SimpleSpeciesReference
is
set, false
otherwise.SBase.getMetaId()
,
SBase.setMetaId(String metaid)
public boolean isSetName()
true
if this
SimpleSpeciesReference
's 'name' attribute is set.
isSetName
 in class SBase
true
if the 'name' attribute of this SimpleSpeciesReference
is
set, false
otherwise.SBase.getMetaId()
,
SBase.setMetaId(String metaid)
public boolean isSetSpecies()
true
if this
SimpleSpeciesReference
's 'species' attribute is set.
true
if the 'species' attribute of this
SimpleSpeciesReference
is set, false
otherwise.public void renameSIdRefs(String oldid, String newid)
renameSIdRefs
 in class SBase
oldid
- the old identifiernewid
- the new identifierpublic int setId(String sid)
SimpleSpeciesReference
.
The string sid
is copied. Note that SBML has strict requirements
for the syntax of identifiers. The following is a summary of the definition of the SBML identifier type
SId
, which defines the permitted syntax of identifiers. We
express the syntax using an extended form of BNF notation:
letter .= 'a'..'z','A'..'Z' digit .= '0'..'9' idChar .= letter | digit | '_' SId .= ( letter | '_' ) idChar*The characters
(
and )
are used for grouping, the
character *
'zero or more times', and the character
|
indicates logical 'or'. The equality of SBML identifiers is
determined by an exact character sequence match i.e., comparisons must be
performed in a case-sensitive manner. In addition, there are a few
conditions for the uniqueness of identifiers in an SBML model. Please
consult the SBML specifications for the exact formulations.
setId
 in class SBase
sid
- the string to use as the identifier of this SimpleSpeciesReference
public int setName(String name)
SimpleSpeciesReference
.
The string in name
is copied.
setName
 in class SBase
name
- the new name for the SimpleSpeciesReference
public int setSpecies(String sid)
SimpleSpeciesReference
.
The identifier string passed in sid
is copied.
sid
- the identifier of a species defined in the enclosing
Model
's ListOfSpecies
.
public int unsetId()
SimpleSpeciesReference
.
public int unsetName()
SimpleSpeciesReference
.