edu.uky.rch.ept.data
Interface IImageAccessMethods

All Known Subinterfaces:
IDataAccessMethods, IDataSourceDriver
All Known Implementing Classes:
DataFactory, DataSourceDriver, Project, Repository

public interface IImageAccessMethods

This interface defines all the image data access methods. Wherever addresses are involved in creating new resources, all non-existing collections in the specified path to the resource will be created automatically.

All the methods throw the following exceptions:

Author:
Sandeep Bodapati

Method Summary
 org.eclipse.swt.graphics.ImageData getImage(String address)
          Retrieves the Image from the specified address
 boolean storeImage(String address, URL source, boolean force)
          Imports the image from the source & stores it at the given address.
 

Method Detail

getImage

public org.eclipse.swt.graphics.ImageData getImage(String address)
                                            throws MalformedAddressException,
                                                   ResourceNotFoundException,
                                                   IOException
Retrieves the Image from the specified address

Parameters:
address - address of the Image
Returns:
an ImageData object corresponding to the image
Throws:
ResourceNotFoundException - if the resource doesnt exist
MalformedAddressException
IOException

storeImage

public boolean storeImage(String address,
                          URL source,
                          boolean force)
                   throws MalformedAddressException,
                          ResourceNotFoundException,
                          IOException
Imports the image from the source & stores it at the given address.

Parameters:
address - the address of the resource
source - URL pointing to the image to be imported
force - if true, then the resource is overwritten if it already exists
Returns:
true if the resource did not exist and was created successfully, false otherwise
Throws:
MalformedAddressException
ResourceNotFoundException
IOException