public class Image extends Transformation2D
Image
concept from the SBML
render extension
The image class represents a bitmap image representation. It is derived from Transformation2D
and inherits all its attributes.
There is an attribute that can be used to specify a file URL where that specifies where the image data can be found. If the URL is a relative path, it is considered to be relative to the document that contains the render extension info. The path should be the location of a JPEG or PNG image, other image formats are currently not supported by the SBML render extension.
Additionally it provides an id attribute as well as attributes that determine the dimensions and the position of the image relative to its viewport.
Constructor and Description |
---|
Image()
Creates a new
Image object with the given SBML level
and SBML version. |
Image(long level)
Creates a new
Image object with the given SBML level
and SBML version. |
Image(long level,
long version)
Creates a new
Image object with the given SBML level
and SBML version. |
Image(long level,
long version,
long pkgVersion)
Creates a new
Image object with the given SBML level
and SBML version. |
Image(RenderPkgNamespaces renderns)
Creates a new
Image object with the given SBMLNamespaces . |
Image(RenderPkgNamespaces renderns,
java.lang.String id)
Instantiates an
Image object with the given id . |
Image(XMLNode node)
|
Image(XMLNode node,
long l2version)
|
Modifier and Type | Method and Description |
---|---|
Image |
cloneObject()
Creates and returns a deep copy of this
Image object. |
void |
delete()
Explicitly deletes the underlying native object.
|
java.lang.String |
getElementName()
Returns the XML element name of this object, which for
Image , is always 'image'. |
RelAbsVector |
getHeight()
Returns a reference to the height of the image.
|
java.lang.String |
getId()
Returns the value of the 'id' attribute of this
Image . |
java.lang.String |
getImageReference()
Returns the image reference URL string.
|
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
RelAbsVector |
getWidth()
Returns a reference to the width of the image.
|
RelAbsVector |
getX()
Returns a reference to the x coordinate of the image position.
|
RelAbsVector |
getY()
Returns a reference to the y coordinate of the image position.
|
RelAbsVector |
getZ()
Returns a reference to the z coordinate of the image position.
|
boolean |
isSetId()
|
boolean |
isSetImageReference()
Returns true if the image reference has been set.
|
void |
setCoordinates(RelAbsVector x,
RelAbsVector y)
Sets the position of the image relative to its viewport.
|
void |
setCoordinates(RelAbsVector x,
RelAbsVector y,
RelAbsVector z)
Sets the position of the image relative to its viewport.
|
void |
setDimensions(RelAbsVector width,
RelAbsVector height)
Sets the dimensions of the image.
|
void |
setHeight(RelAbsVector height)
Sets the height of the image when rendered.
|
int |
setId(java.lang.String id)
Sets the value of the 'id' attribute of this
Image . |
void |
setImageReference(java.lang.String ref)
Sets the reference to the image location.
|
void |
setWidth(RelAbsVector width)
Sets the width of the image when rendered.
|
void |
setX(RelAbsVector coord)
Sets the x coordinate of the image position.
|
void |
setY(RelAbsVector coord)
Sets the y coordinate of the image position.
|
void |
setZ(RelAbsVector coord)
Sets the z coordinate of the image position.
|
XMLNode |
toXML()
|
int |
unsetId()
Unsets the value of the 'id' attribute of this
Image . |
getIdentityMatrix2D, getMatrix2D, setMatrix, setMatrix2D
getIdentityMatrix, getMatrix, isSetMatrix
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, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm, unsetUserData
public Image(long level, long version, long pkgVersion) throws SBMLConstructorException
Image
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Image(long level, long version) throws SBMLConstructorException
Image
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Image(long level) throws SBMLConstructorException
Image
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Image() throws SBMLConstructorException
Image
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Image(RenderPkgNamespaces renderns) throws SBMLConstructorException
Image
object with the given SBMLNamespaces
.
sbmlns
- The SBML namespace for the object.SBMLConstructorException
public Image(XMLNode node, long l2version) throws SBMLConstructorException
Image
object from the given XMLNode
object.
The XMLNode
object has to contain a valid XML representation of a
Image
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 Image
object to be instantiated.SBMLConstructorException
public Image(XMLNode node) throws SBMLConstructorException
Image
object from the given XMLNode
object.
The XMLNode
object has to contain a valid XML representation of a
Image
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 Image
object to be instantiated.SBMLConstructorException
public Image(RenderPkgNamespaces renderns, java.lang.String id) throws SBMLConstructorException
Image
object with the given id
.
The image reference is unset, the position and the dimensions
values of the image are set to 0.
For the image to be valid, the reference has to be set and it has to have dimensions different from and larger than 0.
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.
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 Image.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 Image.delete()
themselves.
delete
 in class Transformation2D
public void setCoordinates(RelAbsVector x, RelAbsVector y, RelAbsVector z)
x
- x coordinate of the image positiony
- y coordinate of the image positionz
- z coordinate of the image positionpublic void setCoordinates(RelAbsVector x, RelAbsVector y)
x
- x coordinate of the image positiony
- y coordinate of the image positionz
- z coordinate of the image positionpublic void setX(RelAbsVector coord)
x
- x coordinate of the image positionpublic void setY(RelAbsVector coord)
y
- y coordinate of the image positionpublic void setZ(RelAbsVector coord)
z
- z coordinate of the image positionpublic RelAbsVector getX()
public RelAbsVector getY()
public RelAbsVector getZ()
public void setDimensions(RelAbsVector width, RelAbsVector height)
width
- the width of the image when renderedheight
- the height of the image when renderedpublic void setWidth(RelAbsVector width)
width
- the width of the image when renderedpublic void setHeight(RelAbsVector height)
height
- the height of the image when renderedpublic RelAbsVector getWidth()
public RelAbsVector getHeight()
public void setImageReference(java.lang.String ref)
ref
- A URL string that specifies where the image is located on the disk.public java.lang.String getImageReference()
public boolean isSetImageReference()
public Image cloneObject()
Image
object.
cloneObject
 in class SBase
Image
.public java.lang.String getElementName()
Image
, is always 'image'.
getElementName
 in class SBase
'image'.
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 SBase
SBML_UNKNOWN
(default).
Image.getElementName()
public XMLNode toXML()
toXML
 in class Transformation2D
XMLNode
with the XML representation for the
Image
object.public java.lang.String getId()
Image
.
public boolean isSetId()
public int setId(java.lang.String id)
Image
.