org.apache.jempbox.xmp
Class Thumbnail

java.lang.Object
  extended by org.apache.jempbox.xmp.Thumbnail

public class Thumbnail
extends java.lang.Object

This class represents a thumbnail datatype.

Version:
$Revision: 1.3 $
Author:
Ben Litchfield

Field Summary
static java.lang.String FORMAT_JPEG
          A supported thumnail format.
protected  org.w3c.dom.Element parent
          The DOM representation of this object.
 
Constructor Summary
Thumbnail(org.w3c.dom.Element parentElement)
          Create a thumnail based on a parent property set.
Thumbnail(XMPMetadata metadata)
          Create a new thumbnail element.
 
Method Summary
 org.w3c.dom.Element getElement()
          Get the underlying XML element.
 java.lang.String getFormat()
          Get the format of the thumbnail.
 java.lang.Integer getHeight()
          Get the height of the image in pixels.
 java.lang.String getImage()
          Get the image data in base 64 encoding.
 java.lang.Integer getWidth()
          Get the width of the image in pixels.
 void setFormat(java.lang.String format)
          Set the format of the thumbnail, currently only JPEG is supported.
 void setHeight(java.lang.Integer height)
          Set the height of the element.
 void setImage(java.lang.String image)
          Set the image data in base 64 encoding.
 void setWidth(java.lang.Integer width)
          Set the width of the element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMAT_JPEG

public static final java.lang.String FORMAT_JPEG
A supported thumnail format.

See Also:
Constant Field Values

parent

protected org.w3c.dom.Element parent
The DOM representation of this object.

Constructor Detail

Thumbnail

public Thumbnail(XMPMetadata metadata)
Create a new thumbnail element.

Parameters:
metadata - The metadata document that his thumbnail will be part of.

Thumbnail

public Thumbnail(org.w3c.dom.Element parentElement)
Create a thumnail based on a parent property set.

Parameters:
parentElement - The parent element that will store the thumbnail properties.
Method Detail

getElement

public org.w3c.dom.Element getElement()
Get the underlying XML element.

Returns:
The XML element that this object represents.

getHeight

public java.lang.Integer getHeight()
Get the height of the image in pixels.

Returns:
The height of the image in pixels.

setHeight

public void setHeight(java.lang.Integer height)
Set the height of the element.

Parameters:
height - The updated height of the element.

getWidth

public java.lang.Integer getWidth()
Get the width of the image in pixels.

Returns:
The width of the image in pixels.

setWidth

public void setWidth(java.lang.Integer width)
Set the width of the element.

Parameters:
width - The updated width of the element.

setFormat

public void setFormat(java.lang.String format)
Set the format of the thumbnail, currently only JPEG is supported. See FORMAT_XXX constants.

Parameters:
format - The image format.

getFormat

public java.lang.String getFormat()
Get the format of the thumbnail. See FORMAT_XXX constants.

Returns:
The image format.

setImage

public void setImage(java.lang.String image)
Set the image data in base 64 encoding.

Parameters:
image - The image.

getImage

public java.lang.String getImage()
Get the image data in base 64 encoding.

Returns:
The image data.