public class SpeciesType extends SBase
The term species type refers to reacting entities independent of location. These include simple ions (e.g., protons, calcium), simple molecules (e.g., glucose, ATP), large molecules (e.g., RNA, polysaccharides, and proteins), and others.
SBML Level 2 Versions 2&ndash4 provide an explicit
SpeciesType
class of object to enable Species
objects of the same type
to be related together. SpeciesType
is a conceptual construct the
existence of SpeciesType
objects in a model has no effect on the model's
numerical interpretation. Except for the requirement for uniqueness of
species/species type combinations located in compartments, simulators
and other numerical analysis software may ignore SpeciesType
definitions
and references to them in a model.
There is no mechanism in SBML Level 2 for representing hierarchies of
species types. One SpeciesType
object cannot be the subtype of another
SpeciesType
object SBML provides no means of defining such
relationships.
As with other major structures in SBML, SpeciesType
has a mandatory
attribute, 'id', used to give the species type an identifier. The
identifier must be a text string conforming to the identifer syntax
permitted in SBML. SpeciesType
also has an optional 'name' attribute,
of type string.
The 'id' and 'name' must be used according to the
guidelines described in the SBML specification (e.g., Section 3.3 in
the Level 2 Version 4 specification).
SpeciesType
was introduced in SBML Level 2 Version 2. It is not
available in SBML Level 1 nor in Level 3.
Species
,
ListOfSpeciesTypes
,
CompartmentType
,
Constructor and Description |
---|
SpeciesType(long level,
long version)
|
SpeciesType(SBMLNamespaces sbmlns)
|
SpeciesType(SpeciesType orig)
Copy constructor creates a copy of this
SpeciesType . |
Modifier and Type | Method and Description |
---|---|
SpeciesType |
cloneObject()
Creates and returns a deep copy of this
SpeciesType . |
void |
delete()
Explicitly deletes the underlying native object.
|
String |
getElementName()
Returns the XML element name of this object, which for
SpeciesType , is always 'compartmentType'. |
String |
getId()
Returns the value of the 'id' attribute of this
SpeciesType . |
String |
getName()
Returns the value of the 'name' attribute of this
SpeciesType . |
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
boolean |
hasRequiredAttributes()
Predicate returning
true if
all the required attributes for this SpeciesType object
have been set. |
boolean |
isSetId()
Predicate returning
true if this
SpeciesType 's 'id' attribute is set. |
boolean |
isSetName()
Predicate returning
true if this
SpeciesType 's 'name' attribute is set. |
int |
setId(String sid)
Sets the value of the 'id' attribute of this
SpeciesType . |
int |
setName(String name)
Sets the value of the 'name' attribute of this
SpeciesType . |
int |
unsetName()
Unsets the value of the 'name' attribute of this
SpeciesType . |
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getElementByMetaId, getElementBySId, getLevel, getLine, getListOfAllElements, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, unsetAnnotation, unsetCVTerms, unsetId, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm
public SpeciesType(long level, long version) throws SBMLConstructorException
level
- a long integer, the SBML Level to assign to this SpeciesType
version
- a long integer, the SBML Version to assign to this
SpeciesType
SBMLConstructorException
- Thrown if the given level
and version
combination, or this kind
of SBML object, are either invalid or mismatched with respect to the
parent SBMLDocument
object.
SpeciesType
object to an SBMLDocument
(e.g., using Model.addSpeciesType(SpeciesType st)
),
the SBML Level, SBML Version and XML namespace of the document
override the values used when creating the SpeciesType
object via this
constructor. This is necessary to ensure that an SBML document is a
consistent structure. Nevertheless, the ability to supply the values
at the time of creation of a SpeciesType
is an important aid to
producing valid SBML. Knowledge of the intented SBML Level and
Version determine whether it is valid to assign a particular value to
an attribute, or whether it is valid to add an object to an existing
SBMLDocument
.public SpeciesType(SBMLNamespaces sbmlns) throws SBMLConstructorException
SpeciesType
using the given SBMLNamespaces
object
sbmlns
.
The SBMLNamespaces
object encapsulates SBML Level/Version/namespaces
information. It is used to communicate the SBML Level, Version, and
(in Level 3) packages used in addition to SBML Level 3 Core.
A common approach to using this class constructor is to create an
SBMLNamespaces
object somewhere in a program, once, then pass it to
object constructors such as this one when needed.
It is worth emphasizing that although this constructor does not take
an identifier argument, in SBML Level 2 and beyond, the 'id'
(identifier) attribute of a SpeciesType
object is required to have a value.
Thus, callers are cautioned to assign a value after calling this
constructor. Setting the identifier can be accomplished using the
method SBase.setId(String id)
.
sbmlns
- an SBMLNamespaces
object.
SBMLConstructorException
- Thrown if the given level
and version
combination, or this kind
of SBML object, are either invalid or mismatched with respect to the
parent SBMLDocument
object.
SpeciesType
object to an SBMLDocument
(e.g., using Model.addSpeciesType(SpeciesType st)
),
the SBML XML namespace of the document overrides the value used
when creating the SpeciesType
object via this constructor. This is
necessary to ensure that an SBML document is a consistent structure.
Nevertheless, the ability to supply the values at the time of creation
of a SpeciesType
is an important aid to producing valid SBML.
Knowledge of the intented SBML Level and Version determine whether it
is valid to assign a particular value to an attribute, or whether it
is valid to add an object to an existing SBMLDocument
.public SpeciesType(SpeciesType orig) throws SBMLConstructorException
SpeciesType
.
orig
- the object to copy.
SBMLConstructorException
- Thrown if the argument orig
is null.
public SpeciesType cloneObject()
SpeciesType
.
cloneObject
 in class SBase
SpeciesType
.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 SpeciesType.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 SpeciesType.delete()
themselves.
public String getElementName()
SpeciesType
, is always 'compartmentType'.
getElementName
 in class SBase
'compartmentType'.
public String getId()
SpeciesType
.
getId
 in class SBase
SpeciesType
.SBase.isSetMetaId()
,
SBase.setMetaId(String metaid)
public String getName()
SpeciesType
.
getName
 in class SBase
SpeciesType
.SBase.isSetMetaId()
,
SBase.setMetaId(String metaid)
public int getTypeCode()
LibSBML attaches an identifying code to every
kind of SBML object. These are known as SBML type codes. In
other languages, the set of type codes is stored in an enumeration in
the Java language interface for libSBML, the type codes are defined as
static integer constants in the interface class libsbmlConstants
. The names of the type codes all begin with the
characters SBML_.
getTypeCode
 in class SBase
SBML_UNKNOWN
(default).
SpeciesType.getElementName()
public boolean hasRequiredAttributes()
true
if
all the required attributes for this SpeciesType
object
have been set.
hasRequiredAttributes
 in class SBase
SpeciesType
object are:
public boolean isSetId()
true
if this
SpeciesType
's 'id' attribute is set.
isSetId
 in class SBase
true
if the 'id' attribute of this SpeciesType
is
set, false
otherwise.SBase.getMetaId()
,
SBase.setMetaId(String metaid)
public boolean isSetName()
true
if this
SpeciesType
's 'name' attribute is set.
isSetName
 in class SBase
true
if the 'name' attribute of this SpeciesType
is
set, false
otherwise.SBase.getMetaId()
,
SBase.setMetaId(String metaid)
public int setId(String sid)
SpeciesType
.
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 SpeciesType
public int setName(String name)
SpeciesType
.
The string in name
is copied.
setName
 in class SBase
name
- the new name for the SpeciesType
public int unsetName()
SpeciesType
.