public class Member extends SBase
Group
.
Member
class objects are used to define what constitutes a 'group' in the
SBML Level 3 Group
package. Member
objects reference other SBML
components in an SBML document. A Member
has four optional attributes:
'id' and 'name', which identify the element, and 'idRef' and 'metaIdRef'
which reference the identifiers of other elements.
There must be exactly one (and only one) method used to reference another
element: either 'idRef' or 'metaIdRef' may be defined, but not both.
(Multiple attributes are needed to account for the different types of
identifiers that a given object may have.) The referenced object
(including, potentially, another Group
object) is thus made a member of
the Group
in which the Member
object is contained.
Since Member
is derived from SBase
, which provides both the ability to
attach SBO
terms as well as MIRIAM annotations, the semantics of a given
member in a model can be made more precise by reference to external
controlled vocabularies and ontologies.
Group
object
If an SBML element is referenced by a Group
's child Member
(directly or
indirectly), it is considered to be a member of that Group
. If the same
element is referenced by multiple Member
objects, this is equivalent to
including it just once. (It is considered best practice to avoid this,
but does not make for an invalid SBML document.)
Children of referenced elements are not considered to be members of the
Group: a KineticLaw
of a referenced Reaction
is not itself a Group
member. Even the membership of so-called SBML container classes (e.g.,
ListOfSpecies
, ListOfCompartments
, etc.) does not imply inclusion of
children as members of the Group
. The sole exception to this rule is the
handling of ListOfMembers
class.
Please refer to the description of the Group
class for more information
about groups, members, and the semantics of group membership.
Group
,
ListOfGroups
,
ListOfMembers
Constructor and Description |
---|
Member()
Creates a new
Member using the given SBML Level, Version and
&ldquogroups&rdquo package version. |
Member(GroupsPkgNamespaces groupsns)
Creates a new
Member using the given GroupsPkgNamespaces object. |
Member(long level)
Creates a new
Member using the given SBML Level, Version and
&ldquogroups&rdquo package version. |
Member(long level,
long version)
Creates a new
Member using the given SBML Level, Version and
&ldquogroups&rdquo package version. |
Member(long level,
long version,
long pkgVersion)
Creates a new
Member using the given SBML Level, Version and
&ldquogroups&rdquo package version. |
Member(Member orig)
Copy constructor for
Member . |
Modifier and Type | Method and Description |
---|---|
Member |
cloneObject()
Creates and returns a deep copy of this
Member object. |
void |
delete()
Explicitly deletes the underlying native object.
|
java.lang.String |
getElementName()
Returns the XML element name of this
Member object. |
java.lang.String |
getId()
Returns the value of the 'id' attribute of this
Member . |
java.lang.String |
getIdRef()
Returns the value of the 'idRef' attribute of this
Member . |
java.lang.String |
getMetaIdRef()
Returns the value of the 'metaIdRef' attribute of this
Member . |
java.lang.String |
getName()
Returns the value of the 'name' attribute of this
Member . |
int |
getTypeCode()
Returns the libSBML type code for this
Member object. |
boolean |
hasRequiredAttributes()
Predicate returning
true if all the required attributes for this Member
object have been set. |
boolean |
isSetId()
Predicate returning
true if this Member 's 'id' attribute is set. |
boolean |
isSetIdRef()
Predicate returning
true if this Member 's 'idRef' attribute is set. |
boolean |
isSetMetaIdRef()
Predicate returning
true if this Member 's 'metaIdRef' attribute is set. |
boolean |
isSetName()
Predicate returning
true if this Member 's 'name' attribute is set. |
void |
renameSIdRefs(java.lang.String oldid,
java.lang.String newid)
Replaces all uses of a given
SIdRef type attribute value with another
value. |
int |
setId(java.lang.String id)
Sets the value of the 'id' attribute of this
Member . |
int |
setIdRef(java.lang.String idRef)
Sets the value of the 'idRef' attribute of this
Member . |
int |
setMetaIdRef(java.lang.String metaIdRef)
Sets the value of the 'metaIdRef' attribute of this
Member . |
int |
setName(java.lang.String name)
Sets the value of the 'name' attribute of this
Member . |
int |
unsetId()
Unsets the value of the 'id' attribute of this
Member . |
int |
unsetIdRef()
Unsets the value of the 'idRef' attribute of this
Member . |
int |
unsetMetaIdRef()
Unsets the value of the 'metaIdRef' attribute of this
Member . |
int |
unsetName()
Unsets the value of the 'name' attribute of this
Member . |
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, connectToChild, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getElementByMetaId, getElementBySId, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm, unsetUserData
public Member(long level, long version, long pkgVersion) throws SBMLConstructorException
Member
using the given SBML Level, Version and
&ldquogroups&rdquo package version.
level
- a long integer, the SBML Level to assign to this Member
.
version
- a long integer, the SBML Version to assign to this Member
.
pkgVersion
- a long integer, the SBML Groups Version to assign to
this Member
.
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.
SBMLDocument
having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument
), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute.public Member(long level, long version) throws SBMLConstructorException
Member
using the given SBML Level, Version and
&ldquogroups&rdquo package version.
level
- a long integer, the SBML Level to assign to this Member
.
version
- a long integer, the SBML Version to assign to this Member
.
pkgVersion
- a long integer, the SBML Groups Version to assign to
this Member
.
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.
SBMLDocument
having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument
), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute.public Member(long level) throws SBMLConstructorException
Member
using the given SBML Level, Version and
&ldquogroups&rdquo package version.
level
- a long integer, the SBML Level to assign to this Member
.
version
- a long integer, the SBML Version to assign to this Member
.
pkgVersion
- a long integer, the SBML Groups Version to assign to
this Member
.
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.
SBMLDocument
having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument
), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute.public Member() throws SBMLConstructorException
Member
using the given SBML Level, Version and
&ldquogroups&rdquo package version.
level
- a long integer, the SBML Level to assign to this Member
.
version
- a long integer, the SBML Version to assign to this Member
.
pkgVersion
- a long integer, the SBML Groups Version to assign to
this Member
.
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.
SBMLDocument
having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument
), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute.public Member(GroupsPkgNamespaces groupsns) throws SBMLConstructorException
Member
using the given GroupsPkgNamespaces
object.
groupsns
- the GroupsPkgNamespaces
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.
SBMLDocument
having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument
), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute.public Member(Member orig) throws SBMLConstructorException
Member
.
orig
- the Member
instance to copy.SBMLConstructorException
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 Member.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 Member.delete()
themselves.
public Member cloneObject()
Member
object.
cloneObject
 in class SBase
