Constructor and Description |
---|
Group()
Creates a new Group with the given level, version, and package version.
|
Group(Group orig)
Copy constructor for Group.
|
Group(GroupsPkgNamespaces groupsns)
Creates a new Group with the given GroupsPkgNamespaces object.
|
Group(long level)
Creates a new Group with the given level, version, and package version.
|
Group(long level,
long version)
Creates a new Group with the given level, version, and package version.
|
Group(long level,
long version,
long pkgVersion)
Creates a new Group with the given level, version, and package version.
|
Modifier and Type | Method and Description |
---|---|
int |
addMember(Member member)
Adds a copy of the given Member objcect to the list of members.
|
int |
addMemberConstraint(MemberConstraint mc)
Adds a copy the given 'MemberConstraint' to this Group.
|
Group |
cloneObject()
Creates and returns a deep copy of this Group object.
|
Member |
createMember()
Creates a Member object, adds it to the end of the
member objects list and returns a pointer to the newly
created object.
|
MemberConstraint |
createMemberConstraint()
Creates a new MemberConstraint object, adds it to this Groups
ListOfMemberConstraints and returns the MemberConstraint object created.
|
void |
delete()
Explicitly deletes the underlying native object.
|
java.lang.String |
getElementName()
Subclasses should override this method to return XML element name of
this SBML object.
|
java.lang.String |
getId()
Returns the value of the 'id' attribute of this Group.
|
int |
getKind()
Returns the value of the 'kind' attribute of this Group.
|
ListOfMemberConstraints |
getListOfMemberConstraints()
Returns the 'ListOfMemberConstraints' in this Group object.
|
ListOfMembers |
getListOfMembers()
Returns the
ListOf object that holds all members. |
Member |
getMember(long n)
Returns the member with the given index.
|
Member |
getMember(java.lang.String symbol)
Returns the member with the given symbol.
|
MemberConstraint |
getMemberConstraint(long n)
Get a MemberConstraint from the ListOfMemberConstraints.
|
MemberConstraint |
getMemberConstraint(java.lang.String sid)
Get a MemberConstraint from the ListOfMemberConstraints
based on its identifier.
|
java.lang.String |
getName()
Returns the value of the 'name' attribute of this Group.
|
long |
getNumMemberConstraints()
Get the number of MemberConstraint objects in this Group.
|
long |
getNumMembers()
Returns the number of members for this group.
|
int |
getTypeCode()
Returns the libSBML type code for this object.
|
boolean |
isSetId()
Predicate returning
true or false depending on whether this
Group's 'id' attribute has been set. |
boolean |
isSetKind()
Predicate returning
true or false depending on whether this
Group's 'kind' attribute has been set. |
boolean |
isSetName()
Predicate returning
true or false depending on whether this
Group's 'name' attribute has been set. |
Member |
removeMember(long index)
Removes the member with the given index from the group.
|
Member |
removeMember(java.lang.String symbol)
Removes the member with the given symbol from the group.
|
MemberConstraint |
removeMemberConstraint(long n)
Removes the nth MemberConstraint from the ListOfMemberConstraints within this Group.
|
MemberConstraint |
removeMemberConstraint(java.lang.String sid)
Removes the MemberConstraint with the given identifier from the ListOfMemberConstraints within this Group
and returns a pointer to it.
|
int |
setId(java.lang.String id)
Sets the value of the 'id' attribute of this Group.
|
int |
setKind(int kind)
Sets the value of the 'kind' attribute of this Group.
|
int |
setName(java.lang.String name)
Sets the value of the 'name' attribute of this Group.
|
int |
unsetId()
Unsets the value of the 'id' attribute of this Group.
|
int |
unsetKind()
Unsets the value of the 'kind' attribute of this Group.
|
int |
unsetName()
Unsets the value of the 'name' attribute of this Group.
|
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getElementByMetaId, getElementBySId, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, 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
public Group() throws SBMLConstructorException
level
- a long integer, the SBML Level to assign to this Group
version
- a long integer, the SBML Version to assign to this Group
pkgVersion
- a long integer, the SBML Groups Version to assign to this GroupSBMLConstructorException
public Group(Group orig) throws SBMLConstructorException
orig
- the Group instance to copy.SBMLConstructorException
public Group(GroupsPkgNamespaces groupsns) throws SBMLConstructorException
groupsns
- the GroupsPkgNamespaces objectSBMLConstructorException
public Group(long level) throws SBMLConstructorException
level
- a long integer, the SBML Level to assign to this Group
version
- a long integer, the SBML Version to assign to this Group
pkgVersion
- a long integer, the SBML Groups Version to assign to this GroupSBMLConstructorException
public Group(long level, long version) throws SBMLConstructorException
level
- a long integer, the SBML Level to assign to this Group
version
- a long integer, the SBML Version to assign to this Group
pkgVersion
- a long integer, the SBML Groups Version to assign to this GroupSBMLConstructorException
public Group(long level, long version, long pkgVersion) throws SBMLConstructorException
level
- a long integer, the SBML Level to assign to this Group
version
- a long integer, the SBML Version to assign to this Group
pkgVersion
- a long integer, the SBML Groups Version to assign to this GroupSBMLConstructorException
public int addMember(Member member)
member
- the Member object to be added to the list of
members.
public int addMemberConstraint(MemberConstraint mc)
mc
- the MemberConstraint object to add
public Group cloneObject()
cloneObject
 in class SBase
