public class ReactionGlyph extends GraphicalObject
Reaction
elements in the layout.
Analogous to how a Reaction object has to at least have one reactant or
product, the ReactionGlyph has to at least have one SpeciesReferenceGlyph
stored in the ListOfSpeciesReferenceGlyphs. Figure 12 on the following
page provides the UML diagram for the class definition. The ReactionGlyph
inherits from GraphicalObject. In addition to the attributes inherited
from GraphicalObject, the ReactionGlyph is described by an attribute
reaction, a Curve element and a listOfSpeciesReferenceGlyphs element. The
Curve describes the center section of a ReactionGlyph. The center section
is frequently used by tools to separate the point where substrates arcs
come together, from the point where product arcs split off. The Curve is
optional, and when not present the dimensions of the inherited BoundingBox
describes the center section, by storing its position and dimension.
| Constructor and Description |
|---|
ReactionGlyph()
Creates a new
ReactionGlyph. |
ReactionGlyph(LayoutPkgNamespaces layoutns)
Creates a new
ReactionGlyph with the given LayoutPkgNamespaces object. |
ReactionGlyph(LayoutPkgNamespaces layoutns,
java.lang.String id)
Creates a ResctionGlyph with the given
LayoutPkgNamespaces and id. |
ReactionGlyph(LayoutPkgNamespaces layoutns,
java.lang.String id,
java.lang.String reactionId)
Creates a ResctionGlyph with the given
LayoutPkgNamespaces, id and set the id of the
associated reaction to the second argument. |
ReactionGlyph(long level)
Creates a new
ReactionGlyph. |
ReactionGlyph(long level,
long version)
Creates a new
ReactionGlyph. |
ReactionGlyph(long level,
long version,
long pkgVersion)
Creates a new
ReactionGlyph. |
ReactionGlyph(ReactionGlyph source)
Copy constructor.
|
ReactionGlyph(XMLNode node)
Creates a new
ReactionGlyph from the given XMLNode |
ReactionGlyph(XMLNode node,
long l2version)
Creates a new
ReactionGlyph from the given XMLNode |
| Modifier and Type | Method and Description |
|---|---|
void |
addSpeciesReferenceGlyph(SpeciesReferenceGlyph glyph)
Adds a new species reference glyph to the list.
|
ReactionGlyph |
cloneObject()
Creates and returns a deep copy of this
ReactionGlyph object. |
CubicBezier |
createCubicBezier()
Creates a new
CubicBezier object, adds it to the end of the list of
curve segment objects of the curve and returns a reference to the
newly created object. |
LineSegment |
createLineSegment()
Creates a new
LineSegment object, adds it to the end of the list of
curve segment objects of the curve and returns a reference to the
newly created object. |
SpeciesReferenceGlyph |
createSpeciesReferenceGlyph()
Creates a new
SpeciesReferenceGlyph object, adds it to the end of the
list of species reference objects and returns a reference to the newly
created object. |
void |
delete()
Explicitly deletes the underlying native object.
|
Curve |
getCurve()
Returns the curve object for the reaction glyph
|
boolean |
getCurveExplicitlySet()  |
java.lang.String |
getElementName()
Returns the XML element name of
this SBML object.
|
long |
getIndexForSpeciesReferenceGlyph(java.lang.String id)
Returns the index of the species reference glyph with the given
id. |
ListOfSpeciesReferenceGlyphs |
getListOfSpeciesReferenceGlyphs()
Returns the
ListOf object that hold the species reference glyphs. |
long |
getNumSpeciesReferenceGlyphs()
Returns the number of species reference glyph objects.
|
java.lang.String |
getReactionId()
Returns the id of the associated reaction.
|
SpeciesReferenceGlyph |
getSpeciesReferenceGlyph(long index)
Returns the species reference glyph with the given index.
|
int |
getTypeCode()
Returns the libSBML type code of this object instance.
|
void |
initDefaults()
Calls initDefaults from
GraphicalObject. |
boolean |
isSetCurve()
Returns true if the curve consists of one or more segments.
|
boolean |
isSetReactionId()
Returns true if the id of the associated reaction is not the empty
string.
|
SpeciesReferenceGlyph |
removeSpeciesReferenceGlyph(long index)
Remove the species reference glyph with the given index.
|
SpeciesReferenceGlyph |
removeSpeciesReferenceGlyph(java.lang.String id)
Remove the species reference glyph with the given
id. |
void |
renameSIdRefs(java.lang.String oldid,
java.lang.String newid)
Renames all the
SIdRef attributes on this element, including any
found in MathML content (if such exists). |
void |
setCurve(Curve curve)
Sets the curve object for the reaction glyph.
|
int |
setReactionId(java.lang.String id)
Sets the id of the associated reaction.
|
XMLNode |
toXML()
Creates an
XMLNode object from this. |
getBoundingBox, getBoundingBoxExplicitlySet, getId, getMetaIdRef, isSetId, isSetMetaIdRef, renameMetaIdRefs, setBoundingBox, setId, setMetaIdRef, unsetId, unsetMetaIdRefaddCVTerm, 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, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTermpublic ReactionGlyph() throws SBMLConstructorException
ReactionGlyph. The list of species reference glyph is
empty and the id of the associated reaction is set to the empty
string.SBMLConstructorExceptionpublic ReactionGlyph(LayoutPkgNamespaces layoutns) throws SBMLConstructorException
ReactionGlyph with the given LayoutPkgNamespaces object.SBMLConstructorExceptionpublic ReactionGlyph(LayoutPkgNamespaces layoutns, java.lang.String id) throws SBMLConstructorException
LayoutPkgNamespaces and id.
(FOR BACKWARD COMPATIBILITY)
SBMLConstructorExceptionpublic ReactionGlyph(LayoutPkgNamespaces layoutns, java.lang.String id, java.lang.String reactionId) throws SBMLConstructorException
LayoutPkgNamespaces, id and set the id of the
associated reaction to the second argument.
(FOR BACKWARD COMPATIBILITY)
SBMLConstructorExceptionpublic ReactionGlyph(long level) throws SBMLConstructorException
ReactionGlyph. The list of species reference glyph is
empty and the id of the associated reaction is set to the empty
string.SBMLConstructorExceptionpublic ReactionGlyph(long level, long version) throws SBMLConstructorException
ReactionGlyph. The list of species reference glyph is
empty and the id of the associated reaction is set to the empty
string.SBMLConstructorExceptionpublic ReactionGlyph(long level, long version, long pkgVersion) throws SBMLConstructorException
ReactionGlyph. The list of species reference glyph is
empty and the id of the associated reaction is set to the empty
string.SBMLConstructorExceptionpublic ReactionGlyph(ReactionGlyph source) throws SBMLConstructorException
SBMLConstructorExceptionpublic ReactionGlyph(XMLNode node) throws SBMLConstructorException
SBMLConstructorExceptionpublic ReactionGlyph(XMLNode node, long l2version) throws SBMLConstructorException
SBMLConstructorExceptionpublic void addSpeciesReferenceGlyph(SpeciesReferenceGlyph glyph)
public ReactionGlyph cloneObject()
ReactionGlyph object.
cloneObject in class GraphicalObjectReactionGlyph.public CubicBezier createCubicBezier()
CubicBezier object, adds it to the end of the list of
curve segment objects of the curve and returns a reference to the
newly created object.public LineSegment createLineSegment()
LineSegment object, adds it to the end of the list of
curve segment objects of the curve and returns a reference to the
newly created object.public SpeciesReferenceGlyph createSpeciesReferenceGlyph()
SpeciesReferenceGlyph object, adds it to the end of the
list of species reference objects and returns a reference to the newly
created object.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 ReactionGlyph.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 ReactionGlyph.delete() themselves.
delete in class GraphicalObjectpublic boolean getCurveExplicitlySet()
public java.lang.String getElementName()
getElementName in class GraphicalObjectpublic long getIndexForSpeciesReferenceGlyph(java.lang.String id)
id.
If the reaction glyph does not contain a species reference glyph with this
id, the
value of the maximum long integer is returned as an indicator.public ListOfSpeciesReferenceGlyphs getListOfSpeciesReferenceGlyphs()
ListOf object that hold the species reference glyphs.public long getNumSpeciesReferenceGlyphs()
public java.lang.String getReactionId()
public SpeciesReferenceGlyph getSpeciesReferenceGlyph(long index)
null is returned.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 GraphicalObjectSBML_LAYOUT_REACTIONGLYPH
ReactionGlyph.getElementName(),
SBase.getPackageName()public void initDefaults()
GraphicalObject.initDefaults in class GraphicalObjectpublic boolean isSetCurve()
public boolean isSetReactionId()
public SpeciesReferenceGlyph removeSpeciesReferenceGlyph(long index)
public SpeciesReferenceGlyph removeSpeciesReferenceGlyph(java.lang.String id)
id.
A pointer to the object is returned. If no object has been removed, null
is returned.public void renameSIdRefs(java.lang.String oldid, java.lang.String newid)
SIdRef attributes on this element, including any
found in MathML content (if such exists).
This method works by looking at all attributes and (if appropriate)
mathematical formulas, comparing the identifiers to the value of
oldid. If any matches are found, the matching identifiers are replaced
with newid. The method does not descend into child elements.
renameSIdRefs in class SBaseoldid - the old identifiernewid - the new identifierpublic void setCurve(Curve curve)
public int setReactionId(java.lang.String id)
public XMLNode toXML()
XMLNode object from this.toXML in class GraphicalObject