public class Association extends SBase
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 Association
class is a helper class for creating annotations to store
gene association information in Version 1 of the SBML Level 3
Flux Balance Constraints (&ldquofbc&rdquo) package. In
&ldquofbc&rdquo Version 2, the equivalent capability is handled
by the FbcAssociation
class and this class (Association) is not used.
Constructor and Description |
---|
Association()
Creates a new
Association objet with the given SBML Level, Version, and
&ldquofbc&rdquo package version. |
Association(Association source)
Copy constructor.
|
Association(FbcPkgNamespaces fbcns)
Creates a new
Association with the given FbcPkgNamespaces object. |
Association(long level)
Creates a new
Association objet with the given SBML Level, Version, and
&ldquofbc&rdquo package version. |
Association(long level,
long version)
Creates a new
Association objet with the given SBML Level, Version, and
&ldquofbc&rdquo package version. |
Association(long level,
long version,
long pkgVersion)
Creates a new
Association objet with the given SBML Level, Version, and
&ldquofbc&rdquo package version. |
Association(XMLNode node,
FbcPkgNamespaces fbcns)   |
Modifier and Type | Method and Description |
---|---|
int |
addAssociation(Association association)
Adds a child
Association to this Association object. |
int |
addGene(java.lang.String id)
Adds a gene with the given
id to the association. |
int |
clearAssociations()
Removes all children of this
Association object. |
Association |
cloneObject()
Creates and returns a deep copy of this
Association object. |
Association |
createAnd()
Creates a new
Association of type 'and'. |
Association |
createGene()
Creates a new
Association of type 'and' with a given gene reference. |
Association |
createGene(java.lang.String reference)
Creates a new
Association of type 'and' with a given gene reference. |
Association |
createOr()
Creates a new
Association of type 'or'. |
void |
delete()
Explicitly deletes the underlying native object.
|
java.lang.String |
getElementName()
Returns the XML element name of this SBML object.
|
long |
getNumAssociations()
Returns the number of child Associations of this
Association object. |
java.lang.String |
getReference()
Returns the string of the 'reference' attribute of this
Association object. |
int |
getType()
Returns the string of the 'type' attribute of this
Association object. |
int |
getTypeCode()
Returns the libSBML type code of this object instance.
|
boolean |
isSetReference()
Predicate returning
true if this Association 's 'reference' attribute
has been set. |
boolean |
isSetType()
Predicate returning
true if this Association 's 'type' attribute is
set. |
static Association |
parseInfixAssociation(java.lang.String association)
Parses a gene association in infix format and returns a corresponding
Association object. |
int |
removeAssociation(int index)
Removes the child Associations with the given
index from this
Association object. |
int |
setReference(java.lang.String reference)
Sets the SIdRef string of the 'reference' attribute of this
Association object. |
int |
setType(int type)
Sets the SIdRef string of the 'type' attribute of this
Association object. |
java.lang.String |
toInfix()
Converts this
Association object into an infix string representation. |
XMLNode |
toXML()
Creates an
XMLNode object from this Association object. |
int |
unsetReference()
Unsets the value of the 'id' attribute of this
Association object. |
int |
unsetType()
Unsets the value of the 'id' attribute of this
Association object. |
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, connectToChild, 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, unsetId, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm, unsetUserData
public Association(long level, long version, long pkgVersion) throws SBMLConstructorException
Association
objet with the given SBML Level, Version, and
&ldquofbc&rdquo package version.SBMLConstructorException
public Association(long level, long version) throws SBMLConstructorException
Association
objet with the given SBML Level, Version, and
&ldquofbc&rdquo package version.SBMLConstructorException
public Association(long level) throws SBMLConstructorException
Association
objet with the given SBML Level, Version, and
&ldquofbc&rdquo package version.SBMLConstructorException
public Association() throws SBMLConstructorException
Association
objet with the given SBML Level, Version, and
&ldquofbc&rdquo package version.SBMLConstructorException
public Association(XMLNode node, FbcPkgNamespaces fbcns) throws SBMLConstructorException
SBMLConstructorException
public Association(FbcPkgNamespaces fbcns) throws SBMLConstructorException
Association
with the given FbcPkgNamespaces
object.SBMLConstructorException
public Association(Association source) throws SBMLConstructorException
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 Association.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 Association.delete()
themselves.
public int getType()
Association
object.
Association
object.public boolean isSetType()
true
if this Association
's 'type' attribute is
set.
true
if this Association
object's 'type' attribute has been set,
otherwise false
is returned.public int setType(int type)
Association
object.
type
- a SIdRef string to be set.
public int unsetType()
Association
object.
public java.lang.String getReference()
Association
object.
Association
object.public boolean isSetReference()
true
if this Association
's 'reference' attribute
has been set.
true
if this Association
object's 'reference' attribute has been set,
otherwise false
is returned.public int setReference(java.lang.String reference)
Association
object.
reference
- a SIdRef string to be set.
public int unsetReference()
Association
object.
public int addGene(java.lang.String id)
id
to the association.
id
- the gene name.
public long getNumAssociations()
Association
object.
public int addAssociation(Association association)
Association
to this Association
object.
association
- the Association
object to add.
public int removeAssociation(int index)
index
from this
Association
object.
index
- the index number of the item to remove
public int clearAssociations()
Association
object.
public Association createAnd()
Association
of type 'and'.
This method does not actually add the created Association
as a child of
this Association
object or do anything else with it&mdashthe returning
pointer is now owned by the caller.
public Association createOr()
Association
of type 'or'.
This method does not actually add the created Association
as a child of
this Association
object or do anything else with it&mdashthe returning
pointer is now owned by the caller.
public Association createGene(java.lang.String reference)
Association
of type 'and' with a given gene reference.
This method does not actually add the created Association
as a child of
this Association
object or do anything else with it&mdashthe returning
pointer is now owned by the caller.
reference
- the gene reference, as a string
Association
object.public Association createGene()
Association
of type 'and' with a given gene reference.
This method does not actually add the created Association
as a child of
this Association
object or do anything else with it&mdashthe returning
pointer is now owned by the caller.
reference
- the gene reference, as a string
Association
object.public XMLNode toXML()
XMLNode
object from this Association
object.public java.lang.String getElementName()
getElementName
 in class SBase
public Association cloneObject()
Association
object.
cloneObject
 in class SBase
Association
object.public 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 getPackageName()
method on the object.
getTypeCode
 in class SBase
SBML_FBC_ASSOCIATION
Association.getElementName()
,
SBase.getPackageName()
public static Association parseInfixAssociation(java.lang.String association)
Association
object.
This parses a string that has a list of gene names and conjunctions or disjunctions. For example:
(b2422) and (b2425) and (b2423) and (b2424) or (b2422) and (b2423) and (b2424) and (b2413) and (b3917)
association
- the string to parse.
null
in case of an error.
public java.lang.String toInfix()
Association
object into an infix string representation.