public Member createMember()
public MemberConstraint createMemberConstraint()
#addMemberConstraint(const MemberConstraint mc)
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 Group.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 Group.delete()
themselves.
public java.lang.String getElementName()
getElementName
 in class SBase
public java.lang.String getId()
public int getKind()
public ListOfMemberConstraints getListOfMemberConstraints()
public ListOfMembers getListOfMembers()
ListOf
object that holds all members.
ListOf
object that holds all members.public Member getMember(long n)
n
- the index number of the Member to get.
public Member getMember(java.lang.String symbol)
symbol
- a string representing the symbol attribute
of the Member to get.
public MemberConstraint getMemberConstraint(long n)
n
- the index number of the MemberConstraint to get.
Group.getNumMemberConstraints()
public MemberConstraint getMemberConstraint(java.lang.String sid)
sid
- a string representing the identifier
of the MemberConstraint to get.
Group.getMemberConstraint(long n)
,
Group.getNumMemberConstraints()
public java.lang.String getName()
public long getNumMemberConstraints()
public long getNumMembers()
public int getTypeCode()
SBase
This method may return the type code of this SBML object, or it may
return SBML_UNKNOWN
. This
is because subclasses of SBase
are not required to implement this
method to return a type code. This method is meant primarily for the
LibSBML C interface, in which class and subclass information is not
readily available.
getTypeCode
 in class SBase
