public class ListOfMembers extends ListOf
Member
objects.
In the SBML Level 3 Groups package, the membership of a group is
defined by placing Member
objects within a ListOfMembers
object contained
within a Group
object. A ListOfMembers
object is optional, but, if
present, it must contain at least one Member
object. In common with other
ListOf___ classes in SBML, ListOfMembers
is derived from SBase
. However,
an uncommon feature of ListOfMembers
is that it has optional 'id' and
'name' attributes that can be used in a manner discussed below.
A ListOfMembers
must have one or more Member
children. Since ListOfMembers
is derived from SBase
, it inherits the 'sboTerm' and 'metaid' attributes,
as well as the optional children Notes and Annotation. Unlike most lists
of objects in SBML, however, the 'sboTerm' attribute and the Notes and
Annotation children are taken here to apply directly to every SBML element
referenced by each child Member
of this ListOfMembers
, if that referenced
element has no such definition. Thus, if a referenced element has no
defined 'sboTerm' attribute or child Notes or Annotation objects, that
element should be considered to now have the 'sboTerm', child Notes, or
child Annotation of the ListOfMembers
.
If multiple ListOfMembers
have child Member
elements that reference
the same SBML element, and more than one ListOfMembers
or Member
has
a value for an sboTerm attribute, Notes, or Annotation element, those
Member
elements should be consistent with each other: the 'sboTerm'
attributes should either be identical, or one should inherit from
the other Notes should say the same or similar things and Annotation
elements should not conflict. Interpreters may choose to resolve any
such conflicts arbitrarily.
An uncommon feature about ListOfMembers
is that, if it is referenced by a
Member
of a different Group
, the children of the referenced
ListOfMembers
are also considered to be members of the referencing group.
In this way, groups may be nested semantically to create larger groups out
of subgroups.
If a Member
object within a Group
object's ListOfMembers
references
another Group
object, it is the referenced Group
itself that is
considered to be a member of the parent Group
, not the corresponding
referenced model component(s). This is true regardless of whether those
components themselves happen to point to other components using some
mechanism defined by another SBML Level 3 package (as happens, for
example, in the SBML Level 3 Hierarchical Model Composition package
and its use of SBaseRef
). However, if instead a Member
object references
a ListOfMembers
object (using the 'id' attribute permitted on
ListOfMembers
objects), it is the components of that ListOfMembers
that
are considered to be part of the parent Group
. In other words: if in some
Group
G, a Member
M references another Group
, that Group
is the
member of G if M references a ListOfMembers
, it is the entities
referenced by the Member
objects within the ListOfMembers
that are
the members of G and not the ListOfMembers
object itself.
The implication of this is that any rule that applies to members of a
group (such the meaning of the 'kind' attribute, or the restrictions on
the application of 'sboTerm' attributes on a ListOfMembers
) applies to the
child group when referenced by the Group
'id', and to the members of the
child group when referenced by the ListOfMembers
'id'. In an example
situation where a parent group includes two Species
plus a Group
which
itself contains three other Species
, if the parent group's ListOfMembers
is given an 'sboTerm' attribute value, that SBO
term applies to the two
species and the group, not to the three child species members of the
second group. (Note also that in such a case, the parent group's 'kind'
attribute value would almost certainly be 'collection'
or
'partonomy'
, and not 'classification'
, as two species and a group are
very unlikely to be classified as the same thing.) In contrast, in the
situation where a parent group includes two Species
plus a ListOfMembers
which contains three other Species
, the parent group's ListOfMembers
'sboTerm' would apply to the five Species
, and could be more reasonably
marked as a 'classification'.
In a future version of this SBML Level 3 Groups specification, it may be possible to perform set operations on groups, but for now, this type of union is the only set operation that is possible.
Groups are not permitted to be circular: no Member
may reference itself,
its parent ListOfMembers
, nor its parent Group
. If a Member
references a
Group
, the same restrictions apply to that subgroup's children: they may
not reference the Member
, its parent ListOfMembers
, nor its parent Group
,
and if any of those children reference a Group
, the same restrictions apply
to them, etc.
If a Member
has a 'idRef' or 'metaIdRef' attribute which references an
object from a namespace that is not understood by the interpreter of the
SBML model, that Member
must be ignored. The referenced object will not be
understood by the interpreter, and therefore has no need to become a
member of the group. If an interpreter cannot tell whether a referenced
object does not exist or if exists in an unparsed namespace, it may choose
to produce a warning.
Group
,
Member
,
ListOfGroups
Constructor and Description |
---|
ListOfMembers()
Creates a new
ListOfMembers using the given SBML Level, Version and
&ldquogroups&rdquo package version. |
ListOfMembers(GroupsPkgNamespaces groupsns)
Creates a new
ListOfMembers using the given GroupsPkgNamespaces object. |
ListOfMembers(ListOfMembers orig)
Copy constructor for
ListOfMembers . |
ListOfMembers(long level)
Creates a new
ListOfMembers using the given SBML Level, Version and
&ldquogroups&rdquo package version. |
ListOfMembers(long level,
long version)
Creates a new
ListOfMembers using the given SBML Level, Version and
&ldquogroups&rdquo package version. |
ListOfMembers(long level,
long version,
long pkgVersion)
Creates a new
ListOfMembers using the given SBML Level, Version and
&ldquogroups&rdquo package version. |
Modifier and Type | Method and Description |
---|---|
int |
addMember(Member m)
Adds a copy of the given
Member to this ListOfMembers . |
ListOfMembers |
cloneObject()
Creates and returns a deep copy of this
ListOfMembers object. |
Member |
createMember()
Creates a new
Member object, adds it to this ListOfMembers object and
returns the Member object created. |
void |
delete()
Explicitly deletes the underlying native object.
|
Member |
get(long n)
Get a
Member from the ListOfMembers . |
Member |
get(java.lang.String sid)
Get a
Member from the ListOfMembers based on its identifier. |
Member |
getByIdRef(java.lang.String sid)
Get a
Member from the ListOfMembers based on the IdRef to which it refers. |
java.lang.String |
getElementName()
Returns the XML element name of this
ListOfMembers object. |
java.lang.String |
getId()
Returns the value of the 'id' attribute of this
ListOfMembers . |
int |
getItemTypeCode()
Returns the libSBML type code for the SBML objects contained in this
ListOfMembers object. |
java.lang.String |
getName()
Returns the value of the 'name' attribute of this
ListOfMembers . |
long |
getNumMembers()
Get the number of
Member objects in this ListOfMembers . |
int |
getTypeCode()
Returns the libSBML type code for this
ListOfMembers object. |
boolean |
hasRequiredAttributes()
Predicate returning
true if all the required attributes for this
ListOfMembers object have been set. |
boolean |
isSetId()
Predicate returning
true if this ListOfMembers 's 'id' attribute is set. |
boolean |
isSetName()
Predicate returning
true if this ListOfMembers 's 'name' attribute is
set. |
Member |
remove(long n)
Removes the nth
Member from this ListOfMembers and returns a pointer to
it. |
Member |
remove(java.lang.String sid)
Removes the
Member from this ListOfMembers based on its identifier and
returns a pointer to it. |
int |
setId(java.lang.String id)
Sets the value of the 'id' attribute of this
ListOfMembers . |
int |
setName(java.lang.String name)
Sets the value of the 'name' attribute of this
ListOfMembers . |
int |
unsetId()
Unsets the value of the 'id' attribute of this
ListOfMembers . |
int |
unsetName()
Unsets the value of the 'name' attribute of this
ListOfMembers . |
append, appendAndOwn, appendFrom, clear, clear, connectToChild, getElementByMetaId, getElementBySId, insert, insertAndOwn, removeFromParentAndDelete, size
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, 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, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm, unsetUserData
public ListOfMembers(long level, long version, long pkgVersion) throws SBMLConstructorException
ListOfMembers
using the given SBML Level, Version and
&ldquogroups&rdquo package version.
level
- a long integer, the SBML Level to assign to this
ListOfMembers
.
version
- a long integer, the SBML Version to assign to this
ListOfMembers
.
pkgVersion
- a long integer, the SBML Groups Version to assign to
this ListOfMembers
.
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 ListOfMembers(long level, long version) throws SBMLConstructorException
ListOfMembers
using the given SBML Level, Version and
&ldquogroups&rdquo package version.
level
- a long integer, the SBML Level to assign to this
ListOfMembers
.
version
- a long integer, the SBML Version to assign to this
ListOfMembers
.
pkgVersion
- a long integer, the SBML Groups Version to assign to
this ListOfMembers
.
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 ListOfMembers(long level) throws SBMLConstructorException
ListOfMembers
using the given SBML Level, Version and
&ldquogroups&rdquo package version.
level
- a long integer, the SBML Level to assign to this
ListOfMembers
.
version
- a long integer, the SBML Version to assign to this
ListOfMembers
.
pkgVersion
- a long integer, the SBML Groups Version to assign to
this ListOfMembers
.
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 ListOfMembers() throws SBMLConstructorException
ListOfMembers
using the given SBML Level, Version and
&ldquogroups&rdquo package version.
level
- a long integer, the SBML Level to assign to this
ListOfMembers
.
version
- a long integer, the SBML Version to assign to this
ListOfMembers
.
pkgVersion
- a long integer, the SBML Groups Version to assign to
this ListOfMembers
.
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 ListOfMembers(GroupsPkgNamespaces groupsns) throws SBMLConstructorException
ListOfMembers
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 ListOfMembers(ListOfMembers orig) throws SBMLConstructorException
ListOfMembers
.
orig
- the ListOfMembers
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 ListOfMembers.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 ListOfMembers.delete()
themselves.
public ListOfMembers cloneObject()
ListOfMembers
object.
cloneObject
 in class ListOf
