public class TextGlyph extends GraphicalObject
The TextGlyph class describes the position and dimension of text labels
in the &ldquolayout&rdquo package. It inherits from GraphicalObject
and
adds the attributes graphicalObject, text and originOfText.
Constructor and Description |
---|
TextGlyph()
Creates a new
TextGlyph with the given SBML level, versin and package
version. |
TextGlyph(LayoutPkgNamespaces layoutns)
Ctor.
|
TextGlyph(LayoutPkgNamespaces layoutns,
String id)
Creates a new
TextGlyph . |
TextGlyph(LayoutPkgNamespaces layoutns,
String id,
String text)
Creates a new
TextGlyph . |
TextGlyph(long level)
Creates a new
TextGlyph with the given SBML level, versin and package
version. |
TextGlyph(long level,
long version)
Creates a new
TextGlyph with the given SBML level, versin and package
version. |
TextGlyph(long level,
long version,
long pkgVersion)
Creates a new
TextGlyph with the given SBML level, versin and package
version. |
TextGlyph(TextGlyph source)
Copy constructor.
|
TextGlyph(XMLNode node)
|
TextGlyph(XMLNode node,
long l2version)
|
Modifier and Type | Method and Description |
---|---|
TextGlyph |
cloneObject()
Creates and returns a deep copy of this
TextGlyph . |
void |
delete()
Explicitly deletes the underlying native object.
|
String |
getElementName()
Returns the XML element name of
this SBML object.
|
String |
getGraphicalObjectId()
Returns the id of the associated graphical object.
|
String |
getOriginOfTextId()
Returns the id of the origin of text.
|
String |
getText()
Returns the text to be displayed by the text glyph.
|
int |
getTypeCode()
Returns the libSBML type code of this object instance.
|
void |
initDefaults()
Calls initDefaults from
GraphicalObject . |
boolean |
isSetGraphicalObjectId()
Returns true if the id of the associated graphical object is not the
empty string.
|
boolean |
isSetOriginOfTextId()
Returns true if the id of the origin of text is not the empty string.
|
boolean |
isSetText()
Returns true if the text is not the empty string.
|
void |
renameSIdRefs(String oldid,
String newid)
Replaces all uses of a given
SIdRef type attribute value with another
value. |
int |
setGraphicalObjectId(String id)
Sets the id of the associated graphical object.
|
int |
setOriginOfTextId(String orig)
Sets the id of the origin of text.
|
void |
setText(String text)
Sets the text to be displayed by the text glyph.
|
XMLNode |
toXML()
Creates an
XMLNode object from this. |
connectToChild, getBoundingBox, getBoundingBoxExplicitlySet, getId, getMetaIdRef, isSetId, isSetMetaIdRef, renameMetaIdRefs, setBoundingBox, setId, setMetaIdRef, unsetId, unsetMetaIdRef
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, 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, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm, unsetUserData
public TextGlyph(long level, long version, long pkgVersion) throws SBMLConstructorException
TextGlyph
with the given SBML level, versin and package
version. The ids of the associated GraphicalObject
and
the originOfText are set to the empty string. The actual text is set
to the empty string as well.SBMLConstructorException
public TextGlyph(long level, long version) throws SBMLConstructorException
TextGlyph
with the given SBML level, versin and package
version. The ids of the associated GraphicalObject
and
the originOfText are set to the empty string. The actual text is set
to the empty string as well.SBMLConstructorException
public TextGlyph(long level) throws SBMLConstructorException
TextGlyph
with the given SBML level, versin and package
version. The ids of the associated GraphicalObject
and
the originOfText are set to the empty string. The actual text is set
to the empty string as well.SBMLConstructorException
public TextGlyph() throws SBMLConstructorException
TextGlyph
with the given SBML level, versin and package
version. The ids of the associated GraphicalObject
and
the originOfText are set to the empty string. The actual text is set
to the empty string as well.SBMLConstructorException
public TextGlyph(LayoutPkgNamespaces layoutns) throws SBMLConstructorException
SBMLConstructorException
public TextGlyph(LayoutPkgNamespaces layoutns, String id) throws SBMLConstructorException
TextGlyph
. The id is given as the first argument.
(FOR BACKWARD COMPATIBILITY)
SBMLConstructorException
public TextGlyph(LayoutPkgNamespaces layoutns, String id, String text) throws SBMLConstructorException
TextGlyph
. The id is given as the first argument, the
text to be displayed as the second. All other attirbutes are set to
the empty string.
(FOR BACKWARD COMPATIBILITY)
SBMLConstructorException
public TextGlyph(XMLNode node, long l2version) throws SBMLConstructorException
SBMLConstructorException
public TextGlyph(XMLNode node) throws SBMLConstructorException
SBMLConstructorException
public TextGlyph(TextGlyph source) throws SBMLConstructorException
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 TextGlyph.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 TextGlyph.delete()
themselves.
delete
 in class GraphicalObject
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 void setText(String text)
public String getGraphicalObjectId()
public int setGraphicalObjectId(String id)
public String getOriginOfTextId()
public int setOriginOfTextId(String orig)
public boolean isSetText()
public boolean isSetOriginOfTextId()
public boolean isSetGraphicalObjectId()
public void initDefaults()
GraphicalObject
.initDefaults
 in class GraphicalObject
public String getElementName()
getElementName
 in class GraphicalObject
public TextGlyph cloneObject()
TextGlyph
.
cloneObject
 in class GraphicalObject
TextGlyph
.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 GraphicalObject
SBML_LAYOUT_TEXTGLYPH
TextGlyph.getElementName()
,
SBase.getPackageName()
public XMLNode toXML()
XMLNode
object from this.toXML
 in class GraphicalObject