Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLyrDefault.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLyrDefault.java	(revision 41852)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLyrDefault.java	(revision 41853)
@@ -94,6 +94,11 @@
 
 	private LayerChangeSupport layerChangeSupport = new LayerChangeSupport();
 
+        /**
+         * Flag to set the layer as a temporary layer.
+         */
+        private boolean temporary;
+        
 	/**
 	 * Path to the upper layer which this layer belongs.
 	 *
@@ -785,7 +790,7 @@
 	 * @see com.iver.cit.gvsig.fmap.layers.FLayer#getTocStatusImage()
 	 */
 	public Image getTocStatusImage() {
-		return tocStatusImage;
+            return tocStatusImage;
 	}
 
 	/**
@@ -799,43 +804,25 @@
 		this.tocStatusImage = tocStatusImage;
 		logger.debug("setTocStatusImage " + tocStatusImage + " sobre capa " + this.getName());
 	}
-	/*
-	 * (non-Javadoc)
-	 * @see com.iver.cit.gvsig.fmap.layers.FLayer#newComposedLayer()
-	 */
+
 	public ComposedLayer newComposedLayer() {
 		return null;
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * @see com.iver.cit.gvsig.fmap.layers.FLayer#allowLinks()
-	 */
 	public boolean allowLinks()
 	{
 		return false;
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * @see com.iver.cit.gvsig.fmap.layers.FLayer#getLinkProperties()
-	 */
 	public AbstractLinkProperties getLinkProperties()
 	{
 		return null;
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * @see com.iver.cit.gvsig.fmap.layers.FLayer#getLink(java.awt.geom.Point2D, double)
-	 */
 	public URI[] getLink(Point2D point, double tolerance) throws ReadException{
 		return null;
 	}
 
-	/**
-	 * @see LayerChangeSupport#addLayerListener(LegendListener)
-	 */
 	public void addLegendListener(LegendListener listener) {
 		layerChangeSupport.addLayerListener(listener);
 	}
@@ -1056,4 +1043,12 @@
 	public boolean hidesThisArea(Envelope area) {
 		return false;
 	}
+        
+        public boolean isTemporary() {
+            return this.temporary;
+        }
+        
+        public void setTemporary(boolean temporary) {
+            this.temporary = temporary;
+        }
 }
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLayer.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLayer.java	(revision 41852)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLayer.java	(revision 41853)
@@ -53,16 +53,16 @@
 
 
 /**
- * <p>Definition of the basic functionality that all kind of <i>FMap</i> layers should implement.</p>
- *
- * <p>This kind of layers store their data, are drawable, projectable (with a projection), can be a node of a tree of layers, and
- *  could be editable and have a cache with previous draws. They also can be visible or not, and active or not.</p>
- *
- * <p>A layer can also store information about errors produced working with it, and have a name (kind of layer) and
- *  a brief summary explaining what's for.</p>
- *
- * <p>Each particular implementation can add new properties, and limit or expand the functionality.</p>
- *
+ * Definition of the basic functionality that all kind of layers should implement.
+ * <br>
+ * This kind of layers store their data, are drawable, projectable (with a projection), can be a node of a tree of layers, and
+ * could be editable and have a cache with previous draws. They also can be visible or not, and active or not.
+ * <br>
+ * A layer can also store information about errors produced working with it, and have a name (kind of layer) and
+ * a brief summary explaining what's for.
+ * <br>
+ * Each particular implementation can add new properties, and limit or expand the functionality.</p
+ * <br>
  * @see Projected
  */
 public interface FLayer extends Projected, Persistent, Metadata, Disposable, ExtendedPropertiesSupport
@@ -73,34 +73,6 @@
 	public static final String METADATA_CRS = DataStore.METADATA_CRS;
 	public static final String METADATA_NAME = "name";
 
-
-//	/**
-//	 * <p>Returns an entity that represents this layer.</p>
-//	 *
-//	 * <p>This XML entity has elements that represent and store information about this layer.</p>
-//	 *
-//	 * @return an XML entity with information of this layer
-//	 * @throws XMLException if there is an error obtaining the object.
-//	 *
-//	 * @see #setXMLEntity(XMLEntity)
-//	 * @see #setXMLEntity03(XMLEntity)
-//	 */
-//	XMLEntity getXMLEntity() throws XMLException;
-//
-//	/**
-//	 * <p>Inserts information to this layer from an XML entity.</p>
-//	 *
-//	 * <p>This XML entity has elements that represent and store information about this layer.</p>
-//	 *
-//	 * @param xml an <code>XMLEntity</code> with the information
-//	 *
-//	 * @throws XMLException if there is an error setting the object.
-//	 *
-//	 * @see #getXMLEntity()
-//	 * @see #setXMLEntity03(XMLEntity)
-//	 */
-//	void setXMLEntity(XMLEntity xml) throws XMLException;
-
 	/**
 	 * <p>Changes the status of this layer to active or inactive.</p>
 	 * <p>One layer is active if is selected in TOC.</p>
@@ -143,7 +115,7 @@
 	 * <p>Executes the initialization operations of this layer. This method is invoked
 	 * only one time during the life of this layer and just before visualize it.</p>
 	 *
-	 * @throws org.gvsig.fmap.drivers.reading.DriverIOException if fails loading the layer.
+	 * @throws LoadLayerException if fails loading the layer.
 	 *
 	 * @see #reload()
 	 */
@@ -339,19 +311,8 @@
 	 * @see #getMaxScale()
 	 */
 	public void setMaxScale(double maxScale);
-	/**
-	 * <p>Changes the status of this layer to editable or not.</p>
-	 * <p>One layer is editable if user can modify its information with graphical tools.</p>
-	 *
-	 * @param b the boolean to be set
-	 *
-	 * @throws com.iver.cit.gvsig.fmap.edition.EditionException if fails enabling for edition this kind of layer.
-	 *
-	 * @see #isEditing()
-	 * @deprecated Editing status is managed internally by layer, cannot be assigned here.
-	 */
-	public void setEditing(boolean b) throws StartEditionLayerException;
-	/**
+
+        /**
 	 * <p>Returns if this layer is editable.</p>
 	 * <p>One layer is editable if user can modify its information with graphical tools.</p>
 	 *
@@ -432,7 +393,7 @@
     /**
      * Adds an error reason that describes this layer's wrong status.
      * 
-     * @param error
+     * @param exception
      *            a <code>BaseException</code> with the information of the error
      * 
      * @see #getNumErrors()
@@ -454,7 +415,7 @@
 	 * <p>Changes the status of availability of this layer.</p>
 	 * <p>One layer is available if the source of data is on-line.</p>
 	 *
-	 * @param the boolean to be set
+	 * @param available the boolean to be set
 	 *
 	 * @see #isAvailable()
 	 */
@@ -547,43 +508,54 @@
 	 */
 	Image getTocStatusImage();
 
-//	Métodos para la utilización de HyperLinks
+	/**
+	 * <p>Sets the projection to this layer.</p>
+	 *
+	 * @param proj information about the new projection
+	 *
+	 */
+	public void setProjection(IProjection proj);
+	
+	public long getDrawVersion();
 
+        public boolean isTemporary();
+        
+        public void setTemporary(boolean temporary);
+        
+        /**
+         * Do nothing.
+         * 
+         * @param b
+         * @throws org.gvsig.fmap.mapcontext.exceptions.StartEditionLayerException
+	 * @deprecated Editing status is managed internally by layer, cannot be assigned here.
+	 */
+	public void setEditing(boolean b) throws StartEditionLayerException;
+	
 	/**
-	 * Returns information about if the layer allows HyperLink or not
-	 * @return boolean true if allows Link, false if not
+         * Alwais return false
+         * @return false
+         * @deprecated see https://redmine.gvsig.net/redmine/projects/gvsig-hyperlink
 	 */
 	public boolean allowLinks();
 
 	/**
-	 * Returns an instance of AbstractLinkProperties that contains the information
-	 * of the HyperLink
-	 * @return Abstra
+         * Alwais return null.
+         * @return null
+         * @deprecated see https://redmine.gvsig.net/redmine/projects/gvsig-hyperlink
 	 */
 	public AbstractLinkProperties getLinkProperties();
 
 	/**
-	 * Provides an array with URIs. Returns one URI by geometry that includes the point
-	 * in its own geometry limits with a allowed tolerance.
-	 * @param layer, the layer
-	 * @param point, the point to check that is contained or not in the geometries in the layer
-	 * @param tolerance, the tolerance allowed. Allowed margin of error to detect if the  point
-	 * 		is contained in some geometries of the layer
-	 * @return
-	 * @throws ReadException
-	 * @throws BehaviorException
+         * alwais return null
+         * 
+         * @param point
+         * @param tolerance
+         * @return null
+         * @throws org.gvsig.fmap.dal.exception.ReadException
+         * @deprecated see https://redmine.gvsig.net/redmine/projects/gvsig-hyperlink
 	 */
 	public URI[] getLink(Point2D point, double tolerance) throws ReadException;
 
 
-	/**
-	 * <p>Inserts the projection to this layer.</p>
-	 *
-	 * @param proj information about the new projection
-	 *
-	 */
-	public void setProjection(IProjection proj);
-	
-	public long getDrawVersion();
-	
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLayers.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLayers.java	(revision 41852)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLayers.java	(revision 41853)
@@ -765,7 +765,16 @@
 		super.saveToState(state);
 		
 		state.set("mapContext", fmap);
-		state.set("layers", layers);
+                
+                List layersToSave = new ArrayList();
+		Iterator iter = this.layers.iterator();
+		while (iter.hasNext()) {
+			FLayer layer = (FLayer) iter.next();
+                        if( !layer.isTemporary() ) {
+                            layersToSave.add(layer); 
+                        }
+		}                
+		state.set("layers", layersToSave);
 	}
 
 	public void loadFromState(PersistentState state) throws PersistenceException {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLayerStatus.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLayerStatus.java	(revision 41852)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLayerStatus.java	(revision 41853)
@@ -106,11 +106,11 @@
 	 */
 	public boolean cacheDrawnLayers;
 
-	
+	private boolean temporal = false;
 	/**
 	 * <p>List with the information of the driver errors produced working this layer.</p>
 	 */
-	private ArrayList layerErrors;
+	private List layerErrors;
 		
 	/**
 	 * <p>This state reports if the driver for managing the layer has been loaded successfully.</p>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/ViewManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/ViewManager.java	(revision 41852)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/ViewManager.java	(revision 41853)
@@ -247,7 +247,9 @@
 	   	IconThemeHelper.registerIcon("layer", "layer-icon-postgresql", ViewManager.class);
 	   	IconThemeHelper.registerIcon("layer", "layer-icon-mysql", ViewManager.class);
 	   	IconThemeHelper.registerIcon("layer", "layer-icon-jdbc", ViewManager.class);
-	   	IconThemeHelper.registerIcon("layer", "layer-icon-unavailable", ViewManager.class);
+	   	//IconThemeHelper.registerIcon("layer", "layer-icon-unavailable", ViewManager.class);
+	   	IconThemeHelper.registerIcon("layer", "layer-chk-unavailable", ViewManager.class);
+	   	IconThemeHelper.registerIcon("layer", "layer-chk-temporary", ViewManager.class);
 
 	   	IconThemeHelper.registerIcon("legend", "legend-overview-single-symbol", ViewManager.class);
 	   	IconThemeHelper.registerIcon("legend", "legend-overview-vectorial-interval", ViewManager.class);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/toc/TocItemBranch.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/toc/TocItemBranch.java	(revision 41852)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/toc/TocItemBranch.java	(revision 41853)
@@ -58,7 +58,9 @@
 	private ImageIcon finalIcon = null;
 
 	private BufferedImage unavailableImg = null;
-
+        
+	private BufferedImage temporaryLayerImg = null;
+        
 	private final String defaultIcon = "images/icolayer.PNG";
 
 	private boolean isAvailable = true;
@@ -118,45 +120,33 @@
 
 	}
 	private void updateStateIcon() {
-		if (icolayer == null) return;
-		if (lyr.getTocStatusImage() != null)
-		{
-			BufferedImage newImage = new BufferedImage(icolayer.getIconWidth(),icolayer.getIconHeight(),BufferedImage.TYPE_INT_ARGB);
-			Graphics2D grp = newImage.createGraphics();
-			grp.drawImage(icolayer.getImage(),0,0,null);
+		if (icolayer == null) {
+                    return;
+                }
+        	BufferedImage newImage = new BufferedImage(icolayer.getIconWidth(),icolayer.getIconHeight(),BufferedImage.TYPE_INT_ARGB);
+                Graphics2D grp = newImage.createGraphics();
+                grp.drawImage(icolayer.getImage(),0,0,null);
+		if (lyr.getTocStatusImage() != null) {
 			Image img = lyr.getTocStatusImage();
-			grp.drawImage(
-					img,
-					0,
-					icolayer.getIconHeight() -img.getHeight(null),
-					null
-			);
-			this.finalIcon = new ImageIcon(newImage);
+			grp.drawImage(img,0,icolayer.getIconHeight()-img.getHeight(null),null);
 		}
-		if (this.lyr.isAvailable() != this.isAvailable || finalIcon==null) {
+
+                if (this.lyr.isAvailable() != this.isAvailable ) {
 			if (!this.lyr.isAvailable()) {
-				BufferedImage newImage = new BufferedImage(icolayer.getIconWidth(),icolayer.getIconHeight(),BufferedImage.TYPE_INT_ARGB);
-				Graphics2D grp = newImage.createGraphics();
-				grp.drawImage(icolayer.getImage(),0,0,null);
-				/*grp.setComposite(AlphaComposite.getInstance(
-				 AlphaComposite.SRC_OVER, (float) 1));*/
 				BufferedImage img = this.getUnavailableImage();
-				grp.drawImage(
-						img,
-						0,
-						icolayer.getIconHeight() -img.getHeight(),
-						null
-				);
-				this.finalIcon = new ImageIcon(newImage);
-
-			} else {
-				this.finalIcon = new ImageIcon(icolayer.getImage());
+				grp.drawImage(img,0,icolayer.getIconHeight()-img.getHeight(),null);
 			}
 			this.isAvailable =(this.lyr.isAvailable());
 		}
