public class RenderCurve extends GraphicalPrimitive1D
Curve concept from the SBML render extension
The curve concept in the SBML render extension is similar to the curves in the SBML layout. Each curve consists of a number of either straight line segments or cubic bezier elements. The two element types can also by mixed in a single curve object.
In contrast to layout curves, render curves can not have gaps and the individual coordinates of the curve elements can be specified as a combination of absolute and relative values.
Another difference to layout curves is the fact that render curves can specify decorations to be applied
to the start and/or the end of the curve (
Since RenderCurve is derived from GraphicalPrimitive1D, it inherits all its attributes and methods.
LineEnding).| Constructor and Description |
|---|
RenderCurve()
Creates a new
RenderCurve object with the given SBML level
and SBML version. |
RenderCurve(long level)
Creates a new
RenderCurve object with the given SBML level
and SBML version. |
RenderCurve(long level,
long version)
Creates a new
RenderCurve object with the given SBML level
and SBML version. |
RenderCurve(long level,
long version,
long pkgVersion)
Creates a new
RenderCurve object with the given SBML level
and SBML version. |
RenderCurve(RenderPkgNamespaces renderns)
Creates a new
RenderCurve object with the given SBMLNamespaces. |
RenderCurve(RenderPkgNamespaces renderns,
java.lang.String id)
Instantiates an empty curve object with the given
id. |
RenderCurve(XMLNode node)
Creates a new
RenderCurve object from the given XMLNode object. |
RenderCurve(XMLNode node,
long l2version)
Creates a new
RenderCurve object from the given XMLNode object. |
| Modifier and Type | Method and Description |
|---|---|
int |
addElement(RenderPoint cs)
Adds a copy of the given curve segment to the end of the list of
curve segments.
|
RenderCurve |
cloneObject()
Creates and returns a deep copy of the
RenderCurve object. |
void |
connectToChild()  |
RenderCubicBezier |
createCubicBezier()
Creates a new bezier element.
|
RenderPoint |
createPoint()
Creates a new point element.
|
void |
delete()
Explicitly deletes the underlying native object.
|
RenderPoint |
getCurveElement(long index)
Returns a pointer to the curve segment with the given index or null if
the id is invalid.
|
RenderPoint |
getElement(long index)
Returns a pointer to the curve segment with the given index or null if
the id is invalid.
|
java.lang.String |
getElementName()
Returns the XML element name of this object, which for
RenderCurve, is always 'curve'. |
java.lang.String |
getEndHead()
Returns the id of the
LineEnding object to be applied to the end of the curve. |
ListOfCurveElements |
getListOfElements()
Returns a pointer to the list of curve segments.
|
long |
getNumElements()
Returns the number of curve segments.
|
java.lang.String |
getStartHead()
Returns the id of the
LineEnding object to be applied to the start of the curve. |
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
boolean |
isSetEndHead()
Returns true if the end head is set or false otherwise.
|
boolean |
isSetStartHead()
Returns true if the start head is set or false otherwise.
|
RenderPoint |
removeElement(long i)
Removes the curve segment with the given index.
|
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 |
setEndHead(java.lang.String endHead)
Sets the id of the end head.
|
void |
setStartHead(java.lang.String startHead)
Sets the id of the start head.
|
XMLNode |
toXML()
Creates an
XMLNode object from this RenderCurve object. |
addDash, clearDashes, getDashByIndex, getId, getNumDashes, getStroke, getStrokeWidth, insertDash, isSetDashArray, isSetId, isSetStroke, isSetStrokeWidth, removeDash, setDashByIndex, setId, setStroke, setStrokeWidth, unsetIdgetIdentityMatrix2D, getMatrix2D, setMatrix, setMatrix2DgetIdentityMatrix, getMatrix, getName, isSetMatrix, isSetName, setName, unsetNameaddCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getElementByMetaId, getElementBySId, getIdAttribute, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getPackageCoreVersion, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetIdAttribute, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setIdAttribute, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetIdAttribute, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm, unsetUserDatapublic RenderCurve(long level, long version, long pkgVersion) throws SBMLConstructorException
RenderCurve object with the given SBML level
and SBML version.
level - SBML level of the new objectlevel - SBML version of the new objectSBMLConstructorExceptionpublic RenderCurve(long level, long version) throws SBMLConstructorException
RenderCurve object with the given SBML level
and SBML version.
level - SBML level of the new objectlevel - SBML version of the new objectSBMLConstructorExceptionpublic RenderCurve(long level) throws SBMLConstructorException
RenderCurve object with the given SBML level
and SBML version.
level - SBML level of the new objectlevel - SBML version of the new objectSBMLConstructorExceptionpublic RenderCurve() throws SBMLConstructorException
RenderCurve object with the given SBML level
and SBML version.
level - SBML level of the new objectlevel - SBML version of the new objectSBMLConstructorExceptionpublic RenderCurve(RenderPkgNamespaces renderns) throws SBMLConstructorException
RenderCurve object with the given SBMLNamespaces.
sbmlns - The SBML namespace for the object.SBMLConstructorExceptionpublic RenderCurve(XMLNode node, long l2version) throws SBMLConstructorException
RenderCurve object from the given XMLNode object.
The XMLNode object has to contain a valid XML representation of a
RenderCurve object as defined in the render extension specification.
This method is normally called when render information is read from a file and
should normally not have to be called explicitly.
node - the XMLNode object reference that describes the RenderCurve
object to be instantiated.SBMLConstructorExceptionpublic RenderCurve(XMLNode node) throws SBMLConstructorException
RenderCurve object from the given XMLNode object.
The XMLNode object has to contain a valid XML representation of a
RenderCurve object as defined in the render extension specification.
This method is normally called when render information is read from a file and
should normally not have to be called explicitly.
node - the XMLNode object reference that describes the RenderCurve
object to be instantiated.SBMLConstructorExceptionpublic RenderCurve(RenderPkgNamespaces renderns, java.lang.String id) throws SBMLConstructorException
id.
The decorations are unset and there are no curve elements.
This constructor is deprecated. The new libsbml API only has
constructors which take the SBML level and version or one that takes
an SBMLNamespaces object.
SBMLConstructorExceptionpublic 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 RenderCurve.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 RenderCurve.delete() themselves.
delete in class GraphicalPrimitive1Dpublic void setStartHead(java.lang.String startHead)
The - id of a LineEnding object to be applied to the start of the curve.public void setEndHead(java.lang.String endHead)
The - id of a LineEnding object to be applied to the end of the curve.public java.lang.String getStartHead()
LineEnding object to be applied to the start of the curve.
LineEnding for the start of the curve.public java.lang.String getEndHead()
LineEnding object to be applied to the end of the curve.
LineEnding for the end of the curve.public long getNumElements()
public RenderCubicBezier createCubicBezier()
RenderCubicBezier object.public RenderPoint createPoint()
RenderCubicBezier object.public RenderPoint getElement(long index)
index - the index of the curve element to be returned
public RenderPoint getCurveElement(long index)
This method call is deprecated, please use getElement instead.
index - the index of the curve element to be returned
public int addElement(RenderPoint cs)
cs - pointer to the RenderPoint object to be added to the end of the curve elements list.
RenderCurve.createPoint(),
RenderCurve.createCubicBezier()RenderCurve. Changes made to the original object
instance (such as resetting attribute values) will not affect the
instance in the RenderCurve. In addition, the caller should make
sure to free the original object if it is no longer being used, or
else a memory leak will result. Please see RenderCurve.createPoint()
or RenderCurve.createCubicBezier()
for methods that do not lead to these issues.
public RenderPoint removeElement(long i)
null is returned.
i - index of element to be removed.
public ListOfCurveElements getListOfElements()
ListOfCurveElements object for the RenderCurve.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 @p
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 RenderCurve cloneObject()
RenderCurve object.
cloneObject in class SBaseRenderCurvepublic java.lang.String getElementName()
RenderCurve, is always 'curve'.
getElementName in class SBase'curve'.public int getTypeCode()
LibSBML attaches an
identifying code to every kind of SBML object. These are known as
SBML type codes. In other languages, the set of type codes
is stored in an enumeration in the Java language interface for
libSBML, the type codes are defined as static integer constants in
interface class libsbmlConstants. The names of the type codes
all begin with the characters SBML_.
getTypeCode in class SBaseSBML_UNKNOWN (default).
RenderCurve.getElementName()public boolean isSetStartHead()
public boolean isSetEndHead()
public XMLNode toXML()
XMLNode object from this RenderCurve object.
toXML in class GraphicalPrimitive1DXMLNode with the XML representation for the
RenderCurve object.public void connectToChild()
connectToChild in class SBase