public class Association extends SBase
The Association
class is not part of the official Flux Balance
specification, but is instead a proposed future development of the
package. If adopted, it would be a child of a GeneAssociation
that would
describe a single 'and' or 'or' relationship between two or more genes or
other associations.
Constructor and Description |
---|
Association()
Creates a new
Association with the given level, version, and 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 with the given level, version, and package version. |
Association(long level,
long version)
Creates a new
Association with the given level, version, and package version. |
Association(long level,
long version,
long pkgVersion)
Creates a new
Association with the given level, version, and package version. |
Association(XMLNode node,
FbcPkgNamespaces fbcns)   |
Modifier and Type | Method and Description |
---|---|
int |
addAssociation(Association association)
Adds a child
Association to this Association . |
int |
addGene(java.lang.String id)
Add a gene with the given
id to the association. |
int |
clearAssociations()
Returns the number of child Associations of this
Association . |
Association |
cloneObject()
Creates and returns a deep copy of this
Association . |
Association |
createAnd()
Creates and returns a new
Association of type 'and'. |
Association |
createGene()
Creates and returns a new
Association of type 'and', and with the gene reference reference . |
Association |
createGene(java.lang.String reference)
Creates and returns a new
Association of type 'and', and with the gene reference reference . |
Association |
createOr()
Creates and returns 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 . |
java.lang.String |
getReference()
Returns the string of the 'reference' attribute of this
Association . |
int |
getType()
Returns the string of the 'type' attribute of this
Association . |
int |
getTypeCode()
Returns the libSBML type code of this object instance.
|
boolean |
isSetReference()
Predicate returning
true or false depending on whether this
Association 's 'reference' attribute has been set. |
boolean |
isSetType()
Predicate returning
true or false depending on whether this
Association 's 'type' attribute has been set. |
static Association |
parseInfixAssociation(java.lang.String association)
Parses a gene association in infix format.
|
int |
removeAssociation(int index)
Removes the child Associations with the given
index from this Association . |
int |
setReference(java.lang.String reference)
Sets the SIdRef string of the 'reference' attribute of this
Association . |
int |
setType(int type)
Sets the SIdRef string of the 'type' attribute of this
Association . |
java.lang.String |
toInfix()
Converts this association into an infix string.
|
XMLNode |
toXML()
Creates an
XMLNode object from this. |
int |
unsetReference()
Unsets the value of the 'id' attribute of this
Association . |
int |
unsetType()
Unsets the value of the 'id' attribute of this
Association . |
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, unsetId, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm
public Association() throws SBMLConstructorException
Association
with the given level, version, and package version.SBMLConstructorException
public Association(Association source) throws SBMLConstructorException
SBMLConstructorException
public Association(FbcPkgNamespaces fbcns) throws SBMLConstructorException
Association
with the given FbcPkgNamespaces
object.SBMLConstructorException
public Association(long level) throws SBMLConstructorException
Association
with the given level, version, and package version.SBMLConstructorException
public Association(long level, long version) throws SBMLConstructorException
Association
with the given level, version, and package version.SBMLConstructorException
public Association(long level, long version, long pkgVersion) throws SBMLConstructorException
Association
with the given level, version, and package version.SBMLConstructorException
public Association(XMLNode node, FbcPkgNamespaces fbcns) throws SBMLConstructorException
SBMLConstructorException
public int addAssociation(Association association)
Association
to this Association
.public int addGene(java.lang.String id)
id
to the association.public int clearAssociations()
Association
.public Association cloneObject()
Association
.
cloneObject
 in class SBase
Association
.public Association createAnd()
Association
of type 'and'. Does not actually add the created Association
as a child of this Association
or do anything else with it--the returning pointer is now owned by the caller.public Association createGene()
Association
of type 'and', and with the gene reference reference
. Does not actually add the created Association
as a child of this Association
or do anything else with it--the returning pointer is now owned by the caller.public Association createGene(java.lang.String reference)
Association
of type 'and', and with the gene reference reference
. Does not actually add the created Association
as a child of this Association
or do anything else with it--the returning pointer is now owned by the caller.public Association createOr()
Association
of type 'or'. Does not actually add the created Association
as a child of this Association
or do anything else with it--the returning pointer is now owned by the caller.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 java.lang.String getElementName()
getElementName
 in class SBase
public long getNumAssociations()
Association
.public java.lang.String getReference()
Association
.
Association
.public int getType()
Association
.
Association
.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 &ldquoSBML_
&rdquo.
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 boolean isSetReference()
true
or false
depending on whether this
Association
's 'reference' attribute has been set.
true
if this Association
's 'reference' attribute has been set,
otherwise false
is returned.public boolean isSetType()
true
or false
depending on whether this
Association
's 'type' attribute has been set.
true
if this Association
's 'type' attribute has been set,
otherwise false
is returned.public static Association parseInfixAssociation(java.lang.String association)
(b2422) and (b2425) and (b2423) and (b2424) or (b2422) and (b2423) and (b2424) and (b2413) and (b3917)
null
in case of an error.public int removeAssociation(int index)
index
from this Association
.public int setReference(java.lang.String reference)
Association
.
reference
- a SIdRef string to be set.
public int setType(int type)
Association
.
type
- a SIdRef string to be set.
public java.lang.String toInfix()
public int unsetReference()
Association
.
public int unsetType()
Association
.