ListOfMembers
object.public java.lang.String getId()
ListOfMembers
.
getId
 in class SBase
ListOfMembers
as a string.public java.lang.String getName()
ListOfMembers
.
getName
 in class SBase
ListOfMembers
as a
string.public boolean isSetId()
true
if this ListOfMembers
's 'id' attribute is set.
isSetId
 in class SBase
true
if this ListOfMembers
's 'id' attribute has been set,
otherwise false
is returned.public boolean isSetName()
true
if this ListOfMembers
's 'name' attribute is
set.
isSetName
 in class SBase
true
if this ListOfMembers
's 'name' attribute has been set,
otherwise false
is returned.public int setId(java.lang.String id)
ListOfMembers
.
public int setName(java.lang.String name)
ListOfMembers
.
public int unsetId()
ListOfMembers
.
public int unsetName()
ListOfMembers
.
public Member get(long n)
Member
from the ListOfMembers
.
get
 in class ListOf
n
- a long integer representing the index of the Member
to
retrieve.
Member
in this ListOfMembers
.
ListOf.size()
public Member get(java.lang.String sid)
Member
from the ListOfMembers
based on its identifier.
sid
- a string representing the identifier of the Member
to retrieve.
Member
in this ListOfMembers
with the given id or null if no
such Member
exists.
ListOf.size()
public Member remove(long n)
Member
from this ListOfMembers
and returns a pointer to
it.
remove
 in class ListOf
