public class Member extends SBase
Member class defines what objects are parts of
a Group.
The Member class 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 and, as mentioned above, SBase 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.
| Constructor and Description |
|---|
Member()
Creates a new
Member using the given SBML Level, Version and
“groups” 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
“groups” package version. |
Member(long level,
long version)
Creates a new
Member using the given SBML Level, Version and
“groups” package version. |
Member(long level,
long version,
long pkgVersion)
Creates a new
Member using the given SBML Level, Version and
“groups” 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, getIdAttribute, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getPackageCoreVersion, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetIdAttribute, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setIdAttribute, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetIdAttribute, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm, unsetUserDatapublic Member(long level, long version, long pkgVersion) throws SBMLConstructorException
Member using the given SBML Level, Version and
“groups” 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.
SBMLConstructorExceptionSBMLDocument 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. For packages, this means that the
parent object to which this package element is being added must have
been created with the package namespace, or that the package namespace
was added to it, even if that parent is not a package object itself.public Member(long level, long version) throws SBMLConstructorException
Member using the given SBML Level, Version and
“groups” 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.
SBMLConstructorExceptionSBMLDocument 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. For packages, this means that the
parent object to which this package element is being added must have
been created with the package namespace, or that the package namespace
was added to it, even if that parent is not a package object itself.public Member(long level) throws SBMLConstructorException
Member using the given SBML Level, Version and
“groups” 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.
SBMLConstructorExceptionSBMLDocument 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. For packages, this means that the
parent object to which this package element is being added must have
been created with the package namespace, or that the package namespace
was added to it, even if that parent is not a package object itself.public Member() throws SBMLConstructorException
Member using the given SBML Level, Version and
“groups” 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.
SBMLConstructorExceptionSBMLDocument 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. For packages, this means that the
parent object to which this package element is being added must have
been created with the package namespace, or that the package namespace
was added to it, even if that parent is not a package object itself.public Member(GroupsPkgNamespaces groupsns) throws SBMLConstructorException
Member using the given GroupsPkgNamespaces object.
The package namespaces object used in this constructor is derived from a
SBMLNamespaces object, which encapsulates SBML Level/Version/namespaces
information. It is used to communicate the SBML Level, Version, and
package version and name information used in addition to SBML Level 3 Core. A
common approach to using libSBML's SBMLNamespaces facilities is to create an
package namespace object somewhere in a program once, then hand that object
as needed to object constructors of that package that accept it as and
argument, such as this one.
groupsns - the GroupsPkgNamespaces object.
SBMLConstructorExceptionSBMLDocument 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. For packages, this means that the
parent object to which this package element is being added must have
been created with the package namespace, or that the package namespace
was added to it, even if that parent is not a package object itself.public Member(Member orig) throws SBMLConstructorException
Member.
orig - the Member instance to copy.SBMLConstructorExceptionpublic 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 SBaseMember object.public java.lang.String getId()
Member.
getId in class SBaseMember as a string.SBase.getIdAttribute(),
SBase.setIdAttribute(String sid),
SBase.isSetIdAttribute(),
SBase.unsetIdAttribute()public java.lang.String getName()
Member.
getName in class SBaseMember as a string.SBase.getIdAttribute(),
SBase.isSetName(),
SBase.setName(String sid),
SBase.unsetName()public java.lang.String getIdRef()
Member.
Member as a string.public java.lang.String getMetaIdRef()
Member.
Member as a string.public boolean isSetId()
true if this Member's 'id' attribute is set.
isSetId in class SBasetrue if this Member's 'id' attribute has been set, otherwise
false is returned.SBase.getIdAttribute(),
SBase.setIdAttribute(String sid),
SBase.unsetIdAttribute(),
SBase.isSetIdAttribute()public boolean isSetName()
true if this Member's 'name' attribute is set.
isSetName in class SBasetrue if this Member's 'name' attribute has been set, otherwise
false is returned.SBase.getName(),
SBase.setName(String sid),
SBase.unsetName()public boolean isSetIdRef()
true if this Member's 'idRef' attribute is set.
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.
true if this Member's 'metaIdRef' attribute has been set,
otherwise false is returned.public int setId(java.lang.String id)
Member.
setId in class SBaseid - String& value of the 'id' attribute to be set.
Calling this function with id = null or an empty string is
equivalent to calling unsetId().
SBase.getIdAttribute(),
SBase.setIdAttribute(String sid),
SBase.isSetIdAttribute(),
SBase.unsetIdAttribute()public int setName(java.lang.String name)
Member.
setName in class SBasename - String& value of the 'name' attribute to be set.
Calling this function with name = null or an empty string is
equivalent to calling unsetName().
public int setIdRef(java.lang.String idRef)
Member.
idRef - String& value of the 'idRef' attribute to be set.
public int setMetaIdRef(java.lang.String metaIdRef)
Member.
metaIdRef - String& value of the 'metaIdRef' attribute to be
set.
public int unsetId()
Member.
unsetId in class SBaseSBase.getIdAttribute(),
SBase.setIdAttribute(String sid),
SBase.isSetIdAttribute(),
SBase.unsetIdAttribute()public int unsetName()
Member.
unsetName in class SBaseSBase.getName(),
SBase.setName(String sid),
SBase.isSetName()public int unsetIdRef()
Member.
public int unsetMetaIdRef()
Member.
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 SBaseoldid - the old identifier.newid - the new identifier.public 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
method on the object.
SBase.getPackageName()
The exception to this is lists: all SBML-style list elements have the type
SBML_LIST_OF, regardless of what package they
are from.
getTypeCode in class SBaseSBML_GROUPS_MEMBER.
Member.getElementName(),
SBase.getPackageName()ListOf.getItemTypeCode()).
public boolean hasRequiredAttributes()
true if all the required attributes for this Member
object have been set.
hasRequiredAttributes in class SBasetrue to indicate that all the required attributes of this
Member have been set, otherwise false is returned.