Index: AbstractRasterDataStore.java
===================================================================
--- AbstractRasterDataStore.java	(revision 4180)
+++ AbstractRasterDataStore.java	(revision 4181)
@@ -93,10 +93,10 @@
 
 /**
  * Default implementation for RasterDataSource
- * 
+ *
  * @author Nacho Brodin (nachobrodin@gmail.com)
  */
-public abstract class AbstractRasterDataStore extends AbstractDisposable 
+public abstract class AbstractRasterDataStore extends AbstractDisposable
 	implements RasterDataStore, CoverageStoreProviderServices, QueryableRaster, DataStoreInitializer {
 	public static final String         PERSISTENT_NAME        = "AbstractRasterDataStore_Persistent";
     public static final String         PERSISTENT_DESCRIPTION = "AbstractRasterDataStore Persistent";
@@ -105,7 +105,7 @@
 	protected BandListImpl             storeBandList          = null;
 	protected RasterProvider           provider               = null;
 	protected Metadata                 metadata               = null;
-	
+
 	/**
 	 * Lista de paletas asociadas a las bandas cargadas en el DataSource. Estas son calculadas
 	 * en las funciones que asignan las bandas a dibujar (addDrawableBands)
@@ -118,23 +118,23 @@
 	protected double 		    	   nWidth                 = 0;
 	protected double 			       nHeight                = 0;
 	private Buffer                     lastBuffer             = null;
-	
+
 	private DataManager                dataManager            = null;
 	protected DataStoreParameters      parameters             = null;
 	private DelegatedDynObject         dynobj                 = null;
-	private DelegateWeakReferencingObservable 
+	private DelegateWeakReferencingObservable
 	                                   delegateObservable     = new DelegateWeakReferencingObservable(this);
 	private Render                     render                 = null;
 	protected ICoordTrans              coordTrans             = null;
 	protected RasterDataServerExplorer explorer               = null;
-	
+
 	public BandList getDefaultBandList() {
 		if(storeBandList == null) {
 			initializeBandList();
 		}
 		return storeBandList;
 	}
-	
+
 	public void initializeBandList() {
 		if(provider != null) {
 			storeBandList = new BandListImpl();
@@ -142,9 +142,9 @@
 			for(int i = 0; i < provider.getBandCount(); i++) {
 				try {
 					int dataType = provider.getDataType()[i];
-					DatasetBand band = new DatasetBandImpl(provider.getURIByBand(i), 
-							provider.getBandPositionByProvider(i), 
-							dataType, 
+					DatasetBand band = new DatasetBandImpl(provider.getURIByBand(i).getPath(),
+							provider.getBandPositionByProvider(i),
+							dataType,
 							provider.getBandCount());
 					storeBandList.addBand(band, i);
 				} catch(BandNotFoundInListException ex) {
@@ -160,14 +160,14 @@
 			storeBandList.setDrawableBands(drawableBands);
 		}
 	}
-	
+
 	public Buffer query(RasterQuery query) throws ProcessInterruptedException, QueryException {
 		Object[] obj = queryArray(query);
 		if(obj != null && obj.length > 0 && obj[0] instanceof Buffer)
 			return ((Buffer)obj[0]);
 		return null;
 	}
-	
+
 	/**
 	 * <UL>Tasks to do in the <code>Datastore</code>
 	 * <LI>Check parameters and adjust them to not exceed the window size</LI>
@@ -181,16 +181,16 @@
 		Object[] result = null;
 		currentQuery = (DefaultRasterQuery)query;
 		DefaultRasterQuery q = currentQuery;
-		
+
 		if(isTiled() || provider instanceof RemoteRasterProvider)
 			q.dontBuildBuffer();
-		
+
 		Buffer buf = null;
-		
+
 		if(q.requestHasShift()) {
 			//TODO: Sin probar
 			FramedBufferResampling framedBufferResampling = new FramedBufferResampling(q, this);
-			buf = framedBufferResampling.query(provider);			
+			buf = framedBufferResampling.query(provider);
 		} else {
 			q.calculateParameters(this);
 			try {
@@ -201,7 +201,7 @@
 			} catch (RasterDriverException e) {
 				throw new QueryException("Error getting data", e);
 			}
-			
+
 			if(q.isSupersamplingOptionActive() && q.isSupersamplingTheRequest()) {
 				buf = buf.getAdjustedWindow(q.getBufWidth(), q.getBufHeight(), Buffer.INTERPOLATION_NearestNeighbour);
 			}
@@ -209,13 +209,13 @@
 		if(buf != null)
 			buf.setDataExtent(q.getAdjustedRequestBoundingBox().toRectangle2D());
 		result = new Object[]{buf};
-		
+
 		if(q.isStoredLastBuffer())
 			lastBuffer = buf;
 		else
 			lastBuffer = null;
 		q.storeLastBuffer(false);
-		
+
 		if(result != null && result.length > 0 && result[0] instanceof Buffer) {
 			((Buffer)result[0]).setStore(this);
 			if(getNoDataValue() != null && getNoDataValue().isDefined())
@@ -224,18 +224,18 @@
 		}
 		return null;
 	}
-	
+
 	public Extent adjustToExtent(Extent e) {
 		Extent currentExtent = this.getExtent();
-	
+
 		double minx = e.getMin().getX() < currentExtent.getMin().getX() ? currentExtent.getMin().getX() : e.getMin().getX();
 		double maxx = e.getMax().getX() > currentExtent.getMax().getX() ? currentExtent.getMax().getX() : e.getMax().getX();
 		double miny = e.getMin().getY() < currentExtent.getMin().getY() ? currentExtent.getMin().getY() : e.getMin().getY();
 		double maxy = e.getMax().getY() > currentExtent.getMax().getY() ? currentExtent.getMax().getY() : e.getMax().getY();
-		
+
 		return new ExtentImpl(minx, maxy, maxx, miny);
 	}
-	
+
 	public String getFullName() {
 		return getName();
 	}
@@ -243,7 +243,7 @@
 	public Buffer getLastBuffer() {
 		return lastBuffer;
 	}
-	
+
 	public TimeSeries getTimeSerials() throws RmfSerializerException {
 		if(getProvider() instanceof RasterProvider)
 			return ((RasterProvider)getProvider()).getTimeSerials();
@@ -252,39 +252,39 @@
 
 	public void setTimeSerials(TimeSeries serialInfo) throws RmfSerializerException {
 		if(getProvider() instanceof RasterProvider)
-			((RasterProvider)getProvider()).setTimeSerials(serialInfo);			
+			((RasterProvider)getProvider()).setTimeSerials(serialInfo);
 	}
-	
+
 	public abstract void saveColorTableToRmf(ColorTable table) throws RmfSerializerException;
-	
+
 	public abstract void saveGeoPointListToRmf(GeoPointList pointList) throws RmfSerializerException;
-	
+
 	public abstract void saveROIFileListToRmf(List<File> fileList) throws RmfSerializerException;
-	
+
 	/**
 	 * Saves information about serials
 	 * @param object to save
 	 * @throws RmfSerializerException
 	 */
 	public abstract void saveSerialInfoToRmf(TimeSeries serialInfo) throws RmfSerializerException;
-	
+
 	/**
 	 * Loads information about serials
 	 * @param object to load
 	 * @throws RmfSerializerException
 	 */
 	public abstract boolean loadSerialInfoFromRmf(TimeSeries serialInfo);
-	
+
 	public Vectorization createVectorizeObject() throws QueryException, ProcessInterruptedException {
 		return new PotraceVectorization((RasterDataStore)this);
 	}
-	
+
 	public Render getRender() {
 		if(render == null)
 			render = new DefaultRender(this);
 		return render;
 	}
-	
+
 	public void setRender(Render render) {
 		this.render = render;
 	}
@@ -292,24 +292,24 @@
 	public boolean isFileSupported(String fName) {
 		return RasterLocator.getManager().getProviderServices().isExtensionSupported(fName);
 	}
-	
+
 	/**
 	 * Registers metadata definition
 	 * @throws MetadataException
 	 */
 	public static void registerMetadataDefinition() throws MetadataException {
 		MetadataManager manager = MetadataLocator.getMetadataManager();
-		
+
 		if(manager == null)
 			return;
-		
+
 		if( manager.getDefinition(METADATA_DEFINITION_NAME) == null  ) {
 			DynStruct defnition = manager.addDefinition(
 					METADATA_DEFINITION_NAME,
-					METADATA_DEFINITION_NAME 
+					METADATA_DEFINITION_NAME
 			);
 			defnition.extend(
-					MetadataManager.METADATA_NAMESPACE, 
+					MetadataManager.METADATA_NAMESPACE,
 					DataStore.METADATA_DEFINITION_NAME
 			);
 		}
@@ -318,7 +318,7 @@
 	public int getSourceType() {
 		return ((RasterProvider)getProvider()).getSourceType();
 	}
-	
+
     //****************************************************
 	//****Implementing DataStoreImplementation methods****
 	//****************************************************
@@ -328,7 +328,7 @@
 		DynObjectManager dynManager = ToolsLocator.getDynObjectManager();
 
 		this.dynobj = (DelegatedDynObject) dynManager
-				.createDynObject( 
+				.createDynObject(
 						MetadataLocator.getMetadataManager().getDefinition(DataStore.SPATIAL_METADATA_DEFINITION_NAME)
 				);
 		this.dataManager = dataManager;
@@ -340,10 +340,10 @@
 			throws InitializeException {
 		setProvider((RasterProvider)provider);
 	}
-	
+
 	public DataManager getManager() {
 		return this.dataManager;
-	}	
+	}
 
 	//****************************************************
 	//*********Implementing DataStore methods*************
@@ -352,7 +352,7 @@
 	public String getProviderName() {
 		return getProvider().getFullName();
 	}
-	
+
 	public void refresh() throws DataException {
 		return;
 	}
@@ -433,7 +433,7 @@
 	public DataServerExplorer getExplorer() throws DataException, ValidateDataParametersException {
 		return explorer;
 	}
-	
+
 	/**
      * Sets the explorer
      * @param explorer
@@ -441,15 +441,15 @@
     public void setExplorer(RasterDataServerExplorer explorer) {
     	this.explorer = explorer;
     }
-	
+
 	public DataQuery createQuery() {
 		return new DefaultRasterQuery();
 	}
-	
+
 	//****************************************************
 	//*********Implementing Metadata methods*************
 	//****************************************************
-	
+
     public Object getMetadataID() {
     	if(parameters != null && parameters instanceof RasterFileStoreParameters)
     		return ((RasterFileStoreParameters)parameters).getFile();
@@ -461,63 +461,63 @@
 	public Set<?> getMetadataChildren() {
     	return null;
     }
-    
+
     //****************************************************
 	//*********Implementing Disposable methods************
 	//****************************************************
-    
+
     public void doDispose() {
-    	
+
     }
-    
+
     //****************************************************
 	//*********Implementing Visitable methods*************
 	//****************************************************
-    
+
     public void accept(Visitor visitor) throws BaseException {
-    	
+
     }
-    
+
     //****************************************************
 	//****Implementing ComplexObservable methods**********
 	//****************************************************
-    
+
     public void disableNotifications() {
-		
+
 	}
 
     public void enableNotifications() {
-		
+
 	}
 
     public void beginComplexNotification() {
-		
+
 	}
 
     public void endComplexNotification() {
-		
+
 	}
-    
+
     //****************************************************
 	//********Implementing Observable methods*************
 	//****************************************************
-    
+
 	public void addObserver(org.gvsig.tools.observer.Observer o) {
-		
+
 	}
 
 	public void deleteObserver(org.gvsig.tools.observer.Observer o) {
-		
+
 	}
 
 	public void deleteObservers() {
-		
+
 	}
-	
+
     //****************************************************
 	//********Implementing DynObject methods*************
 	//****************************************************
-	
+
 	public DynClass getDynClass() {
 		return this.dynobj.getDynClass();
 	}
@@ -555,11 +555,11 @@
 			dynobj.clear();
 		}
     }
-	
+
 	public DataStoreParameters getParameters() {
 		return parameters;
 	}
-	
+
 	//***********************************************************************
 	//********Implementing CoverageStoreProviderServices methods*************
 	//***********************************************************************
@@ -595,17 +595,17 @@
 	public DataStore getStore() {
 		return this;
 	}
-	
+
 	public void setCoordTrans(ICoordTrans t) {
 		this.coordTrans = t;
 	}
-	
+
 	public void close() {
 		if(lastBuffer != null) {
 			lastBuffer.dispose();
 		}
 	}
-	
+
 	protected void finalize() throws Throwable {
 		currentQuery           = null;
 		if(palette != null) {