+                
+                if( this.lyr.isTemporary() ) {
+                        BufferedImage img = this.getTemporaryLayerImage();
+                        grp.drawImage(img,icolayer.getIconWidth()-img.getWidth(),icolayer.getIconHeight()-img.getHeight(),null);
+                }
+                
+		this.finalIcon = new ImageIcon(newImage);
+        }
 
-	}
-
 	private void setIcon(ImageIcon icon) {
 		if (icon!=null) {
 			icolayer = icon;
@@ -210,7 +200,7 @@
 
 	private BufferedImage getUnavailableImage() {
 		if (this.unavailableImg == null) {
-			ImageIcon uIcon = IconThemeHelper.getImageIcon("layer-icon-unavailable");
+			ImageIcon uIcon = IconThemeHelper.getImageIcon("layer-chk-unavailable");
 			if (uIcon != null) {
 				this.unavailableImg = new BufferedImage(uIcon.getIconWidth(), uIcon.getIconHeight(), BufferedImage.TYPE_INT_RGB);
 				this.unavailableImg.getGraphics().drawImage(uIcon.getImage(), 0, 0, null);
@@ -218,6 +208,17 @@
 		}
 		return this.unavailableImg;
 	}
+        
+	private BufferedImage getTemporaryLayerImage() {
+		if (this.temporaryLayerImg == null) {
+			ImageIcon uIcon = IconThemeHelper.getImageIcon("layer-chk-temporary");
+			if (uIcon != null) {
+				this.temporaryLayerImg = new BufferedImage(uIcon.getIconWidth(), uIcon.getIconHeight(), BufferedImage.TYPE_INT_RGB);
+				this.temporaryLayerImg.getGraphics().drawImage(uIcon.getImage(), 0, 0, null);
+			}
+		}
+		return this.temporaryLayerImg;
+	}
 
 	public IContextMenuAction getDoubleClickAction() {
 		// TODO
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/images/layer/layer-chk-temporary.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/images/layer/layer-chk-temporary.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/images/layer/layer-chk-unavailable.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/images/layer/layer-chk-unavailable.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

