Index: RasterDataStore.java
===================================================================
--- RasterDataStore.java	(revision 4180)
+++ RasterDataStore.java	(revision 4181)
@@ -24,10 +24,12 @@
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Point2D;
 import java.io.File;
+import java.net.URI;
 import java.util.List;
 
 import org.cresques.cts.ICoordTrans;
 import org.cresques.cts.IProjection;
+
 import org.gvsig.compat.net.ICancellable;
 import org.gvsig.fmap.dal.DataStore;
 import org.gvsig.fmap.dal.DataStoreParameters;
@@ -61,16 +63,16 @@
 
 /**
  * Interfaz que deben implementar los almacenes de datos raster.
- * 
+ *
  * @author Nacho Brodin (nachobrodin@gmail.com)
  */
-public interface RasterDataStore extends DataStore, TRasterStore, 
+public interface RasterDataStore extends DataStore, TRasterStore,
 	PyramidRasterStore, RasterStoreProperties, Histogramable {
 	public static final int              RED_BAND            = 0x01;
 	public static final int              GREEN_BAND          = 0x02;
 	public static final int              BLUE_BAND           = 0x04;
 	public static final int              ALPHA_BAND          = 0x08;
-	
+
 	/**
 	* Tipos de raster dependiendo de su fuente
 	*/
@@ -78,26 +80,26 @@
 	public static final int              POSTGIS             = 1;
 	public static final int              REMOTE              = 2;
 	public static final int              MOSAIC              = 3;
-	
+
 	/**
 	 * Actions to reload the information of a layer such as, read rmf or
-	 * tfw files 
+	 * tfw files
 	 */
 	public void reload();
-	
+
 	/**
 	 * Gets a default band list for this provider
 	 * @return
 	 */
 	public BandList getDefaultBandList();
-	
+
 	/**
 	 * Gets a list of data parameters. If it doesn't have
 	 * internal providers this method will return only one DataParameter
 	 * @return
 	 */
 	public RasterDataParameters[] getDataParametersByProvider();
-	
+
 	/**
 	 * Gets a list of sizes. If the provider doesn't have files it will return null.
 	 * If the provider has one file it will return an array of one element with the
@@ -105,59 +107,59 @@
 	 * @return
 	 */
 	public long[] getFileSizeByProvider();
-	
+
 	/**
-	 * Gets a list of file names or URI. Each element of this array is the name of a 
-	 * provider 
+	 * Gets a list of file names or URI. Each element of this array is the name of a
+	 * provider
 	 * @return
 	 */
-	public String[] getURIByProvider();
-	
+	public URI[] getURIByProvider();
+
 	/**
-	 * Gets the number of bands by provider. 
+	 * Gets the number of bands by provider.
 	 * @return
 	 */
 	public int[] getBandCountByProvider();
-	
+
 	/**
-	 * Gets a list of Metadata 
+	 * Gets a list of Metadata
 	 * @return
 	 */
 	public Metadata[] getMetadataByProvider();
-	
+
 	/**
 	 * Gets the number of overviews by provider
 	 * @param number of band
 	 * @return
 	 */
 	public int[] getOverviewCountByProvider(int band) throws BandAccessException;
-	
+
 	/**
 	 * Gets the size of a overview in one band. The result is a list of strings (WidthXHeight)
-	 * 
+	 *
 	 * @param band
 	 * @return
 	 */
 	public String[] getOverviewSizeByProvider(int band, int overview) throws BandAccessException;
-	
+
 	/**
 	 * Gets a list of affine transforms
 	 * @return
 	 */
 	public AffineTransform[] getAffineTransformByProvider();
-	
+
 	/**
 	 * Gets the height by provider
 	 * @return
 	 */
 	public double[] getHeightByProvider();
-	
+
 	/**
 	 * Gets the width by provider
 	 * @return
 	 */
 	public double[] getWidthByProvider();
-	
+
 	/**
 	 * Gets the URI of the source. If the provider has only one band
 	 * the result will be the URI. If it is multifile will have to choose
@@ -165,101 +167,101 @@
 	 * @param band
 	 * @return
 	 */
-	public String getURIByBand(int band);
-	
+	public URI getURIByBand(int band);
+
 	/**
 	 * Returns the number of internal providers that it has
 	 * @return
 	 */
 	public int getProviderCount();
-	
+
 	/**
-	 * Adds a new file. The behavior of this function depends on 
+	 * Adds a new file. The behavior of this function depends on
 	 * the kind of provider and its implementation.
 	 * @param file
-	 * @throws InvalidSourceException 
+	 * @throws InvalidSourceException
 	 */
-	public void addFile(String file) throws InvalidSourceException;
-	
+	public void addFile(File file) throws InvalidSourceException;
+
 	/**
-	 * Removes a file. The behavior of this function depends on 
+	 * Removes a file. The behavior of this function depends on
 	 * the kind of provider and its implementation.
 	 * @param file
 	 */
-	public void removeFile(String file);
+	public void removeFile(File file);
 
 	/**
 	 * Define el valor NoData asociado al raster.
 	 * @return
 	 */
 	public void setNoDataValue(NoData value);
-	
+
 	/**
 	 * Obtiene el extent asignado
 	 * @return	Extent
 	 */
 	public Extent getView();
-	
+
 	/**
 	 * Creates a new dataset which has the same source reference
 	 * @return RasterDataStore
 	 */
 	public RasterDataStore newDataStore();
-	
+
 	/**
 	 * Creates a new dataset which has the same source reference but insure
 	 * that the provider will be not tiled. Most of processes has to be applied
-	 * over not tiled providers 
+	 * over not tiled providers
 	 * @return RasterDataStore
 	 */
 	public RasterDataStore newNotTiledDataStore();
-	
+
 	/**
-	 * Obtiene el Tamaño de cada fichero de que consta el raster en bytes. 
+	 * Obtiene el Tamaño de cada fichero de que consta el raster en bytes.
 	 * @return long que representa el tamaño
 	 */
 	public long getFileSize();
-	
+
 	/**
 	 * Convierte un punto desde coordenadas pixel a coordenadas del mundo.
 	 * @param pt Punto a transformar
 	 * @return punto transformado en coordenadas del mundo
 	 */
 	public Point2D rasterToWorld(Point2D pt);
-	
+
 	/**
 	 * Convierte un punto desde del mundo a coordenadas pixel.
 	 * @param pt Punto a transformar
 	 * @return punto transformado en coordenadas pixel
 	 */
 	public Point2D worldToRaster(Point2D pt);
-	
+
 	/**
-	 * Metodo que obtiene si un punto cae dentro de los límites de la extensión de la fuente de 
+	 * Metodo que obtiene si un punto cae dentro de los límites de la extensión de la fuente de
 	 * datos raster o fuera de ellos.
 	 * @param p Punto a calcular
 	 * @return true si está dentro de los límites y false si está fuera
 	 */
 	public boolean isInside(Point2D p);
-	
+
 	/**
 	 * Returns true if the data source is tiled
 	 * @return
 	 */
 	public boolean isTiled();
-	
+
 	/**
 	 * Returns true if the provider has several files and all of them has the same extension
 	 * @return
 	 */
 	public boolean isMultiFile();
-	
+
 	/**
 	 * Returns true if the source of data is a mosaic of images
 	 * @return
 	 */
 	public boolean isMosaic();
-	
+
 	/**
 	 * Obtiene la matriz de transformación del propio raster. Esta matriz es la
 	 * encargada de convertir las coordenadas de la petición en coordenadas a las
@@ -272,7 +274,7 @@
 	 * @return
 	 */
 	public AffineTransform getOwnAffineTransform();
-	
+
 	/**
 	 * Obtiene la transformación afin aplicada en las peticiones con coordenadas
 	 * reales. Esta corresponde al producto matricial entre la transformación de
@@ -282,7 +284,7 @@
 	 * @return Matriz de la transformación afín.
 	 */
 	public AffineTransform getAffineTransform();
-	
+
 	/**
 	 * Asigna una transformación al raster para que se tenga en cuenta en la
 	 * asignación del setView. Esta asignación recalcula el extent, el
@@ -292,63 +294,63 @@
 	 * @param t Transformación afín a aplicar
 	 */
 	public void setAffineTransform(AffineTransform transf);
-	
+
 	/**
 	 * Gets an object which vectorize a raster
 	 * @return
 	 * @throws RasterDriverException
 	 * @throws ProcessInterruptedException
-	 *         When the object Vectorization is built the raster data buffer is loaded. 
+	 *         When the object Vectorization is built the raster data buffer is loaded.
 	 *         This operation can be interrupted
 	 */
 	public Vectorization createVectorizeObject() throws QueryException, ProcessInterruptedException;
-	
+
 	/**
 	 * Builds an render object using this RasterDataStore
 	 * @return Render
 	 */
 	public Render getRender();
-	
+
 	/**
 	 * Assigns a render object
 	 * @param render
 	 */
 	public void setRender(Render render);
-	
+
 	/**
 	 * Saves georeferencing information in the rmf file
 	 * @throws RmfSerializerException
 	 */
 	public void saveGeoreferencingToRmf() throws RmfSerializerException;
-	
+
 	/**
 	 * Saves a color table
 	 * @param table
 	 * @throws RmfSerializerException
 	 */
 	public void saveColorTableToRmf(ColorTable table) throws RmfSerializerException;
-	
+
 	/**
 	 * Saves the geo point list to a RMF file
 	 * @param pointList
 	 * @throws RmfSerializerException
 	 */
 	public void saveGeoPointListToRmf(GeoPointList pointList) throws RmfSerializerException;
-	
+
 	/**
 	 * Saves a list of files in the RMF file
 	 * @param fileList
 	 * @throws RmfSerializerException
 	 */
 	public void saveROIFileListToRmf(List<File> fileList) throws RmfSerializerException;
-	
+
 	/**
 	 * Gets the list of ROI files in the RMF
 	 * @return
 	 * @throws RmfSerializerException
 	 */
 	public List<File> getROIFileListFromRmf();
-	
+
 	/**
 	 * Tipo de fichero soportado.
 	 * Devuelve true si el tipo de fichero (extension) está soportado, si no
@@ -358,43 +360,43 @@
 	 * @return  true si está soportado, si no false.
 		*/
 	public boolean isFileSupported(String fName);
-	
+
 	/**
 	 * Returns true if this DataStore is open and false if not
 	 * @return
 	 */
 	public boolean isOpen();
-	
+
 	/**
 	 * Obtiene el flag que dice si el raster está o no georreferenciado
 	 * @return true si está georreferenciado y false si no lo está.
 	 */
 	public boolean isGeoreferenced();
-	
+
 	/**
 	 * Returns true if this data store is reproyectable or false if not
 	 * @return
 	 */
 	public boolean isReproyectable();
-	
+
 	/**
 	 * Consulta de si un raster tiene rotación o no.
 	 * @return true si tiene rotación y false si no la tiene.
 	 */
 	public boolean isRotated();
-	
+
 	/**
 	 * Obtiene el número de overviews de una banda
 	 * @return Número de overviews del raster.
 	 */
 	public int getOverviewCount(int band) throws BandAccessException, RasterDriverException;
-	
+
 	/**
 	 * Informa de si el dataset soporta overviews o no.
 	 * @return true si soporta overviews y false si no las soporta.
 	 */
 	public boolean overviewsSupport();
-	
+
 	/**
 	 * Obtiene el ancho de una overview de una banda
 	 * @return
@@ -412,74 +414,74 @@
 	 * @return
 	 */
 	public BandList getBands();
-		
+
 	/**
 	 * Clones this object
 	 * @return RasterDataStore
-	 * @throws CloneException 
+	 * @throws CloneException
 	 */
 	public RasterDataStore cloneDataStore() throws CloneException;
-	
+
 	/**
 	 * Gets a provider
 	 * @return
 	 */
 	public CoverageStoreProvider getProvider();
-	
+
 	/**
 	 * Sets a provider
 	 * @return
 	 */
 	public void setProvider(CoverageStoreProvider prov);
-	
+
 	/**
 	 * Deletes the cache of this layer composed by the files in the provider list
 	 */
 	public void deleteLayerFromCache();
-	
+
 	/**
 	 * Sets the parameters
 	 * @param p
 	 */
 	public void setParameters(DataStoreParameters p);
-	
+
 	/**
 	 * Returns the source type (FILE, POSTGIS, REMOTE,...)
 	 * @return
 	 */
 	public int getSourceType();
-	
+
 	/**
 	 * This method will return the DataParameters if it has a simple provider behind. If it has
-	 * a TileProvider this method will return the DataParameters used by the TileProvider.  
+	 * a TileProvider this method will return the DataParameters used by the TileProvider.
 	 * @return
 	 */
 	public RasterDataParameters getInternalParameters();
-	
+
 	/**
      * Sets the explorer
      * @param explorer
      */
     public void setExplorer(RasterDataServerExplorer explorer);
-    
+
 	/**
 	 * Closes this data store
 	 * @throws CloseException
 	 */
 	public void close() throws CloseException;
-	
-	
+
+
 	//******************************************
 	//***********Query methods******************
-	
+
 	/**
 	 * Returns the last buffer loaded if the flag storeLastBuffer in the query is true
 	 * @return
 	 */
 	public Buffer getLastBuffer();
-	
+
 	/**
-	 * Gets a pixel 
+	 * Gets a pixel
 	 * @param x
 	 * @param y
 	 * @param band
@@ -489,54 +491,54 @@
 	 * @throws RasterDriverException
 	 */
 	public Object getData(int x, int y, int band)throws InvalidSetViewException, FileNotOpenException, RasterDriverException;
-	
+
 	/**
 	 * Makes a request to load a buffer of data. This call returns an array of results. The first
-	 * element in the array is the buffer and the other elements are the transparency buffer, 
+	 * element in the array is the buffer and the other elements are the transparency buffer,
 	 * the legend and so on. This funtion is mainly used by the getTile call. This array contains
-	 * all visualization properties. 
-	 * @param query 
+	 * all visualization properties.
+	 * @param query
 	 * @return Object[]
 	 */
 	public Object[] queryArray(RasterQuery query) throws ProcessInterruptedException, QueryException;
-	
+
 	/**
 	 * Makes a request to load a buffer of data. This call returns only a buffer. This call is used
 	 * by most functions because the properties are read from the datastore.
-	 * @param query 
+	 * @param query
 	 * @return Buffer
 	 */
 	public Buffer query(RasterQuery query) throws ProcessInterruptedException, QueryException;
-	
+
 	/**
 	 * Sets a tile server to create a second level of cache. This second level will be
 	 * created if the cache structure is different to the current.
 	 * @param tileServer
 	 */
 	public void setTileServer(Class<?> tileServer) throws InitializeException;
-	
+
 	/**
-	 * Some sevices has neither limits nor pixel size. For instance, WebMapService 
+	 * Some sevices has neither limits nor pixel size. For instance, WebMapService
 	 * is a service of this type if the size is not fixed. Other services, like
 	 * WMTS are enclosed too but in this case it will have resolution by level.
 	 * This method returns true if the data source is enclosed.
 	 * @return
 	 */
 	public boolean isRasterEnclosed();
-	
+
 	/**
 	 * This function returns true if the image to be loaded needs a enhanced filter or
 	 * doesn't. It depends on the format, number of bands, type of data and so on.
 	 * @return The default value is false but each driver can change this value.
 	 */
 	public boolean needEnhanced();
-	
+
 	/**
 	 * Sets the transformation
 	 * @param t
 	 */
 	public void setCoordTrans(ICoordTrans t);
-	
+
 	/**
 	 * Gets the information in a real point
 	 * @param x
@@ -546,10 +548,10 @@
 	 * @return
 	 */
 	public String getInfoByPoint(double x, double y, ICancellable cancellable) throws InfoByPointException;
-	
+
 	/**
-	 * Gets the information in a pixel point. Some services need additional 
-	 * information as the window where the request is done 
+	 * Gets the information in a pixel point. Some services need additional
+	 * information as the window where the request is done
 	 * @param x
 	 *        X Pixel position
 	 * @param y
@@ -565,18 +567,18 @@
 	 * @throws RemoteServiceException
 	 */
 	public String getInfoByPoint(double x, double y, Extent extent, int w, int h, ICancellable cancellable) throws InfoByPointException;
-	
+
 	/**
 	 * Gets the list of geo points associated to this provider
 	 * @return
 	 */
 	public GeoPointList getGeoPointList();
-	
+
 	/**
 	 * Sets the list of geo points associated to this provider
 	 */
 	public void setGeoPointList(GeoPointList geoPointList);
-	
+
 	/**
 	 * Gets the list of regions of interest
 	 * @param defaultProjection
@@ -584,7 +586,7 @@
 	 * @throws ROIException
 	 */
 	public List<ROI> getRois(IProjection defaultProjection) throws ROIException;
-	
+
 	/**
 	 * Gets the list of regions of interest
 	 * @param defaultProjection
@@ -592,11 +594,11 @@
 	 * @throws ROIException
 	 */
 	public List<ROI> getRois(String epsg) throws ROIException;
-	
+
 	/**
 	 * Sets the list of regions of interest
 	 * @param rois
 	 */
 	public void setRois(List<ROI> rois);
-	
+
 }
\ No newline at end of file
