Index: DefaultFLyrRaster.java
===================================================================
--- DefaultFLyrRaster.java	(revision 4180)
+++ DefaultFLyrRaster.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;
 
@@ -32,12 +32,14 @@
 import java.awt.image.BufferedImage;
 import java.io.File;
 import java.io.IOException;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Set;
 
 import org.cresques.cts.IProjection;
+
 import org.gvsig.compat.print.PrintAttributes;
 import org.gvsig.fmap.crs.CRSFactory;
 import org.gvsig.fmap.dal.DataStore;
@@ -131,17 +133,19 @@
 import org.gvsig.tools.task.SimpleTaskStatus;
 import org.gvsig.tools.task.TaskStatusManager;
 import org.gvsig.tools.task.impl.BaseTaskStatus;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * Raster layer
- * 
+ *
  * @author Nacho Brodin (nachobrodin@gmail.com)
  */
 @SuppressWarnings("deprecation")
 public class DefaultFLyrRaster extends FLyrDefault implements FLyrRaster, Multiresolution, InfoByPoint, Classifiable,
 		IRasterLayerActions, ILayerState, VisualPropertyListener, SingleLayer {
+
 	public static final String      PERSISTENT_NAME                = "FLyrRasterSE_Persistent";
     public static final String      PERSISTENT_DESCRIPTION         = "FLyrRasterSE Persistent";
     private RasterManager           rManager                       = RasterLocator.getManager();
@@ -171,29 +175,29 @@
 	static private IConfiguration   configuration                  = new DefaultLayerConfiguration();
 	protected int                   zoomLevel                      =  1;
 	public boolean                  recalcLevel                    = true;
-	private String                  uri                            = null;
-	
+	private URI                  uri                            = null;
+
 	private static GeometryManager  geomManager   	               = GeometryLocator.getGeometryManager();
 	private static final Logger     logger                         = LoggerFactory.getLogger(DefaultFLyrRaster.class);
 	protected FileUtils             fileUtil                       = RasterLocator.getManager().getFileUtils();
 	protected RasterUtils           rasterUtil                     = RasterLocator.getManager().getRasterUtils();
 	protected CRSUtils              crsUtil                        = RasterLocator.getManager().getCRSUtils();
 	protected MathUtils             mathUtil                       = RasterLocator.getManager().getMathUtils();
-	
+
 	public class RasterTaskStatus extends BaseTaskStatus {
 		Cancellable c = null;
-		
+
 		public RasterTaskStatus(String tittle, Cancellable c) {
 			super(tittle);
 			this.c = c;
 		}
-		
+
 		public boolean isCancellationRequested() {
 			if(c != null)
 				return this.c.isCanceled();
 			return false;
 		}
-		
+
 		public void cancelRequest() {
 			if(c != null)
 				this.c.setCanceled(true);
@@ -209,11 +213,11 @@
 	protected String                readingData            = null;
 	//It is set to true if the method init has been called at least once
 	private boolean                 layerInitialize        = false;
-	
+
 	public DefaultFLyrRaster() {
 		affineTransformList = rManager.createHistoricalService();
 	}
-	
+
 	public static void registerDynClass() {
 		DynObjectManager manager = ToolsLocator.getDynObjectManager();
     	DynClass dynClass = manager.add("RasterInfo", "Raster layer Info by point");
@@ -227,19 +231,19 @@
     	dynClass.addDynFieldString("Band Value");
     	dynClass.addDynFieldString("World Point");
 	}
-	
+
 	/**
 	 * Builds a new raster layer
 	 * @param fileName
 	 * @return
-	 * @throws RasterNotLoadException 
-	 * @throws LoadLayerException 
+	 * @throws RasterNotLoadException
+	 * @throws LoadLayerException
 	 */
 	public static DefaultFLyrRaster createLayer(String layerName, File file) throws LoadLayerException {
 		ProviderServices provServ = RasterLocator.getManager().getProviderServices();
 		RasterDataParameters storeParameters = provServ.createParameters(file.getName());
-		storeParameters.setURI(file.getPath());
-		
+		storeParameters.setURI(file.toURI());
+
 		MapContextManager mcm = MapContextLocator.getMapContextManager();
 		DefaultFLyrRaster lyr = (DefaultFLyrRaster) mcm.createLayer(layerName, storeParameters);
 
@@ -273,7 +277,7 @@
 
 		enableStopped(); // Paramos la capa mientras se hace un load
 
-		int test = -1;
+		boolean test = false;
 		DataStoreParameters params = getDataStore().getParameters();
 		DataStoreParameters p = params;
 		if (params != null) {
@@ -286,15 +290,8 @@
 				if(params instanceof RasterDataParameters)
 					uri = ((RasterDataParameters)p).getURI();
 			}
-			test = uri.indexOf("ecwp:");
 		}
 
-		if (test != -1) {
-			String urlECW = uri.substring(test + 6);
-			uri = "ecwp://" + urlECW;
-			System.err.println(test + " " + uri);
-		}
-
 		try {
 			if(!getDataStore().isOpen())
 				dataStore = rManager.getProviderServices().open(params);
@@ -306,19 +303,19 @@
 			throw new LoadLayerException(this.getName());
 		}
 	}
-	
+
 	public void setLayerInitialized(boolean initialized) {
 		layerInitialize = initialized;
 	}
 
 	/**
 	 * Acciones de inicialización después de que la fuente de datos
-	 * de la capa está asignada. 
-	 * @throws FilePaletteException 
+	 * de la capa está asignada.
+	 * @throws FilePaletteException
 	 */
 	public void init() throws LoadLayerException, FilePaletteException {
 		layerInitialize = true;
-		
+
 		if (getDataStore() == null)
 			throw new LoadLayerException("Formato no valido", new IOException());
 
@@ -365,8 +362,8 @@
 		}
 		return render;
 	}
-	
-	public String getURI() {
+
+	public URI getURI() {
 		return uri;
 	}
 
@@ -380,12 +377,12 @@
 
 	/**
 	 * Initializes the filter list to render this raster layer
-	 * @throws FilePaletteException 
+	 * @throws FilePaletteException
 	 */
 	protected void initFilters() throws FilePaletteException {
 		if(getDataType() == null)
 			return;
-			
+
 		RasterFilterList filterList = rManager.createEmptyFilterList(getDataType()[0]);
 		if(loadedFromProject) {
 			filterList = getDataStore().getRender().getFilterList();
@@ -393,7 +390,7 @@
 
 		if(getDataStore() == null)
 			return;
-		
+
 		if(getDataStore().getNoDataValue() != null) {
 			getDataStore().getNoDataValue().load();
 		}
@@ -421,8 +418,8 @@
 					params.setParam("colorTable", table);
 					colorTableManager.addFilter(params);
 				} else //sino hace lo que dice en las preferencias
-					if(getDataStore().needEnhanced() || 
-							(loadedFromProject && filterList.get("enhanced_stretch") != null)) 
+					if(getDataStore().needEnhanced() ||
+							(loadedFromProject && filterList.get("enhanced_stretch") != null))
 						loadEnhancedOrColorTable(filterList);
 			colorTableLoadedFromProject = null;
 
@@ -446,7 +443,7 @@
 	 * de color por defecto
 	 * @param filterManager
 	 * @throws FilterTypeException
-	 * @throws FilePaletteException 
+	 * @throws FilePaletteException
 	 */
 	private void loadEnhancedOrColorTable(RasterFilterList filterList) throws FilterTypeException, FilterManagerException, FilePaletteException {
 		String colorTableName = null;
@@ -527,7 +524,7 @@
 	public void draw(BufferedImage image, Graphics2D g, ViewPort vp, Cancellable cancel, double scale) throws ReadException {
 		TaskEventManager task = rManager.getRasterTask();
 		task.setEvent(null);
-		
+
 		if(!layerInitialize) {
 			if (getDataStore() != null)
 				try {
@@ -545,7 +542,7 @@
 
 			enableStopped();
 			// callLegendChanged(null);
-			
+
 			//Solo el zoom normal recalcula el nivel dependiendo de la escala. El zoom por niveles asigna
 			//él el nivel de zoom por lo que no habrá que recalcularlo.
 			if(recalcLevel) {
@@ -565,7 +562,7 @@
 			}
 
 			if (isWithinScale(scale)) {
-				
+
 				if (mustTileDraw) {
 					Point2D p = vp.getOffset();
 					Rectangle r = new Rectangle((int) p.getX(), (int) p.getY(), vp.getImageWidth(), vp.getImageHeight());
@@ -590,10 +587,10 @@
 						System.out.println("Se ha cancelado el pintado");
 					} catch (QueryException e) {
 						throw new ReadException("Error reading file.", e);
-					} 
+					}
 
 			}
-			
+
 			//callLegendChanged(null);
 		} finally {
 			disableStopped();
@@ -614,21 +611,21 @@
 		ViewPortData vp2 = rManager.getDataStructFactory().createViewPortData(vp.getProjection(), e, imgSz );
 		vp2.setMat(vp.getAffineTransform());
 		vp2.setDPI((int)vp.getDPI());
-		//vp2.setTime(vp.getTime()); 
-		
+		//vp2.setTime(vp.getTime());
+
 		TaskStatusManager manager = ToolsLocator.getTaskStatusManager();
 		SimpleTaskStatus taskStatus = new RasterTaskStatus("Drawing " + getName() + "...", cancel);
 		manager.add(taskStatus);
 		taskStatus.setAutoremove(true);
-		
+
 		//Crea la reproyección al vuelo la primera vez
 		RasterDataParameters params = (RasterDataParameters)getDataStore().getParameters();
-		if(!getRender().isReprojectingOnTheFly() && 
+		if(!getRender().isReprojectingOnTheFly() &&
 			getDataStore().getProjection() != null &&
 			params.getReprojectionOption() == RasterDataParameters.ON_THE_FLY) {
 			getRender().createReprojectionOnTheFly(getDataStore(), getCoordTrans(), taskStatus);
 		}
-		
+
 		try {
 			if(getDataStore().isTiled()) {
 				getRender().drawTiledService(g, vp2, vp.getImageSize(), taskStatus);
@@ -654,7 +651,7 @@
 			logger.error("Error saving the projection", e);
 		}
 	}
-	
+
 	public void setProjection(IProjection proj, boolean persist) {
 		try {
 			getDataStore().setProjection(proj, persist);
@@ -676,7 +673,7 @@
 					.getMaxY(), SUBTYPES.GEOM2D);
 
 			/*
-			No es necesario 
+			No es necesario
 			ICoordTrans ct = getCoordTrans();
 			RasterDataParameters params = (RasterDataParameters)getDataStore().getParameters();
 			if (ct != null && params.getReprojectionOption() == RasterDataParameters.ON_THE_FLY) {
@@ -689,7 +686,7 @@
 			return null;
 		}
 	}
-	
+
 	/**
 	 * Obtiene el valor del pixel del Image en la posición x,y
 	 * @param x Posición x
@@ -800,7 +797,7 @@
 
 		if (/*!isOpen() ||*/ !isVisible() || !isWithinScale(scale))
 			return;
-		
+
 		TaskStatusManager manager = ToolsLocator.getTaskStatusManager();
 		SimpleTaskStatus taskStatus = new RasterTaskStatus("Printing raster " + getName() + "...", cancel);
 		manager.add(taskStatus);
@@ -825,7 +822,7 @@
 				}
 			}
 		}
-		
+
 		taskStatus.terminate();
 	}
 
@@ -941,7 +938,7 @@
 
 			if (this.isRemoveRasterFlag()) {
 				if (getDataStore() != null) {
-					String[] files = getFileName().clone();
+					URI[] uris = getUris().clone();
 
 					try {
 						getDataStore().close();
@@ -955,8 +952,8 @@
 					// System.gc();
 					this.setRemoveRasterFlag(true);
 
-					for (int i = 0; i < files.length; i++) {
-						File file = new File(files[i]);
+	                for (int i = 0; i < uris.length; i++) {
+                        File file = new File(uris[i]);
 						File dirTemp = fileUtil.getTemporalFile();
 						if(!file.exists())
 							continue;
@@ -1043,15 +1040,15 @@
 		return getDataStore().getFileSizeByProvider();
 	}
 
-	/**
-	 * Gets the list of file names
-	 */
-	public String[] getFileName() {
-		if (getDataStore() == null)
-			return null;
+	   /**
+     * Gets the list of URIs
+     */
+    public URI[] getUris() {
+        if (getDataStore() == null)
+            return null;
 
-		return getDataStore().getURIByProvider();
-	}
+        return getDataStore().getURIByProvider();
+    }
 
 	/**
 	 * Returns the number of files in this raster layer
@@ -1089,15 +1086,15 @@
 	public void setRenderFilterList(RasterFilterList filterList) {
 		getRender().setFilterList(filterList);
 	}
-	
+
 	public DynObjectSet getInfo(org.gvsig.fmap.geom.primitive.Point p, double tolerance) throws LoadLayerException, DataException {
 		DynObjectSetRasterInfo info = new DynObjectSetRasterInfo();
-		
+
 		if (!isOpen()) {
 			info.addField("Layer not open", normalizeAsXMLTag(getName()), 0);
 			return info;
 		}
-		
+
 		Point2D pReal = new Point2D.Double(p.getX(), p.getY());
 		Point2D px = new Point2D.Double();
 		if(	pReal.getX() > this.getMinX() &&
@@ -1108,7 +1105,7 @@
 		}
 		//int[] rgb = getPixel((int) p.getX(), (int) p.getY());
 		//ColorConversion conv = rManager.getColorConversion();
-		
+
 		info.addField("File", normalizeAsXMLTag(getName()), 0);
 		info.addField("View Point", "[" + p.getX() + " , " + p.getY() + "]", 1);
 		info.addField("World Point", "[" + mathUtil.format(pReal.getX(), 3) + " , " + mathUtil.format(pReal.getY(), 3) + "]", 2);
@@ -1116,9 +1113,9 @@
 			info.addField("Pixel Point", "Out", 3);
 		else
 			info.addField("Pixel Point", "[" + (int) px.getX() + ",  " + (int) px.getY() + "]", 3);
-	
+
 		//La información RGB no puede obtener de la capa
-		
+
 		/*info.addField("RGB", "[" + rgb[1] + ",  " + rgb[2] + ",  " + rgb[3] + "]", 4);
 		double[] cmyk = conv.RGBtoCMYK(rgb[1] & 0xff, rgb[2] & 0xff, rgb[3] & 0xff, 1D);
 		info.addField("CMYK", "[" + mathUtil.format(cmyk[0], 4) + ",  " + mathUtil.format(cmyk[1], 4) + ",  " + mathUtil.format(cmyk[2], 4) + ",  " + mathUtil.format(cmyk[3], 4) + "]", 5);
@@ -1127,7 +1124,7 @@
 		hsl[2] = (int) (hsl[2] * 255. + 0.5);
 		hsl[1] = (int) (hsl[1] * 255. + 0.5);
 		info.addField("HSL", "[" + mathUtil.format(hsl[0], 4) + ",  " + mathUtil.format(hsl[1], 4) + ",  " + mathUtil.format(hsl[2], 4) + "]", 6);*/
-		
+
 		String data = "[";
 		try {
 			if (px != null) {
@@ -1135,7 +1132,7 @@
 					for(int i = 0; i < getDataStore().getBandCount(); i++) {
 						if(getDataStore().isInside(pReal)) {
 							Point2D pxAux = transformPoint(pReal);
-							int val = ((Integer)getDataStore().getData((int)pxAux.getX(), 
+							int val = ((Integer)getDataStore().getData((int)pxAux.getX(),
 									(int)pxAux.getY(), i)).intValue();
 							if(getDataType()[0] == Buffer.TYPE_BYTE)
 								data += (val & 0x000000ff) + ",  ";
@@ -1148,7 +1145,7 @@
 					for(int i = 0; i < getDataStore().getBandCount(); i++) {
 						if(getDataStore().isInside(pReal)) {
 							Point2D pxAux = transformPoint(pReal);
-							data += ((Float)getDataStore().getData((int)pxAux.getX(), 
+							data += ((Float)getDataStore().getData((int)pxAux.getX(),
 									(int)pxAux.getY(), i)).floatValue() + ",  ";
 						}
 					}
@@ -1157,7 +1154,7 @@
 					for(int i = 0; i < getDataStore().getBandCount(); i++) {
 						if(getDataStore().isInside(pReal)) {
 							Point2D pxAux = transformPoint(pReal);
-							data += ((Double)getDataStore().getData((int)pxAux.getX(), 
+							data += ((Double)getDataStore().getData((int)pxAux.getX(),
 									(int)pxAux.getY(), i)).doubleValue() + ",  ";
 						}
 					}
@@ -1174,14 +1171,14 @@
 		}
 		return info;
 	}
-	
+
 	/**
 	 * Transforma un punto real a coordenadas pixel
-	 * 
+	 *
 	 * @param numberBand
 	 * @param pReal
 	 * @return
-	 * @throws LoadLayerException 
+	 * @throws LoadLayerException
 	 * @throws ReadDriverException
 	 */
 	private Point2D transformPoint(Point2D pReal) throws LoadLayerException {
@@ -1195,7 +1192,7 @@
 			throw new LoadLayerException("Error en la transformación del punto", e);
 		}
 	}
-	
+
 	public Object getInfo(String key) {
 		if (key.equals("DriverName"))
 			return "gvSIG Raster Driver";
@@ -1279,7 +1276,7 @@
 	public boolean isFileAccepted(File file) {
 		return getDataStore().isFileSupported(file.getName());
 	}
-	
+
 	/**
 	 * Consulta si un fichero es aceptado o no para este tipo de capa.
 	 * @param file Fichero a consultar
@@ -1374,7 +1371,7 @@
 			return;
 
 		getDataStore().saveGeoreferencingToRmf();
-		
+
 		affineTransformList.clear();
 		affineTransformList.add(this.getAffineTransform());
 	}
@@ -1420,14 +1417,14 @@
 				state.disableStopped();
 			else
 				enableStopped();
-	
+
 			if(isAwake() || isClosed())
 				try {
 					this.load();
 				} catch (LoadLayerException e) {
 					e.printStackTrace();
 				}
-	
+
 			/*
 			 * Cuando se modifica la visibilidad de una capa raster se hace un updateDrawVersion de todas las
 			 * capas raster de ese MapContext. Esto es porque la estrategia utilizada por RasterDrawStrategy hace
@@ -1442,7 +1439,7 @@
 					if(listLayers.get(i) instanceof DefaultFLyrRaster)
 						((DefaultFLyrRaster)listLayers.get(i)).updateDrawVersion();
 			}
-	
+
 			super.setVisible(visibility);
 	}
 
@@ -1487,11 +1484,11 @@
 	public void setRois(List<ROI> rois) {
 		getDataStore().setRois(rois);
 	}
-	
+
 	public void setROIsFiles(List<File> file) throws RmfSerializerException {
 		getDataStore().saveROIFileListToRmf(file);
 	}
-	
+
 	public List<File> getROIsFiles() throws RmfSerializerException {
 		return getDataStore().getROIFileListFromRmf();
 	}
@@ -1578,7 +1575,7 @@
 		newLayer.setName(getName());
 		newLayer.setOpenRasterStore(ds);
 		newLayer.firstLoad = firstLoad;
-		
+
 		List<RasterFilter> filters = getRender().getFilterList().getStatusCloned();
 
 		//Hacemos una copia de las bandas a renderizar
@@ -1597,10 +1594,10 @@
 		if(getDataStore().getNoDataValue().isDefined())
 			newLayer.setNoDataTransparent(true);
 		newLayer.enableOpen();
-		
+
 		return newLayer;
 	}
-	
+
 	public FLayer getFileLayer() throws RasterDriverException {
 		try {
 			return cloneLayer();
@@ -1608,12 +1605,12 @@
 		}
 		return null;
 	}
-	
-	public void addFile(String file) throws InvalidSourceException {
+
+	public void addFile(File file) throws InvalidSourceException {
 		getDataStore().addFile(file);
 	}
-	
-	public void removeFile(String file) {
+
+	public void removeFile(File file) {
 		getDataStore().removeFile(file);
 	}
 
@@ -1682,11 +1679,11 @@
 		}
 		return this.dataStore;
 	}
-	
+
 	public IProjection getProjection() {
 		if(getDataStore() == null)
 			return null;
-		
+
 		RasterDataParameters p = (RasterDataParameters)getDataStore().getParameters();
 		if(p.getReprojectionOption() == RasterDataParameters.DONT_CHANGE_PROJECTION)
 			return null;
@@ -1697,7 +1694,7 @@
 		if(dataStore instanceof CoverageStoreProviderServices) {
 			try {
 				this.dataStore = rManager.getProviderServices().open(
-						((CoverageStoreProviderServices) dataStore).getProvider(), 
+						((CoverageStoreProviderServices) dataStore).getProvider(),
 						dataStore.getParameters());
 			} catch (NotSupportedExtensionException e) {
 				throw new LoadLayerException("Extension not supported", e);
@@ -1720,16 +1717,16 @@
 			}
 		}
 	}
-	
+
 	public void setDataStore(DataStore dataStore) throws LoadLayerException {
 		setOpenRasterStore(dataStore);
 		load();
 	}
-	
+
 	public boolean isRemote() {
 		return false;
 	}
-	
+
 	/**
 	 * Returns true if exists a process reading data from this layer
 	 * @return
@@ -1746,7 +1743,7 @@
 	public synchronized void setReadingData(String readingData) {
 		this.readingData = readingData;
 	}
-	
+
 	public DynObjectSet getInfo(Point p, double tolerance, Cancellable cancel,
 			boolean fast)
 			throws LoadLayerException, DataException {
@@ -1774,38 +1771,38 @@
 	public void setZoomLevel(int zoomLevel) {
 		this.zoomLevel = zoomLevel;
 	}
-	
+
 	public boolean increaseZoomLevel() {
-		if(zoomLevel < (this.getDataStore().getZoomLevels() - 1)) { 
+		if(zoomLevel < (this.getDataStore().getZoomLevels() - 1)) {
 			zoomLevel ++;
 			recalcLevel = false;
 			return true;
 		}
 		return false;
 	}
-	
+
 	public boolean decreaseZoomLevel() {
-		if(zoomLevel > 0) { 
+		if(zoomLevel > 0) {
 			zoomLevel --;
 			recalcLevel = false;
 			return true;
 		}
 		return false;
 	}
-	
+
 	public Envelope getCoordsInLevel(Point2D center, int level, int w, int h) throws CreateEnvelopeException {
 		Extent ex = getDataStore().getCoordsInLevel(center, level, w, h);
 		return geomManager.createEnvelope(ex.getULX(), ex.getULY(), ex.getLRX(), ex.getLRY(), SUBTYPES.GEOM2D);
 	}
-	
+
 	public boolean isEnabledMultiresolution() {
 		return getDataStore().isTiled();
 	}
-	
+
 	public void setTileServer(Class<?> tileServer) throws InitializeException {
 		getDataStore().setTileServer(tileServer);
 	}
-	
+
 	@Override
 	public void loadFromState(PersistentState state)
 			throws PersistenceException {
@@ -1831,14 +1828,14 @@
 	@Override
 	public void saveToState(PersistentState state) throws PersistenceException {
 		super.saveToState(state);
-		
-		state.set("rasterdatastore", getDataStore());	
-		state.set("legend", lastLegend);	
-		state.set("colortable", getRender().getColorTable());	
-		state.set("zoomLevel", zoomLevel);	
-		state.set("recalcLevel", recalcLevel);	
-	}	
-	
+
+		state.set("rasterdatastore", getDataStore());
+		state.set("legend", lastLegend);
+		state.set("colortable", getRender().getColorTable());
+		state.set("zoomLevel", zoomLevel);
+		state.set("recalcLevel", recalcLevel);
+	}
+
 	public static void registerPersistence() {
 		PersistenceManager manager = ToolsLocator.getPersistenceManager();
 		DynStruct definition = manager.getDefinition(PERSISTENT_NAME);
@@ -1847,15 +1844,15 @@
 					DefaultFLyrRaster.class,
 					PERSISTENT_NAME,
 					PERSISTENT_DESCRIPTION,
-					null, 
+					null,
 					null
 			);
 			definition.extend(PersistenceManager.PERSISTENCE_NAMESPACE, "FLyrDefault");
-			
+
 			registerPersistence(definition);
 		}
 	}
-	
+
 	public static void registerPersistence(DynStruct definition) {
 		definition.addDynFieldObject("rasterdatastore").setClassOfValue(RasterDataStore.class).setMandatory(false);
 		definition.addDynFieldObject("legend").setClassOfValue(ILegend.class).setMandatory(false);
@@ -1871,13 +1868,13 @@
 			throw new ReadException(getDataStore().getName(), e);
 		} catch (GeometryTypeNotValidException e) {
 			throw new ReadException(getDataStore().getName(), e);
-		} 
+		}
 	}
-	
+
 	public void setDataStore(DataStore dataStore, String domain) throws LoadLayerException {
 		setDataStore(dataStore);
 	}
-	
+
 	protected void finalize() {
 		layerChangeSupport             = null;
 		state                          = null;
