Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Docs/EULA.txt
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Docs/EULA.txt	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Docs/EULA.txt	(revision 2769)
@@ -0,0 +1,27 @@
+This end-user license agreement applies to the following software;
+
+The Netron Diagramming Library
+Cobalt.IDE
+Xeon webserver
+Neon UI Library
+
+Copyright (C) 2007, Francois M.Vanderseypen, The Netron Project & The Orbifold
+
+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, MA  02110-1301, USA
+
+
+http://www.fsf.org/licensing/licenses/gpl.html
+
+http://www.fsf.org/licensing/licenses/gpl-faq.html
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Binary/BinaryAmbiance.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Binary/BinaryAmbiance.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Binary/BinaryAmbiance.cs	(revision 2769)
@@ -0,0 +1,417 @@
+using System;
+using System.Drawing.Drawing2D;
+using System.Drawing;
+using System.Runtime.Serialization;
+namespace Netron.GraphLib.IO.Binary
+{
+	/// <summary>
+	/// Collects ambient properties of the GraphControl
+	/// </summary>
+	[Serializable] public class BinaryAmbiance : ISerializable
+	{
+
+		#region Fields
+
+		/// <summary>
+		/// the Locked setting
+		/// </summary>
+		private bool mLocked;
+		/// <summary>
+		/// the ShowGrid setting
+		/// </summary>
+		private bool mShowGrid;
+		/// <summary>
+		/// the bottom gradient
+		/// </summary>
+		private Color mGradientBottom;
+		/// <summary>
+		/// the top gradient
+		/// </summary>
+		private Color mGradientTop;
+		/// <summary>
+		/// the AllowAddConnection property
+		/// </summary>
+		private bool mAllowAddConnection;
+		/// <summary>
+		/// the AllowAddShape property
+		/// </summary>
+		private bool mAllowAddShape;
+		/// <summary>
+		/// the AllowDeleteShape property
+		/// </summary>
+		private bool mAllowDeleteShape;
+		/// <summary>
+		/// the AllowMoveShape property
+		/// </summary>
+		private bool mAllowMoveShape;
+		/// <summary>
+		/// the AutomataPulse property
+		/// </summary>
+		private int mAutomataPulse;
+		/// <summary>
+		/// the BackgroundColor property
+		/// </summary>
+		private Color mBackgroundColor;
+		/// <summary>
+		/// the BackgroundImagePath property
+		/// </summary>
+		private string mBackgroundImagePath;
+		/// <summary>
+		/// the BackgroundType property
+		/// </summary>
+		private CanvasBackgroundType mBackgroundType;
+		/// <summary>
+		/// the DefaultConnectionPath property
+		/// </summary>
+		private string mDefaultConnectionPath;
+		/// <summary>
+		/// the GradientMode property
+		/// </summary>
+		private LinearGradientMode mGradientMode;
+		/// <summary>
+		/// the EnableContextMenu property
+		/// </summary>
+		private bool mEnableContextMenu;
+		/// <summary>
+		/// the GridSize property
+		/// </summary>
+		private int mGridSize;
+		/// <summary>
+		/// the RestrictToCanvas property
+		/// </summary>
+		private bool mRestrictToCanvas;
+		/// <summary>
+		/// the Snap property
+		/// </summary>
+		private bool mSnap;		
+		/// <summary>
+		/// the DefaultConnectionEnd property
+		/// </summary>
+		private ConnectionEnd mDefaultConnectionEnd ;
+		/// <summary>
+		/// the mEnableLayout property
+		/// </summary>
+		private bool mEnableLayout;
+		/// <summary>
+		/// the GraphLayoutAlgorithm property
+		/// </summary>
+		private  GraphLayoutAlgorithms mGraphLayoutAlgorithm;		
+		/// <summary>
+		/// the EnableTooltip property
+		/// </summary>
+		private bool mEnableTooltip;
+		/// <summary>
+		/// the ShowAutomataController property
+		/// </summary>
+		private bool mShowAutomataController;
+		#endregion
+		
+		#region Properties
+		/// <summary>
+		/// Gets or sets whether the internal dataflow is runnning
+		/// </summary>
+		public bool ShowAutomataController
+		{
+			get{return mShowAutomataController;}			
+			set{mShowAutomataController = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the EnableTooltip property of the GraphControl
+		/// </summary>
+		public bool EnableTooltip
+		{
+			get{return mEnableTooltip;}
+			set{mEnableTooltip = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the Locked property of the GraphControl
+		/// </summary>
+		public bool Locked
+		{
+			get{return mLocked;}
+			set{mLocked = value;}
+		}
+		/// <summary>
+		/// Gets or sets the GraphLayoutAlgorithm property of the GraphControl
+		/// </summary>
+		public  GraphLayoutAlgorithms GraphLayoutAlgorithm
+		{
+			get{return mGraphLayoutAlgorithm;}
+			set{mGraphLayoutAlgorithm = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the EnableLayout property of the GraphControl
+		/// </summary>
+		public bool EnableLayout
+		{
+			get{return mEnableLayout ;}
+			set{mEnableLayout = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the DefaultConnectionEnd property of the GraphControl
+		/// </summary>
+		public ConnectionEnd DefaultConnectionEnd
+		{
+			get{return mDefaultConnectionEnd ;}
+			set{mDefaultConnectionEnd = value;}
+		}
+
+	
+		/// <summary>
+		/// Gets or sets the Snap property of the GraphControl
+		/// </summary>
+		public bool Snap
+		{
+			get{return mSnap ;}
+			set{mSnap = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the RestrictToCanvas property of the GraphControl
+		/// </summary>
+		public bool RestrictToCanvas
+		{
+			get{return mRestrictToCanvas ;}
+			set{mRestrictToCanvas = value;}
+		}
+		/// <summary>
+		/// Gets or sets the GridSize property of the GraphControl
+		/// </summary>
+		public int GridSize
+		{
+			get{return mGridSize ;}
+			set{mGridSize = value;}
+		}
+		/// <summary>
+		/// Gets or sets the GradientMode property of the GraphControl
+		/// </summary>
+		public LinearGradientMode GradientMode
+		{
+			get{return mGradientMode ;}
+			set{mGradientMode = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the EnableContextMenu property of the GraphControl
+		/// </summary>
+		public bool EnableContextMenu
+		{
+			get{return mEnableContextMenu ;}
+			set{mEnableContextMenu = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the DefaultConnectionPath property of the GraphControl
+		/// </summary>
+		public string DefaultConnectionPath
+		{
+			get{return mDefaultConnectionPath;}
+			set{mDefaultConnectionPath = value;}
+		}
+		/// <summary>
+		/// Gets or sets the BackgroundType property of the GraphControl
+		/// </summary>
+		public CanvasBackgroundType BackgroundType
+		{
+			get{return mBackgroundType;}
+			set{mBackgroundType = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the BackgroundImagePath property of the GraphControl
+		/// </summary>
+		public string BackgroundImagePath
+		{
+			get{return mBackgroundImagePath;}
+			set{mBackgroundImagePath = value;}
+		}
+		/// <summary>
+		/// Gets or sets the BackgroundColor property of the GraphControl
+		/// </summary>
+		public Color BackgroundColor
+		{
+			get{return mBackgroundColor;}
+			set{mBackgroundColor = value;}
+		}
+		/// <summary>
+		/// Gets or sets the AutomataPulse property
+		/// </summary>
+		public int AutomataPulse
+		{
+			get{return mAutomataPulse;}
+			set{mAutomataPulse = value;}
+		}
+		/// <summary>
+		/// Gets or sets the AllowAddShape property of the GraphControl
+		/// </summary>
+		public bool AllowMoveShape
+		{
+			get{return mAllowMoveShape;}
+			set{mAllowMoveShape = value;}		
+		}
+		/// <summary>
+		/// Gets or sets the AllowAddShape property of the GraphControl
+		/// </summary>
+		public bool AllowDeleteShape
+		{
+			get{return mAllowDeleteShape;}
+			set{mAllowDeleteShape = value;}		
+		}
+
+		/// <summary>
+		/// Gets or sets the AllowAddShape property of the GraphControl
+		/// </summary>
+		public bool AllowAddShape
+		{
+			get{return mAllowAddShape;}
+			set{mAllowAddShape = value;}		
+		}
+
+		/// <summary>
+		/// Gets or sets the AllowAddConnection property of the GraphControl
+		/// </summary>
+		public bool AllowAddConnection
+		{
+			get{return mAllowAddConnection;}
+			set{mAllowAddConnection = value;}		
+		}
+
+		/// <summary>
+		/// Gets or sets the gradient top-color
+		/// </summary>
+		public Color GradientTop
+		{
+			get{return mGradientTop;}
+			set{mGradientTop = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the gradient bottom-color
+		/// </summary>
+		public Color GradientBottom
+		{
+			get{return mGradientBottom;}
+			set{mGradientBottom = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the ShowGrid setting
+		/// </summary>
+		public bool ShowGrid
+		{
+			get{return mShowGrid;}
+			set{mShowGrid = value;}
+		}
+		#endregion
+
+		#region Constructor
+		/// <summary>
+		/// Constructor
+		/// </summary>
+		public BinaryAmbiance()
+		{
+			
+		}
+		/// <summary>
+		/// Deserialization constructor
+		/// </summary>
+		/// <param name="info"></param>
+		/// <param name="context"></param>
+		protected BinaryAmbiance(SerializationInfo info, StreamingContext context) 
+		{
+		
+		
+			#region Incremental serialization fix; delete try-catch when properly saved with all members
+			try
+			{				
+				 mLocked = info.GetBoolean("mLocked");
+			}
+			catch
+			{
+				this.mLocked = false;
+			}
+
+			try
+			{
+				mEnableTooltip = info.GetBoolean("mEnableTooltip");
+			}
+			catch
+			{
+				mEnableTooltip = true;
+			}
+
+			try
+			{
+			mShowAutomataController = info.GetBoolean("mShowAutomataController");
+			}
+			catch
+			{
+				mShowAutomataController = false;
+			}
+			#endregion
+				mShowGrid = info.GetBoolean("mShowGrid");
+				mGradientBottom = (Color) info.GetValue("mGradientBottom", typeof(Color));
+				mGradientTop = (Color) info.GetValue("mGradientTop", typeof(Color));
+				mAllowAddConnection = info.GetBoolean("mAllowAddConnection");
+				mAllowAddShape = info.GetBoolean("mAllowAddShape");
+				mAllowDeleteShape = info.GetBoolean("mAllowDeleteShape");
+				mAllowMoveShape = info.GetBoolean("mAllowMoveShape");
+				mAutomataPulse = info.GetInt32("mAutomataPulse");
+				mBackgroundColor = (Color) info.GetValue("mBackgroundColor", typeof(Color));
+				mBackgroundImagePath = info.GetString("mBackgroundImagePath");
+				mBackgroundType = (CanvasBackgroundType) info.GetValue("mBackgroundType", typeof(CanvasBackgroundType));
+				mDefaultConnectionPath = info.GetString("mDefaultConnectionPath");
+				mGradientMode =(LinearGradientMode)  info.GetValue("mGradientMode", typeof(LinearGradientMode));
+				mEnableContextMenu = info.GetBoolean("mEnableContextMenu");
+				mGridSize = info.GetInt32("mGridSize");
+				mRestrictToCanvas = info.GetBoolean("mRestrictToCanvas");
+				mSnap = info.GetBoolean("mSnap");
+				mDefaultConnectionEnd  = (ConnectionEnd) info.GetValue("mDefaultConnectionEnd", typeof(ConnectionEnd));
+				mEnableLayout = info.GetBoolean("mEnableLayout");
+				mGraphLayoutAlgorithm = (GraphLayoutAlgorithms) info.GetValue("mGraphLayoutAlgorithm", typeof(GraphLayoutAlgorithms));
+				
+			
+		}
+		#endregion
+
+		#region ISerializable Members
+
+		/// <summary>
+		/// Serialization of this class
+		/// </summary>
+		/// <param name="info"></param>
+		/// <param name="context"></param>
+		public void GetObjectData(SerializationInfo info, StreamingContext context)
+		{
+				info.AddValue("mLocked",  mLocked);
+				info.AddValue("mShowGrid",  mShowGrid);
+				info.AddValue("mGradientBottom",  mGradientBottom);
+				info.AddValue("mGradientTop",  mGradientTop);
+				info.AddValue("mAllowAddConnection",  mAllowAddConnection);
+				info.AddValue("mAllowAddShape",  mAllowAddShape);
+				info.AddValue("mAllowDeleteShape",  mAllowDeleteShape);
+				info.AddValue("mAllowMoveShape",  mAllowMoveShape);
+				info.AddValue("mAutomataPulse",  mAutomataPulse);
+				info.AddValue("mBackgroundColor",  mBackgroundColor);
+				info.AddValue("mBackgroundImagePath",  mBackgroundImagePath);
+				info.AddValue("mBackgroundType",  mBackgroundType);
+				info.AddValue("mDefaultConnectionPath",  mDefaultConnectionPath);
+				info.AddValue("mGradientMode",  mGradientMode);
+				info.AddValue("mEnableContextMenu",  mEnableContextMenu);
+				info.AddValue("mGridSize",  mGridSize);
+				info.AddValue("mRestrictToCanvas",  mRestrictToCanvas);
+				info.AddValue("mSnap",  mSnap);
+				info.AddValue("mDefaultConnectionEnd",  mDefaultConnectionEnd);
+				info.AddValue("mEnableLayout",  mEnableLayout);
+				info.AddValue("mGraphLayoutAlgorithm",  mGraphLayoutAlgorithm);
+				info.AddValue("mEnableTooltip", mEnableTooltip);
+				info.AddValue("mShowAutomataController", mShowAutomataController);
+		}
+
+		#endregion
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Binary/BinaryCapsule.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Binary/BinaryCapsule.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Binary/BinaryCapsule.cs	(revision 2769)
@@ -0,0 +1,102 @@
+using System;
+using System.Diagnostics;
+using System.Drawing;
+using System.Runtime.Serialization;
+namespace Netron.GraphLib.IO.Binary
+{
+	/// <summary>
+	/// Encapsulates the GraphAbstract and additional ambient properties of the GraphControl
+	/// for binary (de)serialization.
+	/// </summary>
+	[Serializable] class BinaryCapsule : ISerializable
+	{
+		#region Fields
+		/// <summary>
+		/// the actual diagram
+		/// </summary>
+		private GraphAbstract mGraphAbstract;
+		/// <summary>
+		/// the ambiant properties
+		/// </summary>
+		private BinaryAmbiance mBinaryAmbiance;
+		/// <summary>
+		/// the thumbnail
+		/// </summary>
+		private Image mThumbnail;
+		#endregion
+
+		#region Properties
+
+		/// <summary>
+		/// Gets or sets the thumbnail of the diagram
+		/// </summary>
+		public Image Thumbnail
+		{
+			get{return mThumbnail;}
+			set{mThumbnail = value;}
+		}
+		/// <summary>
+		/// Gets or sets the GraphAbstract
+		/// </summary>
+		public GraphAbstract Abstract
+		{
+			get{return mGraphAbstract;}
+			set{mGraphAbstract = value;}
+		}
+		/// <summary>
+		/// Gets or sets the ambiance properties
+		/// </summary>
+		public BinaryAmbiance Ambiance
+		{
+			get{return mBinaryAmbiance;}
+			set{mBinaryAmbiance = value;}
+		}
+		#endregion
+
+		#region Constructor
+		/// <summary>
+		/// Default Constructor
+		/// </summary>
+		public BinaryCapsule()
+		{
+			
+		}
+		protected  BinaryCapsule(SerializationInfo info, StreamingContext context) 
+		{
+			try
+			{
+				this.mBinaryAmbiance = info.GetValue("mBinaryAmbiance", typeof(BinaryAmbiance)) as BinaryAmbiance;
+			}
+			catch(Exception exc)
+			{
+				Trace.WriteLine(exc.Message, "BinaryCapsule.DeserializationConstructor");
+				//trying to recover the old binaries
+				this.mBinaryAmbiance = info.GetValue("mBinaryAmbience", typeof(BinaryAmbiance)) as BinaryAmbiance;
+			}
+			this.mGraphAbstract = info.GetValue("mGraphAbstract", typeof(GraphAbstract)) as GraphAbstract;
+			this.mThumbnail = info.GetValue("mThumbnail", typeof(Image)) as Image;
+		}
+		/// <summary>
+		/// Constructor
+		/// </summary>
+		/// <param name="graphAbstract"></param>
+		/// <param name="ambiance"></param>
+		public BinaryCapsule(GraphAbstract graphAbstract, BinaryAmbiance ambiance)
+		{
+			this.mGraphAbstract = graphAbstract;
+			this.mBinaryAmbiance = ambiance;
+		}
+		#endregion
+
+
+
+		public void GetObjectData(SerializationInfo info, StreamingContext context)
+		{
+			info.AddValue("mGraphAbstract",this.mGraphAbstract);
+			info.AddValue("mBinaryAmbiance", this.mBinaryAmbiance);
+			info.AddValue("mThumbnail", this.mThumbnail);
+
+		}
+
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/HTML/HTMLExporter.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/HTML/HTMLExporter.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/HTML/HTMLExporter.cs	(revision 2769)
@@ -0,0 +1,154 @@
+using System;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.IO;
+using System.Text;
+using Netron.GraphLib.UI;
+using System.Reflection;
+namespace Netron.GraphLib.IO.HTML
+{
+	/// <summary>
+	/// Exports a diagram to HTML
+	/// includes the diagram as an image with an
+	/// imagemap if there are URL's included on shapes.
+	/// </summary>
+	public class HTMLExporter
+	{
+
+		/// <summary>
+		/// the graph control
+		/// </summary>
+		private GraphControl mSite;
+
+		/// <summary>
+		/// Default constructor
+		/// </summary>
+		/// <param name="site"></param>
+		public HTMLExporter(GraphControl site)
+		{
+			mSite = site;
+		}
+
+
+		/// <summary>
+		/// Creates the necessary files and directories for the export
+		/// </summary>
+		/// <param name="filePath"></param>
+		private void CreateDirAndFiles(string filePath)
+		{
+			if(!Directory.Exists(Path.GetDirectoryName(filePath)))
+			{
+				Directory.CreateDirectory(Path.GetDirectoryName(filePath));
+			}
+			if(!Directory.Exists(Path.GetDirectoryName(filePath) + "\\images"))
+			{
+				Directory.CreateDirectory(Path.GetDirectoryName(filePath) + "\\images");
+			}
+			Stream stream=Assembly.GetExecutingAssembly().GetManifestResourceStream("Netron.GraphLib.Resources.Stripes.gif");
+			Bitmap bmp= Bitmap.FromStream(stream) as Bitmap;
+			bmp.Save(Path.GetDirectoryName(filePath) + "\\images\\Stripes.gif",ImageFormat.Gif);
+			stream.Close();
+			stream=null;
+/*
+			Stream stream=Assembly.GetExecutingAssembly().GetManifestResourceStream("Netron.GraphLib.Resources.GradLeft.jpg");
+			Bitmap bmp= Bitmap.FromStream(stream) as Bitmap;
+			bmp.Save(Path.GetDirectoryName(filePath) + "\\images\\GradLeft.jpg",ImageFormat.Jpeg);
+			stream.Close();
+			stream=null;
+
+			stream=Assembly.GetExecutingAssembly().GetManifestResourceStream("Netron.GraphLib.Resources.GradTop.jpg");
+			bmp= Bitmap.FromStream(stream) as Bitmap;
+			bmp.Save(Path.GetDirectoryName(filePath) + "\\images\\GradTop.jpg",ImageFormat.Jpeg);
+			stream.Close();
+			stream=null;
+*/
+		}
+
+		/// <summary>
+		/// Creates the image-map for the clickable areas related to the URL on the shapes
+		/// </summary>
+		/// <returns></returns>
+		private string GetURLMap()
+		{
+			StringBuilder sb = new StringBuilder();
+			string template = @"<area shape=""rect"" coords=""{0},{1},{2},{3}"" href=""{4}"" target=""_blank"" title=""{4}"" >";
+			foreach(Shape sh in mSite.Abstract.Shapes)
+			{
+				if(sh.URL!=string.Empty)
+				{
+					sb.AppendFormat(template,Convert.ToInt32(sh.Rectangle.Right-16),Convert.ToInt32(sh.Rectangle.Bottom-16),Convert.ToInt32(sh.Rectangle.Right), Convert.ToInt32(sh.Rectangle.Bottom),sh.URL);
+				}
+			}
+			return sb.ToString();
+		}
+
+		/// <summary>
+		/// Saves an HTML version of the diagram to the given file
+		/// </summary>
+		/// <param name="filePath">a path</param>
+		public void SaveAs(string filePath)
+		{
+			CreateDirAndFiles(filePath);
+
+			StreamWriter sw = null;
+			try
+			{
+				GraphInformation info = mSite.Abstract.GraphInformation;
+				Stream stream=Assembly.GetExecutingAssembly().GetManifestResourceStream("Netron.GraphLib.Resources.DefaultHTML.htm");
+				StreamReader reader = new StreamReader(stream,System.Text.Encoding.ASCII);
+				string template = reader.ReadToEnd();
+				
+				stream.Close();
+				
+				stream=null;
+
+				sw = new StreamWriter(filePath);
+
+				if(info.Title==string.Empty)
+					template = template.Replace("$title$", "A Netron diagram");
+				else
+					template = template.Replace("$title$",info.Title);
+
+				if(info.Description==string.Empty)
+					template = template.Replace("$description$","Not set");
+				else
+					template = template.Replace("$description$",info.Description);
+				
+				if(info.Author==string.Empty)
+					template = template.Replace("$author$", "Not set");
+				else
+					template = template.Replace("$author$",info.Author);
+
+				if(info.Subject==string.Empty)
+					template = template.Replace("$subject$", "Not set");
+				else
+					template = template.Replace("$subject$",info.Subject);
+				
+				template = template.Replace("$creationdate$",info.CreationDate);
+				
+				if(mSite.FileName==string.Empty)
+					template = template.Replace("$filepath$", "Unsaved diagram");
+				else
+					template = template.Replace("$filepath$",mSite.FileName);
+
+				string imagename = Path.ChangeExtension(Path.GetFileName(filePath),"jpg");
+
+				mSite.SaveImage(Path.GetDirectoryName(filePath) + "\\images\\" + imagename, true);
+
+
+				template = template.Replace("$imagepath$","images\\" + imagename);
+
+				template = template.Replace("$urlmap$",GetURLMap());
+				
+
+				sw.Write(template);
+				sw.Close();
+			}
+			catch(Exception exc)
+			{
+				mSite.OutputInfo(exc.Message,OutputInfoLevels.Exception);
+				if(sw!=null) sw.Close();
+			}
+		}
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/DataCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/DataCollection.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/DataCollection.cs	(revision 2769)
@@ -0,0 +1,93 @@
+using System;
+
+namespace Netron.GraphLib.IO.NML
+{
+	/// <summary>
+	/// Generic Collection of NML related data
+	/// </summary>
+	public class DataCollection : System.Collections.CollectionBase 
+	{
+            
+		
+		#region Constructor
+		/// <summary>
+		/// Default constructor
+		/// </summary>
+		public DataCollection() 
+		{
+		}
+        
+		#endregion
+		
+		#region Methods
+		/// <summary>
+		/// Integer indexer
+		/// </summary>
+		public virtual object this[int index] 
+		{
+			get 
+			{
+				return this.List[index];
+			}
+			set 
+			{
+				this.List[index] = value;
+			}
+		}
+            
+		
+		/// <summary>
+		/// Adds an item to the collection
+		/// </summary>
+		/// <param name="o"></param>
+		public virtual void Add(object o) 
+		{
+			this.List.Add(o);
+		}
+            
+		/// <summary>
+		/// Returns whether the given object is in the collection
+		/// </summary>
+		/// <param name="o"></param>
+		/// <returns></returns>
+		public virtual bool Contains(object o) 
+		{
+			return this.List.Contains(o);
+		}
+            
+		/// <summary>
+		/// Remove an item from the collection
+		/// </summary>
+		/// <param name="o"></param>		
+		public virtual void Remove(object o) 
+		{
+			this.List.Remove(o);
+		}
+		
+		/// <summary>
+		/// Overrides the default method to return
+		/// the content of the collection
+		/// </summary>
+		/// <returns></returns>
+		public override string ToString() 
+		{
+			System.IO.StringWriter sw = new System.IO.StringWriter();
+			// <foreach>
+			// This loop mimics a foreach call. See C# programming language, pg 247
+			// Here, the enumerator is seale and does not implement IDisposable
+			System.Collections.IEnumerator enumerator = this.List.GetEnumerator();
+			for (
+				; enumerator.MoveNext(); 
+				) 
+			{
+				string s = ((string)(enumerator.Current));
+				// foreach body
+				sw.Write(s);
+			}
+			// </foreach>
+			return sw.ToString();
+		}
+
+		#endregion
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/FromToCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/FromToCollection.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/FromToCollection.cs	(revision 2769)
@@ -0,0 +1,29 @@
+using System;
+using System.Collections;
+
+namespace Netron.GraphLib.IO.NML
+{
+	/// <summary>
+	/// STC of FromTo collection, related to deserailization of connections
+	/// </summary>
+	public class FromToCollection : CollectionBase
+	{		
+		/// <summary>
+		/// integer indexer
+		/// </summary>
+		public FromTo this[int index]
+		{
+			get{return (FromTo) this.InnerList[index] ;}
+		}
+
+		/// <summary>
+		/// Adds an item to the collection
+		/// </summary>
+		/// <param name="ft">a ParentChild object</param>
+		/// <returns></returns>
+		public int Add(FromTo ft)
+		{
+			return this.InnerList.Add(ft);
+		}
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/ItemCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/ItemCollection.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/ItemCollection.cs	(revision 2769)
@@ -0,0 +1,81 @@
+using System;
+
+namespace Netron.GraphLib.IO.GraphML
+{
+	/// <summary>
+	/// Summary description for ItemCollection.
+	/// </summary>
+	public class ItemCollection : System.Collections.CollectionBase 
+	{
+            
+		/// <summary />
+		/// <remarks />
+		public ItemCollection() 
+		{
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual object this[int index] 
+		{
+			get 
+			{
+				return this.List[index];
+			}
+			set 
+			{
+				this.List[index] = value;
+			}
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual void Add(object o) 
+		{
+			this.List.Add(o);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual void AddGraph(GraphType _graph) 
+		{
+			this.List.Add(_graph);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual bool ContainsGraph(GraphType _graph) 
+		{
+			return this.List.Contains(_graph);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual void RemoveGraph(GraphType _graph) 
+		{
+			this.List.Remove(_graph);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual void AddData(DataType _data) 
+		{
+			this.List.Add(_data);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual bool ContainsData(DataType _data) 
+		{
+			return this.List.Contains(_data);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual void RemoveData(DataType _data) 
+		{
+			this.List.Remove(_data);
+		}
+	}
+        
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/KeyCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/KeyCollection.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/KeyCollection.cs	(revision 2769)
@@ -0,0 +1,59 @@
+using System;
+
+namespace Netron.GraphLib.IO.GraphML
+{
+	/// <summary>
+	/// Summary description for KeyCollection.
+	/// </summary>
+	public class KeyCollection : System.Collections.CollectionBase 
+	{
+            
+		/// <summary />
+		/// <remarks />
+		public KeyCollection() 
+		{
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual object this[int index] 
+		{
+			get 
+			{
+				return this.List[index];
+			}
+			set 
+			{
+				this.List[index] = value;
+			}
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual void Add(object o) 
+		{
+			this.List.Add(o);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual void AddKeyType(KeyType o) 
+		{
+			this.List.Add(o);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual bool ContainsKeyType(KeyType o) 
+		{
+			return this.List.Contains(o);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual void RemoveKeyType(KeyType o) 
+		{
+			this.List.Remove(o);
+		}
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/TextCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/TextCollection.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/Collections/TextCollection.cs	(revision 2769)
@@ -0,0 +1,61 @@
+using System;
+
+namespace Netron.GraphLib.IO.GraphML
+{
+	/// <summary>
+	/// Summary description for TextCollection.
+	/// </summary>
+	public class Textcollection : System.Collections.CollectionBase 
+	{
+            
+		/// <summary />
+		/// <remarks />
+		public Textcollection() 
+		{
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual object this[int index] 
+		{
+			get 
+			{
+				return this.List[index];
+			}
+			set 
+			{
+				this.List[index] = value;
+			}
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual void Add(object o) 
+		{
+			this.List.Add(o);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual void AddString(string o) 
+		{
+			this.List.Add(o);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual bool ContainsString(string o) 
+		{
+			return this.List.Contains(o);
+		}
+            
+		/// <summary />
+		/// <remarks />
+		public virtual void RemoveString(string o) 
+		{
+			this.List.Remove(o);
+		}
+            
+		
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/ConnectionType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/ConnectionType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/ConnectionType.cs	(revision 2769)
@@ -0,0 +1,154 @@
+
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.NML {    
+    
+	/// <summary>
+	/// The XML wrappper of an edge or connection
+	/// </summary>
+    [XmlType(IncludeInSchema=true, TypeName="edge.type")]
+    [XmlRoot(ElementName="Connection", IsNullable=false, DataType="")]
+    public class ConnectionType {
+
+		#region Fields
+		
+		/// <summary>
+		/// the data collection
+		/// </summary>
+        private DataCollection mData = new DataCollection();
+		/// <summary>
+		/// the source
+		/// </summary>
+        private string mSource;
+		/// <summary>
+		/// the mUID
+		/// </summary>
+        private string mUID;
+		/// <summary>
+		/// the source-connector
+		/// </summary>
+        private string mSourcePort;
+		/// <summary>
+		/// the target-connector
+		/// </summary>
+        private string mTargetPort;		
+		/// <summary>
+		/// the target
+		/// </summary>
+        private string mTarget;
+		/// <summary>
+		/// the graph
+		/// </summary>
+        private GraphType mGraph;
+		
+		/// <summary>
+		/// the unique key to the shape to be instantiated
+		/// </summary>
+		private string mInstanceKey = string.Empty;
+		#endregion 
+
+		#region Properties
+
+		/// <summary>
+		/// Gets or sets which key to use to instantiate the connection
+		/// </summary>
+		[XmlElement(ElementName="InstanceKey")]
+		public string InstanceKey
+		{
+			get{return mInstanceKey;}
+			set{mInstanceKey = value;}
+		}
+	
+        /// <summary>
+        /// Gets or sets the data collection
+        /// </summary>
+        [XmlElement(ElementName="property", Type=typeof(DataType))]
+        public virtual DataCollection Data {
+            get {
+                return this.mData;
+            }
+            set {
+                this.mData = value;
+            }
+        }
+		/// <summary>
+		/// Gets or sets the graph the connection belongs to
+		/// </summary>
+        [XmlElement(ElementName="graph")]
+        public virtual GraphType Graph {
+            get {
+                return this.mGraph;
+            }
+            set {
+                this.mGraph = value;
+            }
+        }
+		/// <summary>
+		/// Gets or sets the mUID
+		/// </summary>
+        [XmlElement(ElementName="UID")]
+        public virtual string ID {
+            get {
+                return this.mUID;
+            }
+            set {
+                this.mUID = value;
+            }
+        }        
+		
+		/// <summary>
+		/// Gets or sets the source
+		/// </summary>
+        [XmlElement(ElementName="source")]
+        public virtual string Source {
+            get {
+                return this.mSource;
+            }
+            set {
+                this.mSource = value;
+            }
+        }
+		/// <summary>
+		/// Gets or sets the target
+		/// </summary>
+        [XmlElement(ElementName="target")]
+        public virtual string Target {
+            get {
+                return this.mTarget;
+            }
+            set {
+                this.mTarget = value;
+            }
+        }
+		/// <summary>
+		/// Gets or sets the source-connector
+		/// </summary>
+        [XmlElement(ElementName="sourceport")]
+        public virtual string Sourceport {
+            get {
+                return this.mSourcePort;
+            }
+            set {
+                this.mSourcePort = value;
+            }
+        }
+        /// <summary>
+        /// Gets or sets the target-connector
+        /// </summary>
+        [XmlElement(ElementName="targetport")]
+        public virtual string Targetport {
+            get {
+                return this.mTargetPort;
+            }
+            set {
+                this.mTargetPort = value;
+            }
+        }
+		#endregion  
+   
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/ConnectorType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/ConnectorType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/ConnectorType.cs	(revision 2769)
@@ -0,0 +1,63 @@
+
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.NML 
+{        
+   /// <summary>
+   /// XML wrapper of a Connector object
+   /// </summary>
+	[XmlRoot(ElementName="Connector", IsNullable=false, DataType="")]
+	public class ConnectorType 
+	{
+
+		#region Fields
+		/// <summary>
+		/// the uid
+		/// </summary>
+		private string mUID;
+		/// <summary>
+		/// the name
+		/// </summary>
+		private string name;
+		#endregion
+
+		#region Properties
+		/// <summary>
+		/// Gets or sets the UID
+		/// </summary>
+		[XmlAttribute(AttributeName="UID")]
+		public virtual string UID 
+		{
+			get 
+			{
+				return this.mUID;
+			}
+			set 
+			{
+				this.mUID = value;
+			}
+		}
+		/// <summary>
+		/// Gets or sets the name of the connector
+		/// </summary>
+		[XmlAttribute(AttributeName="Name")]
+		public virtual string Name 
+		{
+			get 
+			{
+				return this.name;
+			}
+			set 
+			{
+				this.name = value;
+			}
+		}
+
+		#endregion
+
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DataExtensionType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DataExtensionType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DataExtensionType.cs	(revision 2769)
@@ -0,0 +1,27 @@
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    namespace Netron.GraphLib.IO.GraphML {
+	/// <summary>
+	/// 
+	/// </summary>
+    [XmlType(IncludeInSchema=true, TypeName="data-extension.type")]
+    [XmlRoot(ElementName="dataextensiontype")]
+    public class DataExtensionType {
+        
+		private DataCollection _text = new DataCollection();
+        
+        [XmlText(Type=typeof(string))]
+        public virtual DataCollection Text {
+            get {
+                return this._text;
+            }
+            set {
+                this._text = value;
+            }
+        }
+        
+    
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DataType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DataType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DataType.cs	(revision 2769)
@@ -0,0 +1,100 @@
+
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+namespace Netron.GraphLib.IO.NML {    
+    
+    /// <summary>
+    /// Generic XML wrapper for any diagram data
+    /// </summary>
+    [XmlType(IncludeInSchema=false, TypeName="aaaaaaa")]
+    [XmlRoot(ElementName="property", IsNullable=false, DataType="")]
+    public class DataType {
+
+		#region Fields
+		/// <summary>
+		/// data collection
+		/// </summary>
+        private DataCollection mValue = new DataCollection();
+		/// <summary>
+		/// the key
+		/// </summary>
+        private string mName;
+		/// <summary>
+		/// the mIsCollection
+		/// </summary>
+        private bool mIsCollection;
+
+		#endregion
+
+		#region Properties
+
+		/// <summary>
+		/// Gets or sets the key of the data type
+		/// </summary>
+        [XmlAttribute(AttributeName="Name")]
+        public virtual string Name {
+            get {
+                return this.mName;
+            }
+            set {
+                this.mName = value;
+            }
+        }
+        
+        
+        /// <summary>
+        /// Gets or sets the mIsCollection
+        /// </summary>
+        [XmlAttribute(AttributeName="IsCollection")]
+        public virtual bool IsCollection {
+            get {
+                return this.mIsCollection;
+            }
+            set {
+                this.mIsCollection = value;
+            }
+        }
+        
+        
+        /// <summary>
+        /// Gets or sets the text
+        /// </summary>
+        
+		[XmlElement(ElementName="Collection", Type=typeof(DataCollection), IsNullable=false)]	
+		[XmlElement(ElementName="string", Type=typeof(string), IsNullable=false)]	
+		[XmlElement(ElementName="Data", Type=typeof(DataType), IsNullable=false)]	
+		public virtual DataCollection Value {
+            get {
+                return this.mValue;
+            }
+            set {
+                this.mValue = value;
+            }
+        }
+		#endregion        
+
+		#region Constructor
+		/// <summary>
+		/// Default constructor
+		/// </summary>
+		/// <param name="key"></param>
+		/// <param name="value"></param>
+		public DataType(string key, string value)
+		{
+			mName = key;
+			mValue.Add(value);
+		}
+		#region Constructor
+		/// <summary>
+		/// Constructor
+		/// </summary>
+		public DataType(){}
+		#endregion
+
+		#endregion
+
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DefaultType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DefaultType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DefaultType.cs	(revision 2769)
@@ -0,0 +1,36 @@
+
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.NML {    
+    
+	/// <summary>
+	/// XML wrapper for a default
+	/// </summary>
+    [XmlType(IncludeInSchema=true, TypeName="default.type")]
+    [XmlRoot(ElementName="default", IsNullable=false, DataType="")]
+    public class DefaultType {        
+        
+		/// <summary>
+		/// the text
+		/// </summary>
+        private DataCollection mText = new DataCollection();
+        /// <summary>
+        /// Gets or sets the text
+        /// </summary>
+        [XmlText(Type=typeof(string))]
+        public virtual DataCollection Text {
+            get {
+                return this.mText;
+            }
+            set {
+                this.mText = value;
+            }
+        }
+        
+
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DictionarySerializer.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DictionarySerializer.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/DictionarySerializer.cs	(revision 2769)
@@ -0,0 +1,72 @@
+using System;
+using System.Collections;
+using System.Xml;
+using System.Xml.Serialization;
+using System.IO;
+using System.Xml.Schema;
+namespace Netron.GraphLib.IO.NML
+{
+	class DictionarySerializer : IXmlSerializable
+	{
+		private IDictionary dictionary;
+
+		public DictionarySerializer()
+		{
+			this.dictionary = new Hashtable();
+		}
+
+		private DictionarySerializer(IDictionary dictionary)
+		{
+			this.dictionary = dictionary;
+		}
+
+		public static void Serialize(IDictionary dictionary, Stream stream)
+		{
+			DictionarySerializer ds = new DictionarySerializer(dictionary);
+			XmlSerializer xs = new XmlSerializer(typeof(DictionarySerializer));
+			xs.Serialize(stream, ds);
+		}
+
+		public static IDictionary Deserialize(Stream stream)
+		{
+			XmlSerializer xs = new XmlSerializer(typeof(DictionarySerializer));
+			DictionarySerializer ds = (DictionarySerializer)xs.Deserialize(stream);
+			return ds.dictionary;
+		}
+
+		XmlSchema IXmlSerializable.GetSchema()
+		{
+			return null;
+		}
+
+		void IXmlSerializable.ReadXml(XmlReader reader)
+		{
+			reader.Read();
+			reader.ReadStartElement("dictionary");
+			while (reader.NodeType != XmlNodeType.EndElement)
+			{
+				reader.ReadStartElement("item");
+				string key = reader.ReadElementString("key");
+				string value = reader.ReadElementString("value");
+				reader.ReadEndElement();
+				reader.MoveToContent();
+				dictionary.Add(key, value);
+			}
+			reader.ReadEndElement();
+		}
+
+		void IXmlSerializable.WriteXml(XmlWriter writer)
+		{
+			writer.WriteStartElement("dictionary");
+			foreach (object key in dictionary.Keys)
+			{
+				object value = dictionary[key];
+				writer.WriteStartElement("item");
+				writer.WriteElementString("key", key.ToString());
+				writer.WriteElementString("value", value.ToString());
+				writer.WriteEndElement();
+			}
+			writer.WriteEndElement();
+		}
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/EndPointType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/EndPointType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/EndPointType.cs	(revision 2769)
@@ -0,0 +1,83 @@
+
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.GraphML {    
+    
+
+    [XmlType(IncludeInSchema=true, TypeName="endpoint.type")]
+    [XmlRoot(ElementName="endpoint", IsNullable=false, DataType="")]
+    public class EndPointType {
+		
+		#region Fields
+		private string _node;
+        private string id;
+        private string _port;
+        private string _desc;
+        private EndPointTypeType _type;
+		#endregion
+
+		#region Properties
+        [XmlElement(ElementName="desc")]
+        public virtual string Desc {
+            get {
+                return this._desc;
+            }
+            set {
+                this._desc = value;
+            }
+        }
+        
+        
+        
+        [XmlAttribute(AttributeName="id")]
+        public virtual string ID {
+            get {
+                return this.id;
+            }
+            set {
+                this.id = value;
+            }
+        }
+        
+        
+        
+        [XmlAttribute(AttributeName="port")]
+        public virtual string Port {
+            get {
+                return this._port;
+            }
+            set {
+                this._port = value;
+            }
+        }
+        
+        
+        
+        [XmlAttribute(AttributeName="node")]
+        public virtual string Node {
+            get {
+                return this._node;
+            }
+            set {
+                this._node = value;
+            }
+        }
+        
+        
+        
+        [XmlAttribute(AttributeName="type")]
+        public virtual EndPointTypeType Type {
+            get {
+                return this._type;
+            }
+            set {
+                this._type = value;
+            }
+        }
+		#endregion
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/FromTo.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/FromTo.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/FromTo.cs	(revision 2769)
@@ -0,0 +1,45 @@
+using System;
+
+namespace Netron.GraphLib.IO.NML
+{
+	/// <summary>
+	/// Utility class to speed up the deserialization of connections
+	/// This struct keeps unattached connections, the connections have the UID of the From and the To connector
+	/// but the respective connectors are still null
+	/// </summary>
+	public struct FromTo
+	{
+		/// <summary>
+		/// Default ctor
+		/// </summary>		
+		public FromTo( string from, string to)
+		{
+			this.From = from;
+			this.To = to;	
+			this.Connection = null;
+		}
+		/// <summary>
+		/// constructor
+		/// </summary>
+		/// <param name="from">the UID of the From-connector</param>
+		/// <param name="to">the UID of the To-Connector</param>
+		/// <param name="con">the instantiated connection</param>
+		public FromTo(string from, string to, Connection con) : this(from,to)
+		{
+			Connection = con;
+		}
+
+		/// <summary>
+		/// Gets or sets the parent in this relation
+		/// </summary>
+		public string From;		
+		/// <summary>
+		/// Gets or sets the child in this relation
+		/// </summary>
+		public string To;
+		/// <summary>
+		/// Gets or sets the connection
+		/// </summary>
+		public Connection Connection;
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/GraphInformationType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/GraphInformationType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/GraphInformationType.cs	(revision 2769)
@@ -0,0 +1,127 @@
+using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+namespace Netron.GraphLib.IO.NML {    
+    
+    /// <summary>
+    /// Generic XML wrapper for any diagram data
+    /// </summary>
+    [XmlType(IncludeInSchema=true, TypeName="GraphInformation.type")]
+    [XmlRoot(ElementName="GraphInformation", IsNullable=false, DataType="")]
+    public class GraphInformationType {
+
+		#region Fields
+		/// <summary>
+		/// the description of the graph
+		/// </summary>
+		private string mDescription = string.Empty;
+		/// <summary>
+		/// the author of the graph
+		/// </summary>
+		private string mAuthor = string.Empty;
+		/// <summary>
+		/// the creation date of the graph
+		/// </summary>
+		private string mCreationDate = string.Empty;
+		/// <summary>
+		/// the subject of the graph
+		/// </summary>
+		private string mSubject = string.Empty;
+		/// <summary>
+		/// the title of the graph
+		/// </summary>
+		private string mTitle = string.Empty;
+
+		#endregion
+
+		#region Properties
+		/// <summary>
+		/// Gets or sets the description of the graph
+		/// </summary>
+		[XmlElement("Description",typeof(string))]
+		public string Description
+		{
+			get{return mDescription;}
+			set{mDescription = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the author of the graph
+		/// </summary>
+		[XmlElement("Author",typeof(string))]
+		public string Author
+		{
+			get{return mAuthor;}
+			set{mAuthor = value;}
+		}
+		/// <summary>
+		/// Gets or sets the creation date of the graph
+		/// </summary>
+		[XmlElement("CreationDate",typeof(string))]
+		public string CreationDate
+		{
+			get{return mCreationDate;}			
+			set{mCreationDate = value;}
+		}
+		/// <summary>
+		/// Gets or sets the subject of the graph
+		/// </summary>
+		[XmlElement("Subject",typeof(string))]
+		public string Subject
+		{
+			get{return mSubject;}
+			set{mSubject = value;}
+		}
+		/// <summary>
+		/// Gets or sets the title of the graph
+		/// </summary>
+		[XmlElement("Title",typeof(string))]
+		public string Title
+		{
+			get{return mTitle;}
+			set{mTitle = value;}
+		}
+		#endregion
+
+		#region Constructor
+		/// <summary>
+		/// Required XMLSerilization constructor
+		/// </summary>
+		public GraphInformationType(){}
+		/// <summary>
+		/// Default constructor
+		/// </summary>
+		/// <param name="info"></param>		
+		public GraphInformationType(GraphInformation info)
+		{
+			this.mAuthor = info.Author;
+			this.mCreationDate = info.CreationDate;
+			this.mDescription = info.Description;
+			this.mSubject = info.Subject;
+			this.mTitle = info.Title;			
+		}
+		
+
+		#endregion
+
+
+		/// <summary>
+		/// Returns this type as a GraphInformation object.
+		/// </summary>
+		/// <remarks>Used at deserialization</remarks>
+		/// <returns></returns>
+		public GraphInformation ToGraphInformation()
+		{
+			GraphInformation gi = new GraphInformation();
+			gi.Author = this.Author;
+			gi.CreationDate = this.mCreationDate;
+			gi.Description =this.mDescription;
+			gi.Subject = this.mSubject;
+			gi.Title = this.mTitle;
+			return gi;
+		}
+
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/GraphMLSchema1.0rc.xsd
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/GraphMLSchema1.0rc.xsd	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/GraphMLSchema1.0rc.xsd	(revision 2769)
@@ -0,0 +1,834 @@
+<?xml version="1.0"?>
+<!--======================================================-->
+<!--      end of file: graphml-structure.xsd              -->
+<!--======================================================-->
+<xs:schema targetNamespace="http://graphml.graphdrawing.org/xmlns/1.0rc" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns="http://graphml.graphdrawing.org/xmlns/1.0rc" xmlns:g="http://graphml.graphdrawing.org/xmlns/1.0rc" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink">
+	<xs:annotation>
+		<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+     The schema corresponding to this document defines the structural
+     layer of the Graph Markup Language (GraphML).
+     Although a DTD is provided, this schema is, together with its extensions
+     http://graphml.graphdrawing.org/xmlns/1.0rc/graphml-attributes.xsd
+     and
+     http://graphml.graphdrawing.org/xmlns/1.0rc/graphml-parseinfo.xsd,
+     the only normative reference.
+    </xs:documentation>
+	</xs:annotation>
+	<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd">
+		<xs:annotation>
+			<xs:documentation source="???" xml:lang="en">
+       Get access to the xlink attribute groups for the attributes
+       xlink:href and xlink:type of locator.type.
+    </xs:documentation>
+		</xs:annotation>
+	</xs:import>
+	<xs:annotation>
+		<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      The attribute groups &lt;element_name>.extra.attrib may be used
+      for adding user defined attributes to the elements
+      &lt;element_name>.
+      The attribute group common.extra.attrib may be used for adding
+      user defined attributes to all elements.
+    </xs:documentation>
+	</xs:annotation>
+	<xs:attributeGroup name="common.extra.attrib"/>
+	<xs:attributeGroup name="graphml.extra.attrib">
+		<xs:attributeGroup ref="common.extra.attrib"/>
+	</xs:attributeGroup>
+	<xs:attributeGroup name="data.extra.attrib">
+		<xs:attributeGroup ref="common.extra.attrib"/>
+	</xs:attributeGroup>
+	<xs:attributeGroup name="key.extra.attrib">
+		<xs:attributeGroup ref="common.extra.attrib"/>
+	</xs:attributeGroup>
+	<xs:attributeGroup name="default.extra.attrib">
+		<xs:attributeGroup ref="common.extra.attrib"/>
+	</xs:attributeGroup>
+	<xs:attributeGroup name="graph.extra.attrib">
+		<xs:attributeGroup ref="common.extra.attrib"/>
+	</xs:attributeGroup>
+	<xs:attributeGroup name="node.extra.attrib">
+		<xs:attributeGroup ref="common.extra.attrib"/>
+	</xs:attributeGroup>
+	<xs:attributeGroup name="edge.extra.attrib">
+		<xs:attributeGroup ref="common.extra.attrib"/>
+	</xs:attributeGroup>
+	<xs:attributeGroup name="port.extra.attrib">
+		<xs:attributeGroup ref="common.extra.attrib"/>
+	</xs:attributeGroup>
+	<xs:attributeGroup name="hyperedge.extra.attrib">
+		<xs:attributeGroup ref="common.extra.attrib"/>
+	</xs:attributeGroup>
+	<xs:attributeGroup name="endpoint.extra.attrib">
+		<xs:attributeGroup ref="common.extra.attrib"/>
+	</xs:attributeGroup>
+	<xs:attributeGroup name="locator.extra.attrib">
+		<xs:attributeGroup ref="common.extra.attrib"/>
+	</xs:attributeGroup>
+	<xs:annotation>
+		<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type definitions for the GraphML structural layer elements:
+      &lt;data>, &lt;default>, &lt;key>, &lt;graphml>, &lt;graph>, 
+      &lt;node>, &lt;port>, 
+      &lt;edge>, &lt;hyperedge>, &lt;endpoint> and &lt;locator>.
+      The names of the complex types are constructed corresponding
+      to the pattern element_name.type.
+      (The only remaining GraphML structural layer element
+      &lt;desc> is of simple type xs:string.)
+    </xs:documentation>
+	</xs:annotation>
+	<xs:complexType name="data-extension.type" mixed="true">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Extension mechanism for the content of &lt;data> and &lt;default>.
+      The complex type data-extension.type is empty per default.
+      Users may redefine this type in order to add content to 
+      the complex types data.type and default.type which are 
+      extensions of data-extension.type.
+    </xs:documentation>
+		</xs:annotation>
+	</xs:complexType>
+	<xs:complexType name="data.type" final="#all" mixed="true">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type for the &lt;data> element.
+      data.type is mixed, that is, &lt;data> may contain #PCDATA.
+      Content type: extension of data-extension.type which is empty
+                    per default.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:complexContent mixed="true">
+			<xs:extension base="data-extension.type">
+				<xs:attribute name="key" type="xs:NMTOKEN" use="required">
+					<xs:annotation>
+						<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">refers to the id attribute of a &lt;key>.
+          </xs:documentation>
+					</xs:annotation>
+				</xs:attribute>
+				<xs:attribute name="id" type="xs:NMTOKEN" use="optional">
+					<xs:annotation>
+						<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">identifies this &lt;data>.
+          </xs:documentation>
+					</xs:annotation>
+				</xs:attribute>
+				<xs:attributeGroup ref="data.extra.attrib">
+					<xs:annotation>
+						<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                 user defined extra attributes for &lt;data> elements
+          </xs:documentation>
+					</xs:annotation>
+				</xs:attributeGroup>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<xs:complexType name="default.type" final="#all" mixed="true">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type for the &lt;default> element.
+      default.type is mixed, that is, data may contain #PCDATA.
+      Content type: extension of data-extension.type which is empty
+                    per default.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:complexContent mixed="true">
+			<xs:extension base="data-extension.type">
+				<xs:attributeGroup ref="default.extra.attrib">
+					<xs:annotation>
+						<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                 user defined extra attributes for &lt;default> elements
+          </xs:documentation>
+					</xs:annotation>
+				</xs:attributeGroup>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<xs:simpleType name="key.for.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Simple type for the for attribute of &lt;key>.
+      key.for.type is a restriction of xs:NMTOKEN
+      Allowed values: all, graph, node, edge, hyperedge, port and endpoint.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:NMTOKEN">
+			<xs:enumeration value="all"/>
+			<xs:enumeration value="graph"/>
+			<xs:enumeration value="node"/>
+			<xs:enumeration value="edge"/>
+			<xs:enumeration value="hyperedge"/>
+			<xs:enumeration value="port"/>
+			<xs:enumeration value="endpoint"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<xs:complexType name="key.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type for the &lt;key> element.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element ref="desc" minOccurs="0"/>
+			<xs:element ref="default" minOccurs="0"/>
+		</xs:sequence>
+		<xs:attribute name="id" type="xs:NMTOKEN" use="required">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">identifies this &lt;key>.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="for" type="key.for.type" default="all">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                 describes the domain of definition for 
+                 the corresponding graph attribute. 
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attributeGroup ref="key.extra.attrib">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                  user defined extra attributes for &lt;key> elements.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attributeGroup>
+	</xs:complexType>
+	<xs:complexType name="graphml.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type for the &lt;graphml> element.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element ref="desc" minOccurs="0"/>
+			<xs:element ref="key" minOccurs="0" maxOccurs="unbounded"/>
+			<xs:sequence>
+				<xs:choice minOccurs="0" maxOccurs="unbounded">
+					<xs:element ref="graph"/>
+					<xs:element ref="data"/>
+				</xs:choice>
+			</xs:sequence>
+		</xs:sequence>
+		<xs:attributeGroup ref="graphml.extra.attrib">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                user defined extra attributes for &lt;graphml> elements.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attributeGroup>
+	</xs:complexType>
+	<xs:simpleType name="graph.edgedefault.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Simple type for the edgedefault attribute of &lt;graph>.
+      graph.edgedefault.type is a restriction of xs:NMTOKEN
+      Allowed values: directed, undirected.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:NMTOKEN">
+			<xs:enumeration value="directed"/>
+			<xs:enumeration value="undirected"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<xs:complexType name="graph.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type for the &lt;graph> element.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element ref="desc" minOccurs="0"/>
+			<xs:choice>
+				<xs:sequence>
+					<xs:choice minOccurs="0" maxOccurs="unbounded">
+						<xs:element ref="data"/>
+						<xs:element ref="node"/>
+						<xs:element ref="edge"/>
+						<xs:element ref="hyperedge"/>
+					</xs:choice>
+				</xs:sequence>
+				<xs:element ref="locator"/>
+			</xs:choice>
+		</xs:sequence>
+		<xs:attributeGroup ref="graph.extra.attrib">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                user defined extra attributes for &lt;graph> elements.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attributeGroup>
+		<xs:attribute name="id" type="xs:NMTOKEN">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                  identifies this graph .
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="edgedefault" type="graph.edgedefault.type" use="required">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                        describes whether edges of this graph are considered
+                        as directed or undirected per default (unless 
+                        specified by the attribute directed of &lt;edge>).
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+	</xs:complexType>
+	<xs:complexType name="node.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type for the &lt;node> element.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element ref="desc" minOccurs="0"/>
+			<xs:choice>
+				<xs:sequence>
+					<xs:choice minOccurs="0" maxOccurs="unbounded">
+						<xs:element ref="data"/>
+						<xs:element ref="port"/>
+					</xs:choice>
+					<xs:element ref="graph" minOccurs="0"/>
+				</xs:sequence>
+				<xs:element ref="locator"/>
+			</xs:choice>
+		</xs:sequence>
+		<xs:attributeGroup ref="node.extra.attrib">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                user defined extra attributes for &lt;node elements.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attributeGroup>
+		<xs:attribute name="id" type="xs:NMTOKEN" use="required">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                 identifies this node.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+	</xs:complexType>
+	<xs:complexType name="port.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type for the &lt;port> element.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element ref="desc" minOccurs="0"/>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:element ref="data"/>
+				<xs:element ref="port"/>
+			</xs:choice>
+		</xs:sequence>
+		<xs:attributeGroup ref="port.extra.attrib">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                 user defined extra attributes for &lt;port> elements.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attributeGroup>
+		<xs:attribute name="name" type="xs:NMTOKEN" use="required">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                   identifies this port, within the node it is contained in.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+	</xs:complexType>
+	<xs:complexType name="edge.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type for the &lt;edge> element.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element ref="desc" minOccurs="0"/>
+			<xs:element ref="data" minOccurs="0" maxOccurs="unbounded"/>
+			<xs:element ref="graph" minOccurs="0"/>
+		</xs:sequence>
+		<xs:attributeGroup ref="edge.extra.attrib">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                 user defined extra attributes for &lt;edge> elements.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attributeGroup>
+		<xs:attribute name="id" type="xs:NMTOKEN">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                identifies this edge .
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="directed" type="xs:boolean">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                overwrites the edgedefault attribute of &lt;graph> .
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="source" type="xs:NMTOKEN" use="required">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                  points to the id attribute of the source &lt;node>.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="target" type="xs:NMTOKEN" use="required">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                   points to the id attribute of the target &lt;node>.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="sourceport" type="xs:NMTOKEN">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                 points to the name attribute of the source &lt;port>.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="targetport" type="xs:NMTOKEN">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                    points to the name attribute of the target &lt;port>.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+	</xs:complexType>
+	<xs:complexType name="hyperedge.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type for the &lt;hyperedge> element.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element ref="desc" minOccurs="0"/>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:element ref="data"/>
+				<xs:element ref="endpoint"/>
+			</xs:choice>
+			<xs:element ref="graph" minOccurs="0"/>
+		</xs:sequence>
+		<xs:attributeGroup ref="hyperedge.extra.attrib">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+               user defined extra attributes for &lt;hyperedge> elements.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attributeGroup>
+		<xs:attribute name="id" type="xs:NMTOKEN">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                  identifies this &lt;hyperedge> .
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+	</xs:complexType>
+	<xs:simpleType name="endpoint.type.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Simple type for the type attribute of &lt;endpoint>.
+      endpoint.type.type is a restriction of xs:NMTOKEN
+      Allowed values: in, out, undir.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:NMTOKEN">
+			<xs:enumeration value="in"/>
+			<xs:enumeration value="out"/>
+			<xs:enumeration value="undir"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<xs:complexType name="endpoint.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type for the &lt;endpoint> element.
+    </xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element ref="desc" minOccurs="0"/>
+		</xs:sequence>
+		<xs:attributeGroup ref="endpoint.extra.attrib">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                 user defined extra attributes for &lt;endpoint> elements.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attributeGroup>
+		<xs:attribute name="id" type="xs:NMTOKEN">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                  identifies this &lt;endpoint> .
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="port" type="xs:NMTOKEN">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                points to the name of the port, to which this endpoint is 
+                 connected .
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="node" type="xs:NMTOKEN" use="required">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en"> 
+            points to the id of the node, to which this endpoint is connected. 
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="type" type="endpoint.type.type" default="undir">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+               defines the direction on this endpoint (undirected per default).
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+	</xs:complexType>
+	<xs:complexType name="locator.type" final="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+      Complex type for the &lt;locator> element.
+      Content type: (empty)
+    </xs:documentation>
+		</xs:annotation>
+		<xs:attributeGroup ref="locator.extra.attrib">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+               user defined extra attributes for &lt;locator> elements.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attributeGroup>
+		<xs:attribute ref="xlink:href" use="required">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+                points to the resource of this locator.
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute ref="xlink:type" fixed="simple">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+               type of the hyperlink (fixed as simple).
+          </xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+	</xs:complexType>
+	<!--========================================================-->
+	<xs:element name="desc" type="xs:string" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+           Description: Provides human-readable descriptions for the GraphML
+                        element containing this &lt;desc> as its first child.
+           Occurence:   &lt;key>, &lt;graphml>, &lt;graph>, 
+                        &lt;node>, &lt;port>, &lt;edge>, &lt;hyperedge>, and
+                        &lt;endpoint>. 
+      </xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:element name="locator" type="locator.type" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+           Description: Graphs and nodes are declared by the elements
+                        &lt;graph> and &lt;node>, respectively. The optional
+                        &lt;locator>-child of these elements point to 
+                        their definition. (If there is no &lt;locator>-child
+                        the graphs/nodes are defined by their content).
+           Occurence:   &lt;graph>, and &lt;node>. 
+      </xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:element name="data" type="data.type" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+           Description: In GraphML there may be data-functions attached
+                        to graphs, nodes, ports, edges, hyperedges and
+                        endpoint and to the whole collection of 
+                        graphs described by the content of &lt;graphml>. 
+                        These functions are declared by &lt;key> elements
+                        (children of &lt;graphml>) and defined by &lt;data>
+                        elements.
+           Occurence: &lt;graphml>, &lt;graph>, &lt;node>, &lt;port>, 
+                      &lt;edge>, &lt;hyperedge>, and &lt;endpoint>. 
+      </xs:documentation>
+		</xs:annotation>
+		<xs:unique name="data_data_key_unique">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">        
+        Ensures: uniqueness of the key attributes of &lt;data> children
+                 of this &lt;data> element.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath="./g:data"/>
+			<xs:field xpath="@key"/>
+		</xs:unique>
+	</xs:element>
+	<xs:element name="key" type="key.type" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+           Description: In GraphML there may be data-functions attached
+                        to graphs, nodes, ports, edges, hyperedges and
+                        endpoint and to the whole collection of 
+                        graphs described by the content of &lt;graphml>. 
+                        These functions are declared by &lt;key> elements
+                        (children of &lt;graphml>) and defined by &lt;data>
+                        elements.
+           Occurence: &lt;graphml>. 
+      </xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:element name="default" type="default.type" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+           Description: In GraphML there may be data-functions attached
+                        to graphs, nodes, ports, edges, hyperedges and
+                        endpoint and to the whole collection of 
+                        graphs described by the content of &lt;graphml>. 
+                        These functions are declared by &lt;key> elements
+                        (children of &lt;graphml>) and defined by &lt;data>
+                        elements.
+                        The (optional) &lt;default> child of &lt;key> gives 
+                        the default value for the corresponding function. 
+           Occurence: &lt;key>. 
+      </xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:element name="graphml" type="graphml.type" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+           Description: &lt;graphml> is the root element of each GraphML 
+                      document.
+           Occurence: root. 
+      </xs:documentation>
+		</xs:annotation>
+		<xs:unique name="graphml_data_key_unique">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: uniqueness of the key attributes of &lt;data> children
+                 of this &lt;graphml> element.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath="./g:data"/>
+			<xs:field xpath="@key"/>
+		</xs:unique>
+		<xs:key name="key_id_key">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: existence and uniqueness of the id attributes of 
+                 each &lt;key> element in this document.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath=".//g:key"/>
+			<xs:field xpath="@id"/>
+		</xs:key>
+		<xs:unique name="graph_id_unique">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: uniqueness of the id attributes of 
+                 each &lt;graph> element in this document.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath=".//g:graph"/>
+			<xs:field xpath="@id"/>
+		</xs:unique>
+		<xs:keyref name="data_key_ref" refer="key_id_key">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: for the key attribute of each &lt;data> in this document, 
+                 the existence of an id attribute of 
+                 &lt;key> which matches the value of it. 
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath=".//g:data"/>
+			<xs:field xpath="@key"/>
+		</xs:keyref>
+	</xs:element>
+	<xs:element name="graph" type="graph.type" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+          Description: Describes one graph in this document.
+          Occurence: &lt;graphml>, &lt;node>, &lt;edge>, &lt;hyperedge>.
+      </xs:documentation>
+		</xs:annotation>
+		<xs:unique name="graph_data_key_unique">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: uniqueness of the key attributes of &lt;data> children
+                 of this &lt;graph> element.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath="./g:data"/>
+			<xs:field xpath="@key"/>
+		</xs:unique>
+		<xs:key name="node_id_key">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: existence and uniqueness of the id attributes of 
+                 each &lt;node> element in this graph.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath=".//g:node"/>
+			<xs:field xpath="@id"/>
+		</xs:key>
+		<xs:unique name="edge_id_unique">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: uniqueness of the id attributes of 
+                 each &lt;edge> element in this graph.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath=".//g:edge"/>
+			<xs:field xpath="@id"/>
+		</xs:unique>
+		<xs:unique name="hyperedge_id_unique">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: uniqueness of the id attributes of 
+                 each &lt;hyperedge> element in this graph.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath=".//g:hyperedge"/>
+			<xs:field xpath="@id"/>
+		</xs:unique>
+		<xs:unique name="endpoint_id_unique">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: uniqueness of the id attributes of 
+                 each &lt;endpoint> element in this graph.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath=".//g:endpoint"/>
+			<xs:field xpath="@id"/>
+		</xs:unique>
+		<xs:keyref name="edge_source_ref" refer="node_id_key">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: for the source attribute of each &lt;edge> in this graph, 
+                 the existence of an id attribute of 
+                 &lt;node> which matches the value of it. 
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath=".//g:edge"/>
+			<xs:field xpath="@source"/>
+		</xs:keyref>
+		<xs:keyref name="edge_target_ref" refer="node_id_key">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: for the target attribute of each &lt;edge> in this graph, 
+                 the existence of an id attribute of 
+                 &lt;node> which matches the value of it. 
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath=".//g:edge"/>
+			<xs:field xpath="@target"/>
+		</xs:keyref>
+		<xs:keyref name="endpoint_node_ref" refer="node_id_key">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: for the node attribute of each &lt;endpoint> in this graph,
+                 the existence of an id attribute of 
+                 &lt;node> which matches the value of it. 
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath=".//g:endpoint"/>
+			<xs:field xpath="@node"/>
+		</xs:keyref>
+	</xs:element>
+	<xs:element name="node" type="node.type" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+           Description: Describes one node in the &lt;graph>
+                        containing this &lt;node>.
+           Occurence: &lt;graph>. 
+      </xs:documentation>
+		</xs:annotation>
+		<xs:key name="port_name_key">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: existence and uniqueness of the name attributes of 
+                 each &lt;port> element within this &lt;node>.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath=".//g:port"/>
+			<xs:field xpath="@name"/>
+		</xs:key>
+		<xs:unique name="node_data_key_unique">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: uniqueness of the key attributes of &lt;data> children
+                 of this &lt;node> element.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath="./g:data"/>
+			<xs:field xpath="@key"/>
+		</xs:unique>
+	</xs:element>
+	<xs:element name="port" type="port.type" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+           Description: Nodes may be structured by ports; thus edges
+                        are not only attached to a node but to a certain
+                        port in this node.
+           Occurence: &lt;node>, &lt;port>. 
+      </xs:documentation>
+		</xs:annotation>
+		<xs:unique name="port_data_key_unique">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: uniqueness of the key attributes of &lt;data> children
+                 of this &lt;port> element.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath="./g:data"/>
+			<xs:field xpath="@key"/>
+		</xs:unique>
+	</xs:element>
+	<xs:element name="edge" type="edge.type" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+           Description: Describes an edge in the &lt;graph> which contains this
+                        &lt;edge>.
+           Occurence: &lt;graph>. 
+      </xs:documentation>
+		</xs:annotation>
+		<xs:unique name="edge_data_key_unique">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: uniqueness of the key attributes of &lt;data> children
+                 of this &lt;edge> element.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath="./g:data"/>
+			<xs:field xpath="@key"/>
+		</xs:unique>
+	</xs:element>
+	<xs:element name="hyperedge" type="hyperedge.type" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+           Description: While edges describe relations between two nodes, 
+                        a hyperedge describes a relation between an arbitrary
+                        number of nodes.
+           Occurence: &lt;graph>. 
+      </xs:documentation>
+		</xs:annotation>
+		<xs:unique name="hyperedge_data_key_unique">
+			<xs:annotation>
+				<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+        Ensures: uniqueness of the key attributes of &lt;data> children
+                 of this &lt;hyperedge> element.
+      </xs:documentation>
+			</xs:annotation>
+			<xs:selector xpath="./g:data"/>
+			<xs:field xpath="@key"/>
+		</xs:unique>
+	</xs:element>
+	<xs:element name="endpoint" type="endpoint.type" block="#all">
+		<xs:annotation>
+			<xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">
+           Description: The list of &lt;endpoints> within a hyperedge
+                        points to the nodes contained in this hyperedge.
+           Occurence: &lt;hyperedge>. 
+      </xs:documentation>
+		</xs:annotation>
+	</xs:element>
+</xs:schema>
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/GraphType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/GraphType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/GraphType.cs	(revision 2769)
@@ -0,0 +1,63 @@
+
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.NML
+{    
+    
+   /// <summary>
+   /// XML wrapper for a graph
+   /// </summary>
+    [XmlRoot(ElementName="Graph", IsNullable=false, DataType="")]
+    public class GraphType {
+		#region Fields
+		/// <summary>
+		/// the items
+		/// </summary>
+        private DataCollection mItems = new DataCollection();		
+
+		private GraphInformationType mGraphInformation;
+		#endregion
+
+		#region Properties
+		/// <summary>
+		/// Gets or sets the graph-info of the graph
+		/// </summary>
+		[XmlElement(ElementName="GraphInformation", Type=typeof(GraphInformationType))]
+		public GraphInformationType GraphInformation
+		{
+			get{return mGraphInformation;}
+			set{mGraphInformation = value;}
+		}
+        
+        /// <summary>
+        /// Gets or sets the item collection
+        /// </summary>
+        [XmlElement(ElementName="locator", Type=typeof(LocatorType))]
+        [XmlElement(ElementName="Connection", Type=typeof(ConnectionType))]
+        [XmlElement(ElementName="Shape", Type=typeof(ShapeType))]
+        [XmlElement(ElementName="data", Type=typeof(DataType))]		
+		public virtual DataCollection Items {
+            get {
+                return this.mItems;
+            }
+            set {
+                this.mItems = value;
+            }
+        }
+  
+		#endregion
+
+		#region Constructor
+		/// <summary>
+		/// Constructor
+		/// </summary>
+		public GraphType()
+		{}
+		#endregion
+
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/HyperedgeType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/HyperedgeType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/HyperedgeType.cs	(revision 2769)
@@ -0,0 +1,68 @@
+
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.GraphML {    
+    
+    [XmlType(IncludeInSchema=true, TypeName="hyperedge.type")]
+    [XmlRoot(ElementName="hyperedge", IsNullable=false, DataType="")]
+    public class HyperEdgeType {
+
+        private DataCollection _items = new DataCollection();
+        private string _desc;
+        private string id;
+        private GraphType _graph;
+        
+        [XmlElement(ElementName="desc")]
+        public virtual string Desc {
+            get {
+                return this._desc;
+            }
+            set {
+                this._desc = value;
+            }
+        }
+        
+        
+        
+        [XmlElement(ElementName="data", Type=typeof(DataType))]
+        [XmlElement(ElementName="endpoint", Type=typeof(EndPointType))]
+        public virtual DataCollection Items {
+            get {
+                return this._items;
+            }
+            set {
+                this._items = value;
+            }
+        }
+        
+        
+        
+        [XmlElement(ElementName="graph")]
+        public virtual GraphType Graph {
+            get {
+                return this._graph;
+            }
+            set {
+                this._graph = value;
+            }
+        }
+        
+        
+        
+        [XmlAttribute(AttributeName="id")]
+        public virtual string ID {
+            get {
+                return this.id;
+            }
+            set {
+                this.id = value;
+            }
+        }
+        
+
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/INMLCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/INMLCollection.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/INMLCollection.cs	(revision 2769)
@@ -0,0 +1,16 @@
+using System;
+
+namespace Netron.GraphLib.IO.NML
+{
+	/// <summary>
+	/// Helps (de)serialize custom collections in shapes.
+	/// </summary>
+	public interface INMLCollection
+	{
+		public INMLCollection()
+		{
+			string WriteXml();
+			void ReadXml(string content);
+		}
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/KeyType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/KeyType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/KeyType.cs	(revision 2769)
@@ -0,0 +1,92 @@
+
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.NML {    
+    
+	/// <summary>
+	/// XML wrapper for the key-type
+	/// </summary>
+    [XmlType(IncludeInSchema=true, TypeName="key.type")]
+    [XmlRoot(ElementName="key", IsNullable=false, DataType="")]
+    public class KeyType {
+		#region Fields
+		/// <summary>
+		/// the default type
+		/// </summary>
+        private DefaultType mDefault;
+		/// <summary>
+		/// the ide
+		/// </summary>
+        private string id;
+		/// <summary>
+		/// the description
+		/// </summary>
+        private string mDescription;
+		/// <summary>
+		/// the for key-type
+		/// </summary>
+        private KeyForType mFor;
+		#endregion
+
+		#region Properties
+		/// <summary>
+		/// Gets or sets the description
+		/// </summary>
+        [XmlElement(ElementName="desc")]
+        public virtual string Desc {
+            get {
+                return this.mDescription;
+            }
+            set {
+                this.mDescription = value;
+            }
+        }
+        
+        
+        /// <summary>
+        /// Gets or sets the default type
+        /// </summary>
+        [XmlElement(ElementName="default")]
+        public virtual DefaultType Default {
+            get {
+                return this.mDefault;
+            }
+            set {
+                this.mDefault = value;
+            }
+        }
+        
+        
+        /// <summary>
+        /// Gets or sets the id
+        /// </summary>
+        [XmlAttribute(AttributeName="id")]
+        public virtual string ID {
+            get {
+                return this.id;
+            }
+            set {
+                this.id = value;
+            }
+        }
+        
+        /// <summary>
+        /// Gets or sets the for key-type
+        /// </summary>
+        
+        [XmlAttribute(AttributeName="for")]
+        public virtual KeyForType For {
+            get {
+                return this.mFor;
+            }
+            set {
+                this.mFor = value;
+            }
+        }
+		#endregion
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/LocatorType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/LocatorType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/LocatorType.cs	(revision 2769)
@@ -0,0 +1,14 @@
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+   
+    
+namespace Netron.GraphLib.IO.NML {    
+	/// <summary>
+	/// XML wrapper for the locator type
+	/// </summary>
+    [XmlType(IncludeInSchema=true, TypeName="locator.type")]
+    [XmlRoot(ElementName="locator", IsNullable=false, DataType="")]
+    public class LocatorType {}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/NMLSerializer.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/NMLSerializer.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/NMLSerializer.cs	(revision 2769)
@@ -0,0 +1,822 @@
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+using System.Collections;
+using System.Reflection;
+using System.IO;
+using System.Diagnostics;
+using System.Xml.Schema;
+using Netron.GraphLib.Attributes;
+using Netron.GraphLib.UI;
+using System.Runtime.Remoting;
+using System.Windows.Forms;
+using System.Drawing;
+
+namespace Netron.GraphLib.IO.NML
+{
+	/// <summary>
+	/// NMLSerializer serializes a graph to NML
+	/// Thanks to Martin Cully for his work on this.
+	/// </summary>
+	public class NMLSerializer
+	{
+		#region Fields
+		private GraphControl site = null;
+		private string dtdPath = "http://nml.graphdrawing.org/dtds/1.0rc/nml.dtd";
+
+
+		//private Hashtable keyList = new Hashtable();
+
+		#endregion
+
+		#region Constructor
+		/// <summary>
+		/// Constructor
+		/// </summary>
+		private NMLSerializer()
+		{
+		}
+
+		/// <summary>
+		/// Constructor
+		/// </summary>
+		/// <param name="site"></param>
+		public NMLSerializer(GraphControl site)
+		{
+			this.site = site;
+		}
+
+		/// <summary>
+		/// Constructor
+		/// </summary>
+		/// <param name="dtdPath"></param>
+		public NMLSerializer(string dtdPath)
+		{
+			this.dtdPath = dtdPath;
+		}
+		#endregion
+
+		#region Methods
+
+		/// <summary>
+		/// Opens a NML serialized file
+		/// </summary>
+		/// <param name="filename"></param>
+		/// <param name="site"></param>
+		public static void Open(string filename, GraphControl site)
+		{
+			try
+			{
+			XmlTextReader reader = new XmlTextReader(filename);
+			IO.NML.NMLSerializer ser = new IO.NML.NMLSerializer(site);
+			
+			site.Abstract = ser.Deserialize(reader) as GraphAbstract;
+			reader.Close();
+			}
+			catch (System.IO.DirectoryNotFoundException exc)
+			{
+				System.Windows.Forms.MessageBox.Show(exc.Message);
+			}
+			catch(System.IO.FileLoadException exc)
+			{				
+				System.Windows.Forms.MessageBox.Show(exc.Message);
+			}
+			catch (System.IO.FileNotFoundException exc)
+			{
+				System.Windows.Forms.MessageBox.Show(exc.Message);
+			}
+			catch
+			{				
+				site.OutputInfo("Non-CLS exception caught.","BinarySerializer.SaveAs", OutputInfoLevels.Exception);
+			}
+		}
+
+		/// <summary>
+		/// Saves the diagram to NML format
+		/// </summary>
+		/// <param name="fileName">the file-path</param>
+		/// <param name="site">the graph-control instance to be serialized</param>
+		/// <returns></returns>
+		public static  bool SaveAs(string fileName, GraphControl site)
+		{
+			XmlTextWriter tw = null;
+			try
+			{
+
+				tw = new XmlTextWriter(fileName,System.Text.Encoding.Unicode);
+				tw.Formatting = System.Xml.Formatting.Indented;
+				IO.NML.NMLSerializer g = new IO.NML.NMLSerializer();
+				g.Serialize(tw,site.Abstract);
+				
+				return true;
+			}
+			catch(Exception exc)			
+			{				
+				//TODO: more specific exception handling here
+				Trace.WriteLine(exc.Message, "NMLSerializer.SaveAs");
+			}
+			catch
+			{
+				Trace.WriteLine("Non-CLS exception caught.","BinarySerializer.SaveAs");
+			}
+			finally
+			{
+				if(tw!=null) tw.Close();
+			}
+			return false;
+
+		}
+		
+		
+		#region Serialization
+		/// <summary>
+		/// Starts the serialization process. Takes the abstract of the graph and
+		/// constructs a NMLType proxy-like object which will be serialized via the 
+		/// standard .Net XmlSerializer process.
+		/// </summary>
+		/// <param name="writer">An XmlWriter</param>
+		/// <param name="g">The GraphAbstract object to be serialized</param>
+		public void Serialize(XmlWriter writer, GraphAbstract g	)
+		{
+			try
+			{
+				//the root of the NML
+				NMLType nml = new NMLType(); 
+				//add the version node
+				nml.Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
+				//the graph node 
+				GraphType graph = new GraphType();	
+				nml.Graph = graph;				
+				//add the graph information				
+				graph.GraphInformation = new GraphInformationType(g.GraphInformation);
+				//serialize the shapes
+				foreach ( Shape s in g.Shapes )				
+					graph.Items.Add(SerializeNode(s));				
+				//serialize the connections
+				foreach(Connection c in g.Connections)
+					graph.Items.Add(SerializeEdge(c));
+				
+				//			foreach(DictionaryEntry de in keyList)
+				//			{
+				//				nml.Key.Add(BuildKeyType((String)de.Key));
+				//			}
+
+			
+				// serialize
+				XmlSerializer ser = new XmlSerializer(typeof(NMLType));
+				
+				ser.Serialize(writer,nml);
+	
+			}
+
+			
+			catch(Exception exc)
+			{
+				site.OutputInfo(exc.Message, "NMLSerializer.Serialize", OutputInfoLevels.Exception);
+			}
+			catch
+			{
+				site.OutputInfo("Non-CLS exception caught.", "BinarySerializer.Serialize", OutputInfoLevels.Exception);
+			}
+			finally
+			{
+						
+			}
+		}
+
+		/// <summary>
+		/// Returns the NML representation of the given GraphAbstract
+		/// </summary>	
+		/// <returns></returns>
+		public string Serialize()
+		{
+			try
+			{
+				GraphAbstract g = this.site.Abstract;
+				System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
+
+				MemoryStream stream = new MemoryStream();
+				XmlTextWriter writer = new XmlTextWriter(stream, System.Text.ASCIIEncoding.ASCII);
+				writer.Formatting = System.Xml.Formatting.Indented;
+				this.Serialize(writer,g);
+
+				
+				//StringReader reader = new StringReader();
+				int count = 0;
+				stream.Seek(0, SeekOrigin.Begin);
+
+				byte[] byteArray = new byte[stream.Length];
+
+				while(count < stream.Length)
+				{
+					byteArray[count++] = Convert.ToByte(stream.ReadByte());
+				}
+
+				// Decode the byte array into a char array 
+				// and write it to the console.
+				char[] charArray = new char[asciiEncoding.GetCharCount(byteArray, 0, count)];
+				asciiEncoding.GetDecoder().GetChars(byteArray, 0, count, charArray, 0);
+
+				string s = new string(charArray);
+				
+				
+				writer.Close();
+
+				stream.Close();
+				return s;
+			}
+			catch(Exception exc)
+			{
+				Trace.WriteLine(exc.Message,"NMLSerializer.Serialize");
+				return string.Empty;
+			}
+		}
+
+		/// <summary>
+		/// Serializes a node
+		/// </summary>
+		/// <param name="s"></param>
+		/// <returns></returns>
+		private ShapeType SerializeNode(Shape s)
+		{
+			PropertiesHashtable properties = GraphMLDataAttribute.GetValuesOfTaggedFields(s);
+
+			ShapeType node = new ShapeType();
+			node.UID = FormatID(s);			
+			node.InstanceKey = s.Summary.Key;
+			foreach(Connector c in s.Connectors)
+			{
+				ConnectorType ct = new ConnectorType();
+				ct.Name = c.Name;
+				ct.UID = c.UID.ToString();
+				node.Data.Add(ct);
+			}
+
+
+			//--------------------------------------
+			foreach(DataType data in DataTypesFromAttributes(properties))
+			{
+				node.Data.Add(data);
+			}
+
+			return node;
+		}
+		/// <summary>
+		/// Serializes an edge
+		/// </summary>
+		/// <param name="c"></param>
+		/// <returns></returns>
+		private ConnectionType SerializeEdge(Connection c)
+		{
+			PropertiesHashtable properties = GraphMLDataAttribute.GetValuesOfTaggedFields(c);
+
+			ConnectionType edge = new ConnectionType();
+			edge.ID = FormatID(c);
+			
+			/* Save the connectors the Connection is connected to */
+			edge.Source = FormatID(c.From.BelongsTo);
+			edge.Target = FormatID(c.To.BelongsTo);
+			/* Save the connectors the Connection is connected to */
+			edge.Sourceport = FormatID(c.From);
+			edge.Targetport = FormatID(c.To);			
+			edge.InstanceKey = c.Summary.Key;
+			
+			foreach(DataType dt in DataTypesFromAttributes(properties))
+			{
+				edge.Data.Add(dt);
+			}
+
+			return edge;
+		}
+		#endregion
+		
+		#region Deserialize
+		/// <summary>
+		/// Deserializes the graph's xml
+		/// </summary>
+		/// <returns></returns>
+		public GraphAbstract Deserialize(XmlReader reader)
+		{
+			//very important; always use the same instantiation parameter of the XmlSerializer as
+			//you used for serialization!
+			XmlSerializer ser = new XmlSerializer(typeof(NMLType));
+			if(ser.CanDeserialize(reader))
+			{
+				NMLType gtype = ser.Deserialize(reader) as NMLType;
+				
+				return Deserialize(gtype);
+			}
+			else
+				throw new Exception("The supplied file cannot be deserialized to a graph (check the XML)");
+		}
+
+		/// <summary>
+		/// Deserializes the presumed NML-string to a GraphAbstract object
+		/// </summary>
+		/// <param name="xml">NML compliant string</param>
+		/// <returns></returns>
+		public GraphAbstract Deserialize(string xml)
+		{
+			StringReader sr = new StringReader(xml);
+			XmlTextReader reader = new XmlTextReader(sr);
+			return Deserialize(reader);
+		}
+
+		/// <summary>
+		/// Deserializes the graphtype, here's where all the smart stuff happens
+		/// </summary>
+		/// <param name="gml">the graphtype which acts as an intermediate storage between XML and the GraphAbstract
+		/// </param>
+		/// <returns></returns>
+		private GraphAbstract Deserialize(NMLType gml)
+		{
+			GraphAbstract abs = new GraphAbstract();
+			
+			#region Load the graph information
+			GraphType g = gml.Graph;
+			
+			abs.GraphInformation = g.GraphInformation.ToGraphInformation();		
+
+			#endregion
+			Shape shape = null;
+			ShapeType node;
+			DataType dt;				
+			ConnectorType ct;
+			Connection con = null;
+			ConnectionType et;
+			string linePath = string.Empty; //see the split deserialization of the connection
+			
+			FromToCollection ftc = new FromToCollection(); //temporary store for from-to relations of connections
+			Hashtable connectors = new Hashtable(); //temporary collection of connector
+			#region Loop over all items
+
+			
+
+			for(int k =0; k<g.Items.Count;k++) //loop over all serialized items
+			{
+				try
+				{
+					if(g.Items[k] is ShapeType)
+					{
+						Trace.WriteLine("Node: " + (g.Items[k] as ShapeType).UID,"NMLSerializer.Deserialize");
+						node = g.Items[k] as ShapeType;
+
+						#region find out which type of shape needs to be instantiated
+						if(node!=null && node.InstanceKey!=string.Empty)
+							shape = GetShape(node.InstanceKey);	
+						if(shape==null)
+						{
+							Trace.WriteLine("...but failed to instantiate the appropriate shape (missing or not loaded library?", "NMLSerializer.Deserialize");
+							continue;
+						}
+
+						#endregion
+						#region use the attribs again to reconstruct the props				
+						for(int m=0; m<node.Data.Count;m++) //loop over the serialized data
+						{
+							if(node.Data[m] is DataType)
+							{
+								#region Handle data node
+								dt = node.Data[m] as DataType;												
+								if(dt==null) continue;
+
+								foreach (PropertyInfo pi in shape.GetType().GetProperties()) 
+								{	
+									if (Attribute.IsDefined(pi, typeof(GraphMLDataAttribute))) 
+									{
+										try
+										{
+											if(pi.Name==dt.Name)
+											{
+															
+												if(pi.GetIndexParameters().Length==0)
+												{
+													if(pi.PropertyType.Equals(typeof(int)))
+														pi.SetValue(shape,Convert.ToInt32(dt.Value[0]),null);
+													else if(pi.PropertyType.Equals(typeof(Color))) //Color is stored as an integer
+														pi.SetValue(shape,Color.FromArgb(int.Parse(dt.Value[0].ToString())),null);
+													else if(pi.PropertyType.Equals(typeof(string)))
+														pi.SetValue(shape,(string)(dt.Value[0]),null);
+													else if(pi.PropertyType.Equals(typeof(bool)))
+														pi.SetValue(shape,Convert.ToBoolean(dt.Value[0]),null);	
+													else if(pi.PropertyType.Equals(typeof(Guid)))
+														pi.SetValue(shape,new Guid((string) dt.Value[0]),null);	
+													else if(pi.PropertyType.Equals(typeof(float)))
+														pi.SetValue(shape, Convert.ToSingle(dt.Value[0]),null);
+													else if(pi.PropertyType.BaseType.Equals(typeof(Enum)))//yesyes, you can imp/exp enum types too
+														pi.SetValue(shape, Enum.Parse(pi.PropertyType,dt.Value[0].ToString()),null);													
+													else if(dt.IsCollection)
+													{
+														#region Some explanations
+														/* OK, here's the deal. 
+														 * This part is related to the possibility to imp/exp property-collections from/to NML.
+														 * However, since (see more specifically the ClassShape) the collections will usually be defined
+														 * where the shapes is defined, i.e. in an external assembly, the collection-type is unknown.
+														 * Importing/exporting collections to NML is itsel a problem and in this part of the code the data is reflected again.
+														 * To bypass the problem that the collection-type is unknown I hereby assume that the collection can be built up again via
+														 * a public constructor of the collection with argument 'ArrayList'. In the ArrayList the collection-elements are of type string[]
+														 * whereby the order of the strings reflect the order of the GraphMLData-tagged properties of the collection elements.
+														 * For example, the ClassPropertiesCollection has the required constructor and the ClassProperty object is instantiated via the string[] elements in the
+														 * ArrayList.
+														 * Of course, this brings some restriction but it's for the moment the most flexible way I have found.
+														 * If the ClassProperty would itself have a property inheriting from CollectionBase this will not work...one has to draw a line somewhere.
+														 * It's the price to pay for using reflection and external assemblies. The whole story can be forgotten if you link the shape-classes at compile-time.
+														 * Remember; the Netron graphlib is more a toolkit than a all-in solution to all situations. 
+														 * However, the current implementation will cover, I beleive, 90% of the needs.
+														 */
+														#endregion
+														
+														ArrayList list = new ArrayList();
+														for(int p =0; p<dt.Value.Count; p++) //loop over the collection elements
+														{
+															DataType dat = dt.Value[p] as DataType; //take a collection element
+															if(dat.IsCollection)	//is it itself a collection?
+															{
+																string[] str = new string[dat.Value.Count];
+																for(int l=0;l<dat.Value.Count;l++)
+																{
+																	if((dat.Value[l] as DataType).Value.Count>0)
+																		str[l] = (string) (dat.Value[l] as DataType).Value[0];
+																	else
+																		str[l] = string.Empty;
+																}
+																list.Add(str); 
+															}
+															else
+															{
+																list.Add(new string[]{(string) dat.Value[0]}); 
+															}
+															
+														}
+														object o;
+														o = pi.PropertyType.GetConstructor(new Type[]{typeof(ArrayList)}).Invoke(new Object[]{list});
+														pi.SetValue(shape,o,null);
+														Trace.WriteLine("'" + dt.Name + "' is an array type","NMLSeriliazer.Deserialize");
+													}
+
+												}
+												else
+													pi.SetValue(shape,dt.Value,null);
+												Trace.WriteLine("'" + dt.Name + "' deserialized.","NMLSeriliazer.Deserialize");
+												break;
+											}
+										}
+										catch(Exception exc)
+										{
+											Trace.WriteLine("Failed '" + dt.Name +"': " + exc.Message,"NMLSeriliazer.Deserialize");
+											continue;//just try to make the best out of it
+										}
+														
+									}
+								
+								}
+								#endregion
+							}
+							else if (node.Data[m] is ConnectorType)
+							{
+								#region Handle connector data
+								ct = node.Data[m] as ConnectorType;
+								foreach(Connector c in shape.Connectors)
+									if(c.Name==ct.Name)
+									{
+										c.UID = new Guid(ct.UID);
+										break;
+									}
+								#endregion
+							}
+						
+						}
+						#endregion
+						//at this point the shape is fully deserialized
+						//but we still need to assign the ambient properties,
+						//i.e. the properties associated to the current hosting of the control
+						if(shape !=null)
+						{
+							shape.Site = site;
+							shape.PostDeserialization();
+							shape.Font = site.Font;
+							//shape.FitSize(false);
+							abs.Shapes.Add(shape);
+							//keep the references to the connectors, to be used when creating the connections
+							foreach(Connector cor in shape.Connectors)
+								connectors.Add(cor.UID.ToString(),cor);
+						}
+					}
+					else if(g.Items[k] is ConnectionType)
+					{
+						#region  handle the edge
+						//we cannot create the connection here since not all shapes have been instantiated yet
+						//keep the edges in temp collection, treated in next loop
+						et = g.Items[k] as ConnectionType;
+						con = new Connection(site);
+						con.Font = site.Font;
+						con.UID = new Guid(et.ID);
+						Trace.WriteLine("Connection: " + et.ID,"NMLSeriliazer.Deserialize");
+						#region use the attribs to reconstruct the props
+
+
+						for(int m=0; m<et.Data.Count;m++) //loop over the serialized data
+						{
+							if(et.Data[m] is DataType)
+							{
+								#region Handle data node, same as the shape
+								dt = et.Data[m] as DataType;												
+								if(dt==null) continue;
+
+								foreach (PropertyInfo pi in con.GetType().GetProperties()) 
+								{	
+									if (Attribute.IsDefined(pi, typeof(GraphMLDataAttribute))) 
+									{
+										try
+										{
+											if(pi.Name==dt.Name)
+											{
+												if(dt.Name=="LinePath")
+												{
+													//the LinePath will not work without non-null From and To, so set it afterwards
+													linePath = dt.Value[0].ToString();
+												}
+												else if(pi.GetIndexParameters().Length==0)
+												{
+													if(pi.PropertyType.Equals(typeof(int)))
+														pi.SetValue(con,Convert.ToInt32(dt.Value[0]),null);
+													else if(pi.PropertyType.Equals(typeof(Color))) //Color is stored as an integer
+														pi.SetValue(con,Color.FromArgb(int.Parse(dt.Value[0].ToString())),null);
+													else if(pi.PropertyType.Equals(typeof(string)))
+														pi.SetValue(con,(string)(dt.Value[0]),null);
+													else if(pi.PropertyType.Equals(typeof(bool)))
+														pi.SetValue(con,Convert.ToBoolean(dt.Value[0]),null);	
+													else if(pi.PropertyType.Equals(typeof(Guid)))
+														pi.SetValue(con,new Guid((string) dt.Value[0]),null);	
+													else if(pi.PropertyType.Equals(typeof(float)))
+														pi.SetValue(con, Convert.ToSingle(dt.Value[0]),null);
+													else if (pi.PropertyType.Equals(typeof(ConnectionWeight)))
+														pi.SetValue(con, Enum.Parse(typeof(ConnectionWeight),dt.Value[0].ToString()),null);
+													else if (pi.PropertyType.Equals(typeof(System.Drawing.Drawing2D.DashStyle)))
+														pi.SetValue(con, Enum.Parse(typeof(System.Drawing.Drawing2D.DashStyle),dt.Value[0].ToString()),null);
+
+												}
+												else
+													pi.SetValue(con,dt.Value,null);
+												Trace.WriteLine("'" + dt.Name + "' deserialized.","NMLSeriliazer.Deserialize");
+												break;
+											}
+										}
+										catch(Exception exc)
+										{
+											Trace.WriteLine("Failed '" + dt.Name +"': " + exc.Message,"NMLSeriliazer.Deserialize");
+											continue;//just try to make the best out of it
+										}
+														
+									}
+								
+								}
+								#endregion
+							}
+						}
+
+						#endregion
+						ftc.Add(new FromTo(et.Sourceport,et.Targetport, con));
+						#endregion
+					}
+				}
+				catch(Exception exc)
+				{
+					Trace.WriteLine(exc.Message,"NMLSeriliazer.Deserialize");
+					continue;
+				}
+
+			}//loop over items in the graph-XML
+			#endregion
+
+			#region now for the edges;
+			//loop over the FromTo collections and pick up the corresponding connectors
+			for(int k=0; k<ftc.Count; k++)
+			{
+				try
+				{
+					con = ftc[k].Connection;
+					con.From = connectors[ftc[k].From] as Connector;
+					con.To = connectors[ftc[k].To] as Connector;					
+					con.From.Connections.Add(con);//if From is null we'll fail in the catch and continue
+					con.LinePath = linePath; //only setable after the From and To are found
+					con.To.Connections.Add(con);				
+					abs.Insert(con);
+					Trace.WriteLine("Connection '" + con.UID + "' added.","NMLSeriliazer.Deserialize");
+				}
+				catch(Exception exc)
+				{
+					Trace.WriteLine("Connection failed: " + exc.Message,"NMLSeriliazer.Deserialize");
+					continue; //make the best of it
+				}
+			}
+			#endregion
+			
+
+			//			for(int n=0; n<pcs.Count; n++)
+			//			{	
+			//				from = pcs[n].ChildShape;
+			//				to = abs.Shapes[pcs[n].Parent];
+			//				con = new Connection(from, to );
+			//				abs.Connections.Add(con);
+			//				con.site = site;
+			//				if(pcs[n].ChildShape.visible)
+			//					con.visible = true;
+			//				from.connection = con;	//a lot of crossing...to make life easy really
+			//				from.parentNode =to;
+			//				to.childNodes.Add(from);
+			//				
+			//				
+			//			}
+
+			return abs;
+
+		}
+
+		#endregion
+
+		
+	
+		#endregion
+
+		#region Helper Functions
+		/// <summary>
+		/// Validation of the XML
+		/// </summary>
+		/// <param name="reader"></param>
+		public static void Validate(XmlReader reader)
+		{
+			//TODO: looks a little odd this one
+			XmlValidatingReader vr = new XmlValidatingReader(reader);
+
+			vr.ValidationType = ValidationType.Auto;
+			vr.ValidationEventHandler += new ValidationEventHandler(ValidationHandler);
+
+			while (vr.Read()){};
+		}
+		/// <summary>
+		/// Outputs the validation of the XML
+		/// </summary>
+		/// <param name="sender"></param>
+		/// <param name="args"></param>
+		private static void ValidationHandler(object sender, ValidationEventArgs args)
+		{
+			Trace.WriteLine(args.ToString(),"NMLSeriliazer.ValidationHandler");
+		}
+
+		/// <summary>
+		/// Returns a shape on the basis of the unique instantiation key
+		/// </summary>
+		/// <param name="key"></param>
+		/// <returns></returns>
+		private Shape GetShape(string key)
+		{
+
+			ObjectHandle handle;
+			Shape shape;
+			for(int k=0; k<site.Libraries.Count;k++)
+			{
+				for(int m=0; m<site.Libraries[k].ShapeSummaries.Count; m++)
+				{
+					if(site.Libraries[k].ShapeSummaries[m].Key == key)
+					{
+						//Type shapeType = Type.GetType(site.Libraries[k].ShapeSummaries[m].ReflectionName);
+						
+						//object[] args = {this.site};
+						Directory.SetCurrentDirectory(Path.GetDirectoryName(Application.ExecutablePath));
+						handle = Activator.CreateInstanceFrom(site.Libraries[k].Path,site.Libraries[k].ShapeSummaries[m].ReflectionName);
+						shape = handle.Unwrap() as Shape;
+						return shape;
+						
+					}
+				}
+			}
+
+			return null;
+
+			
+		}
+		
+		/// <summary>
+		/// Returns the UID of the entity in string format
+		/// </summary>
+		/// <param name="e"></param>
+		/// <returns></returns>
+		private static string FormatID(Entity e)
+		{
+			return String.Format("{0}",e.UID.ToString());
+		}
+
+		private static KeyType BuildKeyType(String s)
+		{
+			KeyType kt = new KeyType();
+			kt.ID = s;
+			kt.For = KeyForType.All;
+			
+			return kt;
+		}
+
+		
+
+
+		/// <summary>
+		/// Converts the hashtable of GraphML-marked properties to types
+		/// </summary>
+		/// <param name="properties"></param>
+		/// <returns></returns>
+		private DataType[] DataTypesFromAttributes(PropertiesHashtable properties)
+		{
+			DataType[] dts = new DataType[properties.Count];
+			for(int k=0; k<properties.Count;k++)
+			{
+				
+				dts[k] = new DataType();
+				dts[k].Name = properties.Keys[k];
+				object val = null;
+				if ((val=properties[k]) != null)
+				{
+					//the color is a bit different
+					if(typeof(Color).IsInstanceOfType(val))
+					{
+						int num = ((Color) val).ToArgb();
+						dts[k].Value.Add(num.ToString());
+					}
+					else if(typeof(Shape).IsInstanceOfType(val))
+					{
+						dts[k].Value.Add((val as Shape).UID.ToString());
+					}
+					else if(typeof(Guid).IsInstanceOfType(val))
+					{
+						dts[k].Value.Add(((Guid) val ).ToString());
+					}
+					else if(typeof(CollectionBase).IsInstanceOfType(val))
+					{
+						CollectionBase col = val as CollectionBase;
+						IEnumerator enumer  = col.GetEnumerator();
+						while(enumer.MoveNext())
+						{
+							object obj = enumer.Current;
+							PropertiesHashtable props= GraphMLDataAttribute.GetValuesOfTaggedFields(obj);
+							DataType[] tps = DataTypesFromAttributes(props);
+							DataType dt = new DataType();
+							dt.Name=obj.GetType().Name;//the name of the collection element
+							dt.IsCollection = true;
+							for(int m =0; m<tps.Length; m++)
+								dt.Value.Add	(tps[m]);
+
+							dts[k].Value.Add(dt);
+							dts[k].IsCollection = true;
+							
+						}						
+					}
+					else
+						dts[k].Value.Add(val.ToString());
+				}
+				/*
+				 * makes the union of all properties in the different shapes
+				if ( !keyList.Contains(properties.Keys[k]))
+					keyList.Add(properties.Keys[k],val);
+				*/
+			
+			}
+			return dts;
+		}
+
+		/// <summary>
+		/// Returns qualified type name of o
+		/// </summary>
+		/// <param name="o"></param>
+		/// <returns></returns>
+		private static string GetTypeQualifiedName(object o)
+		{
+			if (o==null)
+				throw new ArgumentNullException("GetTypeQualifiedName(object) was called with null parameter");
+			return GetTypeQualifiedName(o.GetType());
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="t"></param>
+		/// <returns></returns>
+		private static string GetTypeQualifiedName(Type t)
+		{
+			return Assembly.CreateQualifiedName(
+				t.Assembly.FullName,
+				t.FullName
+				);
+		}
+
+		private static Type ToType(string text)
+		{
+			return Type.GetType(text,true);
+		}
+
+		private static bool ToBool(string text)
+		{
+			return bool.Parse(text);
+		}
+		#endregion
+	}
+}
+
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/NMLType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/NMLType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/NMLType.cs	(revision 2769)
@@ -0,0 +1,86 @@
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    namespace Netron.GraphLib.IO.NML {
+    
+	/// <summary>
+	/// The base-template class for the NML serialization,
+	/// this class corresponds to the root of the XML
+	/// </summary>
+    [XmlRoot(ElementName="NML", IsNullable=false, DataType="")]
+    public class NMLType {
+        
+		#region Fields
+        
+        /// <summary>
+        /// the keys
+        /// </summary>
+        private DataCollection mKeys = new DataCollection();
+		/// <summary>
+		/// the graph node
+		/// </summary>
+		private GraphType mGraph;
+		/// <summary>
+		/// the graphlib version
+		/// </summary>
+		private string mVersion;
+        /// <summary>
+        /// the data items
+        /// </summary>
+        private DataCollection mItems = new DataCollection();
+		#endregion
+
+		#region Properties
+        /// <summary>
+        /// Gets or sets the NML version
+        /// </summary>
+		[XmlElement("Version",typeof(string))]
+		public string Version
+		{
+			get{return mVersion;}
+			set{mVersion = value;}
+		}
+		/// <summary>
+		/// Gets or sets the serialized graph
+		/// </summary>
+		[XmlElement("Graph",typeof(GraphType))]
+		public GraphType Graph
+		{
+			get{return mGraph;}
+			set{mGraph = value;}
+		}
+        
+        /// <summary>
+        /// Gets or sets the key-collection
+        /// </summary>
+        [XmlElement(ElementName="key", Type=typeof(KeyType))]
+        public virtual DataCollection Key {
+            get {
+                return this.mKeys;
+            }
+            set {
+                this.mKeys = value;
+            }
+        }
+        
+        
+        /// <summary>
+        /// Gets or sets the data collection for the graph
+        /// </summary>        
+        [XmlElement(ElementName="data", Type=typeof(DataType))]
+        public virtual DataCollection Items {
+            get {
+                return this.mItems;
+            }
+            set {
+                this.mItems = value;
+            }
+        }
+		#endregion
+
+		
+    
+    
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/NamespaceDoc.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/NamespaceDoc.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/NamespaceDoc.cs	(revision 2769)
@@ -0,0 +1,14 @@
+using System;
+
+namespace Netron.GraphLib.IO.GraphML
+{
+	/// <summary>
+	/// The <b>Netron.GraphLib.IO.GraphML</b> contains the classes
+	/// that map the GraphML schema.
+	/// </summary>
+	internal class NamespaceDoc
+	{
+		private NamespaceDoc()
+		{}
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/PortType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/PortType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/PortType.cs	(revision 2769)
@@ -0,0 +1,75 @@
+
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.NML {    
+    
+	/// <summary>
+	/// The NML template corresponding to the XML of a connector
+	/// </summary>
+    [XmlType(IncludeInSchema=true, TypeName="port.type")]
+    [XmlRoot(ElementName="port", IsNullable=false, DataType="")]
+    public class PortType {
+		#region Fields
+		/// <summary>
+		/// the data items
+		/// </summary>
+        private DataCollection mItems = new DataCollection();
+		/// <summary>
+		/// the name of the port
+		/// </summary>
+        private string mName;
+		/// <summary>
+		/// the description of the port
+		/// </summary>
+        private string mDescription;
+		#endregion
+        
+		#region Properties
+        /// <summary>
+        /// Gets or sets the description of the port
+        /// </summary>
+        [XmlElement(ElementName="desc")]
+        public virtual string Desc {
+            get {
+                return this.mDescription;
+            }
+            set {
+                this.mDescription = value;
+            }
+        }
+        
+        
+        /// <summary>
+        /// Gets or sets the data items
+        /// </summary>
+        [XmlElement(ElementName="port", Type=typeof(PortType))]
+        [XmlElement(ElementName="data", Type=typeof(DataType))]
+        public virtual DataCollection Items {
+            get {
+                return this.mItems;
+            }
+            set {
+                this.mItems = value;
+            }
+        }
+        
+        
+        /// <summary>
+        /// Gets or sets the name of the port
+        /// </summary>
+        [XmlAttribute(AttributeName="name")]
+        public virtual string Name {
+            get {
+                return this.mName;
+            }
+            set {
+                this.mName = value;
+            }
+        }
+		#endregion   
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/PropertiesHashtable.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/PropertiesHashtable.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/PropertiesHashtable.cs	(revision 2769)
@@ -0,0 +1,77 @@
+using System;
+using System.Collections;
+namespace Netron.GraphLib.IO.NML
+{
+	/// <summary>
+	/// STC of string-value pairs, helpful in keeping a collection of properties with their value
+	/// </summary>
+	public class PropertiesHashtable : DictionaryBase
+	{
+		/// <summary>
+		/// keeps the collection of keys
+		/// </summary>
+		private StringCollection mKeys = new StringCollection();
+
+		/// <summary>
+		/// Gets the keys of the hashtable and
+		/// allows to loop over the keys without
+		/// boxing/unboxing.
+		/// </summary>
+		public StringCollection Keys
+		{	
+			get{return mKeys;}
+		
+		}
+		/// <summary>
+		/// Constructor
+		/// </summary>
+		public PropertiesHashtable()
+		{
+			
+		}
+		
+
+		
+		/// <summary>
+		/// Adds a property-value pair
+		/// </summary>
+		/// <param name="key"></param>
+		/// <param name="propertyValue"></param>
+		public void Add(string key, object propertyValue)
+		{
+			this.InnerHashtable.Add(key, propertyValue);
+			mKeys.Add(key);
+		}
+		/// <summary>
+		/// Integer indexer
+		/// </summary>
+		public object this[int index]
+		{
+			get{
+			
+				if(mKeys[index]!=null)
+				{		
+					return this.InnerHashtable[mKeys[index]];
+				}
+				else return null;
+			}
+		}
+
+		/// <summary>
+		/// Removes an elements based on a key
+		/// </summary>
+		/// <param name="key">a (string) key</param>
+		/// <returns></returns>
+		public bool Remove(string key)
+		{
+			int index;
+			if((index=mKeys.Contains(key))>-1)
+			{
+				this.InnerHashtable.Remove(key);
+				this.mKeys.RemoveAt(index);
+				return true;
+			}
+			return false;
+		}
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/ShapeType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/ShapeType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/ShapeType.cs	(revision 2769)
@@ -0,0 +1,99 @@
+
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.NML 
+{    
+    /// <summary>
+    /// XML wrapper for a shape object
+    /// </summary>
+	[XmlType(IncludeInSchema=true, TypeName="node.type")]
+	[XmlRoot(ElementName="Shape", IsNullable=false, DataType="")]
+	public class ShapeType 
+	{
+		#region Fields
+		/// <summary>
+		/// data collection
+		/// </summary>
+		private DataCollection mData = new DataCollection();
+		/// <summary>
+		/// the description
+		/// </summary>
+		private string mDescription;
+		/// <summary>
+		/// the mUID
+		/// </summary>
+		private string mUID;
+		/// <summary>
+		/// the unique key to the shape to be instantiated
+		/// </summary>
+		private string mInstanceKey = string.Empty;
+		#endregion
+
+		#region Properties
+        /// <summary>
+        /// Gets or sets the key to use when instantiating/deserializing the node again
+        /// </summary>
+		[XmlElement(ElementName="InstanceKey")]
+		public string InstanceKey
+		{
+			get{return mInstanceKey;}
+			set{mInstanceKey = value;}
+		}
+		/// <summary>
+		/// Gets or sets the description
+		/// </summary>
+		[XmlElement(ElementName="desc")]
+		public virtual string Desc 
+		{
+			get 
+			{
+				return this.mDescription;
+			}
+			set 
+			{
+				this.mDescription = value;
+			}
+		}
+        
+		/// <summary>
+		/// Gets or sets the data collection
+		/// </summary>
+		[XmlElement(ElementName="locator", Type=typeof(LocatorType))]
+		[XmlElement(ElementName="graph", Type=typeof(GraphType))]
+		[XmlElement(ElementName="property", Type=typeof(DataType))]
+		[XmlElement(ElementName="port", Type=typeof(PortType))]
+		[XmlElement(ElementName="connector", Type=typeof(ConnectorType))]		
+		public virtual DataCollection Data 
+		{
+			get 
+			{
+				return this.mData;
+			}
+			set 
+			{
+				this.mData = value;
+			}
+		}
+        /// <summary>
+        /// Gets or sets the mUID
+        /// </summary>
+		[XmlElement(ElementName="UID")]
+		public virtual string UID 
+		{
+			get 
+			{
+				return this.mUID;
+			}
+			set 
+			{
+				this.mUID = value;
+			}
+		}
+		#endregion
+	}
+}
+
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/enums/EndPointTypeType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/enums/EndPointTypeType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/enums/EndPointTypeType.cs	(revision 2769)
@@ -0,0 +1,27 @@
+
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.GraphML {    
+    
+    public enum EndPointTypeType {
+        
+        
+        
+        [XmlEnum(Name="in")]
+        IN,
+        
+        
+        
+        [XmlEnum(Name="out")]
+        Out,
+        
+        
+        
+        [XmlEnum(Name="undir")]
+        Undir,
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/enums/GraphEdgeDefaultType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/enums/GraphEdgeDefaultType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/enums/GraphEdgeDefaultType.cs	(revision 2769)
@@ -0,0 +1,24 @@
+
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.NML {    
+    /// <summary>
+    /// XML wrapper for the edge type
+    /// </summary>
+    public enum GraphEdgeDefaultType {
+        /// <summary>
+        /// Directed edge
+        /// </summary>
+        [XmlEnum(Name="directed")]
+        Directed,
+        /// <summary>
+        /// Undirected edge
+        /// </summary>
+        [XmlEnum(Name="undirected")]
+        Undirected,
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/enums/KeyForType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/enums/KeyForType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/enums/KeyForType.cs	(revision 2769)
@@ -0,0 +1,49 @@
+
+    using System;
+    using System.Xml;
+    using System.Xml.Serialization;
+    using System.IO;
+    
+    
+namespace Netron.GraphLib.IO.NML {    
+    /// <summary>
+    /// For key-types
+    /// </summary>
+    public enum KeyForType {
+        /// <summary>
+        /// 
+        /// </summary>
+        [XmlEnum(Name="all")]
+        All,
+		/// <summary>
+		/// 
+		/// </summary>
+        [XmlEnum(Name="graph")]
+        Graph,
+		/// <summary>
+		/// 
+		/// </summary>
+        [XmlEnum(Name="Shape")]
+        Node,
+		/// <summary>
+		/// 
+		/// </summary>
+        [XmlEnum(Name="Connection")]
+        Edge,
+		/// <summary>
+		/// 
+		/// </summary>
+        [XmlEnum(Name="hyperedge")]
+        HyperEdge,
+		/// <summary>
+		/// 
+		/// </summary>
+        [XmlEnum(Name="port")]
+        Port,
+		/// <summary>
+		/// 
+		/// </summary>
+        [XmlEnum(Name="endpoint")]
+        EndPoint,
+    }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/xShapeType.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/xShapeType.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/NML/xShapeType.cs	(revision 2769)
@@ -0,0 +1,165 @@
+
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+using System.IO;
+using System.Collections; 
+    
+namespace Netron.GraphLib.IO.NML 
+{    
+    /// <summary>
+    /// XML wrapper for a shape object
+    /// </summary>
+	
+	public class ShapeType : IXmlSerializable
+	{
+		#region Fields
+		/// <summary>
+		/// data collection
+		/// </summary>
+		private DataCollection mData = new DataCollection();
+		/// <summary>
+		/// the description
+		/// </summary>
+		private string mDescription;
+		/// <summary>
+		/// the mUID
+		/// </summary>
+		private string mUID;
+		/// <summary>
+		/// the unique key to the shape to be instantiated
+		/// </summary>
+		private string mInstanceKey = string.Empty;
+		#endregion
+
+		#region Properties
+        /// <summary>
+        /// Gets or sets the key to use when instantiating/deserializing the node again
+        /// </summary>
+		
+		public string InstanceKey
+		{
+			get{return mInstanceKey;}
+			set{mInstanceKey = value;}
+		}
+		/// <summary>
+		/// Gets or sets the description
+		/// </summary>
+	
+		public virtual string Desc 
+		{
+			get 
+			{
+				return this.mDescription;
+			}
+			set 
+			{
+				this.mDescription = value;
+			}
+		}
+        
+		/// <summary>
+		/// Gets or sets the data collection
+		/// </summary>
+		
+		public virtual DataCollection Data 
+		{
+			get 
+			{
+				return this.mData;
+			}
+			set 
+			{
+				this.mData = value;
+			}
+		}
+        /// <summary>
+        /// Gets or sets the mUID
+        /// </summary>
+	
+		public virtual string UID 
+		{
+			get 
+			{
+				return this.mUID;
+			}
+			set 
+			{
+				this.mUID = value;
+			}
+		}
+		#endregion
+
+		#region IXmlSerializable Members
+
+		public void WriteXml(XmlWriter writer)
+		{
+			writer.WriteAttributeString("att","123");
+			writer.WriteComment("here it comes");
+			writer.WriteElementString("InstanceKey",this.mInstanceKey);
+			writer.WriteElementString("UID",this.mUID);
+			for(int k=0;k<mData.Count;k++)
+			{
+				if(typeof(ConnectorType).IsInstanceOfType(mData[k]))
+				{
+					writer.WriteStartElement("Connector");
+					writer.WriteAttributeString("UID", (mData[k] as ConnectorType).UID);
+					writer.WriteAttributeString("Name", (mData[k] as ConnectorType).Name);
+					writer.WriteEndElement();
+				}
+				else if(typeof(DataType).IsInstanceOfType(mData[k]))
+				{
+					writer.WriteStartElement("data");
+					writer.WriteAttributeString("key", (mData[k] as DataType).Key.ToString());					
+					if(typeof(DataCollection).IsInstanceOfType((mData[k] as DataType).Text))
+					{
+						WriteData(writer, (mData[k] as DataType).Text);						
+					}
+					else if(typeof(string).IsInstanceOfType((mData[k] as DataType).Text))
+						writer.WriteString((mData[k] as DataType).Text.ToString());
+				
+					writer.WriteEndElement();
+				}
+				else if(typeof(CollectionBase).IsInstanceOfType(mData[k]))
+				{
+					(mData[k] as IXmlSerializable).WriteXml(writer);
+				}
+			
+
+			}
+
+			
+		}
+
+
+		private void WriteData(XmlWriter writer,DataCollection collection)
+		{
+			for(int m=0; m<collection.Count; m++)
+			{
+				if(typeof(DataType).IsInstanceOfType(collection[m]))
+				{
+					writer.WriteStartElement("data");
+					writer.WriteAttributeString("key",(collection[m] as DataType).Key);
+					WriteData(writer,(collection[m] as DataType).Text);
+					writer.WriteEndElement();
+				}	
+				else if(typeof(string).IsInstanceOfType(collection[m]))					
+					writer.WriteString(collection[m].ToString());	
+			}
+		}
+
+		public System.Xml.Schema.XmlSchema GetSchema()
+		{
+			// TODO:  Add ShapeType.GetSchema implementation
+			return null;
+		}
+
+		public void ReadXml(XmlReader reader)
+		{
+			// TODO:  Add ShapeType.ReadXml implementation
+		}
+
+		#endregion
+	}
+}
+
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/AssemblyReporter.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/AssemblyReporter.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/AssemblyReporter.cs	(revision 2769)
@@ -0,0 +1,18 @@
+using System;
+
+namespace Netron.GraphLib.IO.Reporting
+{
+	/// <summary>
+	/// Summary description for AssemblyReporter.
+	/// </summary>
+	public class AssemblyReporter
+	{
+		/// <summary>
+		/// Default constructor
+		/// </summary>
+		public AssemblyReporter()
+		{
+			throw new NotImplementedException("Sorry, it's still in the back of my noodle");
+		}
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/BinaryReport.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/BinaryReport.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/BinaryReport.cs	(revision 2769)
@@ -0,0 +1,128 @@
+using System;
+using System.Drawing;
+namespace Netron.GraphLib.IO.Reporting
+{
+	/// <summary>
+	/// Encapsulates the reporting of a single diagram saved to binary file
+	/// </summary>
+	public class BinaryReport
+	{
+		#region Fields
+
+		/// <summary>
+		/// the size of the file
+		/// </summary>
+		private long mSize;
+		/// <summary>
+		/// the path to tht file
+		/// </summary>
+		private string mPath;
+		/// <summary>
+		/// the thumbnail
+		/// </summary>
+		private Image mThumbnail;
+		/// <summary>
+		/// the description of the graph
+		/// </summary>
+		private string mDescription = string.Empty;
+		/// <summary>
+		/// the author of the graph
+		/// </summary>
+		private string mAuthor = string.Empty;
+		/// <summary>
+		/// the creation date of the graph
+		/// </summary>
+		private string mCreationDate = string.Empty;
+		/// <summary>
+		/// the subject of the graph
+		/// </summary>
+		private string mSubject = string.Empty;
+		/// <summary>
+		/// the title of the graph
+		/// </summary>
+		private string mTitle = string.Empty;
+
+		#endregion
+		
+		#region Properties
+
+		/// <summary>
+		/// Gets or sets the file-size
+		/// </summary>
+		public long FileSize
+		{
+			get{return mSize;}
+			set{mSize = value;}
+		}
+		/// <summary>
+		/// Gets or sets the path to the file
+		/// </summary>
+		public string Path
+		{
+			get{return mPath;}
+			set{mPath = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the thumbnail
+		/// </summary>
+		public Image Thumbnail
+		{
+			get{return mThumbnail;}
+			set{mThumbnail = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the description of the graph
+		/// </summary>
+		public string Description
+		{
+			get{return mDescription;}
+			set{mDescription = value;}
+		}
+
+		/// <summary>
+		/// Gets or sets the author of the graph
+		/// </summary>
+		public string Author
+		{
+			get{return mAuthor;}
+			set{mAuthor = value;}
+		}
+		/// <summary>
+		/// Gets or sets the creation date of the graph
+		/// </summary>
+		public string CreationDate
+		{
+			get{return mCreationDate;}			
+			set{mCreationDate = value;}
+		}
+		/// <summary>
+		/// Gets or sets the subject of the graph
+		/// </summary>
+		public string Subject
+		{
+			get{return mSubject;}
+			set{mSubject = value;}
+		}
+		/// <summary>
+		/// Gets or sets the title of the graph
+		/// </summary>
+		public string Title
+		{
+			get{return mTitle;}
+			set{mTitle = value;}
+		}
+		#endregion
+
+		#region Constructor
+		/// <summary>
+		/// Default constructor
+		/// </summary>
+		public BinaryReport()
+		{
+			
+		}
+		#endregion
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/BinaryReportCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/BinaryReportCollection.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/BinaryReportCollection.cs	(revision 2769)
@@ -0,0 +1,39 @@
+using System;
+using System.Collections;
+namespace Netron.GraphLib.IO.Reporting
+{
+	/// <summary>
+	/// STC of BinaryReport objects
+	/// </summary>
+	public class BinaryReportCollection : CollectionBase
+	{
+
+		/// <summary>
+		/// Adds a report to the collection
+		/// </summary>
+		/// <param name="report"></param>
+		/// <returns></returns>
+		public int Add(BinaryReport report)
+		{
+			return this.InnerList.Add(report);
+		}
+
+		/// <summary>
+		/// Integer indexer
+		/// </summary>
+		public BinaryReport this[int index]
+		{
+			get{
+				return this.InnerList[index] as BinaryReport;
+			}
+		}
+
+		/// <summary>
+		/// Default constructor
+		/// </summary>
+		public BinaryReportCollection()
+		{
+			
+		}
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/BinaryReporter.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/BinaryReporter.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/BinaryReporter.cs	(revision 2769)
@@ -0,0 +1,148 @@
+using System;
+using System.IO;
+using Netron.GraphLib.Interfaces;
+using Netron.GraphLib.IO.Binary;
+using System.Diagnostics;
+using System.Runtime.Serialization.Formatters.Binary;
+namespace Netron.GraphLib.IO.Reporting
+{
+	/// <summary>
+	/// Summary description for BinaryReporter.
+	/// </summary>
+	public class BinaryReporter : IReporter
+	{
+
+		/// <summary>
+		/// Occurs when a report is found and added to the collection
+		/// </summary>
+		public event InfoDelegate OnReport;
+
+		#region Fields
+		private string path;
+		#endregion
+
+		#region Properties
+		/// <summary>
+		/// Constructor
+		/// </summary>
+		/// <param name="path">the path to either a binary saved diagram or a directory, in the latter case the report will contain a
+		/// collection of reports</param>
+		public BinaryReporter(string path)
+		{
+			this.path = path;
+		}
+
+		#endregion
+
+		#region Methods
+
+		/// <summary>
+		/// Returns a BinaryReport or a collection of BinaryReport objects depending on whether the given path is a file or a directory
+		/// </summary>
+		/// <returns></returns>
+		public object Report()
+		{
+			if(Directory.Exists(path)) //directory
+					return GetReports();
+			else
+				return GetReport(path);
+		}
+
+		/// <summary>
+		/// Assuming the given path is a directory this method will return a 
+		/// collection of BinaryReports of the binary diagram in the directory
+		/// </summary>
+		/// <returns></returns>
+		private BinaryReportCollection GetReports()
+		{
+			string[] files = Directory.GetFiles(path,"*.netron");
+			BinaryReportCollection col = new BinaryReportCollection();
+			BinaryReport report;
+			for(int k=0; k<files.Length; k++)
+			{
+				report = GetReport(files[k]);
+				if(report!=null) col.Add(report);
+			}
+			return col;
+		}
+
+		/// <summary>
+		/// Returns a BinaryReport of the diagram save in the given path/file
+		/// </summary>
+		/// <param name="filePath"></param>
+		/// <returns></returns>
+		private BinaryReport GetReport(string filePath)
+		{
+			BinaryReport report = new BinaryReport();
+			BinaryCapsule capsule = LoadCapsule(filePath);
+			if(capsule!=null)
+			{
+				
+				report.Thumbnail = capsule.Thumbnail;
+				GraphInformation info = capsule.Abstract.GraphInformation;
+				report.Author = info.Author;
+				report.CreationDate = info.CreationDate;
+				report.Description = info.Description;
+				report.FileSize = new System.IO.FileInfo(filePath).Length;
+				report.Path = filePath;
+				report.Subject = info.Subject;
+				report.Title = info.Title;
+				if(OnReport!=null) OnReport(report,OutputInfoLevels.Info);
+				return report;
+			}
+			else
+				return null;
+		}
+
+		private BinaryCapsule LoadCapsule(string fileName)
+		{
+			FileStream fs=null;
+					
+			try
+			{
+				fs= File.OpenRead(fileName);
+			}
+			catch (System.IO.DirectoryNotFoundException exc)
+			{
+				System.Windows.Forms.MessageBox.Show(exc.Message);
+			}
+			catch(System.IO.FileLoadException exc)
+			{				
+				System.Windows.Forms.MessageBox.Show(exc.Message);
+			}
+			catch (System.IO.FileNotFoundException exc)
+			{
+				System.Windows.Forms.MessageBox.Show(exc.Message);
+			}
+			catch
+			{				
+				Trace.WriteLine("Non-CLS exception caught.","BinarySerializer.SaveAs");
+			}
+			//donnot open anything if filestream is not there
+			if (fs==null) return null;
+			try
+			{
+						
+				BinaryFormatter f = new BinaryFormatter();
+				
+				BinaryCapsule capsule = (BinaryCapsule) f.Deserialize(fs); 						
+				
+				return capsule;
+			}
+			catch(System.Runtime.Serialization.SerializationException exc)
+			{
+				Trace.WriteLine(exc.Message,"BinaryReporter.LoadCapsule");
+				return null;
+			}
+			catch(Exception exc)
+			{
+				Trace.WriteLine(exc.Message,"BinaryReporter.LoadCapsule");
+				return null;
+			}
+
+		}
+
+		#endregion
+		
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/ShapeReporter.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/ShapeReporter.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Reporting/ShapeReporter.cs	(revision 2769)
@@ -0,0 +1,18 @@
+using System;
+
+namespace Netron.GraphLib.IO.Reporting
+{
+	/// <summary>
+	/// Summary description for ShapeReporter.
+	/// </summary>
+	public class ShapeReporter
+	{
+		/// <summary>
+		/// Default constructor
+		/// </summary>
+		public ShapeReporter()
+		{
+			throw new NotImplementedException("Sorry, it's still in the back of my noodle");
+		}
+	}
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/SVG/SVGSerializer.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/SVG/SVGSerializer.cs	(revision 2769)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/SVG/SVGSerializer.cs	(revision 2769)
@@ -0,0 +1,194 @@
+using System;
+using System.Diagnostics;
+using System.Xml;
+using Netron.GraphLib.UI;
+namespace Netron.GraphLib.IO.SVG
+{
+	/// <summary>
+	/// Exports a diagram to SVG
+	/// </summary>
+	public class SVGSerializer
+	{
+		#region Fields
+		private GraphControl site;
+		#endregion
+
+		#region Constructor
+		/// <summary>
+		/// Defautl constructor
+		/// </summary>
+		/// <param name="site"></param>
+		public SVGSerializer(GraphControl site)
+		{
+			this.site = site;
+		}
+
+		#endregion
+
+		#region Methods
+		/// <summary>
+		/// Serializes the given graph abstract to XML with the given XmlWriter
+		/// </summary>
+		/// <param name="writer"></param>
+		/// <param name="g"></param>
+		public static void Serialize(XmlWriter writer, GraphAbstract g	)
+		{
+			writer.WriteStartElement("svg");
+			writer.WriteAttributeString("xmlns","http://www.w3.org/2000/svg");
+			WriteDefinitions(writer);
+			WriteFilters(writer);
+			WriteMetadata(writer, g);
+			
+			WriteConnections(writer, g);
+			WriteShapes(writer, g);
+
+			writer.WriteEndElement();
+		}
+
+		private static void WriteShapes(XmlWriter writer, GraphAbstract g)
+		{
+			writer.WriteStartElement("g");
+			for(int k=0; k<g.Shapes.Count; k++) //<rect x="1140" y="30" width="100" height="20" style="fill: url(#two_hues); stroke: black;"/>
+			{
+				writer.WriteStartElement("rect");
+				writer.WriteAttributeString("x", g.Shapes[k].X.ToString());
+				writer.WriteAttributeString("y", g.Shapes[k].Y.ToString());
+				writer.WriteAttributeString("width", g.Shapes[k].Width.ToString());
+				writer.WriteAttributeString("height", g.Shapes[k].Height.ToString());
+				writer.WriteAttributeString("rx", "2");//rounded rectangle				
+
+				//writer.WriteAttributeString("style", "fill: url(#two_hues); stroke: black;");
+				writer.WriteAttributeString("fill",  string.Concat("#", (g.Shapes[k].ShapeColor.ToArgb() & 0x00FFFFFF).ToString("X6")) );
+				writer.WriteEndElement();
+				
+				//<text text-anchor="middle" x="{$x+50}" y="{$y+15}">
+				writer.WriteStartElement("text");
+				writer.WriteAttributeString("x", Convert.ToString(g.Shapes[k].X + 10));
+				writer.WriteAttributeString("y", Convert.ToString(g.Shapes[k].Y + 15));
+				writer.WriteAttributeString("text-anchor", "start");			
+				writer.WriteAttributeString("font-size", "9");
+				writer.WriteString(g.Shapes[k].Text);
+				writer.WriteEndElement();
+				
+			}
+			writer.WriteEndElement();
+		}
+
+		private static void WriteConnections(XmlWriter writer, GraphAbstract g)
+		{
+			/*
+				<line class="edge" x1="{$x1}" y1="{$y1}" x2="{$x}" y2="{$y+50}">
+				<xsl:attribute name="style">marker-end:url(#arrow)</xsl:attribute>
+				</line>
+			 */
+			writer.WriteStartElement("g");
+			for(int k=0; k<g.Connections.Count; k++) 
+			{
+				writer.WriteStartElement("line");
+				writer.WriteAttributeString("x1", g.Connections[k].From.Location.X.ToString());
+				writer.WriteAttributeString("y1", g.Connections[k].From.Location.Y.ToString());
+				writer.WriteAttributeString("x2", g.Connections[k].To.Location.X.ToString());
+				writer.WriteAttributeString("y2", g.Connections[k].To.Location.Y.ToString());				
+				//writer.WriteAttributeString("style", "fill: url(#two_hues); stroke: black;");				
+				writer.WriteEndElement();
+			}
+			writer.WriteEndElement();
+		}
+
+		private static void WriteMetadata(XmlWriter writer, GraphAbstract g)
+		{
+			writer.WriteStartElement("title");
+			writer.WriteString(g.GraphInformation.Title);
+			writer.WriteEndElement();
+			writer.WriteStartElement("desc");
+			writer.WriteString(g.GraphInformation.Description);
+			writer.WriteEndElement();
+		}
+
+		private static void WriteDefinitions(XmlWriter writer)
+		{
+			writer.WriteRaw(@"<defs>
+										<linearGradient id=""two_hues"">
+												<stop offset=""0%"" style=""stop-color: #ffffff;""/>
+												<stop offset=""100%"" style=""stop-color: #4682B4;""/>
+										</linearGradient>
+										</defs>"
+			  );
+//			writer.WriteStartElement("defs");
+//			writer.WriteStartElement("linearGradient");
+//			writer.WriteAttributeString("id", "two_hues");
+//			writer.WriteStartElement("stop");
+//			writer.WriteAttributeString("offset", "0%");
+//			writer.WriteAttributeString("style","stop-color: #ffffff");
+//			writer.WriteEndElement();//stop
+//			writer.WriteStartElement("stop");
+//			writer.WriteAttributeString("offset", "100%");
+//			writer.WriteAttributeString("style","stop-color: #4682B4");
+//			writer.WriteEndElement();//stop
+//			writer.WriteEndElement();//linearGradient
+//			writer.WriteEndElement();//defs
+
+
+		}
+
+		private static void WriteFilters(XmlWriter writer)
+		{
+
+			writer.WriteRaw(@"<filter id=""drop-shadow"">
+											<feGaussianBlur in=""SourceAlpha"" stdDeviation=""2"" result=""blur""/>
+											<feOffset in=""blur"" dx=""4"" dy=""4"" result=""offsetBlur""/>
+											<feMerge>
+												<feMergeNode in=""offsetBlur""/>
+												<feMergeNode in=""SourceGraphic""/>
+											</feMerge>
+										</filter>"
+									);
+
+//			writer.WriteStartElement("filter");
+//			writer.WriteAttributeString("id","dropShadow");
+//			writer.WriteStartElement("feGaussianBlur");
+//			writer.WriteAttributeString("in", "SourceAlpha");
+//			writer.WriteAttributeString("stdDeviation","2");
+//			writer.WriteAttributeString("result","blur");
+//			writer.WriteEndElement();//feGaussianBlur
+//			writer.WriteEndElement();//filter
+
+
+		}
+		/// <summary>
+		/// Saves the diagram to SVG format
+		/// </summary>
+		/// <param name="fileName">the file-path</param>
+		/// <param name="site">the graph-control instance to be serialized</param>
+		/// <returns></returns>
+		public static  bool SaveAs(string fileName, GraphControl site)
+		{
+			XmlTextWriter tw = null;
+			try
+			{
+
+				tw = new XmlTextWriter(fileName,System.Text.Encoding.Unicode);
+				tw.Formatting = System.Xml.Formatting.Indented;				
+				Serialize(tw,site.Abstract);
+				
+				return true;
+			}
+			catch(Exception exc)			
+			{				
+				//TODO: more specific exception handling here
+				Trace.WriteLine(exc.Message, "SVGSerializer.SaveAs");
+			}
+			catch
+			{
+				Trace.WriteLine("Non-CLS exception caught.","BinarySerializer.SaveAs");
+			}
+			finally
+			{
+				if(tw!=null) tw.Close();
+			}
+			return false;
+
+		}
+		#endregion
+	}
+}
