public class ListOfFbcAssociations extends ListOf
FbcAssociation objects.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
The ListOfFbcAssociations is a container of FbcAssociation objects for the
FbcAnd and FbcOr classes. Unlike the ListOf___ classes in SBML, the
ListOfFbcAssociations is not a class that appears in the &ldquofbc&rdquo
Version 2 specification, and instead is used internally in libSBML as
a convenience class to store arbitrary numbers of FbcAssociation objects.
Also unlike other ListOf___ classes, the FbcAnd and FbcOr classes require
at least two child FbcAssociation objects, so valid ListOfFbcAssociations
libsbml objects will always contain two or more children. These children
will have element names associated with their derived class, not the base
FbcAssociation class: <fbc:and>,
<fbc:or>, and <fbc:geneProductRef>.
FbcAssociation,
FbcAnd,
FbcOr,
GeneProductRefAssociation and
GeneAssociation annotation classes. Please see the Version 1 and
Version 2 &ldquofbc&rdquo specifications for more details.
FbcAssociation objects in a way that mirrors how other lists of
components in SBML are manipulated. ListOfFbcAssociations is abstracted
away when an SBML &ldquofbc&rdquo model file is actually written out in
the final XML form.
| Constructor and Description |
|---|
ListOfFbcAssociations()
Creates a new
ListOfFbcAssociations with the given SBML Level, Version,
and &ldquofbc&rdquopackage version. |
ListOfFbcAssociations(FbcPkgNamespaces fbcns)
Creates a new
ListOfFbcAssociations with the given FbcPkgNamespaces
object. |
ListOfFbcAssociations(long level)
Creates a new
ListOfFbcAssociations with the given SBML Level, Version,
and &ldquofbc&rdquopackage version. |
ListOfFbcAssociations(long level,
long version)
Creates a new
ListOfFbcAssociations with the given SBML Level, Version,
and &ldquofbc&rdquopackage version. |
ListOfFbcAssociations(long level,
long version,
long pkgVersion)
Creates a new
ListOfFbcAssociations with the given SBML Level, Version,
and &ldquofbc&rdquopackage version. |
| Modifier and Type | Method and Description |
|---|---|
int |
addFbcAssociation(FbcAssociation fa)
Adds a copy the given
FbcAssociation object to this
ListOfFbcAssociations. |
ListOfFbcAssociations |
cloneObject()
Creates and returns a deep copy of this
ListOfFbcAssociations object. |
FbcAnd |
createAnd()
Creates a new
FbcAnd object. |
GeneProductRef |
createGeneProductRef()
Creates a new
GeneProductRef object. |
FbcOr |
createOr()
Creates a new
FbcOr object. |
void |
delete()
Explicitly deletes the underlying native object.
|
FbcAssociation |
get(long n)
Get a
FbcAssociation from the ListOfFbcAssociations. |
FbcAssociation |
get(java.lang.String sid)
Get a
FbcAssociation from the ListOfFbcAssociations based on its
identifier. |
java.lang.String |
getElementName()
Returns the XML element name of this object.
|
int |
getItemTypeCode()
Returns the libSBML type code for the objects contained in this
ListOf. |
long |
getNumFbcAssociations()
Get the number of
FbcAssociation objects in this ListOfFbcAssociations. |
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
FbcAssociation |
remove(long n)
Removes the nth
FbcAssociation |
FbcAssociation |
remove(java.lang.String sid)
Removes the
FbcAssociation with the given identifier |
append, appendAndOwn, appendFrom, clear, clear, connectToChild, getElementByMetaId, getElementBySId, insert, insertAndOwn, removeFromParentAndDelete, sizeaddCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getId, getIdAttribute, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getName, 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, isSetId, isSetIdAttribute, isSetMetaId, isSetModelHistory, isSetName, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setId, setIdAttribute, setMetaId, setModelHistory, setName, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetId, unsetIdAttribute, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm, unsetUserDatapublic ListOfFbcAssociations(long level, long version, long pkgVersion) throws SBMLConstructorException
ListOfFbcAssociations with the given SBML Level, Version,
and &ldquofbc&rdquopackage version.
level - a long integer, the SBML Level to assign to this
ListOfFbcAssociations.
version - a long integer, the SBML Version to assign to this
ListOfFbcAssociations.
pkgVersion - a long integer, the SBML &ldquofbc&rdquo package
Version to assign to this ListOfFbcAssociations.
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 ListOfFbcAssociations(long level, long version) throws SBMLConstructorException
ListOfFbcAssociations with the given SBML Level, Version,
and &ldquofbc&rdquopackage version.
level - a long integer, the SBML Level to assign to this
ListOfFbcAssociations.
version - a long integer, the SBML Version to assign to this
ListOfFbcAssociations.
pkgVersion - a long integer, the SBML &ldquofbc&rdquo package
Version to assign to this ListOfFbcAssociations.
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 ListOfFbcAssociations(long level) throws SBMLConstructorException
ListOfFbcAssociations with the given SBML Level, Version,
and &ldquofbc&rdquopackage version.
level - a long integer, the SBML Level to assign to this
ListOfFbcAssociations.
version - a long integer, the SBML Version to assign to this
ListOfFbcAssociations.
pkgVersion - a long integer, the SBML &ldquofbc&rdquo package
Version to assign to this ListOfFbcAssociations.
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 ListOfFbcAssociations() throws SBMLConstructorException
ListOfFbcAssociations with the given SBML Level, Version,
and &ldquofbc&rdquopackage version.
level - a long integer, the SBML Level to assign to this
ListOfFbcAssociations.
version - a long integer, the SBML Version to assign to this
ListOfFbcAssociations.
pkgVersion - a long integer, the SBML &ldquofbc&rdquo package
Version to assign to this ListOfFbcAssociations.
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 ListOfFbcAssociations(FbcPkgNamespaces fbcns) throws SBMLConstructorException
ListOfFbcAssociations with the given FbcPkgNamespaces
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.
fbcns - the FbcPkgNamespaces 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 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 ListOfFbcAssociations.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 ListOfFbcAssociations.delete() themselves.
public ListOfFbcAssociations cloneObject()
ListOfFbcAssociations object.
cloneObject in class ListOfListOfFbcAssociations object.public FbcAssociation get(long n)
FbcAssociation from the ListOfFbcAssociations.
get in class ListOfn - the index number of the FbcAssociation to get.
FbcAssociation in this ListOfFbcAssociations.
ListOf.size(),
ListOfFbcAssociations.getNumFbcAssociations()public FbcAssociation get(java.lang.String sid)
FbcAssociation from the ListOfFbcAssociations based on its
identifier.
sid - a string representing the identifier of the FbcAssociation to
get.
FbcAssociation in this ListOfFbcAssociations with the given id
or null if no such FbcAssociation exists.
ListOfFbcAssociations.get(long n),
ListOf.size()public int addFbcAssociation(FbcAssociation fa)
FbcAssociation object to this
ListOfFbcAssociations.
fa - the FbcAssociation object to add.
public long getNumFbcAssociations()
FbcAssociation objects in this ListOfFbcAssociations.
FbcAssociation objects in this
ListOfFbcAssociations.public FbcAnd createAnd()
FbcAnd object.
This method creates a new FbcAssociation object of subclass FbcAnd, adds
it to the ListOfFbcAssociations, and returns the FbcAssociation object
created.
FbcAssociation object instance.
ListOfFbcAssociations.createOr(),
ListOfFbcAssociations.createGeneProductRef(),
ListOfFbcAssociations.addFbcAssociation(FbcAssociation fa)public FbcOr createOr()
FbcOr object.
This method creates a new FbcAssociation object of subclass FbcOr, adds
it to the ListOfFbcAssociations, and returns the FbcAssociation object
created.
FbcAssociation object instance.
ListOfFbcAssociations.createAnd(),
ListOfFbcAssociations.createGeneProductRef(),
ListOfFbcAssociations.addFbcAssociation(FbcAssociation fa)public GeneProductRef createGeneProductRef()
GeneProductRef object.
This method creates a new FbcAssociation object of subclass
GeneProductRef, adds it to the ListOfFbcAssociations, and returns the
FbcAssociation object created.
FbcAssociation object instance.
ListOfFbcAssociations.createOr(),
ListOfFbcAssociations.createAnd(),
ListOfFbcAssociations.addFbcAssociation(FbcAssociation fa)public FbcAssociation remove(long n)
FbcAssociation
This method removes the nth object from this ListOfFbcAssociations and
returns a pointer to it.
remove in class ListOfn - the index of the FbcAssociation to remove.
ListOf.size()public FbcAssociation remove(java.lang.String sid)
FbcAssociation with the given identifier
This method searches for and removes the FbcAssociation object with the
given identifier sid, and returns a pointer to it. 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 FbcAssociation to remove.
FbcAssociation removed. As mentioned above, the caller owns
the returned item.public java.lang.String getElementName()
For ListOfFbcAssociations, the XML element name is always
'listOfFbcAssociations'.
getElementName in class ListOfpublic int getTypeCode()
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()
getTypeCode in class ListOfSBML_LIST_OF (default).
ListOfFbcAssociations.getElementName(),
SBase.getPackageName()public int getItemTypeCode()
ListOf.
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()
getItemTypeCode in class ListOfListOf
instance: SBML_FBC_ASSOCIATION (default).
ListOfFbcAssociations.getElementName(),
SBase.getPackageName()