Group.getElementName()
public boolean isSetId()
true
or false
depending on whether this
Group's 'id' attribute has been set.
public boolean isSetKind()
true
or false
depending on whether this
Group's 'kind' attribute has been set.
Some words of explanation about the
set
/unset
/isSet
methods:
The SBML specifications define certain attributes on some classes of
objects as being optional. This requires an application to be careful
about the distinction between two cases when reading a model: (1) a given
attribute has never been set to a value, and therefore should be
assumed to have the SBML-defined default value if one exists, and (2) a
given attribute has been set to a value, but the value happens to be an
empty string. The situation can be ambiguous when reading a model from a
file or data stream and then examining the data objects that libSBML
constructs as a result. LibSBML supports these distinctions by providing
methods to set, unset, and query the status of attributes that are
optional. The methods have names of the form set
Attribute(...)
,
unset
Attribute()
, and
isSet
Attribute()
, where Attribute is the the name of the optional
attribute in question.
true
if this Group's 'kind' attribute has been set,
otherwise false
is returned.public boolean isSetName()
true
or false
depending on whether this
Group's 'name' attribute has been set.
Some words of explanation about the
set
/unset
/isSet
methods:
The SBML specifications define certain attributes on some classes of
objects as being optional. This requires an application to be careful
about the distinction between two cases when reading a model: (1) a given
attribute has never been set to a value, and therefore should be
assumed to have the SBML-defined default value if one exists, and (2) a
given attribute has been set to a value, but the value happens to be an
empty string. The situation can be ambiguous when reading a model from a
file or data stream and then examining the data objects that libSBML
constructs as a result. LibSBML supports these distinctions by providing
methods to set, unset, and query the status of attributes that are
optional. The methods have names of the form set
Attribute(...)
,
unset
Attribute()
, and
isSet
Attribute()
, where Attribute is the the name of the optional
attribute in question.
public Member removeMember(long index)
n
- the index of the Member object to remove
public Member removeMember(java.lang.String symbol)
symbol
- the symbol attribute of the Member object to remove
public MemberConstraint removeMemberConstraint(long n)
The caller owns the returned item and is responsible for deleting it.
n
- the index of the MemberConstraint to remove.
Group.getNumMemberConstraints()
public MemberConstraint removeMemberConstraint(java.lang.String sid)
The caller owns the returned item and is responsible for deleting it.
If none of the items in this list have the identifier sid
, then
null
is returned.
sid
- the identifier of the MemberConstraint to remove.
public int setId(java.lang.String id)
public int setKind(int kind)
The string in kind
is copied.
Some words of explanation about the
set
/unset
/isSet
methods:
The SBML specifications define certain attributes on some classes of
objects as being optional. This requires an application to be careful
about the distinction between two cases when reading a model: (1) a given
attribute has never been set to a value, and therefore should be
assumed to have the SBML-defined default value if one exists, and (2) a
given attribute has been set to a value, but the value happens to be an
empty string. The situation can be ambiguous when reading a model from a
file or data stream and then examining the data objects that libSBML
constructs as a result. LibSBML supports these distinctions by providing
methods to set, unset, and query the status of attributes that are
optional. The methods have names of the form set
Attribute(...)
,
unset
Attribute()
, and
isSet
Attribute()
, where Attribute is the the name of the optional
attribute in question.
kind
- the new kind for the Group
public int setName(java.lang.String name)
The string in name
is copied.
Some words of explanation about the
set
/unset
/isSet
methods:
The SBML specifications define certain attributes on some classes of
objects as being optional. This requires an application to be careful
about the distinction between two cases when reading a model: (1) a given
attribute has never been set to a value, and therefore should be
assumed to have the SBML-defined default value if one exists, and (2) a
given attribute has been set to a value, but the value happens to be an
empty string. The situation can be ambiguous when reading a model from a
file or data stream and then examining the data objects that libSBML
constructs as a result. LibSBML supports these distinctions by providing
methods to set, unset, and query the status of attributes that are
optional. The methods have names of the form set
Attribute(...)
,
unset
Attribute()
, and
isSet
Attribute()
, where Attribute is the the name of the optional
attribute in question.
public int unsetId()
public int unsetKind()
public int unsetName()
Some words of explanation about the
set
/unset
/isSet
methods:
The SBML specifications define certain attributes on some classes of
objects as being optional. This requires an application to be careful
about the distinction between two cases when reading a model: (1) a given
attribute has never been set to a value, and therefore should be
assumed to have the SBML-defined default value if one exists, and (2) a
given attribute has been set to a value, but the value happens to be an
empty string. The situation can be ambiguous when reading a model from a
file or data stream and then examining the data objects that libSBML
constructs as a result. LibSBML supports these distinctions by providing
methods to set, unset, and query the status of attributes that are
optional. The methods have names of the form set
Attribute(...)
,
unset
Attribute()
, and
isSet
Attribute()
, where Attribute is the the name of the optional
attribute in question.