org.gcube.opensearch.opensearchlibrary
Class ImageElement

java.lang.Object
  extended by org.gcube.opensearch.opensearchlibrary.ImageElement

public class ImageElement
extends java.lang.Object

Class implementing the functionality of an Image element contained in a DescriptionDocument

Author:
gerasimos.farantatos

Constructor Summary
ImageElement(org.w3c.dom.Element image)
          Creates a new ImageElement instance
 
Method Summary
 int getHeight()
          Returns the image height
 java.lang.String getMimeType()
          Returns the MIME type of the image
 java.net.URI getURI()
          Returns the URI of the image
 int getWidth()
          Returns the image width
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageElement

public ImageElement(org.w3c.dom.Element image)
             throws java.lang.Exception
Creates a new ImageElement instance

Parameters:
image - A DOM Element that will be processed in order for the ImageElement instance to be created
Throws:
java.lang.Exception - If the image element structure does not conform to the OpenSearch specification or in case of other error
Method Detail

getWidth

public int getWidth()
Returns the image width

Returns:
The image width

getHeight

public int getHeight()
Returns the image height

Returns:
The image height

getMimeType

public java.lang.String getMimeType()
Returns the MIME type of the image

Returns:
The MIME type of the image

getURI

public java.net.URI getURI()
                    throws java.lang.Exception
Returns the URI of the image

Returns:
The URI of the image
Throws:
java.lang.Exception - In case of error