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.
|
void |
connectToChild()   |
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.
|
String |
getElementName()
Subclasses should override this method to return XML element name of
this SBML object.
|
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(String symbol)
Returns the member with the given symbol.
|
MemberConstraint |
getMemberConstraint(long n)
Get a MemberConstraint from the ListOfMemberConstraints.
|
MemberConstraint |
getMemberConstraint(String sid)
Get a MemberConstraint from the ListOfMemberConstraints
based on its identifier.
|
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(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(String sid)
Removes the MemberConstraint with the given identifier from the ListOfMemberConstraints within this Group
and returns a pointer to it.
|
int |
setId(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(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, 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, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm, unsetUserData
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 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) 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() 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(GroupsPkgNamespaces groupsns) throws SBMLConstructorException
GroupsPkgNamespaces
object.
groupsns
- the GroupsPkgNamespaces
objectSBMLConstructorException
public Group(Group orig) throws SBMLConstructorException
orig
- the Group 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 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 Group cloneObject()
cloneObject
 in class SBase
public boolean isSetId()
true
or false
depending on whether this
Group's 'id' attribute has been set.
public int unsetId()
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 int setName(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 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.
public int getKind()
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 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 unsetKind()
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(String symbol)
symbol
- a string representing the symbol attribute
of the Member to get.
public int addMember(Member member)
member
- the Member object to be added to the list of
members.
public long getNumMembers()
public Member createMember()
public Member removeMember(long index)
n
- the index of the Member object to remove
public Member removeMember(String symbol)
symbol
- the symbol attribute of the Member object to remove
public ListOfMemberConstraints getListOfMemberConstraints()
public MemberConstraint getMemberConstraint(long n)
n
- the index number of the MemberConstraint to get.
Group.getNumMemberConstraints()
public MemberConstraint getMemberConstraint(String sid)
sid
- a string representing the identifier
of the MemberConstraint to get.
,
Group.getMemberConstraint(long n)
public int addMemberConstraint(MemberConstraint mc)
mc
- the MemberConstraint object to add
public long getNumMemberConstraints()
public MemberConstraint createMemberConstraint()
Group.addMemberConstraint( MemberConstraint mc)
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(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 String getElementName()
getElementName
 in class SBase
public int getTypeCode()
SBase
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.
Here follow some additional general information about libSBML type codes:
SBase
subclass (e.g. SBMLLayoutTypeCode_t
for the SBML Level 3
Layout extension, SBMLFbcTypeCode_t
for the SBML Level 3 Flux
Balance Constraints extension, etc.).
SBase.getTypeCode()
and SBase.getPackageName()
must be
checked. This is particularly important for functions that take an SBML
type code as an argument, such as
SBase.getAncestorOfType(int, String)
, which by
default assumes you are handing it a core type, and will return null
if
the value you give it is actually from a package.
The following example code illustrates the combined use of
SBase.getPackageName()
and SBase.getTypeCode()
:
void example (SBase sb) { String pkgName = sb.getPackageName() if (pkgName.equals('core')) { switch (sb.getTypeCode()) { case libsbml.SBML_MODEL: .... break case libsbml.SBML_REACTION: .... } } else if (pkgName.equals('layout')) { switch (sb.getTypeCode()) { case libsbml.SBML_LAYOUT_LAYOUT: .... break case libsbml.SBML_LAYOUT_REACTIONGLYPH: .... } } ... }
getTypeCode
 in class SBase
Group.getElementName()
public void connectToChild()
connectToChild
 in class SBase