Index: FLyrRaster.java
===================================================================
--- FLyrRaster.java	(revision 4180)
+++ FLyrRaster.java	(revision 4181)
@@ -2,22 +2,22 @@
 *
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
 * of the Valencian Government (CIT)
-* 
+*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
-* 
+*
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
-* 
+*
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA  02110-1301, USA.
-* 
+*
 */
 package org.gvsig.raster.fmap.layers;
 
@@ -26,10 +26,12 @@
 import java.awt.geom.Point2D;
 import java.awt.image.BufferedImage;
 import java.io.File;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.cresques.cts.IProjection;
+
 import org.gvsig.fmap.dal.coverage.datastruct.Extent;
 import org.gvsig.fmap.dal.coverage.datastruct.NoData;
 import org.gvsig.fmap.dal.coverage.exception.InvalidSourceException;
@@ -51,61 +53,61 @@
 
 /**
  * All kind of raster layers should implement this interface.
- * 
+ *
  * @author Nacho Brodin (nachobrodin@gmail.com)
  */
 @SuppressWarnings("deprecation")
 public interface FLyrRaster extends FLayer {
 	/**
 	 * Sets the layer as initialized. That's implies that the layer has
-	 * the right filters and is opened, 
+	 * the right filters and is opened,
 	 * @param initialized
 	 */
 	public void setLayerInitialized(boolean initialized);
-	
+
 	/**
 	 * Gets the uniform resource identifier
 	 * @return
 	 */
-	public String getURI();
-	
+	public URI getURI();
+
 	/**
 	 * Returns true if a color table exists
 	 * @return
 	 */
 	public boolean existColorTable();
-	
+
 	/**
 	 * Define la ultima leyenda valida de la capa o se pone a null para que la
 	 * capa busque una leyenda valida.
 	 * @param ct
 	 */
 	public void setLastLegend(ColorTable ct);
-	
+
 	/**
 	 * Crea el objeto renderizador de raster
 	 * @return Rendering
 	 */
 	public Render getRender();
-	
+
 	/**
 	 * Gets the MapContext object
 	 * @return
 	 */
 	public MapContext getMapContext();
-	
+
 	/**
 	 * Gets the full extent
 	 * @return
 	 */
 	public Extent getFullRasterExtent();
-	
+
 	/**
 	 * Gets the DataStore
 	 * @return
 	 */
 	public RasterDataStore getDataStore();
-	
+
 	/**
 	 * Metodo para consultar si una capa puede ser un RGB. Suponemos que es un RGB
 	 * si el tipo de datos es de tipo byte y su interpretacion de color tiene
@@ -113,25 +115,25 @@
 	 * @return boolean
 	 */
 	public boolean isRGB();
-	
+
 	/**
 	 * Returns true if the drawn is going to be tiled
 	 * @return
 	 */
 	public boolean isTiled();
-	
+
 	/**
 	 * Gets the regions of interest
-	 * @return 
-	 * @throws ROIException 
+	 * @return
+	 * @throws ROIException
 	 */
 	public List<ROI> getRois() throws ROIException;
-	
+
 	/**
 	 * Sets the regions of interest
 	 */
 	public void setRois(List<ROI> rois);
-	
+
 	/**
 	 * Sets the files which contain the regions of interest. This method is temporal until
 	 * after the refactoring of ROIs.
@@ -139,7 +141,7 @@
 	 * @throws RmfSerializerException
 	 */
 	public void setROIsFiles(List<File> file) throws RmfSerializerException;
-	
+
 	/**
 	 * Gets the files which contain the regions of interest. This method is temporal until
 	 * after the refactoring of ROIs.
@@ -147,49 +149,49 @@
 	 * @throws RmfSerializerException
 	 */
 	public List<File> getROIsFiles() throws RmfSerializerException;
-	
+
 	/**
 	 * Obtiene la proyección del fichero.
 	 * @return IProjection
 	 */
 	public IProjection readProjection() throws RasterDriverException;
-	
+
 	/**
 	 * Gets the tile size
 	 * @return
 	 */
 	public int[] getTileSize();
-	
+
 	/**
 	 * Obtiene el valor NoData asociado al raster.
 	 * @return double
 	 */
 	public NoData getNoDataValue();
-	
+
 	/**
 	 * Returs a string with the extension of the first file
 	 */
 	public String getFileFormat();
-	
+
 	/**
 	 * Obtiene el flag que dice si la imagen está o no georreferenciada
 	 * @return true si está georreferenciada y false si no lo está.
 	 */
 	public boolean isGeoreferenced();
-	
+
 	/**
 	 * Returns the number of bands of each dataset
 	 * @return
 	 */
 	public int[] getBandCountFromDataset();
-	
+
 	/**
 	 * Gets the projection in well known text format
 	 * @return
 	 * @throws RasterDriverException
 	 */
 	public String getWktProjection() throws RasterDriverException;
-	
+
 	/**
 	 * Gets the color interpretation
 	 * @param band
@@ -197,20 +199,20 @@
 	 * @return
 	 */
 	public String getColorInterpretation(int band, int dataset);
-	
+
 	/**
 	 * When a process is using information of this layer this variable will contain
 	 * the thread ID.
 	 * @param readingData
 	 */
 	public void setReadingData(String readingData);
-	
+
 	/**
 	 * Sets the nodata value for this layer
 	 * @param noDataValue the noDataValue to set
 	 */
 	public void setNoDataValue(NoData noDataValue);
-	
+
 	/**
 	 * Sets the minimum scale visible. Lower scales won't be drawn.
 	 *
@@ -218,7 +220,7 @@
 	 * @see #getMinScale()
 	 */
 	public void setMinScale(double minScale);
-	
+
 	/**
 	 * Sets the maximum scale visible. Higher scales won't be drawn.
 	 *
@@ -234,7 +236,7 @@
 	 * @see #setMaxScale(double)
 	 */
 	public double getMaxScale();
-	
+
 	/**
 	 * Returns the minimum scale visible. Lower scales won't be drawn.
 	 *
@@ -242,7 +244,7 @@
 	 * @see #setMinScale(double)
 	 */
 	public double getMinScale();
-	
+
 	/**
 	 * @return Returns the removeRasterFlag.
 	 */
@@ -254,7 +256,7 @@
 	 * @param removeRasterFlag The removeRasterFlag to set.
 	 */
 	public void setRemoveRasterFlag(boolean removeRasterFlag);
-	
+
 	/**
 	 * Borra de la lista de listeners el que se pasa como parámetro.
 	 *
@@ -263,7 +265,7 @@
 	 * @return True si ha sido correcto el borrado del Listener.
 	 */
 	public boolean removeLayerListener(LayerListener o);
-	
+
 	/**
 	 * @throws ReadException
 	 * @throws ReadDriverException
@@ -272,73 +274,73 @@
 	 * 		com.iver.utiles.swing.threads.Cancellable)
 	 */
 	public void draw(BufferedImage image, Graphics2D g, ViewPort vp, Cancellable cancel, double scale) throws ReadException;
-	
+
 	/**
 	 * Clones this layer
 	 * @return
 	 * @throws Exception
 	 */
 	public FLayer cloneLayer() throws Exception;
-	
+
 	/**
 	 * Gets a layer which the source is a file
 	 * @return
-	 * @throws RasterDriverException 
+	 * @throws RasterDriverException
 	 */
 	public FLayer getFileLayer() throws RasterDriverException;
-	
+
 	/**
-	 * Gets the position of the alpha band  
+	 * Gets the position of the alpha band
 	 * @return
 	 */
 	public int getAlphaBandNumber();
-	
+
 	public String getName();
-	
+
 	/**
 	 * Gets the projection
 	 * @return
 	 */
 	public IProjection getProjection();
-	
+
 	/**
 	 * Devuelve si es reproyectable o no la capa
 	 * @return
 	 */
 	public boolean isReproyectable();
-	
+
 	/**
 	 * Recupera del raster la matriz de transformación que lo situa en cualquier parte de la vista
 	 * @return AffineTransform
 	 */
 	public AffineTransform getAffineTransform();
-	
+
 	/**
 	 * Obtiene la lista de transformaciones que se han ido aplicando al raster.
 	 * @return Historical. Lista de AffineTransform
 	 */
 	public Historical getAffineTransformHistorical();
-	
+
 	/**
 	 * Asigna al raster la matriz de transformación para situarlo en cualquier parte de la vista
 	 * @param transf
 	 */
 	public void setAffineTransform(AffineTransform transf);
-	
+
 	/**
 	 * Asigna al raster la matriz de transformación para situarlo en cualquier parte de la vista.
 	 * Esta versión no guarda en el historico.
 	 * @param transf
 	 */
 	public void setAffineTransformWithoutHistorical(AffineTransform transf);
-	
+
 	/**
 	 * Salva la georreferenciación a fichero rmf.
 	 * @param fName
 	 * @throws RmfSerializerException
 	 */
 	public void saveGeoToRmf() throws RmfSerializerException;
-	
+
 	/**
 	 * Metodo que obtiene si un punto cae dentro de los límites de la capa
 	 * o fuera de ellos.
@@ -346,13 +348,13 @@
 	 * @return true si está dentro de los límites y false si está fuera
 	 */
 	public boolean isInside(Point2D p);
-	
+
 	/**
 	 * Returns true if this layer is remote
 	 * @return
 	 */
 	public boolean isRemote();
-	
+
 	/**
 	 * Gets the attribute list
 	 * <UL>
@@ -365,41 +367,41 @@
 	 * @return ArrayList<Object>
 	 */
 	public ArrayList<Object> getAttributes();
-	
+
 	/**
 	 * Returns the full bounding box of this layer
 	 * @return
 	 */
 	public Envelope getFullEnvelope();
-	
+
 	/**
 	 * Ajusta las coordenadas especificadas en el parámetro al área máxima
 	 * del raster en píxeles.
 	 * @param req Punto a ajustar dentro del extener del raster
 	 */
 	public Point2D adjustWorldRequest(Point2D req);
-	
+
 	/**
-	 * 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);
+
 	/**
 	 * When this flag is true then renderice nodata value as transparent
 	 * @param t
 	 */
 	public void setNoDataTransparent(boolean t);
-	
+
 	/**
 	 * Sets the layer projection
 	 * @param proj