Member
object.public java.lang.String getId()
Member
.
public java.lang.String getName()
Member
.
public java.lang.String getIdRef()
Member
.
The attributes 'idRef' and 'metaIdRef' on Member
are used to reference the
identifiers of other components in a model in order to include them as
members of a Group
. There must be exactly one (and only one) method used
to reference another element: either 'idRef' or 'metaIdRef' may be
defined, but not both. The value must be the identifier of an object
elsewhere in the Model
. (Object identifiers are usually set by attributes
named 'id' thus, the 'idRef' value will usually be the 'id' value of an
object in the Model
.) An example value of 'idRef' might be the identifier
of a species in the model, or the identifier of a Group
object. The
namespace in which the SId
value is to be found is the
SId
namespace of the Model
to which the Group
belongs.
Conversely, elements with 'id' values that are not part of the SId
namespace may not be referenced by this 'idRef' attribute. In SBML
Level 3 Version 1, this includes the Unit
and LocalParameter
objects.
Member
as a string.public java.lang.String getMetaIdRef()
Member
.
The attributes 'idRef' and 'metaIdRef' on Member
are used to reference the
identifiers of other components in a model in order to include them as
members of a Group
. There must be exactly one (and only one) method used
to reference another element: either 'idRef' or 'metaIdRef' may be
defined, but not both. The 'metaIdRef' attribute takes a value of type
IDREF
. This attribute is used to refer to a 'metaid'
attribute value on any other object in the Model
, for cases where the
object being referenced does not have an identifier in the Model
SId
namespace. (This is the case with, for example, units and rules in SBML
Level 3 Version 1.) Since meta identifiers are optional
attributes of SBase
, all SBML objects have the potential to have a meta
identifier value, including most elements from other SBML packages.
Note that even if used in conjunction with the SBML Level 3
Hierarchical Model
Composition package, this attribute is not allowed to
reference elements that reside within other Model
objects in the same SBML
Document. Referenced elements must be normal members of the parent Model
containing the Member
object, and submodel elements may be normally
accessed by creating replacements.
Member
as a string.public boolean isSetId()
true
if this Member
's 'id' attribute is set.
public boolean isSetName()
true
if this Member
's 'name' attribute is set.
public boolean isSetIdRef()
true
if this Member
's 'idRef' attribute is set.
The attributes 'idRef' and 'metaIdRef' on Member
are used to reference the
identifiers of other components in a model in order to include them as
members of a Group
. There must be exactly one (and only one) method used
to reference another element: either 'idRef' or 'metaIdRef' may be
defined, but not both. The value must be the identifier of an object
elsewhere in the Model
. (Object identifiers are usually set by attributes
named 'id' thus, the 'idRef' value will usually be the 'id' value of an
object in the Model
.) An example value of 'idRef' might be the identifier
of a species in the model, or the identifier of a Group
object. The
namespace in which the SId
value is to be found is the
SId
namespace of the Model
to which the Group
belongs.
Conversely, elements with 'id' values that are not part of the SId
namespace may not be referenced by this 'idRef' attribute. In SBML
Level 3 Version 1, this includes the Unit
and LocalParameter
objects.
true
if this Member
's 'idRef' attribute has been set, otherwise
false
is returned.public boolean isSetMetaIdRef()
true
if this Member
's 'metaIdRef' attribute is set.
The attributes 'idRef' and 'metaIdRef' on Member
are used to reference the
identifiers of other components in a model in order to include them as
members of a Group
. There must be exactly one (and only one) method used
to reference another element: either 'idRef' or 'metaIdRef' may be
defined, but not both. The 'metaIdRef' attribute takes a value of type
IDREF
. This attribute is used to refer to a 'metaid'
attribute value on any other object in the Model
, for cases where the
object being referenced does not have an identifier in the Model
SId
namespace. (This is the case with, for example, units and rules in SBML
Level 3 Version 1.) Since meta identifiers are optional
attributes of SBase
, all SBML objects have the potential to have a meta
identifier value, including most elements from other SBML packages.
Note that even if used in conjunction with the SBML Level 3
Hierarchical Model
Composition package, this attribute is not allowed to
reference elements that reside within other Model
objects in the same SBML
Document. Referenced elements must be normal members of the parent Model
containing the Member
object, and submodel elements may be normally
accessed by creating replacements.
true
if this Member
's 'metaIdRef' attribute has been set,
otherwise false
is returned.public int setId(java.lang.String id)
Member
.
public int setName(java.lang.String name)
Member
.
public int setIdRef(java.lang.String idRef)
Member
.
The attributes 'idRef' and 'metaIdRef' on Member
are used to reference the
identifiers of other components in a model in order to include them as
members of a Group
. There must be exactly one (and only one) method used
to reference another element: either 'idRef' or 'metaIdRef' may be
defined, but not both. The value must be the identifier of an object
elsewhere in the Model
. (Object identifiers are usually set by attributes
named 'id' thus, the 'idRef' value will usually be the 'id' value of an
object in the Model
.) An example value of 'idRef' might be the identifier
of a species in the model, or the identifier of a Group
object. The
namespace in which the SId
value is to be found is the
SId
namespace of the Model
to which the Group
belongs.
Conversely, elements with 'id' values that are not part of the SId
namespace may not be referenced by this 'idRef' attribute. In SBML
Level 3 Version 1, this includes the Unit
and LocalParameter
objects.
idRef
- String& value of the 'idRef' attribute to be set.
public int setMetaIdRef(java.lang.String metaIdRef)
Member
.
The attributes 'idRef' and 'metaIdRef' on Member
are used to reference the
identifiers of other components in a model in order to include them as
members of a Group
. There must be exactly one (and only one) method used
to reference another element: either 'idRef' or 'metaIdRef' may be
defined, but not both. The 'metaIdRef' attribute takes a value of type
IDREF
. This attribute is used to refer to a 'metaid'
attribute value on any other object in the Model
, for cases where the
object being referenced does not have an identifier in the Model
SId
namespace. (This is the case with, for example, units and rules in SBML
Level 3 Version 1.) Since meta identifiers are optional
attributes of SBase
, all SBML objects have the potential to have a meta
identifier value, including most elements from other SBML packages.
Note that even if used in conjunction with the SBML Level 3
Hierarchical Model
Composition package, this attribute is not allowed to
reference elements that reside within other Model
objects in the same SBML
Document. Referenced elements must be normal members of the parent Model
containing the Member
object, and submodel elements may be normally
accessed by creating replacements.
metaIdRef
- String& value of the 'metaIdRef' attribute to be
set.
public int unsetId()
Member
.
public int unsetName()
Member
.
public int unsetIdRef()
Member
.
The attributes 'idRef' and 'metaIdRef' on Member
are used to reference the
identifiers of other components in a model in order to include them as
members of a Group
. There must be exactly one (and only one) method used
to reference another element: either 'idRef' or 'metaIdRef' may be
defined, but not both. The value must be the identifier of an object
elsewhere in the Model
. (Object identifiers are usually set by attributes
named 'id' thus, the 'idRef' value will usually be the 'id' value of an
object in the Model
.) An example value of 'idRef' might be the identifier
of a species in the model, or the identifier of a Group
object. The
namespace in which the SId
value is to be found is the
SId
namespace of the Model
to which the Group
belongs.
Conversely, elements with 'id' values that are not part of the SId
namespace may not be referenced by this 'idRef' attribute. In SBML
Level 3 Version 1, this includes the Unit
and LocalParameter
objects.
public int unsetMetaIdRef()
Member
.
The attributes 'idRef' and 'metaIdRef' on Member
are used to reference the
identifiers of other components in a model in order to include them as
members of a Group
. There must be exactly one (and only one) method used
to reference another element: either 'idRef' or 'metaIdRef' may be
defined, but not both. The 'metaIdRef' attribute takes a value of type
IDREF
. This attribute is used to refer to a 'metaid'
attribute value on any other object in the Model
, for cases where the
object being referenced does not have an identifier in the Model
SId
namespace. (This is the case with, for example, units and rules in SBML
Level 3 Version 1.) Since meta identifiers are optional
attributes of SBase
, all SBML objects have the potential to have a meta
identifier value, including most elements from other SBML packages.
Note that even if used in conjunction with the SBML Level 3
Hierarchical Model
Composition package, this attribute is not allowed to
reference elements that reside within other Model
objects in the same SBML
Document. Referenced elements must be normal members of the parent Model
containing the Member
object, and submodel elements may be normally
accessed by creating replacements.
public void renameSIdRefs(java.lang.String oldid, java.lang.String newid)
Replaces all uses of a given SIdRef
type attribute value with another
value.
In SBML, object identifiers are of a data type called SId
.
In SBML Level 3, an explicit data type called SIdRef
was
introduced for attribute values that refer to SId
values in
previous Levels of SBML, this data type did not exist and attributes were
simply described to as 'referring to an identifier', but the effective
data type was the same as SIdRef
in Level 3. These and
other methods of libSBML refer to the type SIdRef
for all
Levels of SBML, even if the corresponding SBML specification did not
explicitly name the data type.
This method works by looking at all attributes and (if appropriate)
mathematical formulas in MathML content, comparing the referenced
identifiers to the value of oldid
. If any matches are found, the
matching values are replaced with newid
. The method does not
descend into child elements.
renameSIdRefs
 in class SBase
oldid
- the old identifiernewid
- the new identifierpublic java.lang.String getElementName()
Member
object.
For Member
, the XML element name is always 'member'.
getElementName
 in class SBase
'member'.
public int getTypeCode()
Member
object.
LibSBML attaches an identifying code to every kind of SBML object. These
are integer constants known as SBML type codes. The names of all
the codes begin with the characters SBML_
.
In the Java language interface for libSBML, the
type codes are defined as static integer constants in the interface class
libsbmlConstants
. Note that different Level 3
package plug-ins may use overlapping type codes to identify the package
to which a given object belongs, call the getPackageName()
method on the object.
getTypeCode
 in class SBase
Member.getElementName()
,
SBase.getPackageName()
public boolean hasRequiredAttributes()
true
if all the required attributes for this Member
object have been set.
hasRequiredAttributes
 in class SBase
true
to indicate that all the required attributes of this
Member
have been set, otherwise false
is returned.
Member
object are: