public class ReferenceGlyph extends GraphicalObject
GraphicalObject
and a GeneralGlyph
.
The ReferenceGlyph
element describes the graphical connection between an
arbitrary GraphicalObject
(or derived element) and a GeneralGlyph
(which
would be an arrow or some curve in most cases). A ReferenceGlyph
inherits
from GraphicalObject
. Additionally it has a mandatory attribute 'glyph'
and two optional attributes 'reference' and 'role'. Optionally, the
ReferenceGlyph
also has an element 'curve'. The ReferenceGlyph
should
either contain a bounding box or a curve specification. If both are
given, the bounding box should be ignored.
Constructor and Description |
---|
ReferenceGlyph()
Creates a new
ReferenceGlyph with the given SBML level, version and
package version. |
ReferenceGlyph(LayoutPkgNamespaces layoutns)
Ctor.
|
ReferenceGlyph(LayoutPkgNamespaces layoutns,
java.lang.String sid,
java.lang.String glyphId,
java.lang.String referenceId,
java.lang.String role)
Creates a new
ReferenceGlyph . |
ReferenceGlyph(long level)
Creates a new
ReferenceGlyph with the given SBML level, version and
package version. |
ReferenceGlyph(long level,
long version)
Creates a new
ReferenceGlyph with the given SBML level, version and
package version. |
ReferenceGlyph(long level,
long version,
long pkgVersion)
Creates a new
ReferenceGlyph with the given SBML level, version and
package version. |
ReferenceGlyph(ReferenceGlyph source)
Copy constructor.
|
ReferenceGlyph(XMLNode node)
Creates a new
ReferenceGlyph from the given XMLNode |
ReferenceGlyph(XMLNode node,
long l2version)
Creates a new
ReferenceGlyph from the given XMLNode |
Modifier and Type | Method and Description |
---|---|
ReferenceGlyph |
cloneObject()
Creates and returns a deep copy of this
ReferenceGlyph . |
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. |
void |
delete()
Explicitly deletes the underlying native object.
|
Curve |
getCurve()
Returns the curve object for the reference glyph
|
boolean |
getCurveExplicitlySet()   |
java.lang.String |
getElementName()
Returns the XML element name of
this SBML object.
|
java.lang.String |
getGlyphId()
Returns the id of the associated glyph.
|
java.lang.String |
getReferenceId()
Returns the id of the associated sbml reference.
|
java.lang.String |
getRole()
Returns a string representation of the role.
|
int |
getTypeCode()
Returns the libSBML type code of this object instance.
|
void |
initDefaults()
Calls initDefaults on
GraphicalObject |
boolean |
isSetCurve()
Returns true if the curve consists of one or more segments.
|
boolean |
isSetGlyphId()
Returns true if the id of the associated glyph is not the
empty string.
|
boolean |
isSetReferenceId()
Returns true if the id of the associated reference is not the
empty string.
|
boolean |
isSetRole()
Returns true of role is different from the empty string.
|
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 reference glyph.
|
void |
setGlyphId(java.lang.String glyphId)
Sets the id of the associated glyph.
|
void |
setReferenceId(java.lang.String id)
Sets the id of the associated sbml reference.
|
void |
setRole(java.lang.String role)
Sets the role.
|
XMLNode |
toXML()
Creates an
XMLNode object from this. |
getBoundingBox, getBoundingBoxExplicitlySet, getId, getMetaIdRef, isSetId, isSetMetaIdRef, renameMetaIdRefs, setBoundingBox, setId, setMetaIdRef, unsetId, unsetMetaIdRef
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, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm
public ReferenceGlyph() throws SBMLConstructorException
ReferenceGlyph
with the given SBML level, version and
package version. The id if the associated
reference and the id of the associated glyph are set to the
empty string. The role is set to empty.SBMLConstructorException
public ReferenceGlyph(LayoutPkgNamespaces layoutns) throws SBMLConstructorException
SBMLConstructorException
public ReferenceGlyph(LayoutPkgNamespaces layoutns, java.lang.String sid, java.lang.String glyphId, java.lang.String referenceId, java.lang.String role) throws SBMLConstructorException
ReferenceGlyph
. The id is given as the first
argument, the id of the associated glyph is given as the
second argument. The third argument is the id of the associated
reference and the fourth argument is the role.SBMLConstructorException
public ReferenceGlyph(long level) throws SBMLConstructorException
ReferenceGlyph
with the given SBML level, version and
package version. The id if the associated
reference and the id of the associated glyph are set to the
empty string. The role is set to empty.SBMLConstructorException
public ReferenceGlyph(long level, long version) throws SBMLConstructorException
ReferenceGlyph
with the given SBML level, version and
package version. The id if the associated
reference and the id of the associated glyph are set to the
empty string. The role is set to empty.SBMLConstructorException
public ReferenceGlyph(long level, long version, long pkgVersion) throws SBMLConstructorException
ReferenceGlyph
with the given SBML level, version and
package version. The id if the associated
reference and the id of the associated glyph are set to the
empty string. The role is set to empty.SBMLConstructorException
public ReferenceGlyph(ReferenceGlyph source) throws SBMLConstructorException
SBMLConstructorException
public ReferenceGlyph(XMLNode node) throws SBMLConstructorException
ReferenceGlyph
from the given XMLNode
SBMLConstructorException
public ReferenceGlyph(XMLNode node, long l2version) throws SBMLConstructorException
ReferenceGlyph
from the given XMLNode
SBMLConstructorException
public ReferenceGlyph cloneObject()
ReferenceGlyph
.
cloneObject
 in class GraphicalObject
ReferenceGlyph
.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 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 ReferenceGlyph.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 ReferenceGlyph.delete()
themselves.
delete
 in class GraphicalObject
public boolean getCurveExplicitlySet()
public java.lang.String getElementName()
getElementName
 in class GraphicalObject
public java.lang.String getGlyphId()
public java.lang.String getReferenceId()
public java.lang.String getRole()
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 GraphicalObject
SBML_LAYOUT_REFERENCEGLYPH
ReferenceGlyph.getElementName()
,
SBase.getPackageName()
public void initDefaults()
GraphicalObject
initDefaults
 in class GraphicalObject
public boolean isSetCurve()
public boolean isSetGlyphId()
public boolean isSetReferenceId()
public boolean isSetRole()
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 SBase
oldid
- the old identifiernewid
- the new identifierpublic void setCurve(Curve curve)
public void setGlyphId(java.lang.String glyphId)
public void setReferenceId(java.lang.String id)
public void setRole(java.lang.String role)
public XMLNode toXML()
XMLNode
object from this.toXML
 in class GraphicalObject