n
- a long integer representing the index of the Member
to remove.
Member
in this ListOfMembers
.
ListOf.size()
public Member remove(java.lang.String sid)
Member
from this ListOfMembers
based on its identifier and
returns a pointer to it.
sid
- a string representing the identifier of the Member
to remove.
Member
in this ListOfMembers
based on the identifier or null
if no such Member
exists.
public int addMember(Member m)
Member
to this ListOfMembers
.
m
- the Member
object to add.
ListOfMembers.createMember()
create
)
for alternatives that do not lead to these issues.
public long getNumMembers()
Member
objects in this ListOfMembers
.
Member
objects in this ListOfMembers
.public Member createMember()
Member
object, adds it to this ListOfMembers
object and
returns the Member
object created.
Member
object instance.
ListOfMembers.addMember(Member m)
public Member getByIdRef(java.lang.String sid)
Member
from the ListOfMembers
based on the IdRef to which it refers.
sid
- a string representing the idRef attribute of the Member
object
to retrieve.
Member
in this ListOfMembers
based on the given idRef
attribute or null if no such Member
exists.public java.lang.String getElementName()
ListOfMembers
object.
For ListOfMembers
, the XML element name is always 'listOfMembers'.
getElementName
 in class ListOf
'listOfMembers'.
public int getTypeCode()
ListOfMembers
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 ListOf
ListOf.getItemTypeCode()
,
ListOf.getElementName()
,
SBase.getPackageName()
public int getItemTypeCode()
ListOfMembers
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.
getItemTypeCode
 in class ListOf
ListOfMembers.getElementName()
,
SBase.getPackageName()
public boolean hasRequiredAttributes()
true
if all the required attributes for this
ListOfMembers
object have been set.
hasRequiredAttributes
 in class SBase
true
to indicate that all the required attributes of this
ListOfMembers
have been set, otherwise false
is returned.
ListOfMembers
object are: