public class GeneProductRef extends FbcAssociation
GeneProductRef
encodes a references to a GeneProduct
object declared in a
ListOfGeneProducts
attached to the enclosing Model
object. GeneProductRef
is derived from the FbcAssociation
class.
GeneProductRef
objects are used to construct the content of
GeneProductAssociation
objects. As described more fully in the
documentation of the latter, a GeneProductAssociation
is a container that
may contain either (i) a single GeneProductRef
or (ii) a logical
expression built up with FbcAnd
and FbcOr
and ultimately containing two
or more GeneProductRef
objects.
Association
and
GeneAssociation
annotation classes. Please see the Version 1 and
Version 2 &ldquofbc&rdquo specifications for more details.Constructor and Description |
---|
GeneProductRef()
Creates a new
GeneProductRef with the given SBML Level, Version, and
&ldquofbc&rdquopackage version. |
GeneProductRef(FbcPkgNamespaces fbcns)
Creates a new
GeneProductRef with the given FbcPkgNamespaces object. |
GeneProductRef(GeneProductRef orig)
Copy constructor for
GeneProductRef . |
GeneProductRef(long level)
Creates a new
GeneProductRef with the given SBML Level, Version, and
&ldquofbc&rdquopackage version. |
GeneProductRef(long level,
long version)
Creates a new
GeneProductRef with the given SBML Level, Version, and
&ldquofbc&rdquopackage version. |
GeneProductRef(long level,
long version,
long pkgVersion)
Creates a new
GeneProductRef with the given SBML Level, Version, and
&ldquofbc&rdquopackage version. |
Modifier and Type | Method and Description |
---|---|
GeneProductRef |
cloneObject()
Creates and returns a deep copy of this
GeneProductRef object. |
void |
delete()
Explicitly deletes the underlying native object.
|
String |
getElementName()
Returns the XML element name of this object.
|
String |
getGeneProduct()
Returns the value of the 'geneProduct' attribute of this
GeneProductRef . |
String |
getId()
Returns the value of the 'id' attribute of this
GeneProductRef . |
String |
getName()
Returns the value of the 'name' attribute of this
GeneProductRef . |
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
boolean |
hasRequiredAttributes()
Predicate returning
true if all the required attributes for this
GeneProductRef object have been set. |
boolean |
isSetGeneProduct()
Predicate returning
true if this GeneProductRef 's 'geneProduct'
attribute is set. |
boolean |
isSetId()
Predicate returning
true if this GeneProductRef 's 'id' attribute is
set. |
boolean |
isSetName()
Predicate returning
true if this GeneProductRef 's 'name' attribute is
set. |
void |
renameSIdRefs(String oldid,
String newid)
Replaces all uses of a given
SIdRef type attribute value with another
value. |
int |
setGeneProduct(String geneProduct)
Sets the value of the 'geneProduct' attribute of this
GeneProductRef . |
int |
setId(String id)
Sets the value of the 'id' attribute of this
GeneProductRef . |
int |
setName(String name)
Sets the value of the 'name' attribute of this
GeneProductRef . |
String |
toInfix()
Converts this
FbcAssociation object into an infix string representation. |
int |
unsetGeneProduct()
Unsets the value of the 'geneProduct' attribute of this
GeneProductRef . |
int |
unsetId()
Unsets the value of the 'id' attribute of this
GeneProductRef . |
int |
unsetName()
Unsets the value of the 'name' attribute of this
GeneProductRef . |
isFbcAnd, isFbcOr, isGeneProductRef, parseFbcInfixAssociation, setElementName
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, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm, unsetUserData
public GeneProductRef(long level, long version, long pkgVersion) throws SBMLConstructorException
GeneProductRef
with the given SBML Level, Version, and
&ldquofbc&rdquopackage version.
level
- a long integer, the SBML Level to assign to this
GeneProductRef
version
- a long integer, the SBML Version to assign to this
GeneProductRef
pkgVersion
- a long integer, the SBML Fbc Version to assign to
this GeneProductRef
SBMLConstructorException
public GeneProductRef(long level, long version) throws SBMLConstructorException
GeneProductRef
with the given SBML Level, Version, and
&ldquofbc&rdquopackage version.
level
- a long integer, the SBML Level to assign to this
GeneProductRef
version
- a long integer, the SBML Version to assign to this
GeneProductRef
pkgVersion
- a long integer, the SBML Fbc Version to assign to
this GeneProductRef
SBMLConstructorException
public GeneProductRef(long level) throws SBMLConstructorException
GeneProductRef
with the given SBML Level, Version, and
&ldquofbc&rdquopackage version.
level
- a long integer, the SBML Level to assign to this
GeneProductRef
version
- a long integer, the SBML Version to assign to this
GeneProductRef
pkgVersion
- a long integer, the SBML Fbc Version to assign to
this GeneProductRef
SBMLConstructorException
public GeneProductRef() throws SBMLConstructorException
GeneProductRef
with the given SBML Level, Version, and
&ldquofbc&rdquopackage version.
level
- a long integer, the SBML Level to assign to this
GeneProductRef
version
- a long integer, the SBML Version to assign to this
GeneProductRef
pkgVersion
- a long integer, the SBML Fbc Version to assign to
this GeneProductRef
SBMLConstructorException
public GeneProductRef(FbcPkgNamespaces fbcns) throws SBMLConstructorException
GeneProductRef
with the given FbcPkgNamespaces
object.
fbcns
- the FbcPkgNamespaces
objectSBMLConstructorException
public GeneProductRef(GeneProductRef orig) throws SBMLConstructorException
GeneProductRef
.
orig
- the GeneProductRef
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 GeneProductRef.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 GeneProductRef.delete()
themselves.
delete
 in class FbcAssociation
public GeneProductRef cloneObject()
GeneProductRef
object.
cloneObject
 in class FbcAssociation
GeneProductRef
object.public String getId()
GeneProductRef
.
getId
 in class SBase
GeneProductRef
as a string.public String getGeneProduct()
GeneProductRef
.
GeneProductRef
as a string.public String toInfix()
FbcAssociation
object into an infix string representation.
toInfix
 in class FbcAssociation
public String getName()
GeneProductRef
.
getName
 in class SBase
GeneProductRef
as a string.public boolean isSetId()
true
if this GeneProductRef
's 'id' attribute is
set.
isSetId
 in class SBase
true
if this GeneProductRef
's 'id' attribute has been set,
otherwise false
is returned.public boolean isSetGeneProduct()
true
if this GeneProductRef
's 'geneProduct'
attribute is set.
true
if this GeneProductRef
's 'geneProduct' attribute has been set,
otherwise false
is returned.public boolean isSetName()
true
if this GeneProductRef
's 'name' attribute is
set.
isSetName
 in class SBase
true
if this GeneProductRef
's 'name' attribute has been set,
otherwise false
is returned.public int setId(String id)
GeneProductRef
.
public int setGeneProduct(String geneProduct)
GeneProductRef
.
geneProduct
- String value of the 'geneProduct' attribute to be set
public int setName(String name)
GeneProductRef
.
public int unsetId()
GeneProductRef
.
public int unsetGeneProduct()
GeneProductRef
.
public int unsetName()
GeneProductRef
.
public void renameSIdRefs(String oldid, String newid)
Replaces all uses of a given SIdRef
type attribute value with another
value.
In SBML, object identifiers are of a data type called SId
.
In SBML Level 3, an explicit data type called SIdRef
was
introduced for attribute values that refer to SId
values in
previous Levels of SBML, this data type did not exist and attributes were
simply described to as 'referring to an identifier', but the effective
data type was the same as SIdRef
in Level 3. These and
other methods of libSBML refer to the type SIdRef
for all
Levels of SBML, even if the corresponding SBML specification did not
explicitly name the data type.
This method works by looking at all attributes and (if appropriate)
mathematical formulas in MathML content, comparing the referenced
identifiers to the value of oldid
. If any matches are found, the
matching values are replaced with newid
. The method does not
descend into child elements.
renameSIdRefs
 in class SBase
oldid
- the old identifiernewid
- the new identifierpublic String getElementName()
For GeneProductRef
, the XML element name is always 'geneProductRef'.
getElementName
 in class FbcAssociation
'geneProductRef'.
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 FbcAssociation
SBML_FBC_GENEPRODUCTREF
(default).
GeneProductRef.getElementName()
,
SBase.getPackageName()
public boolean hasRequiredAttributes()
true
if all the required attributes for this
GeneProductRef
object have been set.
hasRequiredAttributes
 in class FbcAssociation
GeneProductRef
object are: