[mapguide-commits] r8462 - in trunk/Tools/Maestro: . Maestro OSGeo.MapGuide.ObjectModels OSGeo.MapGuide.ObjectModels/ApplicationDefinition OSGeo.MapGuide.ObjectModels/ApplicationDefinition/v1_0_0 OSGeo.MapGuide.ObjectModels/Common OSGeo.MapGuide.ObjectModels/DrawingSource OSGeo.MapGuide.ObjectModels/DrawingSource/v1_0_0 OSGeo.MapGuide.ObjectModels/FeatureSource OSGeo.MapGuide.ObjectModels/FeatureSource/v1_0_0 OSGeo.MapGuide.ObjectModels/IO OSGeo.MapGuide.ObjectModels/LayerDefinition OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0 OSGeo.MapGuide.ObjectModels/LoadProcedure OSGeo.MapGuide.ObjectModels/LoadProcedure/v1_0_0 OSGeo.MapGuide.ObjectModels/MapDefinition OSGeo.MapGuide.ObjectModels/MapDefinition/v1_0_0 OSGeo.MapGuide.ObjectModels/PrintLayout OSGeo.MapGuide.ObjectModels/PrintLayout/v1.0.0 OSGeo.MapGuide.ObjectModels/Properties OSGeo.MapGuide.ObjectModels/SymbolDefinition OSGeo.MapGuide.ObjectModels/SymbolDefinition/v1_0_0 OSGeo.MapGuide.ObjectModels/SymbolLibrary OSGeo.MapGuide .ObjectModels/SymbolLibrary/v1.0.0 OSGeo.MapGuide.ObjectModels/WatermarkDefinition OSGeo.MapGuide.ObjectModels/WebLayout OSGeo.MapGuide.ObjectModels/WebLayout/v1_0_0

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Dec 25 05:55:42 PST 2014


Author: jng
Date: 2014-12-25 05:55:42 -0800 (Thu, 25 Dec 2014)
New Revision: 8462

Added:
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/ApplicationDefinitionInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/v1_0_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/v1_0_0/ApplicationDefinitionImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/v1_0_0/ApplicationDefinitionInfoImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/BaseSerializable.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Check.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ExpressionDataType.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ExtendedDataType.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/Geometries.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IEnvelope.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IExpressionPropertySource.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IFdoSerializable.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IFdoSpatialContext.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ILongTransaction.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IRepositoryItem.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IResourceIdReference.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ResourceItems.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ResourceList.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/DrawingSource/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/DrawingSource/DrawingSourceInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/DrawingSource/v1_0_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/DrawingSource/v1_0_0/DrawingSourceImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/FeatureSourceInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/v1_0_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/v1_0_0/FeatureSourceImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IO/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IO/ReadOnlyRewindableStream.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IO/Utf8XmlWriter.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IResource.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IVersionedEntity.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/LayerDefinitionInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/GridLayerDefinitionImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/LayerElementFactoryImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/VectorLayerDefinitionImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_1_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_2_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_3_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v2_3_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v2_4_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/LoadProcedureInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/v1_0_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/v1_0_0/LoadProcedureFactoryImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/v1_0_0/LoadProcedureImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/v1_1_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/v2_4_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/MapDefinition/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/MapDefinition/MapDefinitionInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/MapDefinition/v1_0_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/MapDefinition/v1_0_0/MapDefinitionImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/OSGeo.MapGuide.ObjectModels.csproj
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/PrintLayout/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/PrintLayout/PrintLayoutInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/PrintLayout/v1.0.0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/PrintLayout/v1.0.0/PrintLayoutImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Properties/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Properties/AssemblyInfo.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceContentVersionChecker.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceIdentifier.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeDescriptor.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypes.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Strings.Designer.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Strings.resx
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/SymbolDefinitionInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/v1_0_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/v1_0_0/SymbolDefinitionImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/v1_1_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/v2_4_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolLibrary/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolLibrary/SymbolLibraryInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolLibrary/v1.0.0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolLibrary/v1.0.0/SymbolLibraryImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/UntypedResource.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Utility.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WatermarkDefinition/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WatermarkDefinition/WatermarkDefinitionInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WatermarkDefinition/v2_3_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WatermarkDefinition/v2_4_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WebLayout/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WebLayout/WebLayoutInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WebLayout/v1_0_0/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WebLayout/v1_0_0/WebLayoutImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/XmlNamespaces.cs
Modified:
   trunk/Tools/Maestro/Maestro/Maestro_All.sln
Log:
#2513: Check in first cut of separated Object Models library. Nothing uses this library yet as the existing object models in the Maestro API and supporting libraries are still present and have not been removed.

Modified: trunk/Tools/Maestro/Maestro/Maestro_All.sln
===================================================================
--- trunk/Tools/Maestro/Maestro/Maestro_All.sln	2014-12-25 12:22:27 UTC (rev 8461)
+++ trunk/Tools/Maestro/Maestro/Maestro_All.sln	2014-12-25 13:55:42 UTC (rev 8462)
@@ -162,6 +162,8 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MpuCalc", "..\MpuCalc\MpuCalc.csproj", "{43B01C27-E0D2-439B-83ED-8C814ED1526A}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSGeo.MapGuide.ObjectModels", "..\OSGeo.MapGuide.ObjectModels\OSGeo.MapGuide.ObjectModels.csproj", "{48C5EB23-45AE-4C4C-8FAB-635428AE8CA1}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -360,6 +362,10 @@
 		{43B01C27-E0D2-439B-83ED-8C814ED1526A}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{43B01C27-E0D2-439B-83ED-8C814ED1526A}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{43B01C27-E0D2-439B-83ED-8C814ED1526A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{48C5EB23-45AE-4C4C-8FAB-635428AE8CA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{48C5EB23-45AE-4C4C-8FAB-635428AE8CA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{48C5EB23-45AE-4C4C-8FAB-635428AE8CA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{48C5EB23-45AE-4C4C-8FAB-635428AE8CA1}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE


Property changes on: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels
___________________________________________________________________
Added: svn:ignore
   + bin
obj
*.user


Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/ApplicationDefinitionInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/ApplicationDefinitionInterfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/ApplicationDefinitionInterfaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,1407 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Xml;
+
+namespace OSGeo.MapGuide.ObjectModels.ApplicationDefinition
+{
+    /// <summary>
+    /// Describes all available widgets
+    /// </summary>
+    public interface IApplicationDefinitionWidgetInfoSet
+    {
+        /// <summary>
+        /// Gets the widgets
+        /// </summary>
+        IEnumerable<IWidgetInfo> WidgetInfo { get; }
+    }
+
+    /// <summary>
+    /// Describes all available containers
+    /// </summary>
+    public interface IApplicationDefinitionContainerInfoSet
+    {
+        /// <summary>
+        /// Gets the containers
+        /// </summary>
+        IEnumerable<IApplicationDefinitionContainerInfo> ContainerInfo { get; }
+    }
+
+    /// <summary>
+    /// Describes all available templates
+    /// </summary>
+    public interface IApplicationDefinitionTemplateInfoSet
+    {
+        /// <summary>
+        /// Gets the templates
+        /// </summary>
+        IEnumerable<IApplicationDefinitionTemplateInfo> TemplateInfo { get; }
+    }
+
+    /// <summary>
+    /// Describes a fusion widget
+    /// </summary>
+    public interface IWidgetInfo
+    {
+        /// <summary>
+        /// Gets the type of widget
+        /// </summary>
+        string Type { get; }
+
+        /// <summary>
+        /// Gets the localized type of the widget
+        /// </summary>
+        string LocalizedType { get; }
+
+        /// <summary>
+        /// Gets the description
+        /// </summary>
+        string Description { get; }
+
+        /// <summary>
+        /// Gets the location
+        /// </summary>
+        string Location { get; }
+
+        /// <summary>
+        /// Gets the label
+        /// </summary>
+        string Label { get; }
+
+        /// <summary>
+        /// Gets the tooltip
+        /// </summary>
+        string Tooltip { get; }
+
+        /// <summary>
+        /// Gets the text to display in the status bar
+        /// </summary>
+        string StatusText { get; }
+
+        /// <summary>
+        /// Gets the image url
+        /// </summary>
+        string ImageUrl { get; }
+
+        /// <summary>
+        /// Gets the image css class
+        /// </summary>
+        string ImageClass { get; }
+
+        /// <summary>
+        /// Indicates if this is a UI widget
+        /// </summary>
+        bool StandardUi { get; }
+
+        /// <summary>
+        /// Indicates which containers this widget is containable by
+        /// </summary>
+        string[] ContainableBy { get; }
+
+        /// <summary>
+        /// Gets the parameters for this widget
+        /// </summary>
+        IWidgetParameter[] Parameters { get; }
+    }
+
+    /// <summary>
+    /// Describes a parameter of a fusion widget
+    /// </summary>
+    public interface IWidgetParameter
+    {
+        /// <summary>
+        /// Gets the name of the parameter
+        /// </summary>
+        string Name { get; }
+
+        /// <summary>
+        /// Gets the description of the parameter
+        /// </summary>
+        string Description { get; }
+
+        /// <summary>
+        /// Gets the type of the parameter
+        /// </summary>
+        string Type { get; }
+
+        /// <summary>
+        /// Gets the label for this parameter
+        /// </summary>
+        string Label { get; }
+
+        /// <summary>
+        /// Gets the minimum allowed value of this parameter
+        /// </summary>
+        string Min { get; }
+
+        /// <summary>
+        /// Gets the maximum allowed value of this parameter
+        /// </summary>
+        string Max { get; }
+
+        /// <summary>
+        /// Gets the list of allowed value of this parameter
+        /// </summary>
+        IAllowedValue[] AllowedValue { get; }
+
+        /// <summary>
+        /// Gets the default value of this parameter
+        /// </summary>
+        string DefaultValue { get; }
+
+        /// <summary>
+        /// Gets whether this parameter is mandatory
+        /// </summary>
+        bool IsMandatory { get; }
+    }
+
+    /// <summary>
+    /// Describes an allowed widget parameter value
+    /// </summary>
+    public interface IAllowedValue
+    {
+        /// <summary>
+        /// Gets the name of this value
+        /// </summary>
+        string Name { get; }
+
+        /// <summary>
+        /// Gets the label of this value
+        /// </summary>
+        string Label { get; }
+    }
+
+    /// <summary>
+    /// Describes a fusion container
+    /// </summary>
+    public interface IApplicationDefinitionContainerInfo
+    {
+        /// <summary>
+        /// Gets the type of container
+        /// </summary>
+        string Type { get; }
+
+        /// <summary>
+        /// Gets the localized type of container
+        /// </summary>
+        string LocalizedType { get; }
+
+        /// <summary>
+        /// Gets the description of this container
+        /// </summary>
+        string Description { get; }
+
+        /// <summary>
+        /// Gets the preview image url of this container
+        /// </summary>
+        string PreviewImageUrl { get; }
+    }
+
+    /// <summary>
+    /// Describes a fusion template
+    /// </summary>
+    public interface IApplicationDefinitionTemplateInfo
+    {
+        /// <summary>
+        /// Gets the name of this template
+        /// </summary>
+        string Name { get; }
+
+        /// <summary>
+        /// Gets the url location of this template
+        /// </summary>
+        string LocationUrl { get; }
+
+        /// <summary>
+        /// Gets the template description
+        /// </summary>
+        string Description { get; }
+
+        /// <summary>
+        /// Gets the preview image url of this template
+        /// </summary>
+        string PreviewImageUrl { get; }
+
+        /// <summary>
+        /// Gets the panels applicable for this template
+        /// </summary>
+        IEnumerable<IApplicationDefinitionPanel> Panels { get; }
+    }
+
+    /// <summary>
+    /// Describes a fusion template panel
+    /// </summary>
+    public interface IApplicationDefinitionPanel
+    {
+        /// <summary>
+        /// Gets the name of this panel
+        /// </summary>
+        string Name { get; }
+
+        /// <summary>
+        /// Gets the label of this panel
+        /// </summary>
+        string Label { get; }
+
+        /// <summary>
+        /// Gets the description of this panel
+        /// </summary>
+        string Description { get; }
+    }
+
+    /// <summary>
+    /// Factory method signature for creating fusion widgets
+    /// </summary>
+    /// <param name="info"></param>
+    /// <returns></returns>
+    public delegate IWidget WidgetFactoryMethod(IWidgetInfo info);
+
+    /// <summary>
+    /// Factory method signature for creating fusion widget containers
+    /// </summary>
+    /// <param name="container"></param>
+    /// <returns></returns>
+    public delegate IWidgetContainer ContainerFactoryMethod(IApplicationDefinitionContainerInfo container);
+
+    /// <summary>
+    /// Defines the stock fusion template names that come with a standard MapGuide installation
+    /// </summary>
+    public static class FusionTemplateNames
+    {
+        /// <summary>
+        /// The preview template. Used for previewing other resources
+        /// </summary>
+        public const string Preview = "Preview"; //NOXLATE
+
+        /// <summary>
+        /// The Aqua template
+        /// </summary>
+        public const string Aqua = "Aqua"; //NOXLATE
+
+        /// <summary>
+        /// The Maroon template
+        /// </summary>
+        public const string Maroon = "Maroon"; //NOXLATE
+
+        /// <summary>
+        /// The Slate template
+        /// </summary>
+        public const string Slate = "Slate"; //NOXLATE
+
+        /// <summary>
+        /// The LimeGold template
+        /// </summary>
+        public const string LimeGold = "LimeGold"; //NOXLATE
+
+        /// <summary>
+        /// The TurquoiseYellow template
+        /// </summary>
+        public const string TurquoiseYellow = "TurquoiseYellow"; //NOXLATE
+    }
+
+    /// <summary>
+    /// A set of known widgets that come with a fusion installation
+    /// </summary>
+    public static class KnownWidgetNames
+    {
+        public const string About = "About"; //NOXLATE
+
+        public const string ActivityIndicator = "ActivityIndicator"; //NOXLATE
+
+        public const string BasemapSwitcher = "BasemapSwitcher"; //NOXLATE
+
+        public const string Buffer = "Buffer"; //NOXLATE
+
+        public const string BufferPanel = "BufferPanel"; //NOXLATE
+
+        public const string CenterSelection = "CenterSelection"; //NOXLATE
+
+        public const string ClearSelection = "ClearSelection"; //NOXLATE
+
+        public const string ColorPicker = "ColorPicker"; //NOXLATE
+
+        public const string CTRLClick = "CTRLClick"; //NOXLATE
+
+        public const string CursorPosition = "CursorPosition"; //NOXLATE
+
+        public const string EditableScale = "EditableScale"; //NOXLATE
+
+        public const string ExtentHistory = "ExtentHistory"; //NOXLATE
+
+        public const string FeatureInfo = "FeatureInfo"; //NOXLATE
+
+        public const string Help = "Help"; //NOXLATE
+
+        public const string InitialMapView = "InitialMapView"; //NOXLATE
+
+        public const string InvokeScript = "InvokeScript"; //NOXLATE
+
+        public const string InvokeURL = "InvokeURL"; //NOXLATE
+
+        public const string LayerManager = "LayerManager"; //NOXLATE
+
+        public const string Legend = "Legend"; //NOXLATE
+
+        public const string LinkToView = "LinkToView"; //NOXLATE
+
+        public const string MapMenu = "MapMenu"; //NOXLATE
+
+        public const string Maptip = "Maptip"; //NOXLATE
+
+        public const string Measure = "Measure"; //NOXLATE
+
+        public const string Navigator = "Navigator"; //NOXLATE
+
+        public const string OverviewMap = "OverviewMap"; //NOXLATE
+
+        public const string Pan = "Pan"; //NOXLATE
+
+        public const string PanOnClick = "PanOnClick"; //NOXLATE
+
+        public const string PanQuery = "PanQuery"; //NOXLATE
+
+        public const string Print = "Print"; //NOXLATE
+
+        public const string Query = "Query"; //NOXLATE
+
+        public const string QuickPlot = "QuickPlot"; //NOXLATE
+
+        public const string Redline = "Redline"; //NOXLATE
+
+        public const string RefreshMap = "RefreshMap"; //NOXLATE
+
+        public const string SaveMap = "SaveMap"; //NOXLATE
+
+        public const string Scalebar = "Scalebar"; //NOXLATE
+
+        public const string ScalebarDual = "ScalebarDual"; //NOXLATE
+
+        public const string Search = "Search"; //NOXLATE
+
+        public const string Select = "Select"; //NOXLATE
+
+        public const string SelectionInfo = "SelectionInfo"; //NOXLATE
+
+        public const string SelectPolygon = "SelectPolygon"; //NOXLATE
+
+        public const string SelectRadius = "SelectRadius"; //NOXLATE
+
+        public const string SelectRadiusValue = "SelectRadiusValue"; //NOXLATE
+
+        public const string SelectWithin = "SelectWithin"; //NOXLATE
+
+        public const string TaskPane = "TaskPane"; //NOXLATE
+
+        public const string Theme = "Theme"; //NOXLATE
+
+        public const string ViewOptions = "ViewOptions"; //NOXLATE
+
+        public const string ViewSize = "ViewSize"; //NOXLATE
+
+        public const string Zoom = "Zoom"; //NOXLATE
+
+        public const string ZoomOnClick = "ZoomOnClick"; //NOXLATE
+
+        public const string ZoomToSelection = "ZoomToSelection"; //NOXLATE
+    }
+
+    /// <summary>
+    /// Represents a fusion flexible layout (aka. An Application Definition document)
+    /// </summary>
+    public interface IApplicationDefinition : IResource, IExtensibleElement
+    {
+        /// <summary>
+        /// Gets or sets the title
+        /// </summary>
+        string Title { get; set; }
+
+        /// <summary>
+        /// Gets or sets the template url
+        /// </summary>
+        string TemplateUrl { get; set; }
+
+        /// <summary>
+        /// Gets the map set
+        /// </summary>
+        IMapSet MapSet { get; }
+
+        /// <summary>
+        /// Gets the widget sets
+        /// </summary>
+        IEnumerable<IWidgetSet> WidgetSets { get; }
+
+        /// <summary>
+        /// Creates a widget set
+        /// </summary>
+        /// <param name="mapWidget"></param>
+        /// <returns></returns>
+        IWidgetSet CreateWidgetSet(IMapWidget mapWidget);
+
+        /// <summary>
+        /// Adds the specified widget set
+        /// </summary>
+        /// <param name="set"></param>
+        void AddWidgetSet(IWidgetSet set);
+
+        /// <summary>
+        /// Removes the specified widget set
+        /// </summary>
+        /// <param name="set"></param>
+        void RemoveWidgetSet(IWidgetSet set);
+
+        /// <summary>
+        /// Creates a widget reference
+        /// </summary>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        IWidgetItem CreateWidgetReference(string name);
+
+        /// <summary>
+        /// Creates a separator
+        /// </summary>
+        /// <returns></returns>
+        ISeparator CreateSeparator();
+
+        /// <summary>
+        /// Create a flyout menu
+        /// </summary>
+        /// <param name="label"></param>
+        /// <returns></returns>
+        IFlyoutItem CreateFlyout(string label);
+
+        /// <summary>
+        /// Adds the new map group to the current map set with a default MapGuide child map
+        /// </summary>
+        /// <param name="id"></param>
+        /// <param name="singleTile"></param>
+        /// <param name="mapDefinitionId"></param>
+        /// <returns></returns>
+        IMapGroup AddMapGroup(string id, bool singleTile, string mapDefinitionId);
+
+        /// <summary>
+        /// Adds a new map group to the specified map set with a default MapGuide child map
+        /// </summary>
+        /// <param name="id"></param>
+        /// <param name="singleTile"></param>
+        /// <param name="mapDefinitionId"></param>
+        /// <param name="centerX"></param>
+        /// <param name="centerY"></param>
+        /// <param name="scale"></param>
+        /// <returns></returns>
+        IMapGroup AddMapGroup(string id, bool singleTile, string mapDefinitionId, double centerX, double centerY, double scale);
+
+        /// <summary>
+        /// Create a widget from the specified widget information
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="widgetInfo"></param>
+        /// <returns></returns>
+        IWidget CreateWidget(string name, IWidgetInfo widgetInfo);
+
+        /// <summary>
+        /// Creates a widget reference UI container
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="containerInfo"></param>
+        /// <returns></returns>
+        IUIItemContainer CreateContainer(string name, IApplicationDefinitionContainerInfo containerInfo);
+
+        /// <summary>
+        /// Creates a map widget
+        /// </summary>
+        /// <param name="mapId"></param>
+        /// <param name="contextMenuId"></param>
+        /// <returns></returns>
+        IMapWidget CreateMapWidget(string mapId, string contextMenuId);
+    }
+
+    /// <summary>
+    /// Represents an element that is extensible with arbitrary XML content
+    /// </summary>
+    public interface IExtensibleElement
+    {
+        /// <summary>
+        /// Gets the extension
+        /// </summary>
+        IExtension Extension { get; }
+    }
+
+    /// <summary>
+    /// Represents a region of arbitrary XML content
+    /// </summary>
+    public interface IExtension
+    {
+        /// <summary>
+        /// Gets or sets the XML content. It is best to use the extension methods to get and set the appropriate values
+        /// rather than accessing this array directly
+        /// </summary>
+        XmlElement[] Content { get; set; }
+    }
+
+    /// <summary>
+    /// A reusable <see cref="XmlDocument"/> providing <see cref="XmlElement"/> creation functionality
+    /// for those that require it
+    /// </summary>
+    internal static class AppDefDocument
+    {
+        private static XmlDocument _doc;
+
+        internal static XmlDocument Instance
+        {
+            get
+            {
+                if (_doc == null)
+                    _doc = new XmlDocument();
+
+                return _doc;
+            }
+        }
+    }
+
+    /// <summary>
+    /// Extension method class
+    /// </summary>
+    public static class ExtensionMethods
+    {
+        /// <summary>
+        /// Gets the name of the fusion template
+        /// </summary>
+        /// <param name="appDef"></param>
+        /// <returns></returns>
+        public static string GetTemplateName(this IApplicationDefinition appDef)
+        {
+            string[] tokens = appDef.TemplateUrl.Split('/');
+            // fusion/templates/mapguide/{templateName}/index.html
+            return tokens[tokens.Length - 2];
+        }
+
+        /// <summary>
+        /// Gets whether a widget with the specified name already exists
+        /// </summary>
+        /// <param name="appDef"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static bool WidgetNameExists(this IApplicationDefinition appDef, string name)
+        {
+            Check.NotNull(appDef, "appDef");
+            Check.NotEmpty(name, "name");
+
+            return appDef.FindWidget(name) != null;
+        }
+
+        /// <summary>
+        /// Gets the widget of the specified name
+        /// </summary>
+        /// <param name="appDef"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static IWidget FindWidget(this IApplicationDefinition appDef, string name)
+        {
+            Check.NotNull(appDef, "appDef");
+            Check.NotEmpty(name, "name");
+
+            foreach (var set in appDef.WidgetSets)
+            {
+                foreach (var wgt in set.Widgets)
+                {
+                    if (wgt.Name == name)
+                        return wgt;
+                }
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Removes the specified widget from this
+        /// </summary>
+        /// <param name="appDef">The app definition.</param>
+        /// <param name="widgetName">Name of the widget to remove.</param>
+        /// <param name="deleteReferences">if set to <c>true</c> [deletes any references to the widget to be deleted].</param>
+        public static void RemoveWidget(this IApplicationDefinition appDef, string widgetName, bool deleteReferences)
+        {
+            Check.NotNull(appDef, "appDef"); //NOXLATE
+            Check.NotEmpty(widgetName, "widgetName"); //NOXLATE
+
+            IWidgetSet matchingSet = null;
+            IWidget matchingWidget = null;
+            foreach (var set in appDef.WidgetSets)
+            {
+                if (matchingSet == null)
+                {
+                    foreach (var wgt in set.Widgets)
+                    {
+                        if (wgt.Name == widgetName)
+                        {
+                            matchingSet = set;
+                            matchingWidget = wgt;
+                            break;
+                        }
+                    }
+                }
+            }
+
+            int removed = 0;
+
+            if (matchingSet != null && matchingWidget != null)
+            {
+                matchingSet.RemoveWidget(matchingWidget);
+
+                if (deleteReferences)
+                {
+                    foreach (var set in appDef.WidgetSets)
+                    {
+                        foreach (var cnt in set.Containers)
+                        {
+                            var uicnt = cnt as IUIItemContainer;
+                            if (uicnt != null)
+                            {
+                                List<IWidgetItem> removeMe = new List<IWidgetItem>();
+                                foreach (var uiitem in uicnt.Items)
+                                {
+                                    IWidgetItem witem = uiitem as IWidgetItem;
+                                    if (witem != null && witem.Widget == widgetName)
+                                    {
+                                        removeMe.Add(witem);
+                                        System.Diagnostics.Trace.TraceInformation("Found widget reference in container: " + uicnt.Name); //NOXLATE
+                                    }
+                                }
+
+                                if (removeMe.Count > 0)
+                                {
+                                    foreach (var rm in removeMe)
+                                    {
+                                        uicnt.RemoveItem(rm);
+                                        removed++;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            if (deleteReferences)
+                System.Diagnostics.Trace.TraceInformation(removed + " widget references removed");   //NOXLATE
+        }
+
+        /// <summary>
+        /// Gets a specific container info by type
+        /// </summary>
+        /// <param name="set"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static IApplicationDefinitionContainerInfo FindContainer(this IApplicationDefinitionContainerInfoSet set, string name)
+        {
+            Check.NotNull(set, "set"); //NOXLATE
+            Check.NotEmpty(name, "name"); //NOXLATE
+
+            foreach (var cnt in set.ContainerInfo)
+            {
+                if (name.Equals(cnt.Type))
+                    return cnt;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Gets a specific Widget Info by name
+        /// </summary>
+        /// <param name="set"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static IWidgetInfo FindWidget(this IApplicationDefinitionWidgetInfoSet set, string name)
+        {
+            Check.NotNull(set, "set"); //NOXLATE
+            Check.NotEmpty(name, "name"); //NOXLATE
+
+            foreach (var wgt in set.WidgetInfo)
+            {
+                if (name.Equals(wgt.Type))
+                    return wgt;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Gets information for the named template
+        /// </summary>
+        /// <param name="set"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static IApplicationDefinitionTemplateInfo FindTemplate(this IApplicationDefinitionTemplateInfoSet set, string name)
+        {
+            Check.NotNull(set, "set"); //NOXLATE
+            Check.NotEmpty(name, "name"); //NOXLATE
+
+            foreach (var tpl in set.TemplateInfo)
+            {
+                if (name.Equals(tpl.Name))
+                    return tpl;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Gets the specified map group by its id
+        /// </summary>
+        /// <param name="set"></param>
+        /// <param name="id"></param>
+        /// <returns></returns>
+        public static IMapGroup GetGroupById(this IMapSet set, string id)
+        {
+            Check.NotNull(set, "set"); //NOXLATE
+            foreach (var group in set.MapGroups)
+            {
+                if (group.id.Equals(id))
+                    return group;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Gets the names of all properties of this extensible element
+        /// </summary>
+        /// <param name="ext"></param>
+        /// <returns></returns>
+        public static string[] GetNames(this IExtensibleElement ext)
+        {
+            Check.NotNull(ext, "ext"); //NOXLATE
+
+            List<string> names = new List<string>();
+
+            foreach (var el in ext.Extension.Content)
+            {
+                names.Add(el.Name);
+            }
+
+            return names.ToArray();
+        }
+
+        /// <summary>
+        /// Gets all the properties in this extensible element
+        /// </summary>
+        /// <param name="ext"></param>
+        /// <returns></returns>
+        public static NameValueCollection GetAllValues(this IExtensibleElement ext)
+        {
+            Check.NotNull(ext, "ext"); //NOXLATE
+            NameValueCollection values = new NameValueCollection();
+            foreach (var el in ext.Extension.Content)
+            {
+                values.Add(el.Name, el.InnerText);
+            }
+            return values;
+        }
+
+        /// <summary>
+        /// Replace the values of all properties in this extensible element with the values provided
+        /// </summary>
+        /// <param name="ext"></param>
+        /// <param name="values"></param>
+        public static void SetAllValues(this IExtensibleElement ext, NameValueCollection values)
+        {
+            Check.NotNull(ext, "ext"); //NOXLATE
+            Check.NotNull(values, "values"); //NOXLATE
+
+            var elements = new List<XmlElement>();
+            foreach (string name in values.Keys)
+            {
+                var value = values[name];
+                var rid = AppDefDocument.Instance.CreateElement(name);
+                rid.InnerText = value;
+                elements.Add(rid);
+            }
+            ext.Extension.Content = elements.ToArray();
+        }
+
+        /// <summary>
+        /// Sets the value of a property in this extensible element.
+        /// </summary>
+        /// <param name="ext"></param>
+        /// <param name="name"></param>
+        /// <param name="value"></param>
+        public static void SetValue(this IExtensibleElement ext, string name, string value)
+        {
+            Check.NotNull(ext, "ext"); //NOXLATE
+            Check.NotEmpty(name, "name"); //NOXLATE
+
+            if (ext.Extension.Content != null)
+            {
+                var el = ext.Extension.Content.FindElementByName(name);
+                if (el != null)
+                {
+                    el.InnerText = value;
+                }
+                else
+                {
+                    var values = new List<XmlElement>(ext.Extension.Content);
+                    var rid = AppDefDocument.Instance.CreateElement(name);
+                    rid.InnerText = value;
+                    values.Add(rid);
+                    ext.Extension.Content = values.ToArray();
+                }
+            }
+            else
+            {
+                var rid = AppDefDocument.Instance.CreateElement(name);
+                rid.InnerText = value;
+                ext.Extension.Content = new XmlElement[] { rid };
+            }
+
+            Trace.TraceInformation("Extensible element property {0} set to: {1}", name, value); //NOXLATE
+        }
+
+        /// <summary>
+        /// Gets the value of a property in this extensible element. If none exists, an empty string is returned
+        /// </summary>
+        /// <param name="ext"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static string GetValue(this IExtensibleElement ext, string name)
+        {
+            Check.NotNull(ext, "ext"); //NOXLATE
+            Check.NotEmpty(name, "name"); //NOXLATE
+
+            if (ext.Extension.Content != null)
+            {
+                var el = ext.Extension.Content.FindElementByName(name);
+                if (el != null)
+                {
+                    return el.InnerText;
+                }
+            }
+            return string.Empty;
+        }
+
+        /// <summary>
+        /// Returns a <see cref="XmlElement"/> whose name matches the specified name
+        /// </summary>
+        /// <param name="elements"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static XmlElement FindElementByName(this XmlElement[] elements, string name)
+        {
+            Check.NotNull(elements, "elements"); //NOXLATE
+            foreach (var el in elements)
+            {
+                if (el.Name == name)
+                    return el;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Set the map definition id
+        /// </summary>
+        /// <param name="map"></param>
+        /// <returns></returns>
+        public static string GetMapDefinition(this IMap map)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            return map.GetValue("ResourceId"); //NOXLATE
+        }
+
+        /// <summary>
+        /// Gets the map definition id
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="mapDefId"></param>
+        public static void SetMapDefinition(this IMap map, string mapDefId)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            map.SetValue("ResourceId", mapDefId); //NOXLATE
+        }
+
+        /// <summary>
+        /// Gets the first widget set of this application definition.
+        /// </summary>
+        /// <param name="appDef"></param>
+        /// <returns></returns>
+        public static IWidgetSet GetFirstWidgetSet(this IApplicationDefinition appDef)
+        {
+            Check.NotNull(appDef, "appDef"); //NOXLATE
+            IWidgetSet set = null;
+            foreach (var wgt in appDef.WidgetSets)
+            {
+                if (set == null)
+                {
+                    set = wgt;
+                    break;
+                }
+            }
+            return set;
+        }
+    }
+
+    /*
+public abstract class WidgetValue
+{
+    protected WidgetValue(string name, bool required)
+    {
+        this.Name = name;
+        this.Nullable = !required;
+    }
+
+    public bool Nullable { get; protected set; }
+
+    public string Name { get; set; }
+
+    public abstract object Value { get; set; }
+
+    protected virtual string ValueToString()
+    {
+        if (this.Value == null)
+            return string.Empty;
+        else
+            return this.Value.ToString();
+    }
+
+    public virtual string ToXml()
+    {
+        if (this.Nullable && this.Value == null)
+            return string.Empty;
+
+        return "<" + this.Name + ">" + ValueToString() + "</" + this.Name + ">"; //NOXLATE
+    }
+}
+
+public class RangedWidgetValue : WidgetValue
+{
+    public RangedWidgetValue(string name, bool required, IComparable minValue, IComparable maxValue) : base(name, required)
+    {
+        Check.NotNull(minValue, "minValue"); //NOXLATE
+        Check.NotNull(maxValue, "maxValue"); //NOXLATE
+
+        if (minValue.CompareTo(maxValue) <= 0)
+        {
+            this.MinValue = minValue;
+            this.MaxValue = maxValue;
+        }
+        else
+        {
+            this.MinValue = maxValue;
+            this.MaxValue = MinValue;
+        }
+    }
+
+    public IComparable MinValue { get; private set; }
+
+    public IComparable MaxValue { get; private set; }
+
+    private object _value;
+
+    public override object Value
+    {
+        get
+        {
+            return _value;
+        }
+        set
+        {
+            if (value == null)
+            {
+                if (!this.Nullable)
+                    throw new InvalidOperationException(OSGeo.MapGuide.MaestroAPI.Properties.ErrorNullNotAccepted);
+
+                _value = value;
+            }
+            else
+            {
+                var cmp = value as IComparable;
+                if (cmp == null)
+                    throw new InvalidOperationException(OSGeo.MapGuide.MaestroAPI.Properties.ErrroValueNotComparable);
+
+                if (cmp.CompareTo(this.MinValue) >= 0 && cmp.CompareTo(this.MaxValue) <= 0)
+                    _value = value;
+                else
+                    throw new InvalidOperationException(string.Format(OSGeo.MapGuide.MaestroAPI.Properties.ErrorValueOutOfRange, this.MinValue, this.MaxValue));
+            }
+        }
+    }
+}
+
+public class RestrictedWidgetValue : WidgetValue
+{
+    public RestrictedWidgetValue(string name, bool required) : base(name, required) { }
+
+    private object _value;
+
+    public override object Value
+    {
+        get
+        {
+            return _value;
+        }
+        set
+        {
+            if (value == null)
+            {
+                if (!this.Nullable)
+                    throw new InvalidOperationException(OSGeo.MapGuide.MaestroAPI.Properties.ErrorNullNotAccepted);
+
+                _value = value;
+            }
+            else
+            {
+                _value = value;
+            }
+        }
+    }
+}
+
+public class ArbitraryWidgetValue : WidgetValue
+{
+    public ArbitraryWidgetValue(string name, bool required) : base(name, required) { }
+
+    private object _value;
+
+    public override object Value
+    {
+        get
+        {
+            return _value;
+        }
+        set
+        {
+            if (value == null)
+            {
+                if (!this.Nullable)
+                    throw new InvalidOperationException(OSGeo.MapGuide.MaestroAPI.Properties.ErrorNullNotAccepted);
+
+                _value = value;
+            }
+            else
+            {
+                _value = value;
+            }
+        }
+    }
+}
+    */
+
+    public interface IMapSet
+    {
+        IEnumerable<IMapGroup> MapGroups { get; }
+
+        int MapGroupCount { get; }
+
+        IMapGroup GetGroupAt(int index);
+
+        void AddGroup(IMapGroup group);
+
+        void RemoveGroup(IMapGroup group);
+    }
+
+    public interface IMapGroup : IExtensibleElement, INotifyPropertyChanged
+    {
+        string id { get; set; }
+
+        IMapView InitialView { get; set; }
+
+        IEnumerable<IMap> Map { get; }
+
+        void AddMap(IMap map);
+
+        void RemoveMap(IMap map);
+
+        int MapCount { get; }
+
+        IMap GetMapAt(int index);
+
+        IMapView CreateInitialView(double x, double y, double scale);
+
+        IMap CreateMapGuideEntry(string mapDefinition);
+
+        IMap CreateCmsMapEntry(string type, bool singleTile, string name, string olType);
+
+        IMap CreateGenericEntry();
+
+        bool MoveUp(IMap map);
+
+        bool MoveDown(IMap map);
+    }
+
+    public interface IMap : INotifyPropertyChanged, IExtensibleElement
+    {
+        string Type { get; set; }
+
+        bool SingleTile { get; set; }
+
+        IMapGuideOverlayOptions OverlayOptions { get; set; }
+
+        IMapGuideOverlayOptions CreateOverlayOptions(bool isBaseLayer, bool useOverlay, string projection);
+
+        ICmsMapOptions CmsMapOptions { get; set; }
+
+        ICmsMapOptions CreateOptions(string name, string type);
+
+        string AsXml();
+
+        void FromXml(string xml);
+    }
+
+    public interface IMapGuideOverlayOptions
+    {
+        bool IsBaseLayer { get; set; }
+
+        bool UseOverlay { get; set; }
+
+        string Projection { get; set; }
+    }
+
+    public interface ICmsMapOptions
+    {
+        string Name { get; set; }
+
+        string Type { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a flexible layout's widget set. This is analogous to a Command Set in a Web Layout
+    /// </summary>
+    public interface IWidgetSet
+    {
+        IEnumerable<IWidgetContainer> Containers { get; }
+
+        int ContainerCount { get; }
+
+        void AddContainer(IWidgetContainer container);
+
+        void RemoveContainer(IWidgetContainer container);
+
+        IMapWidget MapWidget { get; }
+
+        int WidgetCount { get; }
+
+        IEnumerable<IWidget> Widgets { get; }
+
+        void AddWidget(IWidget widget);
+
+        void RemoveWidget(IWidget widget);
+    }
+
+    /// <summary>
+    /// Represents a container component in a flexible layout
+    /// </summary>
+    public interface IWidgetContainer : INotifyPropertyChanged, IExtensibleElement
+    {
+        string Name { get; set; }
+
+        string Type { get; set; }
+
+        string Position { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a UI item container component
+    /// </summary>
+    public interface IUIItemContainer : IWidgetContainer, IMenu
+    {
+    }
+
+    /// <summary>
+    /// A interface for widgets and components with menu-like characteristics
+    /// </summary>
+    public interface IMenu
+    {
+        /// <summary>
+        /// Gets the item count.
+        /// </summary>
+        /// <value>The item count.</value>
+        int ItemCount { get; }
+
+        /// <summary>
+        /// Gets the items.
+        /// </summary>
+        /// <value>The items.</value>
+        IEnumerable<IUIItem> Items { get; }
+
+        /// <summary>
+        /// Moves the specified item up.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        /// <returns></returns>
+        bool MoveUp(IUIItem item);
+
+        /// <summary>
+        /// Moves the specified item down.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        /// <returns></returns>
+        bool MoveDown(IUIItem item);
+
+        /// <summary>
+        /// Gets the index of the specified item.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        /// <returns></returns>
+        int GetIndex(IUIItem item);
+
+        /// <summary>
+        /// Inserts the specified item at the specified index.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        /// <param name="index">The index.</param>
+        void Insert(IUIItem item, int index);
+
+        /// <summary>
+        /// Adds the item.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        void AddItem(IUIItem item);
+
+        /// <summary>
+        /// Removes the item.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        void RemoveItem(IUIItem item);
+    }
+
+    /// <summary>
+    /// Defines the type of UI items
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum UiItemFunctionType
+    {
+        /// <remarks/>
+        Separator,
+
+        /// <remarks/>
+        Widget,
+
+        /// <remarks/>
+        Flyout,
+    }
+
+    public interface IUIItem : INotifyPropertyChanged
+    {
+        IMenu Parent { get; }
+
+        UiItemFunctionType Function { get; }
+    }
+
+    public interface IFlyoutItem : IUIItem, IMenu, INotifyPropertyChanged
+    {
+        string Label { get; set; }
+
+        string Tooltip { get; set; }
+
+        string ImageUrl { get; set; }
+
+        string ImageClass { get; set; }
+    }
+
+    public interface ISeparator : IUIItem
+    {
+    }
+
+    /// <summary>
+    /// Represents a widget reference. This is analogous to a command item in a Web Layouts
+    /// </summary>
+    public interface IWidgetItem : IUIItem
+    {
+        string Widget { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a fusion application widget
+    /// </summary>
+    public interface IWidget : INotifyPropertyChanged, IExtensibleElement
+    {
+        /// <summary>
+        /// Gets or sets the name of the widget
+        /// </summary>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the type of the widget
+        /// </summary>
+        string Type { get; set; }
+
+        /// <summary>
+        /// Gets or sets the location
+        /// </summary>
+        string Location { get; set; }
+
+        /// <summary>
+        /// Gets the raw XML content of this widget
+        /// </summary>
+        /// <returns></returns>
+        string ToXml();
+    }
+
+    /// <summary>
+    /// Represents a map widget
+    /// </summary>
+    public interface IMapWidget : IWidget
+    {
+        string MapId { get; set; }
+    }
+
+    public interface IUIWidget : IWidget
+    {
+        string ImageUrl { get; set; }
+
+        string ImageClass { get; set; }
+
+        string Label { get; set; }
+
+        string Tooltip { get; set; }
+
+        string StatusText { get; set; }
+
+        string Disabled { get; set; }
+
+        IUIWidget Clone();
+    }
+
+    /// <summary>
+    /// The initial view of the map
+    /// </summary>
+    public interface IMapView : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the center X.
+        /// </summary>
+        /// <value>The center X.</value>
+        double CenterX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the center Y.
+        /// </summary>
+        /// <value>The center Y.</value>
+        double CenterY { get; set; }
+
+        /// <summary>
+        /// Gets or sets the scale.
+        /// </summary>
+        /// <value>The scale.</value>
+        double Scale { get; set; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/v1_0_0/ApplicationDefinitionImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/v1_0_0/ApplicationDefinitionImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/v1_0_0/ApplicationDefinitionImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,1159 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Linq;
+using System.Text;
+using System.Xml;
+using System.Xml.Serialization;
+
+#pragma warning disable 1591, 0114, 0108
+
+namespace OSGeo.MapGuide.ObjectModels.ApplicationDefinition.v1_0_0
+{
+    partial class CustomContentType : IExtension
+    {
+        XmlElement[] IExtension.Content
+        {
+            get
+            {
+                return this.Any;
+            }
+            set
+            {
+                this.Any = value;
+            }
+        }
+    }
+
+    partial class ApplicationDefinitionType : IApplicationDefinition, IMapSet
+    {
+        internal ApplicationDefinitionType()
+        {
+            this.Extension = new CustomContentType() { Any = new XmlElement[0] };
+        }
+
+        private static readonly Version RES_VERSION = new Version(1, 0, 0);
+
+        public IMapWidget CreateMapWidget(string mapId, string contextMenuId)
+        {
+            var map = new MapWidgetType()
+            {
+                MapId = mapId,
+                Name = "Map", //NOXLATE
+                Type = "Map", //NOXLATE
+                Extension = new CustomContentType() { Any = new XmlElement[0] }
+            };
+            map.SetValue("MenuContainer", contextMenuId); //NOXLATE
+            return map;
+        }
+
+        public IWidgetItem CreateWidgetReference(string name)
+        {
+            return new WidgetItemType() { Function = UiItemFunctionType.Widget, Widget = name };
+        }
+
+        public ISeparator CreateSeparator()
+        {
+            return new SeparatorItemType() { Function = UiItemFunctionType.Separator };
+        }
+
+        public IFlyoutItem CreateFlyout(string label)
+        {
+            return new FlyoutItemType()
+            {
+                Function = UiItemFunctionType.Flyout,
+                Label = label,
+                Item = new System.ComponentModel.BindingList<UiItemType>()
+            };
+        }
+
+        public IMapGroup AddMapGroup(string id, bool singleTile, string mapDefinitionId)
+        {
+            var map = new MapGroupType()
+            {
+                id = id,
+                Map = new System.ComponentModel.BindingList<MapType>()
+                {
+                    new MapType()
+                    {
+                        Type = "MapGuide", //NOXLATE
+                        SingleTile = singleTile.ToString(),
+                        Extension = new CustomContentType()
+                        {
+                            Any = new XmlElement[1]
+                        }
+                    }
+                },
+            };
+            map.Map[0].Extension.Any[0] = AppDefDocument.Instance.CreateElement("ResourceId"); //NOXLATE
+            map.Map[0].Extension.Any[0].InnerText = mapDefinitionId;
+
+            this.MapSet.Add(map);
+
+            return map;
+        }
+
+        public IMapGroup AddMapGroup(string id, bool singleTile, string mapDefinitionId, double centerX, double centerY, double scale)
+        {
+            var map = AddMapGroup(id, singleTile, mapDefinitionId);
+            map.InitialView = new MapViewType() { CenterX = centerX, CenterY = centerY, Scale = scale };
+
+            return map;
+        }
+
+        private string _resId;
+
+        [XmlIgnore]
+        public string ResourceID
+        {
+            get
+            {
+                return _resId;
+            }
+            set
+            {
+                if (!ResourceIdentifier.Validate(value))
+                    throw new InvalidOperationException(Strings.ErrorInvalidResourceIdentifier);
+
+                var res = new ResourceIdentifier(value);
+                if (res.Extension != ResourceTypes.ApplicationDefinition.ToString())
+                    throw new InvalidOperationException(string.Format(Strings.ErrorUnexpectedResourceType, res.ToString(), ResourceTypes.ApplicationDefinition));
+
+                _resId = value;
+                this.OnPropertyChanged("ResourceID"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public string ResourceType
+        {
+            get
+            {
+                return ResourceTypes.ApplicationDefinition.ToString();
+            }
+        }
+
+        [XmlIgnore]
+        public Version ResourceVersion
+        {
+            get
+            {
+                return RES_VERSION;
+            }
+        }
+
+        object ICloneable.Clone()
+        {
+            return this.Clone();
+        }
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] //NOXLATE
+        public string ValidatingSchema
+        {
+            get { return "ApplicationDefinition-1.0.0.xsd"; } //NOXLATE
+            set { }
+        }
+
+        [XmlIgnore]
+        public bool IsStronglyTyped
+        {
+            get { return true; }
+        }
+
+        IMapGroup IMapSet.GetGroupAt(int index)
+        {
+            return this.MapSet[index];
+        }
+
+        IWidget IApplicationDefinition.CreateWidget(string name, IWidgetInfo widgetInfo)
+        {
+            var wparams = widgetInfo.Parameters;
+
+            IWidget widget = null;
+
+            if (widgetInfo.StandardUi)
+            {
+                widget = new UiWidgetType()
+                {
+                    Disabled = "false", //NOXLATE
+                    Extension = new CustomContentType() { Any = new XmlElement[0] },
+                    ImageClass = widgetInfo.ImageClass ?? string.Empty, //Required to satisfy content model
+                    ImageUrl = widgetInfo.ImageUrl ?? string.Empty, //Required to satisfy content model
+                    Label = widgetInfo.Label ?? string.Empty, //Required to satisfy content model
+                    Location = widgetInfo.Location ?? string.Empty, //Required to satisfy content model
+                    Name = name,
+                    StatusText = widgetInfo.StatusText ?? string.Empty, //Required to satisfy content model
+                    Tooltip = widgetInfo.Tooltip ?? string.Empty, //Required to satisfy content model
+                    Type = widgetInfo.Type
+                };
+            }
+            else
+            {
+                widget = new WidgetType()
+                {
+                    Extension = new CustomContentType() { Any = new XmlElement[0] },
+                    Location = widgetInfo.Location ?? string.Empty, //Required to satisfy content model
+                    Name = name,
+                    Type = widgetInfo.Type,
+                };
+            }
+
+            NameValueCollection extProperties = new NameValueCollection();
+
+            foreach (var wp in widgetInfo.Parameters)
+            {
+                if (!string.IsNullOrEmpty(wp.DefaultValue))
+                {
+                    extProperties.Add(wp.Name, wp.DefaultValue);
+                }
+                else
+                {
+                    extProperties.Add(wp.Name, string.Empty);
+                }
+            }
+
+            widget.SetAllValues(extProperties);
+
+            return widget;
+        }
+
+        private XmlElement CreateExtensionElement(IWidgetParameter wparam)
+        {
+            var el = AppDefDocument.Instance.CreateElement(wparam.Name);
+            el.InnerText = wparam.DefaultValue;
+            return el;
+        }
+
+        IUIItemContainer IApplicationDefinition.CreateContainer(string name, IApplicationDefinitionContainerInfo containerInfo)
+        {
+            return new UiItemContainerType()
+            {
+                Name = name,
+                Type = containerInfo.Type,
+                Item = new System.ComponentModel.BindingList<UiItemType>(),
+                Extension = new CustomContentType() { Any = new XmlElement[0] }
+            };
+        }
+
+        [XmlIgnore]
+        IMapSet IApplicationDefinition.MapSet
+        {
+            get { return this; }
+        }
+
+        [XmlIgnore]
+        IExtension IExtensibleElement.Extension
+        {
+            get
+            {
+                return this.Extension;
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<IMapGroup> IMapSet.MapGroups
+        {
+            get
+            {
+                foreach (var grp in this.MapSet)
+                {
+                    yield return grp;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        int IMapSet.MapGroupCount
+        {
+            get { return this.MapSet.Count; }
+        }
+
+        void IMapSet.AddGroup(IMapGroup group)
+        {
+            var grp = group as MapGroupType;
+            if (grp != null)
+            {
+                this.MapSet.Add(grp);
+                OnPropertyChanged("MapSet"); //NOXLATE
+            }
+        }
+
+        void IMapSet.RemoveGroup(IMapGroup group)
+        {
+            var grp = group as MapGroupType;
+            if (grp != null)
+            {
+                this.MapSet.Remove(grp);
+                OnPropertyChanged("MapSet"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public IEnumerable<IWidgetSet> WidgetSets
+        {
+            get
+            {
+                foreach (var wset in this.WidgetSet)
+                {
+                    yield return wset;
+                }
+            }
+        }
+
+        public void AddWidgetSet(IWidgetSet set)
+        {
+            var wset = set as WidgetSetType;
+            if (wset != null)
+            {
+                this.WidgetSet.Add(wset);
+                OnPropertyChanged("WidgetSet"); //NOXLATE
+            }
+        }
+
+        public void RemoveWidgetSet(IWidgetSet set)
+        {
+            var wset = set as WidgetSetType;
+            if (wset != null)
+            {
+                this.WidgetSet.Remove(wset);
+                OnPropertyChanged("WidgetSet"); //NOXLATE
+            }
+        }
+
+        public IWidgetSet CreateWidgetSet(IMapWidget mapWidget)
+        {
+            return new WidgetSetType()
+            {
+                Widget = new System.ComponentModel.BindingList<WidgetType>(),
+                Container = new System.ComponentModel.BindingList<ContainerType>(),
+                MapWidget = (MapWidgetType)mapWidget
+            };
+        }
+    }
+
+    partial class UiItemContainerType : IUIItemContainer
+    {
+        public int ItemCount
+        {
+            get { return this.Item.Count; }
+        }
+
+        [XmlIgnore]
+        public IEnumerable<IUIItem> Items
+        {
+            get
+            {
+                foreach (var it in this.Item)
+                {
+                    yield return it;
+                }
+            }
+        }
+
+        public bool MoveUp(IUIItem item)
+        {
+            var idx = GetIndex(item);
+            if (idx > 0)
+            {
+                RemoveItem(item);
+                Insert(item, idx - 1);
+                return true;
+            }
+            return false;
+        }
+
+        public bool MoveDown(IUIItem item)
+        {
+            var idx = GetIndex(item);
+            if (idx < this.Item.Count - 1)
+            {
+                RemoveItem(item);
+                Insert(item, idx + 1);
+                return true;
+            }
+            return false;
+        }
+
+        public int GetIndex(IUIItem item)
+        {
+            var it = item as UiItemType;
+            if (it != null)
+            {
+                return this.Item.IndexOf(it);
+            }
+            return -1;
+        }
+
+        public void Insert(IUIItem item, int index)
+        {
+            var it = item as UiItemType;
+            if (it != null)
+            {
+                this.Item.Insert(index, it);
+                it.Parent = this;
+                OnPropertyChanged("Item"); //NOXLATE
+            }
+        }
+
+        public void AddItem(IUIItem item)
+        {
+            var it = item as UiItemType;
+            if (it != null)
+            {
+                this.Item.Add(it);
+                it.Parent = this;
+                OnPropertyChanged("Item"); //NOXLATE
+            }
+        }
+
+        public void RemoveItem(IUIItem item)
+        {
+            var it = item as UiItemType;
+            if (it != null)
+            {
+                this.Item.Remove(it);
+                it.Parent = null;
+                OnPropertyChanged("Item"); //NOXLATE
+            }
+        }
+    }
+
+    partial class FlyoutItemType : IFlyoutItem
+    {
+        [XmlIgnore]
+        public int ItemCount
+        {
+            get { return this.Item.Count; }
+        }
+
+        [XmlIgnore]
+        public IEnumerable<IUIItem> Items
+        {
+            get
+            {
+                foreach (var it in this.Item)
+                {
+                    yield return it;
+                }
+            }
+        }
+
+        public bool MoveUp(IUIItem item)
+        {
+            var idx = GetIndex(item);
+            if (idx > 0)
+            {
+                RemoveItem(item);
+                Insert(item, idx - 1);
+                return true;
+            }
+            return false;
+        }
+
+        public bool MoveDown(IUIItem item)
+        {
+            var idx = GetIndex(item);
+            if (idx < this.Item.Count - 1)
+            {
+                RemoveItem(item);
+                Insert(item, idx + 1);
+                return true;
+            }
+            return false;
+        }
+
+        public int GetIndex(IUIItem item)
+        {
+            var it = item as UiItemType;
+            if (it != null)
+            {
+                return this.Item.IndexOf(it);
+            }
+            return -1;
+        }
+
+        public void Insert(IUIItem item, int index)
+        {
+            var it = item as UiItemType;
+            if (it != null)
+            {
+                this.Item.Insert(index, it);
+                it.Parent = this;
+                OnPropertyChanged("Item"); //NOXLATE
+            }
+        }
+
+        public void AddItem(IUIItem item)
+        {
+            var it = item as UiItemType;
+            if (it != null)
+            {
+                this.Item.Add(it);
+                it.Parent = this;
+                OnPropertyChanged("Item"); //NOXLATE
+            }
+        }
+
+        public void RemoveItem(IUIItem item)
+        {
+            var it = item as UiItemType;
+            if (it != null)
+            {
+                this.Item.Remove(it);
+                it.Parent = null;
+                OnPropertyChanged("Item"); //NOXLATE
+            }
+        }
+    }
+
+    partial class UiItemType : IUIItem
+    {
+        [XmlIgnore]
+        public IMenu Parent { get; set; }
+    }
+
+    partial class WidgetItemType : IWidgetItem { }
+
+    partial class SeparatorItemType : ISeparator { }
+
+    partial class WidgetSetType : IWidgetSet
+    {
+        [XmlIgnore]
+        public IEnumerable<IWidgetContainer> Containers
+        {
+            get
+            {
+                foreach (var cnt in this.Container)
+                {
+                    yield return cnt;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        public int ContainerCount
+        {
+            get { return this.Container.Count; }
+        }
+
+        public void AddContainer(IWidgetContainer container)
+        {
+            var cnt = container as ContainerType;
+            if (cnt != null)
+            {
+                this.Container.Add(cnt);
+                OnPropertyChanged("Container"); //NOXLATE
+            }
+        }
+
+        public void RemoveContainer(IWidgetContainer container)
+        {
+            var cnt = container as ContainerType;
+            if (cnt != null)
+            {
+                this.Container.Remove(cnt);
+                OnPropertyChanged("Container"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        IMapWidget IWidgetSet.MapWidget
+        {
+            get
+            {
+                return this.MapWidget;
+            }
+        }
+
+        [XmlIgnore]
+        public int WidgetCount
+        {
+            get { return this.Widget.Count; }
+        }
+
+        [XmlIgnore]
+        public IEnumerable<IWidget> Widgets
+        {
+            get
+            {
+                foreach (var wgt in this.Widget)
+                {
+                    yield return wgt;
+                }
+            }
+        }
+
+        public void AddWidget(IWidget widget)
+        {
+            var wgt = widget as WidgetType;
+            if (wgt != null)
+            {
+                this.Widget.Add(wgt);
+            }
+        }
+
+        public void RemoveWidget(IWidget widget)
+        {
+            var wgt = widget as WidgetType;
+            if (wgt != null)
+            {
+                this.Widget.Remove(wgt);
+            }
+        }
+    }
+
+    partial class ContainerType : IWidgetContainer
+    {
+        [XmlIgnore]
+        IExtension IExtensibleElement.Extension
+        {
+            get { return this.Extension; }
+        }
+    }
+
+    partial class WidgetType : IWidget
+    {
+        [XmlIgnore]
+        IExtension IExtensibleElement.Extension
+        {
+            get
+            {
+                return this.Extension;
+            }
+        }
+
+        string IWidget.ToXml()
+        {
+            string xml = this.Serialize();
+            //HACK: It currently escapes me why we're getting junk whitespace for extension elements
+            //but this will clean them out.
+            XmlDocument doc = new XmlDocument();
+            doc.LoadXml(xml);
+            var settings = new XmlWriterSettings()
+            {
+                Indent = true
+            };
+            using (var stringWriter = new System.IO.StringWriter())
+            using (var xmlTextWriter = XmlWriter.Create(stringWriter, settings))
+            {
+                doc.WriteTo(xmlTextWriter);
+                xmlTextWriter.Flush();
+                return stringWriter.GetStringBuilder().ToString();
+            }
+        }
+    }
+
+    partial class UiWidgetType : IUIWidget
+    {
+        IUIWidget IUIWidget.Clone()
+        {
+            var clone = new UiWidgetType()
+            {
+                Disabled = this.Disabled,
+                ImageClass = this.ImageClass,
+                ImageUrl = this.ImageUrl,
+                Label = this.Label,
+                Location = this.Location,
+                Name = this.Name,
+                StatusText = this.StatusText,
+                Tooltip = this.Tooltip,
+                Type = this.Type,
+                Extension = new CustomContentType() { Any = new XmlElement[0] }
+            };
+
+            var ext = this.GetAllValues();
+            if (ext.Count > 0)
+                clone.SetAllValues(ext);
+
+            return clone;
+        }
+    }
+
+    partial class MapWidgetType : IMapWidget { }
+
+    partial class MapViewType : IMapView { }
+
+    partial class MapGroupType : IMapGroup
+    {
+        bool IMapGroup.MoveUp(IMap map)
+        {
+            var mt = map as MapType;
+            if (mt != null)
+            {
+                var idx = this.mapField.IndexOf(mt);
+                if (idx > 0)
+                {
+                    this.mapField.RemoveAt(idx);
+                    idx--;
+                    this.mapField.Insert(idx, mt);
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        bool IMapGroup.MoveDown(IMap map)
+        {
+            var mt = map as MapType;
+            if (mt != null)
+            {
+                var idx = this.mapField.IndexOf(mt);
+                if (idx < this.mapField.Count - 1)
+                {
+                    this.mapField.RemoveAt(idx);
+                    idx++;
+                    this.mapField.Insert(idx, mt);
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        IMap IMapGroup.CreateMapGuideEntry(string mapDefinition)
+        {
+            var map = new MapType()
+            {
+                Type = "MapGuide", //NOXLATE
+                SingleTile = "true",
+                Extension = new CustomContentType()
+                {
+                    Any = new XmlElement[1]
+                }
+            };
+            map.Extension.Any[0] = AppDefDocument.Instance.CreateElement("ResourceId"); //NOXLATE
+            map.Extension.Any[0].InnerText = mapDefinition;
+            return map;
+        }
+
+        IMap IMapGroup.CreateGenericEntry()
+        {
+            var el = AppDefDocument.Instance.CreateElement("Options"); //NOXLATE
+            var n = AppDefDocument.Instance.CreateElement("name"); //NOXLATE
+            var t = AppDefDocument.Instance.CreateElement("type"); //NOXLATE
+
+            n.InnerText = string.Empty;
+            t.InnerText = string.Empty;
+            el.AppendChild(n);
+            el.AppendChild(t);
+
+            var map = new MapType()
+            {
+                Type = "", //NOXLATE
+                SingleTile = "false", //NOXLATE
+                Extension = new CustomContentType()
+                {
+                    Any = new XmlElement[] { el }
+                }
+            };
+            return map;
+        }
+
+        IMap IMapGroup.CreateCmsMapEntry(string type, bool singleTile, string name, string olType)
+        {
+            var el = AppDefDocument.Instance.CreateElement("Options"); //NOXLATE
+            var n = AppDefDocument.Instance.CreateElement("name"); //NOXLATE
+            var t = AppDefDocument.Instance.CreateElement("type"); //NOXLATE
+
+            n.InnerText = name;
+            t.InnerText = olType;
+            el.AppendChild(n);
+            el.AppendChild(t);
+
+            return new MapType()
+            {
+                Extension = new CustomContentType()
+                {
+                    Any = new XmlElement[] { el }
+                },
+                SingleTile = "true", //NOXLATE
+                Type = type
+            };
+        }
+
+        IMapView IMapGroup.CreateInitialView(double x, double y, double scale)
+        {
+            return new MapViewType() { CenterX = x, CenterY = y, Scale = scale };
+        }
+
+        [XmlIgnore]
+        int IMapGroup.MapCount
+        {
+            get
+            {
+                return this.Map.Count;
+            }
+        }
+
+        IMap IMapGroup.GetMapAt(int index)
+        {
+            return (IMap)this.Map[index];
+        }
+
+        [XmlIgnore]
+        IMapView IMapGroup.InitialView
+        {
+            get
+            {
+                return this.InitialView;
+            }
+            set
+            {
+                this.InitialView = (MapViewType)value;
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<IMap> IMapGroup.Map
+        {
+            get
+            {
+                foreach (var map in this.Map)
+                {
+                    yield return map;
+                }
+            }
+        }
+
+        public void AddMap(IMap map)
+        {
+            var m = map as MapType;
+            if (m != null)
+            {
+                this.Map.Add(m);
+                OnPropertyChanged("Map"); //NOXLATE
+            }
+        }
+
+        public void RemoveMap(IMap map)
+        {
+            var m = map as MapType;
+            if (m != null)
+            {
+                this.Map.Remove(m);
+                OnPropertyChanged("Map"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        IExtension IExtensibleElement.Extension
+        {
+            get
+            {
+                return this.Extension;
+            }
+        }
+    }
+
+    public class MapGuideOverlayOptions : IMapGuideOverlayOptions
+    {
+        public bool IsBaseLayer
+        {
+            get;
+            set;
+        }
+
+        public bool UseOverlay
+        {
+            get;
+            set;
+        }
+
+        public string Projection
+        {
+            get;
+            set;
+        }
+    }
+
+    partial class MapType : IMap
+    {
+        string IMap.AsXml()
+        {
+            return this.Serialize();
+        }
+
+        void IMap.FromXml(string xml)
+        {
+            var mt = MapType.Deserialize(xml);
+            this.Extension = mt.Extension;
+            this.SingleTile = mt.SingleTile;
+            this.Type = mt.Type;
+        }
+
+        [XmlIgnore]
+        IExtension IExtensibleElement.Extension
+        {
+            get
+            {
+                return this.Extension;
+            }
+        }
+
+        [XmlIgnore]
+        bool IMap.SingleTile
+        {
+            get
+            {
+                bool result;
+                if (bool.TryParse(this.SingleTile, out result))
+                    return result;
+
+                return default(bool);
+            }
+            set
+            {
+                this.SingleTile = value.ToString();
+            }
+        }
+
+        ICmsMapOptions IMap.CreateOptions(string name, string type)
+        {
+            return new MapOptions() { Name = name, Type = type };
+        }
+
+        [XmlIgnore]
+        ICmsMapOptions IMap.CmsMapOptions
+        {
+            get
+            {
+                if (this.extensionField.Any.Length > 0)
+                {
+                    var els = new List<XmlElement>(this.extensionField.Any);
+                    for (int i = 0; i < els.Count; i++)
+                    {
+                        if (els[i].Name.Equals("Options")) //NOXLATE
+                        {
+                            try
+                            {
+                                var n = els[i]["name"]; //NOXLATE
+                                var t = els[i]["type"]; //NOXLATE
+
+                                if (n != null && t != null)
+                                    return new MapOptions() { Name = n.InnerText, Type = t.InnerText };
+                            }
+                            catch
+                            {
+                                return null;
+                            }
+                        }
+                    }
+                    return null;
+                }
+                else
+                {
+                    return null;
+                }
+            }
+            set
+            {
+                if (this.Type.Equals("MapGuide")) //NOXLATE
+                    throw new InvalidOperationException(Strings.ErrorCmsOptionsOnMapGuideMap);
+
+                if (value == null)
+                {
+                    if (this.extensionField.Any.Length > 0)
+                    {
+                        var els = new List<XmlElement>(this.extensionField.Any);
+                        for (int i = 0; i < els.Count; i++)
+                        {
+                            if (els[i].Name.Equals("Options")) //NOXLATE
+                            {
+                                els.RemoveAt(i);
+                                break;
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    XmlElement el = null;
+                    if (this.Extension.Any.Length == 0)
+                    {
+                        el = AppDefDocument.Instance.CreateElement("Options"); //NOXLATE
+
+                        var n = AppDefDocument.Instance.CreateElement("name"); //NOXLATE
+                        var t = AppDefDocument.Instance.CreateElement("type"); //NOXLATE
+
+                        n.InnerText = value.Name;
+                        t.InnerText = value.Type;
+
+                        el.AppendChild(n);
+                        el.AppendChild(t);
+
+                        this.Extension.Any = new XmlElement[] { el };
+                    }
+                    else
+                    {
+                        var els = new List<XmlElement>(this.extensionField.Any);
+                        for (int i = 0; i < els.Count; i++)
+                        {
+                            if (els[i].Name.Equals("Options")) //NOXLATE
+                            {
+                                els[i].RemoveAll();
+
+                                var n = AppDefDocument.Instance.CreateElement("name"); //NOXLATE
+                                var t = AppDefDocument.Instance.CreateElement("type"); //NOXLATE
+
+                                n.InnerText = value.Name;
+                                t.InnerText = value.Type;
+
+                                els[i].AppendChild(n);
+                                els[i].AppendChild(t);
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        [XmlIgnore]
+        IMapGuideOverlayOptions IMap.OverlayOptions
+        {
+            /*
+            From Fusion Wiki:
+
+            Note that the commercial layer must be the base layer so any overlays must
+            have the isBaseLayer: false option set. The projection tag is needed so
+            that OpenLayers will initialize the layer in the same projection as the base
+            map.
+
+            <Options>
+               <isBaseLayer>false</isBaseLayer>
+               <useOverlay>true</useOverlay>
+               <projection>EPSG:900913</projection>
+            </Options>
+             */
+            get
+            {
+                if (this.extensionField.Any.Length > 0)
+                {
+                    var els = new List<XmlElement>(this.extensionField.Any);
+                    for (int i = 0; i < els.Count; i++)
+                    {
+                        if (els[i].Name.Equals("Options")) //NOXLATE
+                        {
+                            try
+                            {
+                                var n = els[i]["isBaseLayer"]; //NOXLATE
+                                var t = els[i]["useOverlay"]; //NOXLATE
+                                var p = els[i]["projection"]; //NOXLATE
+
+                                if (n != null && t != null)
+                                    return ((IMap)this).CreateOverlayOptions(Convert.ToBoolean(n.InnerText), Convert.ToBoolean(t.InnerText), p.InnerText);
+                            }
+                            catch
+                            {
+                                return null;
+                            }
+                        }
+                    }
+                    return null;
+                }
+                else
+                {
+                    return null;
+                }
+            }
+            set
+            {
+                if (!this.Type.Equals("MapGuide")) //NOXLATE
+                    throw new InvalidOperationException(Strings.ErrorOverlayOptionsOnNonMapGuideMap);
+
+                if (value == null)
+                {
+                    if (this.extensionField.Any.Length > 0)
+                    {
+                        var els = new List<XmlElement>(this.extensionField.Any);
+                        for (int i = 0; i < els.Count; i++)
+                        {
+                            if (els[i].Name.Equals("Options")) //NOXLATE
+                            {
+                                els.RemoveAt(i);
+                                this.extensionField.Any = els.ToArray();
+                                break;
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    XmlElement el = null;
+                    if (this.Extension.Any.Length == 0)
+                    {
+                        el = AppDefDocument.Instance.CreateElement("Options"); //NOXLATE
+
+                        this.Extension.Any = new XmlElement[] { el };
+                    }
+                    else
+                    {
+                        var els = new List<XmlElement>(this.extensionField.Any);
+                        for (int i = 0; i < els.Count; i++)
+                        {
+                            if (els[i].Name.Equals("Options")) //NOXLATE
+                            {
+                                el = els[i];
+                                break;
+                            }
+                        }
+
+                        if (el == null)
+                        {
+                            el = AppDefDocument.Instance.CreateElement("Options"); //NOXLATE
+                            els.Add(el);
+                            this.Extension.Any = els.ToArray();
+                        }
+                    }
+
+                    el.RemoveAll();
+
+                    var n = el.OwnerDocument.CreateElement("isBaseLayer"); //NOXLATE
+                    var t = el.OwnerDocument.CreateElement("useOverlay"); //NOXLATE
+                    var p = el.OwnerDocument.CreateElement("projection"); //NOXLATE
+
+                    n.InnerText = value.IsBaseLayer.ToString().ToLower();
+                    t.InnerText = value.UseOverlay.ToString().ToLower();
+                    p.InnerText = value.Projection;
+
+                    el.AppendChild(n);
+                    el.AppendChild(t);
+                    el.AppendChild(p);
+                }
+            }
+        }
+
+        IMapGuideOverlayOptions IMap.CreateOverlayOptions(bool isBaseLayer, bool useOverlay, string projection)
+        {
+            return new MapGuideOverlayOptions() { IsBaseLayer = isBaseLayer, UseOverlay = useOverlay, Projection = projection };
+        }
+    }
+
+    public class MapOptions : ICmsMapOptions
+    {
+        public string Name { get; set; }
+
+        public string Type { get; set; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/v1_0_0/ApplicationDefinitionInfoImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/v1_0_0/ApplicationDefinitionInfoImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ApplicationDefinition/v1_0_0/ApplicationDefinitionInfoImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,144 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+#pragma warning disable 1591, 0114, 0108
+
+namespace OSGeo.MapGuide.ObjectModels.ApplicationDefinition.v1_0_0
+{
+    partial class ApplicationDefinitionWidgetInfoSet : IApplicationDefinitionWidgetInfoSet
+    {
+        [XmlIgnore]
+        IEnumerable<IWidgetInfo> IApplicationDefinitionWidgetInfoSet.WidgetInfo
+        {
+            get
+            {
+                foreach (var w in this.WidgetInfo)
+                {
+                    yield return w;
+                }
+            }
+        }
+    }
+
+    partial class ApplicationDefinitionContainerInfoSet : IApplicationDefinitionContainerInfoSet
+    {
+        [XmlIgnore]
+        IEnumerable<IApplicationDefinitionContainerInfo> IApplicationDefinitionContainerInfoSet.ContainerInfo
+        {
+            get
+            {
+                foreach (var c in this.ContainerInfo)
+                {
+                    yield return c;
+                }
+            }
+        }
+    }
+
+    partial class ApplicationDefinitionTemplateInfoSet : IApplicationDefinitionTemplateInfoSet
+    {
+        [XmlIgnore]
+        IEnumerable<IApplicationDefinitionTemplateInfo> IApplicationDefinitionTemplateInfoSet.TemplateInfo
+        {
+            get
+            {
+                foreach (var t in this.TemplateInfo)
+                {
+                    yield return t;
+                }
+            }
+        }
+    }
+
+    partial class AllowedValueType : IAllowedValue
+    {
+    }
+
+    partial class ApplicationDefinitionTemplateInfoType : IApplicationDefinitionTemplateInfo
+    {
+        [XmlIgnore]
+        IEnumerable<IApplicationDefinitionPanel> IApplicationDefinitionTemplateInfo.Panels
+        {
+            get
+            {
+                foreach (var p in this.Panel)
+                {
+                    yield return p;
+                }
+            }
+        }
+    }
+
+    partial class ApplicationDefinitionContainerInfoType : IApplicationDefinitionContainerInfo
+    {
+    }
+
+    partial class ApplicationDefinitionPanelType : IApplicationDefinitionPanel
+    {
+    }
+
+    partial class ApplicationDefinitionWidgetInfoType : IWidgetInfo
+    {
+        [XmlIgnore]
+        string[] IWidgetInfo.ContainableBy
+        {
+            get { return this.ContainableBy.ToArray(); }
+        }
+
+        [XmlIgnore]
+        public IWidgetParameter[] Parameters
+        {
+            get
+            {
+                List<IWidgetParameter> param = new List<IWidgetParameter>();
+                foreach (var p in this.Parameter)
+                {
+                    param.Add(p);
+                }
+                return param.ToArray();
+            }
+        }
+    }
+
+    partial class ApplicationDefinitionWidgetParameterType : IWidgetParameter
+    {
+        [XmlIgnore]
+        IAllowedValue[] IWidgetParameter.AllowedValue
+        {
+            get
+            {
+                List<IAllowedValue> values = new List<IAllowedValue>();
+                foreach (var v in this.AllowedValue)
+                {
+                    values.Add(v);
+                }
+                return values.ToArray();
+            }
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/BaseSerializable.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/BaseSerializable.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/BaseSerializable.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,52 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    public abstract class BaseSerializable
+    {
+        protected virtual string NormalizedSerialize(XmlSerializer serializer, object obj)
+        {
+            return Utility.NormalizedSerialize(serializer, obj);
+        }
+    }
+
+    public class BaseSerializableMapDefinition : BaseSerializable
+    {
+        protected string SerializeHTMLColor(Color color, bool bIncludeAlpha)
+        {
+            return Utility.SerializeHTMLColor(color, bIncludeAlpha);
+        }
+
+        protected Color ParseHTMLColor(string strColor)
+        {
+            return Utility.ParseHTMLColor(strColor);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Check.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Check.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Check.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,111 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    /// <summary>
+    /// Pre-condition verifier utility class
+    /// </summary>
+    internal static class Check
+    {
+        /// <summary>
+        /// Check that condition evaluates to true
+        /// </summary>
+        /// <param name="condition"></param>
+        /// <param name="msg"></param>
+        public static void That(bool condition, string msg)
+        {
+            if (!condition)
+                throw new ArgumentException(msg);
+        }
+
+        /// <summary>
+        /// Check that value is not null
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="obj"></param>
+        /// <param name="arg"></param>
+        public static void NotNull<T>(T obj, string arg) where T : class
+        {
+            if (obj == null)
+                throw new ArgumentException(Strings.PrecondValueNull + arg);
+        }
+
+        /// <summary>
+        /// Check that string value is not null or empty
+        /// </summary>
+        /// <param name="value"></param>
+        /// <param name="arg"></param>
+        public static void NotEmpty(string value, string arg)
+        {
+            if (string.IsNullOrEmpty(value))
+                throw new ArgumentException(Strings.PrecondStringEmpty + arg);
+        }
+
+        /// <summary>
+        /// Check that the specified condition is true
+        /// </summary>
+        /// <param name="condition"></param>
+        /// <param name="msg"></param>
+        public static void Precondition(bool condition, string msg)
+        {
+            if (!condition)
+                throw new ArgumentException(Strings.PrecondFailure + msg);
+        }
+
+        /// <summary>
+        /// Check that the given integer is between the specified range
+        /// </summary>
+        /// <param name="value">The value to check</param>
+        /// <param name="min">The lower bound</param>
+        /// <param name="max">The upper bound</param>
+        /// <param name="bInclusive">Determines whether the range is inclusive. If false, the range is exclusive</param>
+        /// <param name="msg">The message to include for precondition failure</param>
+        public static void IntBetween(int value, int min, int max, bool bInclusive, string msg)
+        {
+            bool bInRange = false;
+            if (bInclusive)
+                bInRange = (value >= min && value <= max);
+            else
+                bInRange = (value > min && value < max);
+
+            if (!bInRange)
+                throw new ArgumentException(Strings.PrecondFailure + msg);
+        }
+
+        /// <summary>
+        /// Check that the given argument is a folder resource id
+        /// </summary>
+        /// <param name="folderid">The folder resource id to check</param>
+        /// <param name="name">The argument name</param>
+        public static void IsFolderArgument(string folderid, string name)
+        {
+            if (!ResourceIdentifier.IsFolderResource(folderid))
+                throw new ArgumentException(string.Format(Strings.NotAFolder, folderid), name);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ExpressionDataType.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ExpressionDataType.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ExpressionDataType.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,261 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    /// <summary>
+    /// The types of valid FDO expressions for use in Symbol Definitions
+    /// </summary>
+    public enum ExpressionDataType
+    {
+        /// <summary>
+        /// BLOB data property
+        /// </summary>
+        Data_Blob,
+
+        /// <summary>
+        /// Boolean data property
+        /// </summary>
+        Data_Boolean,
+
+        /// <summary>
+        /// Byte data property
+        /// </summary>
+        Data_Byte,
+
+        /// <summary>
+        /// CLOB data property
+        /// </summary>
+        Data_Clob,
+
+        /// <summary>
+        /// DateTime data property
+        /// </summary>
+        Data_DateTime,
+
+        /// <summary>
+        /// Double data property
+        /// </summary>
+        Data_Double,
+
+        /// <summary>
+        /// Int16 data property
+        /// </summary>
+        Data_Int16,
+
+        /// <summary>
+        /// Int32 data property
+        /// </summary>
+        Data_Int32,
+
+        /// <summary>
+        /// Int64 data property
+        /// </summary>
+        Data_Int64,
+
+        /// <summary>
+        /// Single data property
+        /// </summary>
+        Data_Single,
+
+        /// <summary>
+        /// String data property
+        /// </summary>
+        Data_String,
+
+        /// <summary>
+        /// Geometry property
+        /// </summary>
+        Geometry,
+
+        /// <summary>
+        /// Raster property
+        /// </summary>
+        Raster,
+
+        /// <summary>
+        /// Association property
+        /// </summary>
+        Association,
+
+        /// <summary>
+        /// String symbol parameter
+        /// </summary>
+        Sym_String,
+
+        /// <summary>
+        /// Boolean symbol parameter
+        /// </summary>
+        Sym_Boolean,
+
+        /// <summary>
+        /// Integer symbol parameter
+        /// </summary>
+        Sym_Integer,
+
+        /// <summary>
+        /// Real symbol parameter
+        /// </summary>
+        Sym_Real,
+
+        /// <summary>
+        /// Color symbol parameter
+        /// </summary>
+        Sym_Color,
+
+        /// <summary>
+        /// Angle symbol parameter
+        /// </summary>
+        Sym_Angle,
+
+        /// <summary>
+        /// Fill color symbol parameter
+        /// </summary>
+        Sym_FillColor,
+
+        /// <summary>
+        /// Line color symbol parameter
+        /// </summary>
+        Sym_LineColor,
+
+        /// <summary>
+        /// Line weight symbol parameter
+        /// </summary>
+        Sym_LineWeight,
+
+        /// <summary>
+        /// Content symbol parameter
+        /// </summary>
+        Sym_Content,
+
+        /// <summary>
+        /// Markup symbol parameter
+        /// </summary>
+        Sym_Markup,
+
+        /// <summary>
+        /// Font name symbol parameter
+        /// </summary>
+        Sym_FontName,
+
+        /// <summary>
+        /// Bold symbol parameter
+        /// </summary>
+        Sym_Bold,
+
+        /// <summary>
+        /// Italic symbol parameter
+        /// </summary>
+        Sym_Italic,
+
+        /// <summary>
+        /// Underlined symbol parameter
+        /// </summary>
+        Sym_Underlined,
+
+        /// <summary>
+        /// Overlined symbol parameter
+        /// </summary>
+        Sym_Overlined,
+
+        /// <summary>
+        /// Oblique angle symbol parameter
+        /// </summary>
+        Sym_ObliqueAngle,
+
+        /// <summary>
+        /// Track spacing symbol parameter
+        /// </summary>
+        Sym_TrackSpacing,
+
+        /// <summary>
+        /// Font height symbol parameter
+        /// </summary>
+        Sym_FontHeight,
+
+        /// <summary>
+        /// Horizontal alignment symbol parameter
+        /// </summary>
+        Sym_HorizontalAlignment,
+
+        /// <summary>
+        /// Vertical alignment symbol parameter
+        /// </summary>
+        Sym_VerticalAlignment,
+
+        /// <summary>
+        /// Justification symbol parameter
+        /// </summary>
+        Sym_Justification,
+
+        /// <summary>
+        /// Line spacing symbol parameter
+        /// </summary>
+        Sym_LineSpacing,
+
+        /// <summary>
+        /// Text color symbol parameter
+        /// </summary>
+        Sym_TextColor,
+
+        /// <summary>
+        /// Ghost color symbol parameter
+        /// </summary>
+        Sym_GhostColor,
+
+        /// <summary>
+        /// Frame line color symbol parameter
+        /// </summary>
+        Sym_FrameLineColor,
+
+        /// <summary>
+        /// Frame fill color symbol parameter
+        /// </summary>
+        Sym_FrameFillColor,
+
+        /// <summary>
+        /// Start offset symbol parameter
+        /// </summary>
+        Sym_StartOffset,
+
+        /// <summary>
+        /// End offset symbol parameter
+        /// </summary>
+        Sym_EndOffset,
+
+        /// <summary>
+        /// Repeat X symbol parameter
+        /// </summary>
+        Sym_RepeatX,
+
+        /// <summary>
+        /// Repeat Y symbol parameter
+        /// </summary>
+        Sym_RepeatY
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ExtendedDataType.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ExtendedDataType.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ExtendedDataType.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,279 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] //NOXLATE
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")] //NOXLATE
+    public partial class ExtendedDataType : System.ComponentModel.INotifyPropertyChanged
+    {
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        private System.Xml.XmlElement[] anyField;
+
+        private static System.Xml.Serialization.XmlSerializer serializer;
+
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                if ((this.anyField != null))
+                {
+                    if ((anyField.Equals(value) != true))
+                    {
+                        this.anyField = value;
+                        this.OnPropertyChanged("Any"); //NOXLATE
+                    }
+                }
+                else
+                {
+                    this.anyField = value;
+                    this.OnPropertyChanged("Any"); //NOXLATE
+                }
+            }
+        }
+
+        private static System.Xml.Serialization.XmlSerializer Serializer
+        {
+            get
+            {
+                if ((serializer == null))
+                {
+                    serializer = new System.Xml.Serialization.XmlSerializer(typeof(ExtendedDataType));
+                }
+                return serializer;
+            }
+        }
+
+        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+        public virtual void OnPropertyChanged(string info)
+        {
+            System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
+            if ((handler != null))
+            {
+                handler(this, new System.ComponentModel.PropertyChangedEventArgs(info));
+            }
+        }
+
+        #region Serialize/Deserialize
+
+        /// <summary>
+        /// Serializes current ExtendedDataType object into an XML document
+        /// </summary>
+        /// <returns>string XML value</returns>
+        public virtual string Serialize()
+        {
+            System.IO.StreamReader streamReader = null;
+            System.IO.MemoryStream memoryStream = null;
+            try
+            {
+                memoryStream = new System.IO.MemoryStream();
+                Serializer.Serialize(memoryStream, this);
+                memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
+                streamReader = new System.IO.StreamReader(memoryStream);
+                return streamReader.ReadToEnd();
+            }
+            finally
+            {
+                if ((streamReader != null))
+                {
+                    streamReader.Dispose();
+                }
+                if ((memoryStream != null))
+                {
+                    memoryStream.Dispose();
+                }
+            }
+        }
+
+        /// <summary>
+        /// Deserializes workflow markup into an ExtendedDataType object
+        /// </summary>
+        /// <param name="xml">string workflow markup to deserialize</param>
+        /// <param name="obj">Output ExtendedDataType object</param>
+        /// <param name="exception">output Exception value if deserialize failed</param>
+        /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
+        public static bool Deserialize(string xml, out ExtendedDataType obj, out System.Exception exception)
+        {
+            exception = null;
+            obj = default(ExtendedDataType);
+            try
+            {
+                obj = Deserialize(xml);
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                exception = ex;
+                return false;
+            }
+        }
+
+        public static bool Deserialize(string xml, out ExtendedDataType obj)
+        {
+            System.Exception exception = null;
+            return Deserialize(xml, out obj, out exception);
+        }
+
+        public static ExtendedDataType Deserialize(string xml)
+        {
+            System.IO.StringReader stringReader = null;
+            try
+            {
+                stringReader = new System.IO.StringReader(xml);
+                return ((ExtendedDataType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
+            }
+            finally
+            {
+                if ((stringReader != null))
+                {
+                    stringReader.Dispose();
+                }
+            }
+        }
+
+        /// <summary>
+        /// Serializes current ExtendedDataType object into file
+        /// </summary>
+        /// <param name="fileName">full path of outupt xml file</param>
+        /// <param name="exception">output Exception value if failed</param>
+        /// <returns>true if can serialize and save into file; otherwise, false</returns>
+        public virtual bool SaveToFile(string fileName, out System.Exception exception)
+        {
+            exception = null;
+            try
+            {
+                SaveToFile(fileName);
+                return true;
+            }
+            catch (System.Exception e)
+            {
+                exception = e;
+                return false;
+            }
+        }
+
+        public virtual void SaveToFile(string fileName)
+        {
+            System.IO.StreamWriter streamWriter = null;
+            try
+            {
+                string xmlString = Serialize();
+                System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
+                streamWriter = xmlFile.CreateText();
+                streamWriter.WriteLine(xmlString);
+                streamWriter.Close();
+            }
+            finally
+            {
+                if ((streamWriter != null))
+                {
+                    streamWriter.Dispose();
+                }
+            }
+        }
+
+        /// <summary>
+        /// Deserializes xml markup from file into an ExtendedDataType object
+        /// </summary>
+        /// <param name="fileName">string xml file to load and deserialize</param>
+        /// <param name="obj">Output ExtendedDataType object</param>
+        /// <param name="exception">output Exception value if deserialize failed</param>
+        /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
+        public static bool LoadFromFile(string fileName, out ExtendedDataType obj, out System.Exception exception)
+        {
+            exception = null;
+            obj = default(ExtendedDataType);
+            try
+            {
+                obj = LoadFromFile(fileName);
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                exception = ex;
+                return false;
+            }
+        }
+
+        public static bool LoadFromFile(string fileName, out ExtendedDataType obj)
+        {
+            System.Exception exception = null;
+            return LoadFromFile(fileName, out obj, out exception);
+        }
+
+        public static ExtendedDataType LoadFromFile(string fileName)
+        {
+            System.IO.FileStream file = null;
+            System.IO.StreamReader sr = null;
+            try
+            {
+                file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
+                sr = new System.IO.StreamReader(file);
+                string xmlString = sr.ReadToEnd();
+                sr.Close();
+                file.Close();
+                return Deserialize(xmlString);
+            }
+            finally
+            {
+                if ((file != null))
+                {
+                    file.Dispose();
+                }
+                if ((sr != null))
+                {
+                    sr.Dispose();
+                }
+            }
+        }
+
+        #endregion Serialize/Deserialize
+
+        #region Clone method
+
+        /// <summary>
+        /// Create a clone of this ExtendedDataType object
+        /// </summary>
+        public virtual ExtendedDataType Clone()
+        {
+            return ((ExtendedDataType)(this.MemberwiseClone()));
+        }
+
+        #endregion Clone method
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/Geometries.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/Geometries.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/Geometries.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,68 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    /// <summary>
+    /// Represents a point in 2 dimensional space
+    /// </summary>
+    public interface IPoint2D
+    {
+        /// <summary>
+        /// Gets or sets the X coordinate
+        /// </summary>
+        double X { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Y coordinate
+        /// </summary>
+        double Y { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a point in 3 dimensional space
+    /// </summary>
+    public interface IPoint3D : IPoint2D
+    {
+        /// <summary>
+        /// Gets or sets the Z coordinate
+        /// </summary>
+        double Z { get; set; }
+    }
+
+    internal class Point2DImpl : IPoint2D
+    {
+        public double X { get; set; }
+
+        public double Y { get; set; }
+    }
+
+    internal class Point3DImpl : Point2DImpl, IPoint3D
+    {
+        public double Z { get; set; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IEnvelope.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IEnvelope.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IEnvelope.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,215 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    /// <summary>
+    /// Represents a rectangular bounding box
+    /// </summary>
+    public interface IEnvelope : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the min X.
+        /// </summary>
+        /// <value>The min X.</value>
+        double MinX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the min Y.
+        /// </summary>
+        /// <value>The min Y.</value>
+        double MinY { get; set; }
+
+        /// <summary>
+        /// Gets or sets the max X.
+        /// </summary>
+        /// <value>The max X.</value>
+        double MaxX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the max Y.
+        /// </summary>
+        /// <value>The max Y.</value>
+        double MaxY { get; set; }
+    }
+
+    /// <summary>
+    /// Extension method class
+    /// </summary>
+    public static class EnvelopeExtensions
+    {
+        /// <summary>
+        /// Gets the center of the specified envelope
+        /// </summary>
+        /// <param name="env"></param>
+        /// <returns></returns>
+        public static IPoint2D Center(this IEnvelope env)
+        {
+            Check.NotNull(env, "env"); //NOXLATE
+
+            return ObjectFactory.CreatePoint2D(
+                (env.MinX + env.MaxX) / 2,
+                (env.MinY + env.MaxY) / 2);
+        }
+
+        /// <summary>
+        /// Clones this instance
+        /// </summary>
+        /// <param name="env">The envelope.</param>
+        /// <returns></returns>
+        public static IEnvelope Clone(this IEnvelope env)
+        {
+            Check.NotNull(env, "env"); //NOXLATE
+            return ObjectFactory.CreateEnvelope(env.MinX, env.MinY, env.MaxX, env.MaxY);
+        }
+
+        /// <summary>
+        /// Expands this envelope to accomodate the given envelope
+        /// </summary>
+        /// <param name="env"></param>
+        /// <param name="e1"></param>
+        public static void ExpandToInclude(this IEnvelope env, IEnvelope e1)
+        {
+            Check.NotNull(env, "env"); //NOXLATE
+            if (e1 == null)
+                return;
+
+            if (e1.MinX < env.MinX)
+                env.MinX = e1.MinX;
+
+            if (e1.MinY < env.MinY)
+                env.MinY = e1.MinY;
+
+            if (e1.MaxX > env.MaxX)
+                env.MaxX = e1.MaxX;
+
+            if (e1.MaxY > env.MaxY)
+                env.MaxY = e1.MaxY;
+        }
+
+        /// <summary>
+        /// Indicates whether the specified coordinates are within this instance
+        /// </summary>
+        /// <param name="env">The env.</param>
+        /// <param name="x">The x.</param>
+        /// <param name="y">The y.</param>
+        /// <returns>
+        /// 	<c>true</c> if [contains] [the specified env]; otherwise, <c>false</c>.
+        /// </returns>
+        public static bool Contains(this IEnvelope env, double x, double y)
+        {
+            Check.NotNull(env, "env"); //NOXLATE
+
+            return env.MinX <= x &&
+                   env.MaxX >= x &&
+                   env.MinY <= y &&
+                   env.MaxY >= y;
+        }
+
+        /// <summary>
+        /// Indicates whether the specified envelope intersects this instance
+        /// </summary>
+        /// <param name="env">The env.</param>
+        /// <param name="other">The other.</param>
+        /// <returns></returns>
+        public static bool Intersects(this IEnvelope env, IEnvelope other)
+        {
+            Check.NotNull(env, "env"); //NOXLATE
+
+            if (other == null)
+                return false;
+
+            return !(other.MinX > env.MaxX || other.MaxX < env.MinX || other.MinY > env.MaxY || other.MaxY < env.MinY);
+        }
+    }
+
+    partial class Envelope : IEnvelope
+    {
+        internal Envelope()
+        {
+        }
+
+        public Envelope(double minx, double miny, double maxx, double maxy)
+        {
+            this.lowerLeftCoordinateField = new EnvelopeLowerLeftCoordinate() { X = minx, Y = miny };
+            this.upperRightCoordinateField = new EnvelopeUpperRightCoordinate() { X = maxx, Y = maxy };
+        }
+
+        /// <summary>
+        /// Gets or sets the lower X value
+        /// </summary>
+        public double MinX
+        {
+            get { return this.lowerLeftCoordinateField.X; }
+            set
+            {
+                this.lowerLeftCoordinateField.X = value;
+                OnPropertyChanged("MinX"); //NOXLATE
+            }
+        }
+
+        /// <summary>
+        /// Gets or set the lower Y value
+        /// </summary>
+        public double MinY
+        {
+            get { return this.lowerLeftCoordinateField.Y; }
+            set
+            {
+                this.lowerLeftCoordinateField.Y = value;
+                OnPropertyChanged("MinY"); //NOXLATE
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the upper X value
+        /// </summary>
+        public double MaxX
+        {
+            get { return this.upperRightCoordinateField.X; }
+            set
+            {
+                this.upperRightCoordinateField.X = value;
+                OnPropertyChanged("MaxX");
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the upper Y value
+        /// </summary>
+        public double MaxY
+        {
+            get { return this.upperRightCoordinateField.Y; }
+            set
+            {
+                this.upperRightCoordinateField.Y = value;
+                OnPropertyChanged("MaxY"); //NOXLATE
+            }
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IExpressionPropertySource.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IExpressionPropertySource.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IExpressionPropertySource.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,48 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    public interface IExpressionPropertySource
+    {
+        /// <summary>
+        /// Gets the name
+        /// </summary>
+        string Name { get; }
+
+        /// <summary>
+        /// Gets the description
+        /// </summary>
+        string Description { get; }
+
+        /// <summary>
+        /// Gets the expression data type
+        /// </summary>
+        ExpressionDataType ExpressionType { get; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IFdoSerializable.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IFdoSerializable.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IFdoSerializable.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,50 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    /// <summary>
+    /// Defines an interface for reading and writing content to and from FDO XML documents
+    /// </summary>
+    public interface IFdoSerializable
+    {
+        /// <summary>
+        /// Writes the current element's content
+        /// </summary>
+        /// <param name="doc"></param>
+        /// <param name="currentNode"></param>
+        void WriteXml(XmlDocument doc, XmlNode currentNode);
+
+        /// <summary>
+        /// Set the current element's content from the current XML node
+        /// </summary>
+        /// <param name="node"></param>
+        /// <param name="mgr"></param>
+        void ReadXml(XmlNode node, XmlNamespaceManager mgr);
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IFdoSpatialContext.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IFdoSpatialContext.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IFdoSpatialContext.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,319 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    /// <summary>
+    /// Represents a Spatial Context of a Feature Source
+    /// </summary>
+    public interface IFdoSpatialContext : IFdoSerializable
+    {
+        /// <summary>
+        /// Gets or sets the name of the coordinate system.
+        /// </summary>
+        /// <value>
+        /// The name of the coordinate system.
+        /// </value>
+        string CoordinateSystemName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the coordinate system WKT.
+        /// </summary>
+        /// <value>
+        /// The coordinate system WKT.
+        /// </value>
+        string CoordinateSystemWkt { get; set; }
+
+        /// <summary>
+        /// Gets or sets the description.
+        /// </summary>
+        /// <value>
+        /// The description.
+        /// </value>
+        string Description { get; set; }
+
+        /// <summary>
+        /// Gets or sets the extent.
+        /// </summary>
+        /// <value>
+        /// The extent.
+        /// </value>
+        IEnvelope Extent { get; set; }
+
+        /// <summary>
+        /// Gets or sets the type of the extent.
+        /// </summary>
+        /// <value>
+        /// The type of the extent.
+        /// </value>
+        FdoSpatialContextListSpatialContextExtentType ExtentType { get; set; }
+
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>
+        /// The name.
+        /// </value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the XY tolerance.
+        /// </summary>
+        /// <value>
+        /// The XY tolerance.
+        /// </value>
+        double XYTolerance { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Z tolerance.
+        /// </summary>
+        /// <value>
+        /// The Z tolerance.
+        /// </value>
+        double ZTolerance { get; set; }
+    }
+
+    partial class FdoSpatialContextListSpatialContext : IFdoSpatialContext
+    {
+        [XmlIgnore]
+        IEnvelope IFdoSpatialContext.Extent
+        {
+            get
+            {
+                double llx;
+                double lly;
+                double urx;
+                double ury;
+
+                if (double.TryParse(this.Extent.LowerLeftCoordinate.X, out llx) &&
+                    double.TryParse(this.Extent.LowerLeftCoordinate.Y, out lly) &&
+                    double.TryParse(this.Extent.UpperRightCoordinate.X, out urx) &&
+                    double.TryParse(this.Extent.UpperRightCoordinate.Y, out ury))
+                    return ObjectFactory.CreateEnvelope(llx, lly, urx, ury);
+
+                return null;
+            }
+            set
+            {
+                if (value == null)
+                {
+                    this.Extent = null;
+                    return;
+                }
+
+                this.Extent = new FdoSpatialContextListSpatialContextExtent()
+                {
+                    LowerLeftCoordinate = new FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate()
+                    {
+                        X = value.MinX.ToString(CultureInfo.InvariantCulture),
+                        Y = value.MinY.ToString(CultureInfo.InvariantCulture)
+                    },
+                    UpperRightCoordinate = new FdoSpatialContextListSpatialContextExtentUpperRightCoordinate()
+                    {
+                        X = value.MaxX.ToString(CultureInfo.InvariantCulture),
+                        Y = value.MaxY.ToString(CultureInfo.InvariantCulture)
+                    }
+                };
+            }
+        }
+
+        public void WriteXml(System.Xml.XmlDocument doc, System.Xml.XmlNode currentNode)
+        {
+            //Can't write dynamic extents
+            if (this.ExtentType == FdoSpatialContextListSpatialContextExtentType.Dynamic)
+                return;
+
+            var crs = doc.CreateElement("gml", "DerivedCRS", XmlNamespaces.GML); //NOXLATE
+            {
+                crs.SetAttribute("id", XmlNamespaces.GML, this.Name); //NOXLATE
+                var meta = doc.CreateElement("gml", "metaDataProperty", XmlNamespaces.GML); //NOXLATE
+                crs.AppendChild(meta);
+                {
+                    var genMeta = doc.CreateElement("gml", "GenericMetaData", XmlNamespaces.GML); //NOXLATE
+                    meta.AppendChild(genMeta);
+                    {
+                        var fdoXY = doc.CreateElement("fdo", "XYTolerance", XmlNamespaces.FDO); //NOXLATE
+                        var fdoZ = doc.CreateElement("fdo", "ZTolerance", XmlNamespaces.FDO); //NOXLATE
+                        fdoXY.InnerText = this.XYTolerance.ToString(CultureInfo.InvariantCulture);
+                        fdoZ.InnerText = this.ZTolerance.ToString(CultureInfo.InvariantCulture);
+                        genMeta.AppendChild(fdoXY);
+                        genMeta.AppendChild(fdoZ);
+                    }
+                }
+
+                var remarks = doc.CreateElement("gml", "remarks", XmlNamespaces.GML); //NOXLATE
+                remarks.InnerText = this.Description;
+                crs.AppendChild(remarks);
+
+                var csName = doc.CreateElement("gml", "srsName", XmlNamespaces.GML); //NOXLATE
+                csName.InnerText = string.IsNullOrEmpty(this.CoordinateSystemName) ? this.Name : this.CoordinateSystemName;
+                crs.AppendChild(csName);
+
+                var ext = doc.CreateElement("gml", "validArea", XmlNamespaces.GML); //NOXLATE
+                {
+                    var bbox = doc.CreateElement("gml", "boundingBox", XmlNamespaces.GML); //NOXLATE
+                    {
+                        var ll = doc.CreateElement("gml", "pos", XmlNamespaces.GML); //NOXLATE
+                        var ur = doc.CreateElement("gml", "pos", XmlNamespaces.GML); //NOXLATE
+                        ll.InnerText = this.Extent.LowerLeftCoordinate.X + " " + this.Extent.LowerLeftCoordinate.Y; //NOXLATE
+                        ur.InnerText = this.Extent.UpperRightCoordinate.X + " " + this.Extent.UpperRightCoordinate.Y; //NOXLATE
+                        bbox.AppendChild(ll);
+                        bbox.AppendChild(ur);
+                    }
+                    ext.AppendChild(bbox);
+                }
+                crs.AppendChild(ext);
+
+                var baseCrs = doc.CreateElement("gml", "baseCRS", XmlNamespaces.GML); //NOXLATE
+                var definedBy = doc.CreateElement("gml", "definedByConversion", XmlNamespaces.GML); //NOXLATE
+                var derivedCrs = doc.CreateElement("gml", "derivedCRSType", XmlNamespaces.GML); //NOXLATE
+                var userCs = doc.CreateElement("gml", "usesCS", XmlNamespaces.GML); //NOXLATE
+
+                if (string.IsNullOrEmpty(this.CoordinateSystemWkt))
+                {
+                    baseCrs.SetAttribute("href", XmlNamespaces.XLINK, "http://fdo.osgeo.org/schemas/feature/crs/#" + (string.IsNullOrEmpty(this.CoordinateSystemName) ? this.Name : this.CoordinateSystemName)); //NOXLATE
+                }
+                else
+                {
+                    var wktCRS = doc.CreateElement("fdo", "WKTCRS", XmlNamespaces.FDO); //NOXLATE
+                    wktCRS.SetAttribute("id", XmlNamespaces.GML, this.Name); //NOXLATE
+                    {
+                        var srsName = doc.CreateElement("gml", "srsName", XmlNamespaces.GML); //NOXLATE
+                        srsName.InnerText = this.nameField;
+                        var fdowkt = doc.CreateElement("fdo", "WKT", XmlNamespaces.FDO); //NOXLATE
+                        fdowkt.InnerText = this.CoordinateSystemWkt;
+                        wktCRS.AppendChild(srsName);
+                        wktCRS.AppendChild(fdowkt);
+                    }
+                    baseCrs.AppendChild(wktCRS);
+                }
+
+                definedBy.SetAttribute("href", XmlNamespaces.XLINK, "http://fdo.osgeo.org/coord_conversions#identity"); //NOXLATE
+                derivedCrs.SetAttribute("codeSpace", "http://fdo.osgeo.org/crs_types"); //NOXLATE
+                derivedCrs.InnerText = "geographic"; //NOXLATE
+                userCs.SetAttribute("href", XmlNamespaces.XLINK, "http://fdo.osgeo.org/cs#default_cartesian"); //NOXLATE
+
+                crs.AppendChild(baseCrs);
+                crs.AppendChild(definedBy);
+                crs.AppendChild(derivedCrs);
+                crs.AppendChild(userCs);
+            }
+
+            currentNode.AppendChild(crs);
+        }
+
+        public void ReadXml(System.Xml.XmlNode node, System.Xml.XmlNamespaceManager mgr)
+        {
+            if (!node.Name.Equals("gml:DerivedCRS")) //NOXLATE
+                throw new Exception(string.Format(Strings.ErrorBadDocumentExpectedElement, "gml:DerivedCRS"));
+
+            //Start off as dynamic, until we find a bounding box. Then we set it to static
+            this.ExtentType = FdoSpatialContextListSpatialContextExtentType.Dynamic;
+
+            var meta = node["gml:metaDataProperty"]; //NOXLATE
+            if (meta != null)
+            {
+                var genMeta = meta["gml:GenericMetaData"]; //NOXLATE
+
+                var scType = Utility.GetFdoElement(genMeta, "SCExtentType"); //NOXLATE
+                var xyTol = Utility.GetFdoElement(genMeta, "XYTolerance"); //NOXLATE
+                var zTol = Utility.GetFdoElement(genMeta, "ZTolerance"); //NOXLATE
+
+                //this.ExtentType = (scType == null || scType.InnerText == "dynamic") ? FdoSpatialContextListSpatialContextExtentType.Dynamic : FdoSpatialContextListSpatialContextExtentType.Static;
+
+                double xy_tol;
+                double z_tol;
+
+                if (double.TryParse(xyTol.InnerText, out xy_tol))
+                    this.XYTolerance = xy_tol;
+
+                if (double.TryParse(zTol.InnerText, out z_tol))
+                    this.ZTolerance = z_tol;
+            }
+            else
+            {
+                this.XYTolerance = 0.0001;
+                this.ZTolerance = 0.0001;
+            }
+
+            var remarks = node["gml:remarks"]; //NOXLATE
+            var srsName = node["gml:srsName"]; //NOXLATE
+            var ext = node["gml:validArea"]; //NOXLATE
+            var baseCrs = node["gml:baseCRS"]; //NOXLATE
+
+            this.Name = srsName.InnerText;
+            this.Description = (remarks != null) ? remarks.InnerText : string.Empty;
+
+            var bbox = ext["gml:boundingBox"]; //NOXLATE
+            if (bbox != null)
+            {
+                var ll = bbox.FirstChild;
+                var ur = bbox.LastChild;
+
+                var llt = ll.InnerText.Split(' '); //NOXLATE
+                var urt = ur.InnerText.Split(' '); //NOXLATE
+
+                if (llt.Length != 2 || urt.Length != 2)
+                    throw new Exception(Strings.ErrorBadDocumentInvalidBbox);
+
+                this.Extent = new FdoSpatialContextListSpatialContextExtent()
+                {
+                    LowerLeftCoordinate = new FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate()
+                    {
+                        X = llt[0],
+                        Y = llt[1]
+                    },
+                    UpperRightCoordinate = new FdoSpatialContextListSpatialContextExtentUpperRightCoordinate()
+                    {
+                        X = urt[0],
+                        Y = urt[1]
+                    }
+                };
+
+                this.ExtentType = FdoSpatialContextListSpatialContextExtentType.Static;
+            }
+
+            if (baseCrs.HasAttribute("xlink:href")) //NOXLATE
+            {
+                var href = baseCrs.GetAttribute("xlink:href"); //NOXLATE
+                this.CoordinateSystemName = href.Substring(href.LastIndexOf("#") + 1); //NOXLATE
+            }
+
+            var wktCrs = Utility.GetFdoElement(baseCrs, "WKTCRS"); //NOXLATE
+            if (wktCrs != null)
+            {
+                var wkt = Utility.GetFdoElement(wktCrs, "WKT"); //NOXLATE
+                if (wkt != null)
+                {
+                    this.CoordinateSystemWkt = wkt.InnerText;
+                }
+            }
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ILongTransaction.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ILongTransaction.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ILongTransaction.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,94 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    /// <summary>
+    /// Represents a list of long transactions
+    /// </summary>
+    public interface ILongTransactionList
+    {
+        /// <summary>
+        /// Gets the long transactions in this list
+        /// </summary>
+        IEnumerable<ILongTransaction> Transactions { get; }
+    }
+
+    /// <summary>
+    /// Represents a long transaction
+    /// </summary>
+    public interface ILongTransaction
+    {
+        /// <summary>
+        /// Gets the name of the long transaction
+        /// </summary>
+        string Name { get; }
+
+        /// <summary>
+        /// Gets the description of the long transaction
+        /// </summary>
+        string Description { get; }
+
+        /// <summary>
+        /// Gets the owner of the long transaction
+        /// </summary>
+        string Owner { get; }
+
+        /// <summary>
+        /// Gets the creation date of the long transaction
+        /// </summary>
+        string CreationDate { get; }
+
+        /// <summary>
+        /// Gets whether the long transaction is active
+        /// </summary>
+        bool IsActive { get; }
+
+        /// <summary>
+        /// Gets whether the long transaction is frozen
+        /// </summary>
+        bool IsFrozen { get; }
+    }
+
+    partial class FdoLongTransactionList : ILongTransactionList
+    {
+        /// <summary>
+        /// Gets the long transactions in this list
+        /// </summary>
+        public IEnumerable<ILongTransaction> Transactions
+        {
+            get
+            {
+                return this.LongTransaction;
+            }
+        }
+    }
+
+    partial class FdoLongTransactionListLongTransaction : ILongTransaction
+    {
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IRepositoryItem.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IRepositoryItem.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IRepositoryItem.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,85 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    /// <summary>
+    /// Represents an item in the repository
+    /// </summary>
+    public interface IRepositoryItem
+    {
+        /// <summary>
+        /// Gets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; }
+
+        /// <summary>
+        /// Gets the resource id.
+        /// </summary>
+        /// <value>The resource id.</value>
+        string ResourceId { get; }
+
+        /// <summary>
+        /// Gets the type of the resource.
+        /// </summary>
+        /// <value>The type of the resource.</value>
+        string ResourceType { get; }
+
+        /// <summary>
+        /// Gets a value indicating whether this instance is folder.
+        /// </summary>
+        /// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
+        bool IsFolder { get; }
+
+        /// <summary>
+        /// Gets a value indicating whether this instance has children.
+        /// </summary>
+        /// <value>
+        /// 	<c>true</c> if this instance has children; otherwise, <c>false</c>.
+        /// </value>
+        bool HasChildren { get; }
+
+        /// <summary>
+        /// Gets the owner.
+        /// </summary>
+        /// <value>The owner.</value>
+        string Owner { get; }
+
+        /// <summary>
+        /// Gets the created date.
+        /// </summary>
+        /// <value>The created date.</value>
+        DateTime CreatedDate { get; }
+
+        /// <summary>
+        /// Gets the modified date.
+        /// </summary>
+        /// <value>The modified date.</value>
+        DateTime ModifiedDate { get; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IResourceIdReference.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IResourceIdReference.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IResourceIdReference.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,43 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    /// <summary>
+    /// Represents a resource id reference
+    /// </summary>
+    public interface IResourceIdReference : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the resource id.
+        /// </summary>
+        /// <value>The resource id.</value>
+        string ResourceId { get; set; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ResourceItems.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ResourceItems.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ResourceItems.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,87 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    partial class ResourceList
+    {
+        [XmlIgnore]
+        public IEnumerable<IRepositoryItem> Children
+        {
+            get
+            {
+                foreach (var obj in this.Items)
+                {
+                    yield return (IRepositoryItem)obj;
+                }
+            }
+        }
+    }
+
+    partial class ResourceListResourceDocument : IRepositoryItem
+    {
+        [XmlIgnore]
+        public string Name
+        {
+            get { return ResourceIdentifier.GetName(this.ResourceId); }
+        }
+
+        [XmlIgnore]
+        public bool HasChildren { get { return false; } } //Documents don't have child resources
+
+        [XmlIgnore]
+        public string ResourceType { get { return ResourceIdentifier.GetResourceTypeAsString(this.ResourceId); } }
+
+        [XmlIgnore]
+        public bool IsFolder { get { return false; } }
+    }
+
+    partial class ResourceListResourceFolder : IRepositoryItem
+    {
+        [XmlIgnore]
+        public string Name
+        {
+            get
+            {
+                if (this.ResourceId != "Library://")
+                    return ResourceIdentifier.GetName(this.ResourceId);
+                else
+                    return "Root"; //LOCALIZE
+            }
+        }
+
+        [XmlIgnore]
+        public bool HasChildren { get { return int.Parse(this.NumberOfDocuments) > 0 || int.Parse(this.NumberOfFolders) > 0; } }
+
+        [XmlIgnore]
+        public string ResourceType { get { return ResourceTypes.Folder.ToString(); } }
+
+        [XmlIgnore]
+        public bool IsFolder { get { return true; } }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ResourceList.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ResourceList.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/ResourceList.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,175 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    partial class ResourceSecurityTypeGroups
+    {
+        internal ResourceSecurityTypeGroups()
+        {
+        }
+    }
+
+    partial class ResourceSecurityTypeUsers
+    {
+        internal ResourceSecurityTypeUsers()
+        {
+        }
+    }
+
+    partial class ResourceDocumentHeaderType
+    {
+        public static ResourceDocumentHeaderType CreateDefault()
+        {
+            return new ResourceDocumentHeaderType()
+            {
+                Security = new ResourceSecurityType() { Inherited = true }
+            };
+        }
+
+        /// <summary>
+        /// For internal use only. Made public to satisfy serialization requirements. Use <see cref="M:OSGeo.MapGuide.ObjectModels.ResourceDocumentHeaderType.CreateDefault"/> to
+        /// create new instances
+        /// </summary>
+        public ResourceDocumentHeaderType()
+        {
+        }
+
+        //Required for saving/updating
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] //NOXLATE
+        public string ValidatingSchema
+        {
+            get { return "ResourceDocumentHeader-1.0.0.xsd"; } //NOXLATE
+            set { }
+        }
+    }
+
+    partial class ResourceFolderHeaderType
+    {
+        public static ResourceFolderHeaderType CreateDefault()
+        {
+            return new ResourceFolderHeaderType()
+            {
+                Security = new ResourceSecurityType() { Inherited = true }
+            };
+        }
+
+        /// <summary>
+        /// For internal use only. Made public to satisfy serialization requirements. Use <see cref="M:OSGeo.MapGuide.ObjectModels.ResourceDocumentHeaderType.CreateDefault"/> to
+        /// create new instances
+        /// </summary>
+        public ResourceFolderHeaderType()
+        {
+        }
+
+        //Required for saving/updating
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] //NOXLATE
+        public string ValidatingSchema
+        {
+            get { return "ResourceFolderHeader-1.0.0.xsd"; } //NOXLATE
+            set { }
+        }
+    }
+
+    partial class ResourceDocumentHeaderTypeMetadataSimple
+    {
+        internal ResourceDocumentHeaderTypeMetadataSimple()
+        {
+        }
+    }
+
+    partial class ResourceDocumentHeaderTypeMetadata
+    {
+        internal ResourceDocumentHeaderTypeMetadata()
+        {
+        }
+
+        /// <summary>
+        /// Returns a <see cref="NameValueCollection"/> of all the metadata properties
+        /// </summary>
+        /// <returns></returns>
+        public NameValueCollection GetProperties()
+        {
+            var dict = new NameValueCollection();
+            foreach (var val in this.Simple.Property)
+            {
+                dict.Add(val.Name, val.Value);
+            }
+            return dict;
+        }
+
+        /// <summary>
+        /// Sets a metadata property.
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="value"></param>
+        public void SetProperty(string name, string value)
+        {
+            foreach (var val in this.Simple.Property)
+            {
+                if (val.Name == name)
+                {
+                    val.Value = value;
+                    return;
+                }
+            }
+
+            this.Simple.Property.Add(new ResourceDocumentHeaderTypeMetadataSimpleProperty()
+            {
+                Name = name,
+                Value = value
+            });
+        }
+
+        /// <summary>
+        /// Applies the specified set of properties to this instance
+        /// </summary>
+        /// <param name="values"></param>
+        public void ApplyProperties(NameValueCollection values)
+        {
+            var dict = GetProperties();
+            foreach (string key in values.Keys)
+            {
+                dict[key] = values[key];
+            }
+
+            this.Simple.Property.Clear();
+            foreach (string key in dict.Keys)
+            {
+                this.Simple.Property.Add(new ResourceDocumentHeaderTypeMetadataSimpleProperty()
+                {
+                    Name = key,
+                    Value = dict[key]
+                });
+            }
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/DrawingSource/DrawingSourceInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/DrawingSource/DrawingSourceInterfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/DrawingSource/DrawingSourceInterfaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,100 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.Common;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.DrawingSource
+{
+    /// <summary>
+    /// A DWF-based Drawing Source
+    /// </summary>
+    public interface IDrawingSource : IResource
+    {
+        /// <summary>
+        /// Gets or sets the name of the source (dwf file).
+        /// </summary>
+        /// <value>The name of the source.</value>
+        string SourceName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the coordinate space.
+        /// </summary>
+        /// <value>The coordinate space.</value>
+        string CoordinateSpace { get; set; }
+
+        /// <summary>
+        /// Removes all sheets.
+        /// </summary>
+        void RemoveAllSheets();
+
+        /// <summary>
+        /// Gets the sheets.
+        /// </summary>
+        /// <value>The sheets.</value>
+        IEnumerable<IDrawingSourceSheet> Sheet { get; }
+
+        /// <summary>
+        /// Adds the sheet.
+        /// </summary>
+        /// <param name="sheet">The sheet.</param>
+        void AddSheet(IDrawingSourceSheet sheet);
+
+        /// <summary>
+        /// Removes the sheet.
+        /// </summary>
+        /// <param name="sheet">The sheet.</param>
+        void RemoveSheet(IDrawingSourceSheet sheet);
+
+        /// <summary>
+        /// Creates the sheet.
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <param name="minx">The minx.</param>
+        /// <param name="miny">The miny.</param>
+        /// <param name="maxx">The maxx.</param>
+        /// <param name="maxy">The maxy.</param>
+        /// <returns></returns>
+        IDrawingSourceSheet CreateSheet(string name, double minx, double miny, double maxx, double maxy);
+    }
+
+    /// <summary>
+    /// Represents a sheet (DWF section)
+    /// </summary>
+    public interface IDrawingSourceSheet
+    {
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the extent.
+        /// </summary>
+        /// <value>The extent.</value>
+        IEnvelope Extent { get; set; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/DrawingSource/v1_0_0/DrawingSourceImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/DrawingSource/v1_0_0/DrawingSourceImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/DrawingSource/v1_0_0/DrawingSourceImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,180 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.Common;
+using OSGeo.MapGuide.ObjectModels.DrawingSource;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+#pragma warning disable 1591, 0114, 0108
+
+namespace OSGeo.MapGuide.ObjectModels.DrawingSource.v1_0_0
+{
+    partial class DrawingSource : IDrawingSource
+    {
+        internal DrawingSource()
+        {
+        }
+
+        private static readonly Version RES_VERSION = new Version(1, 0, 0);
+
+        private string _resId;
+
+        [XmlIgnore]
+        public string ResourceID
+        {
+            get
+            {
+                return _resId;
+            }
+            set
+            {
+                if (!ResourceIdentifier.Validate(value))
+                    throw new InvalidOperationException(Strings.ErrorInvalidResourceIdentifier); //LOCALIZE
+
+                var res = new ResourceIdentifier(value);
+                if (res.Extension != ResourceTypes.DrawingSource.ToString())
+                    throw new InvalidOperationException(string.Format(Strings.ErrorUnexpectedResourceType, res.ToString(), ResourceTypes.DrawingSource)); //LOCALIZE
+
+                _resId = value;
+                this.OnPropertyChanged("ResourceID"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public string ResourceType
+        {
+            get
+            {
+                return ResourceTypes.DrawingSource.ToString();
+            }
+        }
+
+        [XmlIgnore]
+        public Version ResourceVersion
+        {
+            get
+            {
+                return RES_VERSION;
+            }
+        }
+
+        object ICloneable.Clone()
+        {
+            return this.Clone();
+        }
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] //NOXLATE
+        public string ValidatingSchema
+        {
+            get { return "DrawingSource-1.0.0.xsd"; } //NOXLATE
+            set { }
+        }
+
+        [XmlIgnore]
+        public bool IsStronglyTyped
+        {
+            get { return true; }
+        }
+
+        void IDrawingSource.RemoveAllSheets()
+        {
+            this.Sheet.Clear();
+        }
+
+        [XmlIgnore]
+        IEnumerable<IDrawingSourceSheet> IDrawingSource.Sheet
+        {
+            get
+            {
+                foreach (var sht in this.Sheet)
+                {
+                    yield return sht;
+                }
+            }
+        }
+
+        IDrawingSourceSheet IDrawingSource.CreateSheet(string name, double minx, double miny, double maxx, double maxy)
+        {
+            return new DrawingSourceSheet()
+            {
+                Extent = new DrawingSourceSheetExtent()
+                {
+                    MinX = minx,
+                    MinY = miny,
+                    MaxX = maxx,
+                    MaxY = maxy
+                },
+                Name = name
+            };
+        }
+
+        void IDrawingSource.AddSheet(IDrawingSourceSheet sheet)
+        {
+            var sht = sheet as DrawingSourceSheet;
+            if (sht != null)
+                this.Sheet.Add(sht);
+        }
+
+        void IDrawingSource.RemoveSheet(IDrawingSourceSheet sheet)
+        {
+            var sht = sheet as DrawingSourceSheet;
+            if (sht != null)
+                this.Sheet.Remove(sht);
+        }
+    }
+
+    partial class DrawingSourceSheetExtent : IEnvelope
+    { }
+
+    partial class DrawingSourceSheet : IDrawingSourceSheet
+    {
+        [XmlIgnore]
+        IEnvelope IDrawingSourceSheet.Extent
+        {
+            get
+            {
+                return this.Extent;
+            }
+            set
+            {
+                if (value == null)
+                {
+                    this.Extent = null;
+                }
+                else
+                {
+                    if (this.Extent == null)
+                        this.Extent = new DrawingSourceSheetExtent();
+
+                    this.Extent.MaxX = value.MaxX;
+                    this.Extent.MaxY = value.MaxY;
+                    this.Extent.MinX = value.MinX;
+                    this.Extent.MinY = value.MinY;
+                }
+            }
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/FeatureSourceInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/FeatureSourceInterfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/FeatureSourceInterfaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,419 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.FeatureSource.v1_0_0;
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.FeatureSource
+{
+    /// <summary>
+    /// Represents an FDO feature source
+    /// </summary>
+    public interface IFeatureSource : IResource
+    {
+        /// <summary>
+        /// Removes all specified connection properties
+        /// </summary>
+        void ClearConnectionProperties();
+
+        /// <summary>
+        /// Gets an array of names of the currently specified connection properties
+        /// </summary>
+        string[] ConnectionPropertyNames { get; }
+
+        /// <summary>
+        /// Gets or sets the FDO provider.
+        /// </summary>
+        /// <value>The FDO provider.</value>
+        string Provider { get; set; }
+
+        /// <summary>
+        /// Gets the connection property.
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <returns></returns>
+        string GetConnectionProperty(string name);
+
+        /// <summary>
+        /// Sets the connection property.
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <param name="value">The value. If null, the matching parameter is removed from the feature source</param>
+        void SetConnectionProperty(string name, string value);
+
+        /// <summary>
+        /// Gets the connection string.
+        /// </summary>
+        /// <value>The connection string.</value>
+        string ConnectionString { get; }
+
+        /// <summary>
+        /// Gets the name of the embedded data resource. Can only be called if <see cref="UsesEmbeddedDataFiles"/> returns true.
+        /// </summary>
+        /// <returns></returns>
+        /// <exception cref="InvalidOperationException">If <see cref="UsesEmbeddedDataFiles"/> is false</exception>
+        string GetEmbeddedDataName();
+
+        /// <summary>
+        /// Gets the name of the alias. Can only be called if <see cref="UsesAliasedDataFiles"/> returns true
+        /// </summary>
+        /// <returns></returns>
+        /// <exception cref="InvalidOperationException">If <see cref="UsesAliasedDataFiles"/> is false </exception>
+        string GetAliasName();
+
+        /// <summary>
+        /// Gets the name of the aliased file. Can only be called if <see cref="UsesAliasedDataFiles"/> returns true. An
+        /// empty string is returned if it is a directory (ie. no file name was found)
+        /// </summary>
+        /// <returns></returns>
+        /// <exception cref="InvalidOperationException">If <see cref="UsesAliasedDataFiles"/> is false</exception>
+        string GetAliasedFileName();
+
+        /// <summary>
+        /// Gets a value indicating whether [uses embedded data files].
+        /// </summary>
+        /// <value>
+        /// 	<c>true</c> if [uses embedded data files]; otherwise, <c>false</c>.
+        /// </value>
+        bool UsesEmbeddedDataFiles { get; }
+
+        /// <summary>
+        /// Gets a value indicating whether [uses aliased data files].
+        /// </summary>
+        /// <value>
+        /// 	<c>true</c> if [uses aliased data files]; otherwise, <c>false</c>.
+        /// </value>
+        bool UsesAliasedDataFiles { get; }
+
+        /// <summary>
+        /// Gets the supplemental spatial context info (coordinate system overrides).
+        /// </summary>
+        /// <value>The supplemental spatial context info.</value>
+        IEnumerable<ISpatialContextInfo> SupplementalSpatialContextInfo { get; }
+
+        /// <summary>
+        /// Adds the spatial context override.
+        /// </summary>
+        /// <param name="sc">The sc.</param>
+        void AddSpatialContextOverride(ISpatialContextInfo sc);
+
+        /// <summary>
+        /// Removes the spatial context override.
+        /// </summary>
+        /// <param name="sc">The sc.</param>
+        void RemoveSpatialContextOverride(ISpatialContextInfo sc);
+
+        /// <summary>
+        /// Gets the extensions for this feature source.
+        /// </summary>
+        /// <value>The extensions.</value>
+        IEnumerable<IFeatureSourceExtension> Extension { get; }
+
+        /// <summary>
+        /// Adds the extension.
+        /// </summary>
+        /// <param name="ext">The ext.</param>
+        void AddExtension(IFeatureSourceExtension ext);
+
+        /// <summary>
+        /// Removes the extension.
+        /// </summary>
+        /// <param name="ext">The ext.</param>
+        void RemoveExtension(IFeatureSourceExtension ext);
+
+        /// <summary>
+        /// Gets or sets the name of the configuration document.
+        /// </summary>
+        /// <value>The name of the configuration document.</value>
+        string ConfigurationDocument { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a spatial context override
+    /// </summary>
+    public interface ISpatialContextInfo
+    {
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the coordinate system.
+        /// </summary>
+        /// <value>The coordinate system.</value>
+        string CoordinateSystem { get; set; }
+    }
+
+    /// <summary>
+    /// Represents an extended feature class
+    /// </summary>
+    public interface IFeatureSourceExtension : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the feature class to extend
+        /// </summary>
+        /// <value>The feature class.</value>
+        string FeatureClass { get; set; }
+
+        /// <summary>
+        /// Gets the calculated properties.
+        /// </summary>
+        /// <value>The calculated properties.</value>
+        IEnumerable<ICalculatedProperty> CalculatedProperty { get; }
+
+        /// <summary>
+        /// Adds the calculated property.
+        /// </summary>
+        /// <param name="prop">The prop.</param>
+        void AddCalculatedProperty(ICalculatedProperty prop);
+
+        /// <summary>
+        /// Removes the calculated property.
+        /// </summary>
+        /// <param name="prop">The prop.</param>
+        void RemoveCalculatedProperty(ICalculatedProperty prop);
+
+        /// <summary>
+        /// Gets the attribute joins
+        /// </summary>
+        /// <value>The attribute joins.</value>
+        IEnumerable<IAttributeRelation> AttributeRelate { get; }
+
+        /// <summary>
+        /// Adds the relation.
+        /// </summary>
+        /// <param name="relate">The relate.</param>
+        void AddRelation(IAttributeRelation relate);
+
+        /// <summary>
+        /// Removes the relation.
+        /// </summary>
+        /// <param name="relate">The relate.</param>
+        void RemoveRelation(IAttributeRelation relate);
+    }
+
+    /// <summary>
+    /// Represents a FDO calculated property
+    /// </summary>
+    public interface ICalculatedProperty : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the FDO expression.
+        /// </summary>
+        /// <value>The FDO expression.</value>
+        string Expression { get; set; }
+    }
+
+    /// <summary>
+    /// Defines the type of joins
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum RelateTypeEnum
+    {
+        /// <remarks/>
+        LeftOuter,
+
+        /// <remarks/>
+        RightOuter,
+
+        /// <remarks/>
+        Inner,
+
+        /// <remarks/>
+        Association,
+    }
+
+    /// <summary>
+    /// Represents an attribute join
+    /// </summary>
+    public interface IAttributeRelation : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets whether to force 1:1 cardinality
+        /// </summary>
+        bool ForceOneToOne { get; set; }
+
+        /// <summary>
+        /// Gets the type of join
+        /// </summary>
+        RelateTypeEnum RelateType { get; set; }
+
+        /// <summary>
+        /// Gets or sets the feature source id containing the feature class to extend
+        /// </summary>
+        string ResourceId { get; set; }
+
+        /// <summary>
+        /// Gets or sets the name of the feature class to extend
+        /// </summary>
+        string AttributeClass { get; set; }
+
+        /// <summary>
+        /// Gets or sets the name of the join
+        /// </summary>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the prefix that prevents a naming collision on both sides of the join
+        /// </summary>
+        string AttributeNameDelimiter { get; set; }
+
+        /// <summary>
+        /// Gets the property pairs involved in this join
+        /// </summary>
+        /// <value>The property pairs.</value>
+        IEnumerable<IRelateProperty> RelateProperty { get; }
+
+        /// <summary>
+        /// Gets the number of properties being joined on
+        /// </summary>
+        int RelatePropertyCount { get; }
+
+        /// <summary>
+        /// Creates the property join.
+        /// </summary>
+        /// <param name="primaryProperty">The primary property.</param>
+        /// <param name="secondaryProperty">The secondary property.</param>
+        /// <returns></returns>
+        IRelateProperty CreatePropertyJoin(string primaryProperty, string secondaryProperty);
+
+        /// <summary>
+        /// Adds the relate property.
+        /// </summary>
+        /// <param name="prop">The prop.</param>
+        void AddRelateProperty(IRelateProperty prop);
+
+        /// <summary>
+        /// Removes the relate property.
+        /// </summary>
+        /// <param name="prop">The prop.</param>
+        void RemoveRelateProperty(IRelateProperty prop);
+
+        /// <summary>
+        /// Removes all relate properties.
+        /// </summary>
+        void RemoveAllRelateProperties();
+    }
+
+    /// <summary>
+    /// Represents a property pair in an attribute join
+    /// </summary>
+    public interface IRelateProperty
+    {
+        /// <summary>
+        /// Gets or sets the feature class property.
+        /// </summary>
+        /// <value>The feature class property.</value>
+        string FeatureClassProperty { get; set; }
+
+        /// <summary>
+        /// Gets or sets the attribute class property.
+        /// </summary>
+        /// <value>The attribute class property.</value>
+        string AttributeClassProperty { get; set; }
+    }
+
+    /// <summary>
+    /// Extension method class
+    /// </summary>
+    public static class FeatureSourceExtensions
+    {
+        /// <summary>
+        /// Gets a collection of connection properties
+        /// </summary>
+        /// <param name="fs"></param>
+        /// <returns></returns>
+        public static NameValueCollection GetConnectionProperties(this IFeatureSource fs)
+        {
+            Check.NotNull(fs, "fs"); //NOXLATE
+            var values = new NameValueCollection();
+            foreach (string name in fs.ConnectionPropertyNames)
+            {
+                values[name] = fs.GetConnectionProperty(name);
+            }
+            return values;
+        }
+
+        /// <summary>
+        /// Sets the connection properties of the feature source
+        /// </summary>
+        /// <param name="fs"></param>
+        /// <param name="values"></param>
+        public static void ApplyConnectionProperties(this IFeatureSource fs, NameValueCollection values)
+        {
+            Check.NotNull(fs, "fs"); //NOXLATE
+            Check.NotNull(values, "values"); //NOXLATE
+
+            fs.ClearConnectionProperties();
+
+            foreach (string name in values.Keys)
+            {
+                string value = values[name];
+
+                fs.SetConnectionProperty(name, value);
+            }
+        }
+
+        /// <summary>
+        /// Adds a spatial context override
+        /// </summary>
+        /// <param name="fs"></param>
+        /// <param name="name"></param>
+        /// <param name="coordSys"></param>
+        public static void AddSpatialContextOverride(this IFeatureSource fs, string name, string coordSys)
+        {
+            Check.NotNull(fs, "fs"); //NOXLATE
+            fs.AddSpatialContextOverride(new SpatialContextType() { Name = name, CoordinateSystem = coordSys });
+        }
+
+        /// <summary>
+        /// Adds the specified property pair to this join
+        /// </summary>
+        /// <param name="rel"></param>
+        /// <param name="primary"></param>
+        /// <param name="secondary"></param>
+        public static void AddRelateProperty(this IAttributeRelation rel, string primary, string secondary)
+        {
+            Check.NotNull(rel, "rel"); //NOXLATE
+            rel.AddRelateProperty(new RelatePropertyType() { FeatureClassProperty = primary, AttributeClassProperty = secondary });
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/v1_0_0/FeatureSourceImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/v1_0_0/FeatureSourceImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/v1_0_0/FeatureSourceImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,470 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace OSGeo.MapGuide.ObjectModels.FeatureSource.v1_0_0
+{
+    partial class FeatureSourceType : IFeatureSource
+    {
+        internal FeatureSourceType()
+        {
+        }
+
+        private static readonly Version RES_VERSION = new Version(1, 0, 0);
+
+        private string _resId;
+
+        [XmlIgnore]
+        public string ResourceID
+        {
+            get
+            {
+                return _resId;
+            }
+            set
+            {
+                if (!ResourceIdentifier.Validate(value))
+                    throw new InvalidOperationException(Strings.ErrorInvalidResourceIdentifier);
+
+                var res = new ResourceIdentifier(value);
+                if (res.Extension != ResourceTypes.FeatureSource.ToString())
+                    throw new InvalidOperationException(string.Format(Strings.ErrorUnexpectedResourceType, res.ToString(), ResourceTypes.FeatureSource));
+
+                _resId = value;
+                this.OnPropertyChanged("ResourceID"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public string ResourceType
+        {
+            get
+            {
+                return ResourceTypes.FeatureSource.ToString();
+            }
+        }
+
+        [XmlIgnore]
+        public Version ResourceVersion
+        {
+            get
+            {
+                return RES_VERSION;
+            }
+        }
+
+        object ICloneable.Clone()
+        {
+            var fs = this.Clone();
+            fs.DetachChangeListeners();
+            return fs;
+        }
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] //NOXLATE
+        public string ValidatingSchema
+        {
+            get { return "FeatureSource-1.0.0.xsd"; } //NOXLATE
+            set { }
+        }
+
+        [XmlIgnore]
+        public bool IsStronglyTyped
+        {
+            get { return true; }
+        }
+
+        public void ClearConnectionProperties()
+        {
+            this.Parameter.Clear();
+        }
+
+        public string[] ConnectionPropertyNames
+        {
+            get
+            {
+                var names = new List<string>();
+                foreach (var p in this.Parameter)
+                {
+                    names.Add(p.Name);
+                }
+                return names.ToArray();
+            }
+        }
+
+        public string GetConnectionProperty(string name)
+        {
+            foreach (var p in this.Parameter)
+            {
+                if (p.Name == name)
+                {
+                    return p.Value;
+                }
+            }
+            return string.Empty;
+        }
+
+        public void SetConnectionProperty(string name, string value)
+        {
+            NameValuePairType pr = null;
+            foreach (var p in this.Parameter)
+            {
+                if (p.Name == name)
+                {
+                    pr = p;
+                    break;
+                }
+            }
+
+            bool bRaise = false;
+            if (pr != null)
+            {
+                if (value != null)
+                    pr.Value = value;
+                else
+                    this.Parameter.Remove(pr);
+                bRaise = true;
+            }
+            else
+            {
+                if (value != null)
+                {
+                    this.Parameter.Add(new NameValuePairType() { Name = name, Value = value });
+                    bRaise = true;
+                }
+            }
+
+            if (bRaise)
+                OnPropertyChanged("Parameter"); //NOXLATE
+        }
+
+        protected void DetachChangeListeners()
+        {
+            var handler = this.PropertyChanged;
+            if (handler != null)
+            {
+                foreach (var h in handler.GetInvocationList())
+                {
+                    this.PropertyChanged -= (PropertyChangedEventHandler)h;
+                }
+                handler = null;
+            }
+        }
+
+        [XmlIgnore]
+        public string ConnectionString
+        {
+            get
+            {
+                return Utility.ToConnectionString(this.GetConnectionProperties());
+            }
+        }
+
+        private const string DATA_FILE_PATH_TAG = "%MG_DATA_FILE_PATH%"; //NOXLATE
+
+        /// <summary>
+        /// Gets the name of the embedded data resource. Can only be called if <see cref="UsesEmbeddedDataFiles"/> returns true.
+        /// </summary>
+        /// <returns></returns>
+        /// <exception cref="InvalidOperationException">If <see cref="UsesEmbeddedDataFiles"/> is false</exception>
+        public string GetEmbeddedDataName()
+        {
+            if (!this.UsesEmbeddedDataFiles)
+                throw new InvalidOperationException(Strings.ERR_FS_NO_EMBEDDED_DATA);
+
+            string connStr = this.ConnectionString;
+            int tagIndex = connStr.IndexOf(DATA_FILE_PATH_TAG);
+
+            int end = connStr.IndexOf(";", tagIndex + DATA_FILE_PATH_TAG.Length); //NOXLATE
+            //The "File" parameter was the last parameter
+            if (end < 0)
+                return connStr.Substring(tagIndex + DATA_FILE_PATH_TAG.Length);
+            else
+                return connStr.Substring(tagIndex + DATA_FILE_PATH_TAG.Length, end - (tagIndex + DATA_FILE_PATH_TAG.Length));
+        }
+
+        private const string ALIAS_PREFIX = "%MG_DATA_PATH_ALIAS["; //NOXLATE
+
+        /// <summary>
+        /// Gets the name of the alias. Can only be called if <see cref="UsesAliasedDataFiles"/> returns true
+        /// </summary>
+        /// <returns></returns>
+        /// <exception cref="InvalidOperationException">If <see cref="UsesAliasedDataFiles"/> is false </exception>
+        public string GetAliasName()
+        {
+            if (!this.UsesAliasedDataFiles)
+                throw new InvalidOperationException(Strings.ERR_FS_NO_ALIAS);
+
+            string connStr = this.ConnectionString;
+
+            int braceStart = connStr.IndexOf(ALIAS_PREFIX) + ALIAS_PREFIX.Length;
+            int braceEnd = connStr.IndexOf(']', braceStart + 1); //NOXLATE
+            int length = braceEnd - braceStart;
+
+            return connStr.Substring(braceStart, length);
+        }
+
+        /// <summary>
+        /// Gets the name of the aliased file. Can only be called if <see cref="UsesAliasedDataFiles"/> returns true. An
+        /// empty string is returned if it is a directory (ie. no file name was found)
+        /// </summary>
+        /// <returns></returns>
+        /// <exception cref="InvalidOperationException">If <see cref="UsesAliasedDataFiles"/> is false</exception>
+        public string GetAliasedFileName()
+        {
+            if (!this.UsesAliasedDataFiles)
+                throw new InvalidOperationException(Strings.ERR_FS_NO_ALIAS);
+
+            string connStr = this.ConnectionString;
+            int braceStart = connStr.IndexOf(ALIAS_PREFIX) + ALIAS_PREFIX.Length;
+            int braceEnd = connStr.IndexOf(']', braceStart + 1); //NOXLATE
+            int aliasEnd = braceEnd + 2;
+
+            int end = connStr.IndexOf(";", aliasEnd); //NOXLATE
+            //The "File" parameter was the last parameter
+            if (end < 0)
+                return connStr.Substring(aliasEnd);
+            else
+                return connStr.Substring(aliasEnd, end - aliasEnd);
+        }
+
+        [XmlIgnore]
+        public bool UsesEmbeddedDataFiles
+        {
+            get
+            {
+                return this.ConnectionString.Contains(DATA_FILE_PATH_TAG);
+            }
+        }
+
+        [XmlIgnore]
+        public bool UsesAliasedDataFiles
+        {
+            get
+            {
+                return this.ConnectionString.Contains(ALIAS_PREFIX);
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<ISpatialContextInfo> IFeatureSource.SupplementalSpatialContextInfo
+        {
+            get
+            {
+                foreach (var sc in this.SupplementalSpatialContextInfo)
+                {
+                    yield return sc;
+                }
+            }
+        }
+
+        void IFeatureSource.AddSpatialContextOverride(ISpatialContextInfo sc)
+        {
+            var sp = sc as SpatialContextType;
+            if (sp != null)
+            {
+                if (this.SupplementalSpatialContextInfo == null)
+                    this.SupplementalSpatialContextInfo = new System.ComponentModel.BindingList<SpatialContextType>();
+
+                this.SupplementalSpatialContextInfo.Add(sp);
+            }
+        }
+
+        void IFeatureSource.RemoveSpatialContextOverride(ISpatialContextInfo sc)
+        {
+            var sp = sc as SpatialContextType;
+            if (sp != null)
+            {
+                if (this.SupplementalSpatialContextInfo == null)
+                    return;
+
+                this.SupplementalSpatialContextInfo.Remove(sp);
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<IFeatureSourceExtension> IFeatureSource.Extension
+        {
+            get
+            {
+                foreach (var ext in this.Extension)
+                {
+                    yield return ext;
+                }
+            }
+        }
+
+        void IFeatureSource.AddExtension(IFeatureSourceExtension ext)
+        {
+            var e = ext as FeatureSourceTypeExtension;
+            if (e != null)
+            {
+                this.Extension.Add(e);
+            }
+        }
+
+        void IFeatureSource.RemoveExtension(IFeatureSourceExtension ext)
+        {
+            var e = ext as FeatureSourceTypeExtension;
+            if (e != null)
+            {
+                this.Extension.Remove(e);
+            }
+        }
+    }
+
+    partial class SpatialContextType : ISpatialContextInfo { }
+
+    partial class FeatureSourceTypeExtension : IFeatureSourceExtension
+    {
+        [XmlIgnore]
+        IEnumerable<ICalculatedProperty> IFeatureSourceExtension.CalculatedProperty
+        {
+            get
+            {
+                foreach (var calc in this.CalculatedProperty)
+                {
+                    yield return calc;
+                }
+            }
+        }
+
+        void IFeatureSourceExtension.AddCalculatedProperty(ICalculatedProperty prop)
+        {
+            var calc = prop as CalculatedPropertyType;
+            if (calc != null)
+                this.CalculatedProperty.Add(calc);
+        }
+
+        void IFeatureSourceExtension.RemoveCalculatedProperty(ICalculatedProperty prop)
+        {
+            var calc = prop as CalculatedPropertyType;
+            if (calc != null)
+                this.CalculatedProperty.Remove(calc);
+        }
+
+        [XmlIgnore]
+        IEnumerable<IAttributeRelation> IFeatureSourceExtension.AttributeRelate
+        {
+            get
+            {
+                foreach (var rel in this.AttributeRelate)
+                {
+                    yield return rel;
+                }
+            }
+        }
+
+        void IFeatureSourceExtension.AddRelation(IAttributeRelation relate)
+        {
+            var rel = relate as AttributeRelateType;
+            if (rel != null)
+                this.AttributeRelate.Add(rel);
+        }
+
+        void IFeatureSourceExtension.RemoveRelation(IAttributeRelation relate)
+        {
+            var rel = relate as AttributeRelateType;
+            if (rel != null)
+                this.AttributeRelate.Remove(rel);
+        }
+    }
+
+    partial class CalculatedPropertyType : ICalculatedProperty { }
+
+    partial class AttributeRelateType : IAttributeRelation
+    {
+        IRelateProperty IAttributeRelation.CreatePropertyJoin(string primaryProperty, string secondaryProperty)
+        {
+            return new RelatePropertyType() { FeatureClassProperty = primaryProperty, AttributeClassProperty = secondaryProperty };
+        }
+
+        [XmlIgnore]
+        bool IAttributeRelation.ForceOneToOne
+        {
+            get
+            {
+                return this.ForceOneToOne;
+            }
+            set
+            {
+                this.ForceOneToOne = value;
+                this.ForceOneToOneSpecified = true;
+            }
+        }
+
+        void IAttributeRelation.RemoveAllRelateProperties()
+        {
+            this.RelateProperty.Clear();
+        }
+
+        [XmlIgnore]
+        RelateTypeEnum IAttributeRelation.RelateType
+        {
+            get { return this.RelateType; }
+            set
+            {
+                this.RelateType = value;
+                this.RelateTypeSpecified = true;
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<IRelateProperty> IAttributeRelation.RelateProperty
+        {
+            get
+            {
+                foreach (var rel in this.RelateProperty)
+                {
+                    yield return rel;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        int IAttributeRelation.RelatePropertyCount
+        {
+            get { return this.RelateProperty.Count; }
+        }
+
+        void IAttributeRelation.AddRelateProperty(IRelateProperty prop)
+        {
+            var rel = prop as RelatePropertyType;
+            if (rel != null)
+                this.RelateProperty.Add(rel);
+        }
+
+        void IAttributeRelation.RemoveRelateProperty(IRelateProperty prop)
+        {
+            var rel = prop as RelatePropertyType;
+            if (rel != null)
+                this.RelateProperty.Remove(rel);
+        }
+    }
+
+    partial class RelatePropertyType : IRelateProperty { }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IO/ReadOnlyRewindableStream.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IO/ReadOnlyRewindableStream.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IO/ReadOnlyRewindableStream.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,117 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.IO
+{
+    /// <summary>
+    /// A read-only, rewindable stream
+    /// </summary>
+    public abstract class ReadOnlyRewindableStream : Stream
+    {
+        /// <summary>
+        /// Resets the internal position of the stream
+        /// </summary>
+        public abstract void Rewind();
+
+        /// <summary>
+        /// Gets whether this stream supports reading
+        /// </summary>
+        public override bool CanRead
+        {
+            get { return true; }
+        }
+
+        /// <summary>
+        /// Gets whether this stream supports seeking
+        /// </summary>
+        public override bool CanSeek
+        {
+            get { return false; }
+        }
+
+        /// <summary>
+        /// Gets whether this stream supports writing
+        /// </summary>
+        public override bool CanWrite
+        {
+            get { return false; }
+        }
+
+        /// <summary>
+        /// Gets whether this stream is rewindable. If not, calls to <see cref="Rewind"/> throw a
+        /// <see cref="T:System.InvalidOperationException"/>
+        /// </summary>
+        public abstract bool CanRewind { get; }
+
+        /// <summary>
+        /// Gets or sets the position (not implemented)
+        /// </summary>
+        public override long Position
+        {
+            get
+            {
+                throw new NotImplementedException();
+            }
+            set
+            {
+                throw new NotImplementedException();
+            }
+        }
+
+        /// <summary>
+        /// Seeks to the specified offset in the stream (not implemented)
+        /// </summary>
+        /// <param name="offset"></param>
+        /// <param name="origin"></param>
+        /// <returns></returns>
+        public override long Seek(long offset, SeekOrigin origin)
+        {
+            throw new NotImplementedException();
+        }
+
+        /// <summary>
+        /// Sets the length of the stream (not implemented)
+        /// </summary>
+        /// <param name="value"></param>
+        public override void SetLength(long value)
+        {
+            throw new NotImplementedException();
+        }
+
+        /// <summary>
+        /// Writes the specified buffer into the stream (not implemented)
+        /// </summary>
+        /// <param name="buffer"></param>
+        /// <param name="offset"></param>
+        /// <param name="count"></param>
+        public override void Write(byte[] buffer, int offset, int count)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IO/Utf8XmlWriter.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IO/Utf8XmlWriter.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IO/Utf8XmlWriter.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,93 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.IO
+{
+    /// <summary>
+    /// Overrides the default XmlWriter, to ensure that the Xml is Utf8 and with whitespaces, as the MapGuide server requires Utf8
+    /// </summary>
+    public class Utf8XmlWriter : System.Xml.XmlTextWriter
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Utf8XmlWriter"/> class.
+        /// </summary>
+        /// <param name="s">The s.</param>
+        public Utf8XmlWriter(System.IO.Stream s)
+            //This creation of the UTF8 encoder removes the BOM
+            //Which is required because MapGuide has trouble reading files with a BOM.
+            : base(s, new System.Text.UTF8Encoding(false, true))
+        {
+            Initialize();
+        }
+
+        private void Initialize()
+        {
+            //The MapGuide Studio parser is broken, it can't read Xml without whitespace :)
+            base.Formatting = System.Xml.Formatting.Indented;
+            base.Indentation = 2;
+            base.IndentChar = ' ';
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Utf8XmlWriter"/> class.
+        /// </summary>
+        /// <param name="w">The TextWriter to write to. It is assumed that the TextWriter is already set to the correct encoding.</param>
+        public Utf8XmlWriter(System.IO.TextWriter w)
+            : base(w)
+        {
+            Initialize();
+        }
+
+        /// <summary>
+        /// Writes the XML declaration with the version "1.0".
+        /// </summary>
+        /// <exception cref="T:System.InvalidOperationException">
+        /// This is not the first write method called after the constructor.
+        /// </exception>
+        public override void WriteStartDocument()
+        {
+            Utf8WriteHeader();
+        }
+
+        /// <summary>
+        /// Writes the XML declaration with the version "1.0" and the standalone attribute.
+        /// </summary>
+        /// <param name="standalone">If true, it writes "standalone=yes"; if false, it writes "standalone=no".</param>
+        /// <exception cref="T:System.InvalidOperationException">
+        /// This is not the first write method called after the constructor.
+        /// </exception>
+        public override void WriteStartDocument(bool standalone)
+        {
+            Utf8WriteHeader();
+        }
+
+        private void Utf8WriteHeader()
+        {
+            base.WriteRaw("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); //NOXLATE
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IResource.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IResource.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IResource.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,97 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    /// <summary>
+    /// Represents a MapGuide Resource
+    /// </summary>
+    public interface IResource : IVersionedEntity, ICloneable, INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets the validating schema.
+        /// </summary>
+        /// <value>The validating schema.</value>
+        string ValidatingSchema { get; }
+
+        /// <summary>
+        /// Gets or sets the resource ID.
+        /// </summary>
+        /// <value>The resource ID.</value>
+        string ResourceID { get; set; }
+
+        /// <summary>
+        /// Gets the type of the resource.
+        /// </summary>
+        /// <value>The type of the resource.</value>
+        string ResourceType { get; }
+
+        /// <summary>
+        /// Serializes this instance to XML and returns the XML content. It is not recommended to call this method directly
+        /// instead use <see cref="M:OSGeo.MapGuide.MaestroAPI.ResourceTypeRegistry.Serialize"/> as that will invoke any pre-serialization
+        /// hooks that may have been set up for this particular resource.
+        /// </summary>
+        /// <returns></returns>
+        string Serialize();
+
+        /// <summary>
+        /// Indicates whether this resource is strongly typed. If false it means the implementer
+        /// is a <see cref="T:OSGeo.MapGuide.ObjectModels.UntypedResource"/> object. This usually means that the matching serializer
+        /// could not be found because the resource version is unrecognised.
+        /// </summary>
+        bool IsStronglyTyped { get; }
+    }
+
+    /// <summary>
+    /// Extension method class
+    /// </summary>
+    public static class ResourceExtensions
+    {
+        /// <summary>
+        /// Serializes to stream.
+        /// </summary>
+        /// <param name="res">The res.</param>
+        /// <returns></returns>
+        public static Stream SerializeToStream(this IResource res)
+        {
+            string str = res.Serialize();
+            return new MemoryStream(Encoding.UTF8.GetBytes(str));
+        }
+
+        /// <summary>
+        /// Gets the resource type descriptor.
+        /// </summary>
+        /// <param name="res">The res.</param>
+        /// <returns></returns>
+        public static ResourceTypeDescriptor GetResourceTypeDescriptor(this IResource res)
+        {
+            return new ResourceTypeDescriptor(res.ResourceType, res.ResourceVersion.ToString());
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IVersionedEntity.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IVersionedEntity.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/IVersionedEntity.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,41 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    /// <summary>
+    /// An entity with an attached version
+    /// </summary>
+    public interface IVersionedEntity
+    {
+        /// <summary>
+        /// Gets the resource version.
+        /// </summary>
+        /// <value>The resource version.</value>
+        Version ResourceVersion { get; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/LayerDefinitionInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/LayerDefinitionInterfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/LayerDefinitionInterfaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,2475 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.Common;
+using OSGeo.MapGuide.ObjectModels.SymbolDefinition;
+using OSGeo.MapGuide.ObjectModels.WatermarkDefinition;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition
+{
+    #region core enums
+
+    /// <summary>
+    /// The type of length unit
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum LengthUnitType
+    {
+        /// <remarks/>
+        Millimeters,
+
+        /// <remarks/>
+        Centimeters,
+
+        /// <remarks/>
+        Meters,
+
+        /// <remarks/>
+        Kilometers,
+
+        /// <remarks/>
+        Inches,
+
+        /// <remarks/>
+        Feet,
+
+        /// <remarks/>
+        Yards,
+
+        /// <remarks/>
+        Miles,
+
+        /// <remarks/>
+        Points,
+    }
+
+    /// <summary>
+    /// The type of size context
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum SizeContextType
+    {
+        /// <remarks/>
+        MappingUnits,
+
+        /// <remarks/>
+        DeviceUnits,
+    }
+
+    /// <summary>
+    /// The type of shape
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum ShapeType
+    {
+        /// <remarks/>
+        Square,
+
+        /// <remarks/>
+        Circle,
+
+        /// <remarks/>
+        Triangle,
+
+        /// <remarks/>
+        Star,
+
+        /// <remarks/>
+        Cross,
+
+        /// <remarks/>
+        X,
+    }
+
+    /// <summary>
+    /// The type of background style
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum BackgroundStyleType
+    {
+        /// <remarks/>
+        Transparent,
+
+        /// <remarks/>
+        Opaque,
+
+        /// <remarks/>
+        Ghosted,
+    }
+
+    /// <summary>
+    /// The type of feature name
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum FeatureNameType
+    {
+        /// <remarks/>
+        FeatureClass,
+
+        /// <remarks/>
+        NamedExtension,
+    }
+
+    /// <summary>
+    /// The type of explicit color
+    /// </summary>
+    [System.SerializableAttribute()]
+    [System.Xml.Serialization.XmlTypeAttribute(IncludeInSchema = false)]
+    public enum ItemChoiceType
+    {
+        /// <remarks/>
+        Band,
+
+        /// <remarks/>
+        Bands,
+
+        /// <remarks/>
+        ExplicitColor,
+    }
+
+    #endregion core enums
+
+    #region core
+
+    /// <summary>
+    /// The type of layer definition
+    /// </summary>
+    public enum LayerType
+    {
+        /// <summary>
+        /// DWF-based drawing layer
+        /// </summary>
+        Drawing,
+
+        /// <summary>
+        /// Vector layer
+        /// </summary>
+        Vector,
+
+        /// <summary>
+        /// Raster layer
+        /// </summary>
+        Raster
+    }
+
+    /// <summary>
+    /// Represents elements that can create clones of themselves
+    /// </summary>
+    /// <typeparam name="T"></typeparam>
+    public interface ICloneableLayerElement<T>
+    {
+        /// <summary>
+        /// Clones this instance.
+        /// </summary>
+        /// <returns></returns>
+        T Clone();
+    }
+
+    /// <summary>
+    /// Helper class to clone certain elements
+    /// </summary>
+    public static class LayerElementCloningUtil
+    {
+        /// <summary>
+        /// Clones the strokes.
+        /// </summary>
+        /// <param name="strokes">The strokes.</param>
+        /// <returns></returns>
+        public static IList<IStroke> CloneStrokes(IEnumerable<IStroke> strokes)
+        {
+            Check.NotNull(strokes, "strokes"); //NOXLATE
+            var list = new List<IStroke>();
+            foreach (var st in strokes)
+            {
+                list.Add(st.Clone());
+            }
+            return list;
+        }
+    }
+
+    /// <summary>
+    /// Factory interface to assist in creating common layer definition elements
+    /// </summary>
+    public interface ILayerElementFactory
+    {
+        /// <summary>
+        /// Creates a name-value pair
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="value"></param>
+        /// <returns></returns>
+        INameStringPair CreatePair(string name, string value);
+
+        /// <summary>
+        /// Creates a default area rule (monochromatic)
+        /// </summary>
+        /// <returns></returns>
+        IAreaRule CreateDefaultAreaRule();
+
+        /// <summary>
+        /// Creates a default area style (monochromatic)
+        /// </summary>
+        /// <returns></returns>
+        IAreaVectorStyle CreateDefaultAreaStyle();
+
+        /// <summary>
+        /// Creates a default fill (monochromatic)
+        /// </summary>
+        /// <returns></returns>
+        IFill CreateDefaultFill();
+
+        /// <summary>
+        /// Creates a default line style (monochromatic)
+        /// </summary>
+        /// <returns></returns>
+        ILineVectorStyle CreateDefaultLineStyle();
+
+        /// <summary>
+        /// Creates a default mark symbol
+        /// </summary>
+        /// <returns></returns>
+        IMarkSymbol CreateDefaultMarkSymbol();
+
+        /// <summary>
+        /// Creates a default point style
+        /// </summary>
+        /// <returns></returns>
+        IPointVectorStyle CreateDefaultPointStyle();
+
+        /// <summary>
+        /// Creates a default 2D point symbolization
+        /// </summary>
+        /// <returns></returns>
+        IPointSymbolization2D CreateDefaultPointSymbolization2D();
+
+        /// <summary>
+        /// Creates a default stroke
+        /// </summary>
+        /// <returns></returns>
+        IStroke CreateDefaultStroke();
+
+        /// <summary>
+        /// Creates a default text symbol
+        /// </summary>
+        /// <returns></returns>
+        ITextSymbol CreateDefaultTextSymbol();
+
+        /// <summary>
+        /// Creates a default advanced placement setting
+        /// </summary>
+        /// <param name="scaleLimit"></param>
+        /// <returns></returns>
+        IAdvancedPlacement CreateDefaultAdvancedPlacement(double scaleLimit);
+
+        /// <summary>
+        /// Creates a fill
+        /// </summary>
+        /// <param name="pattern"></param>
+        /// <param name="background"></param>
+        /// <param name="foreground"></param>
+        /// <returns></returns>
+        IFill CreateFill(string pattern, System.Drawing.Color background, System.Drawing.Color foreground);
+
+        /// <summary>
+        /// Creates a default line rule
+        /// </summary>
+        /// <returns></returns>
+        ILineRule CreateDefaultLineRule();
+
+        /// <summary>
+        /// Creates a default point rule
+        /// </summary>
+        /// <returns></returns>
+        IPointRule CreateDefaultPointRule();
+
+        /// <summary>
+        /// Creates a stroke of the specified color
+        /// </summary>
+        /// <param name="color"></param>
+        /// <returns></returns>
+        IStroke CreateStroke(System.Drawing.Color color);
+
+        /// <summary>
+        /// Creates a vector scale range
+        /// </summary>
+        /// <returns></returns>
+        IVectorScaleRange CreateVectorScaleRange();
+
+        /// <summary>
+        /// Creates a font symbol
+        /// </summary>
+        /// <returns></returns>
+        IFontSymbol CreateDefaultFontSymbol();
+
+        /// <summary>
+        /// Creates a W2D symbol from a Symbol Library
+        /// </summary>
+        /// <param name="symbolLibrary"></param>
+        /// <param name="symbolName"></param>
+        /// <returns></returns>
+        IW2DSymbol CreateDefaultW2DSymbol(string symbolLibrary, string symbolName);
+
+        /// <summary>
+        /// Creates the default composite rule.
+        /// </summary>
+        /// <remarks>This method does not create any composite symbolizations. This is up for the calling method to provide</remarks>
+        /// <returns></returns>
+        ICompositeRule CreateDefaultCompositeRule();
+
+        /// <summary>
+        /// Creates a default composite style.
+        /// </summary>
+        /// <remarks>This method does not create any composite symbolizations. This is up for the calling method to provide</remarks>
+        /// <returns></returns>
+        ICompositeTypeStyle CreateDefaultCompositeStyle();
+
+        /// <summary>
+        /// Creates tehe default URL data
+        /// </summary>
+        /// <returns></returns>
+        IUrlData CreateUrlData();
+
+        /// <summary>
+        /// Creates a default AreaSymbolizationFill element
+        /// </summary>
+        /// <returns></returns>
+        IAreaSymbolizationFill CreateDefaultAreaSymbolizationFill();
+
+        /// <summary>
+        /// Clones the given symbolization
+        /// </summary>
+        /// <param name="sym"></param>
+        /// <returns></returns>
+        ICompositeSymbolization CloneCompositeSymbolization(ICompositeSymbolization sym);
+    }
+
+    /// <summary>
+    /// Top-level interface of the layer definition
+    /// </summary>
+    public interface ILayerDefinition : IResource, ILayerElementFactory
+    {
+        /// <summary>
+        /// Gets the sub layer.
+        /// </summary>
+        /// <value>The sub layer.</value>
+        ISubLayerDefinition SubLayer { get; }
+    }
+
+    /// <summary>
+    /// Represents the base of all layer definitions
+    /// </summary>
+    public interface ISubLayerDefinition : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets the type of layer definition
+        /// </summary>
+        LayerType LayerType { get; }
+
+        /// <summary>
+        /// Gets or sets the resource id which is the data source for this layer
+        /// </summary>
+        string ResourceId { get; set; }
+    }
+
+    /// <summary>
+    /// Represents the base of all layer definitions. Based on Layer Definition schema
+    /// version 2.3.0
+    /// </summary>
+    public interface ISubLayerDefinition2 : ISubLayerDefinition, IWatermarkCollection
+    {
+    }
+
+    /// <summary>
+    /// Represents a layer definition based on a vector-based feature source
+    /// </summary>
+    public interface IVectorLayerDefinition : ISubLayerDefinition
+    {
+        /// <summary>
+        /// Gets or sets fully qualified name of the feature class which this layer applies
+        /// </summary>
+        string FeatureName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the geometry field of the feature class which this layer applies
+        /// </summary>
+        string Geometry { get; set; }
+
+        /// <summary>
+        /// Gets or sets an FDO expression which represents the URL that is opened when
+        /// a feature is selected
+        /// </summary>
+        /// <remarks>
+        /// If this is a <see cref="T:OSGeo.MapGuide.ObjectModels.LayerDefinition.IVectorLayerDefinition2"/>
+        /// instance, this property is a pass through to the <see cref="P:OSGeo.MapGuide.ObjectModels.LayerDefinition.IUrlData.Content"/>
+        /// property value. In other words it is equivalent to getting or setting the value of UrlData.Content
+        /// </remarks>
+        string Url { get; set; }
+
+        /// <summary>
+        /// Gets or sets an FDO expression which represents the HTML content that is displayed
+        /// when the mouse is over the current feature
+        /// </summary>
+        string ToolTip { get; set; }
+
+        /// <summary>
+        /// Gets or sets an FDO filter which is applied when rendering/styling features
+        /// </summary>
+        string Filter { get; set; }
+
+        /// <summary>
+        /// Gets the scale ranges for this layer
+        /// </summary>
+        IEnumerable<IVectorScaleRange> VectorScaleRange { get; }
+
+        /// <summary>
+        /// Gets the collection index of this scale range
+        /// </summary>
+        /// <param name="range"></param>
+        /// <returns></returns>
+        int IndexOfScaleRange(IVectorScaleRange range);
+
+        /// <summary>
+        /// Removes all scale ranges from this layer
+        /// </summary>
+        void RemoveAllScaleRanges();
+
+        /// <summary>
+        /// Gets the scale range at this specified index
+        /// </summary>
+        /// <param name="index"></param>
+        /// <returns></returns>
+        IVectorScaleRange GetScaleRangeAt(int index);
+
+        /// <summary>
+        /// Adds the specified vector scale range
+        /// </summary>
+        /// <param name="range"></param>
+        void AddVectorScaleRange(IVectorScaleRange range);
+
+        /// <summary>
+        /// Removes the specified vector scale range
+        /// </summary>
+        /// <param name="range"></param>
+        void RemoveVectorScaleRange(IVectorScaleRange range);
+
+        /// <summary>
+        /// Gets the property mappings for this layer. This determines which properties
+        /// are displayed (and what labels to use) in the property pane and
+        /// </summary>
+        IEnumerable<INameStringPair> PropertyMapping { get; }
+
+        /// <summary>
+        /// Adds the specified property mapping
+        /// </summary>
+        /// <param name="pair"></param>
+        void AddPropertyMapping(INameStringPair pair);
+
+        /// <summary>
+        /// Removes the specified property mapping
+        /// </summary>
+        /// <param name="pair"></param>
+        void RemovePropertyMapping(INameStringPair pair);
+
+        /// <summary>
+        /// Gets the property mapping at the specified index
+        /// </summary>
+        /// <param name="index"></param>
+        /// <returns></returns>
+        INameStringPair GetPropertyMappingAt(int index);
+
+        /// <summary>
+        /// Gets the property mapping for the feature class property
+        /// </summary>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        INameStringPair GetPropertyMapping(string name);
+
+        /// <summary>
+        /// Gets the position of the specified pair in the order of property mappings
+        /// </summary>
+        /// <param name="pair"></param>
+        /// <returns></returns>
+        int GetPosition(INameStringPair pair);
+
+        /// <summary>
+        /// Moves the specified pair up the order of property mappings
+        /// </summary>
+        /// <param name="pair"></param>
+        /// <returns></returns>
+        int MoveUp(INameStringPair pair);
+
+        /// <summary>
+        /// Moves the specified pair down the order of property mappings
+        /// </summary>
+        /// <param name="pair"></param>
+        /// <returns></returns>
+        int MoveDown(INameStringPair pair);
+
+        /// <summary>
+        /// Gets the supported symbol definition version to use for composite symbolization.
+        /// If the Layer Definition does not support composite symbolization, null is returned
+        /// </summary>
+        Version SymbolDefinitionVersion { get; }
+
+        /// <summary>
+        /// Removes all property mappings
+        /// </summary>
+        void ClearPropertyMappings();
+    }
+
+    /// <summary>
+    /// Based on Layer Definition schema 2.4.0
+    /// </summary>
+    public interface IVectorLayerDefinition2 : IVectorLayerDefinition
+    {
+        /// <summary>
+        /// Gets or sets the URL data.
+        /// </summary>
+        /// <value>
+        /// The URL data.
+        /// </value>
+        IUrlData UrlData { get; set; }
+    }
+
+    /// <summary>
+    /// URL information for features
+    /// </summary>
+    public interface IUrlData
+    {
+        /// <summary>
+        /// Gets or sets the real address of the URL. This can be a string FDO expression
+        /// </summary>
+        /// <value>
+        /// The content.
+        /// </value>
+        string Content { get; set; }
+
+        /// <summary>
+        /// Gets or sets the description of the URL. This can be a string FDO expression
+        /// </summary>
+        /// <value>
+        /// The description.
+        /// </value>
+        string Description { get; set; }
+
+        /// <summary>
+        /// Gets or sets the override of URL content for a specific feature which can be a string FDO expression
+        /// </summary>
+        /// <value>
+        /// The content override.
+        /// </value>
+        string ContentOverride { get; set; }
+
+        /// <summary>
+        /// Gets or sets the override of URL description for a specific feature which can be a string FDO expression
+        /// </summary>
+        /// <value>
+        /// The description override.
+        /// </value>
+        string DescriptionOverride { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a layer definition based on a raster-based feature source
+    /// </summary>
+    public interface IRasterLayerDefinition : ISubLayerDefinition
+    {
+        /// <summary>
+        /// Gets or sets the name of the feature class.
+        /// </summary>
+        /// <value>The name of the feature class.</value>
+        string FeatureName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the raster property.
+        /// </summary>
+        /// <value>The raster property.</value>
+        string Geometry { get; set; }
+
+        /// <summary>
+        /// Gets the grid scale ranges.
+        /// </summary>
+        /// <value>The grid scale ranges.</value>
+        IEnumerable<IGridScaleRange> GridScaleRange { get; }
+
+        /// <summary>
+        /// Adds the specified grid scale range
+        /// </summary>
+        /// <param name="range"></param>
+        void AddGridScaleRange(IGridScaleRange range);
+
+        /// <summary>
+        /// Removes the specified grid scale range
+        /// </summary>
+        /// <param name="range"></param>
+        void RemoveGridScaleRange(IGridScaleRange range);
+
+        /// <summary>
+        /// Indexes the of scale range.
+        /// </summary>
+        /// <param name="range">The range.</param>
+        /// <returns></returns>
+        int IndexOfScaleRange(IGridScaleRange range);
+
+        /// <summary>
+        /// Gets the scale range at.
+        /// </summary>
+        /// <param name="index">The index.</param>
+        /// <returns></returns>
+        IGridScaleRange GetScaleRangeAt(int index);
+
+        /// <summary>
+        /// Gets the grid scale range count.
+        /// </summary>
+        int GridScaleRangeCount { get; }
+    }
+
+    //If only all layers were as simple as this one...
+
+    /// <summary>
+    /// Represents a layer definition based on a DWF-based drawing source
+    /// </summary>
+    public interface IDrawingLayerDefinition : ISubLayerDefinition
+    {
+        /// <summary>
+        /// Gets or sets the sheet of the DWF to user
+        /// </summary>
+        string Sheet { get; set; }
+
+        /// <summary>
+        /// Gets or sets the layers to show from the specified sheet. Shows all layers if this is not specified
+        /// </summary>
+        string LayerFilter { get; set; }
+
+        /// <summary>
+        /// Gets or sets the zoomed in part of the scale range. Defaults to 0 if not specified. Inclusive
+        /// </summary>
+        double MinScale { get; set; }
+
+        /// <summary>
+        /// Gets or sets the zoomed out part of the scale range. Defaults to the application's maximum value if not specified. Exclusive
+        /// </summary>
+        double MaxScale { get; set; }
+    }
+
+    #endregion core
+
+    #region vector layer
+
+    /// <summary>
+    /// The stylization to be applied to the vector features for a given scale range
+    /// </summary>
+    public interface IVectorScaleRange
+    {
+        /// <summary>
+        /// The zoomed in part of the scale range. Defaults to 0 if not specified. Inclusive
+        /// </summary>
+        double? MinScale { get; set; }
+
+        /// <summary>
+        /// The zoomed out part of the scale range. Defaults to the application's maximum value if not specified. Exclusive
+        /// </summary>
+        double? MaxScale { get; set; }
+
+        /// <summary>
+        /// Gets or sets the area style for this scale range
+        /// </summary>
+        IAreaVectorStyle AreaStyle { get; set; }
+
+        /// <summary>
+        /// Gets or sets the point style for this scale range
+        /// </summary>
+        IPointVectorStyle PointStyle { get; set; }
+
+        /// <summary>
+        /// Gets or sets the line style for this scale range
+        /// </summary>
+        ILineVectorStyle LineStyle { get; set; }
+
+        /// <summary>
+        /// Creates a clone of this instance
+        /// </summary>
+        /// <returns></returns>
+        IVectorScaleRange Clone();
+    }
+
+    /// <summary>
+    /// The stylization to be applied to the vector features for a given scale range. Supports elevation, extrusion settings
+    /// and Advanced Stylization through composite styles
+    ///
+    /// Supported by Layer Definition 1.1.0 and higher
+    /// </summary>
+    public interface IVectorScaleRange2 : IVectorScaleRange
+    {
+        /// <summary>
+        /// Creates a new instance of <see cref="IElevationSettings"/>. This instance is detached
+        /// and needs to be assigned to the <see cref="ElevationSettings"/> property to take effect.
+        /// </summary>
+        /// <param name="zOffset"></param>
+        /// <param name="zExtrusion"></param>
+        /// <param name="zOffsetType"></param>
+        /// <param name="unit"></param>
+        /// <returns></returns>
+        IElevationSettings Create(string zOffset, string zExtrusion, ElevationTypeType zOffsetType, LengthUnitType unit);
+
+        /// <summary>
+        /// Gets or sets the elevation settings
+        /// </summary>
+        IElevationSettings ElevationSettings { get; set; }
+
+        /// <summary>
+        /// Gets or sets the composite styles for this scale range
+        /// </summary>
+        IEnumerable<ICompositeTypeStyle> CompositeStyle { get; set; }
+
+        /// <summary>
+        /// Gets the composite style count.
+        /// </summary>
+        int CompositeStyleCount { get; }
+    }
+
+    /// <summary>
+    /// Represents a name-value pair
+    /// </summary>
+    public interface INameStringPair
+    {
+        /// <summary>
+        /// Gets or set the name
+        /// </summary>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the value
+        /// </summary>
+        string Value { get; set; }
+    }
+
+    /// <summary>
+    /// base interface for all style specifications
+    /// </summary>
+    public interface IVectorStyle : IRuleCollection
+    {
+        /// <summary>
+        /// Gets the type of this style specification
+        /// </summary>
+        StyleType StyleType { get; }
+
+        /// <summary>
+        /// Gets the rule count.
+        /// </summary>
+        int RuleCount { get; }
+    }
+
+    /// <summary>
+    /// Indicates the type of geometry this style specification is for
+    /// </summary>
+    public enum StyleType
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        Area,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Line,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Point,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Composite
+    }
+
+    /// <summary>
+    /// Style specification for a area geometry layer
+    /// </summary>
+    public interface IAreaVectorStyle : IVectorStyle, IRuleCollection<IAreaRule>
+    {
+        /// <summary>
+        /// Enumerates the rules in this specification
+        /// </summary>
+        IEnumerable<IAreaRule> Rules { get; }
+
+        /// <summary>
+        /// Adds a rule to this specification
+        /// </summary>
+        /// <param name="rule"></param>
+        void AddRule(IAreaRule rule);
+
+        /// <summary>
+        /// Removes a rule from this specification
+        /// </summary>
+        /// <param name="rule"></param>
+        void RemoveRule(IAreaRule rule);
+
+        /// <summary>
+        /// Removes all rules.
+        /// </summary>
+        void RemoveAllRules();
+    }
+
+    /// <summary>
+    /// Style specification for a line geometry layer
+    /// </summary>
+    public interface ILineVectorStyle : IVectorStyle, IRuleCollection<ILineRule>
+    {
+        /// <summary>
+        /// Enumerates the rules in this specification
+        /// </summary>
+        IEnumerable<ILineRule> Rules { get; }
+
+        /// <summary>
+        /// Adds a rule to this specification
+        /// </summary>
+        /// <param name="rule"></param>
+        void AddRule(ILineRule rule);
+
+        /// <summary>
+        /// Removes a rule from this specification
+        /// </summary>
+        /// <param name="rule"></param>
+        void RemoveRule(ILineRule rule);
+
+        /// <summary>
+        /// Removes all current rules
+        /// </summary>
+        void RemoveAllRules();
+    }
+
+    /// <summary>
+    /// Defines a collection of style rules
+    /// </summary>
+    public interface IRuleCollection
+    {
+        /// <summary>
+        /// Gets the rule at the specified index
+        /// </summary>
+        /// <param name="index"></param>
+        /// <returns></returns>
+        IVectorRule GetRuleAt(int index);
+
+        /// <summary>
+        /// Gets the index of the specified rule
+        /// </summary>
+        /// <param name="rule">The rule.</param>
+        /// <returns></returns>
+        int IndexOfRule(IVectorRule rule);
+
+        /// <summary>
+        /// Moves the specified rule up the list
+        /// </summary>
+        /// <param name="rule">The rule.</param>
+        /// <returns></returns>
+        bool MoveUp(IVectorRule rule);
+
+        /// <summary>
+        /// Moves the specified rule down the list
+        /// </summary>
+        /// <param name="rule">The rule.</param>
+        /// <returns></returns>
+        bool MoveDown(IVectorRule rule);
+    }
+
+    /// <summary>
+    /// Defines a collection of style rules
+    /// </summary>
+    /// <typeparam name="TRule">The type of the rule.</typeparam>
+    public interface IRuleCollection<TRule> : IRuleCollection
+    {
+        /// <summary>
+        /// Gets the index of the specified rule
+        /// </summary>
+        /// <param name="rule"></param>
+        /// <returns></returns>
+        int IndexOfRule(TRule rule);
+
+        /// <summary>
+        /// Gets the rule at the specified index
+        /// </summary>
+        /// <param name="index">The index.</param>
+        /// <returns></returns>
+        TRule GetRuleAt(int index);
+
+        /// <summary>
+        /// Moves the specified rule up the list
+        /// </summary>
+        /// <param name="rule">The rule.</param>
+        /// <returns></returns>
+        bool MoveUp(TRule rule);
+
+        /// <summary>
+        /// Moves the specified rule down the list
+        /// </summary>
+        /// <param name="rule">The rule.</param>
+        /// <returns></returns>
+        bool MoveDown(TRule rule);
+    }
+
+    /// <summary>
+    /// Style specification for a point geometry layer
+    /// </summary>
+    public interface IPointVectorStyle : IVectorStyle, IRuleCollection<IPointRule>
+    {
+        /// <summary>
+        /// Gets or sets whether to create a text layer
+        /// </summary>
+        bool DisplayAsText { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether to allow labels from any map layer (including the current layer) to obscure features on the current layer
+        /// </summary>
+        bool AllowOverpost { get; set; }
+
+        /// <summary>
+        /// Enumerates the rules for this specification
+        /// </summary>
+        IEnumerable<IPointRule> Rules { get; }
+
+        /// <summary>
+        /// Adds a rule to this specification
+        /// </summary>
+        /// <param name="rule"></param>
+        void AddRule(IPointRule rule);
+
+        /// <summary>
+        /// Removes a rule from this specification
+        /// </summary>
+        /// <param name="rule"></param>
+        void RemoveRule(IPointRule rule);
+
+        /// <summary>
+        /// Removes all current rules
+        /// </summary>
+        void RemoveAllRules();
+    }
+
+    /// <summary>
+    /// Base interface for style rules of all geometric types
+    /// </summary>
+    public interface IVectorRule
+    {
+        /// <summary>
+        /// Gets or sets the label for the rule to be displayed in the legend
+        /// </summary>
+        string LegendLabel { get; set; }
+
+        /// <summary>
+        /// Gets or sets the filter for this rule
+        /// </summary>
+        string Filter { get; set; }
+    }
+
+    /// <summary>
+    /// Base interface for basic style rules for all geometric types
+    /// </summary>
+    public interface IBasicVectorRule : IVectorRule
+    {
+        /// <summary>
+        /// Gets or sets the the label
+        /// </summary>
+        ITextSymbol Label { get; set; }
+    }
+
+    /// <summary>
+    /// A style rule for the point geometry type
+    /// </summary>
+    public interface IPointRule : IBasicVectorRule
+    {
+        /// <summary>
+        /// Gets or sets the symbolization settings for this point rule
+        /// </summary>
+        IPointSymbolization2D PointSymbolization2D { get; set; }
+    }
+
+    /// <summary>
+    /// A style rule for the line geometry type
+    /// </summary>
+    public interface ILineRule : IBasicVectorRule
+    {
+        /// <summary>
+        /// Gets the number of strokes in this line rule
+        /// </summary>
+        int StrokeCount { get; }
+
+        /// <summary>
+        /// Gets the symbolization settings for this line rule
+        /// </summary>
+        IEnumerable<IStroke> Strokes { get; }
+
+        /// <summary>
+        /// Removes any existing strokes and adds the specified list of strokes
+        /// </summary>
+        /// <param name="strokes"></param>
+        void SetStrokes(IEnumerable<IStroke> strokes);
+
+        /// <summary>
+        /// Adds a stroke to this rule
+        /// </summary>
+        /// <param name="stroke"></param>
+        void AddStroke(IStroke stroke);
+
+        /// <summary>
+        /// Removes a stroke from this rule
+        /// </summary>
+        /// <param name="stroke"></param>
+        void RemoveStroke(IStroke stroke);
+    }
+
+    /// <summary>
+    /// A style rule for the area/polygon geometry type
+    /// </summary>
+    public interface IAreaRule : IBasicVectorRule
+    {
+        /// <summary>
+        /// Gets or sets the polygon stylization settings
+        /// </summary>
+        IAreaSymbolizationFill AreaSymbolization2D { get; set; }
+    }
+
+    /// <summary>
+    /// Encapsulates the stylization of a line
+    /// </summary>
+    public interface IStroke : ICloneableLayerElement<IStroke>
+    {
+        /// <summary>
+        /// Gets or sets the line style
+        /// </summary>
+        string LineStyle { get; set; }
+
+        /// <summary>
+        /// Gets or sets the thickness
+        /// </summary>
+        string Thickness { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color
+        /// </summary>
+        string Color { get; set; }
+
+        /// <summary>
+        /// Gets or sets the thickness unit
+        /// </summary>
+        LengthUnitType Unit { get; set; }
+    }
+
+    /// <summary>
+    /// Encapsulates the stylization of a line. Supported in Layer Definition schema
+    /// 1.1.0 and newer
+    /// </summary>
+    public interface IStroke2 : IStroke, ICloneableLayerElement<IStroke2>
+    {
+        /// <summary>
+        /// Gets or sets the size context of the thickness units
+        /// </summary>
+        SizeContextType SizeContext { get; set; }
+    }
+
+    /// <summary>
+    /// Symbolization characteristics for areas.
+    /// </summary>
+    public interface IAreaSymbolizationFill : ICloneableLayerElement<IAreaSymbolizationFill>
+    {
+        /// <summary>
+        /// Gets or sets the style of the polygon fill.
+        /// </summary>
+        IFill Fill { get; set; }
+
+        /// <summary>
+        /// Gets or sets the style of the polygon edge
+        /// </summary>
+        IStroke Stroke { get; set; }
+    }
+
+    /// <summary>
+    /// The type of point symbol
+    /// </summary>
+    public enum PointSymbolType
+    {
+        /// <summary>
+        /// A textual symbol
+        /// </summary>
+        Text,
+
+        /// <summary>
+        /// A predefined shape such as a square or circle.
+        /// </summary>
+        Mark,
+
+        /// <summary>
+        /// A raster or image symbol.  Note that these do not scale well, but sometimes this is all that you have.  Supported formats are application specific.
+        /// </summary>
+        Image,
+
+        /// <summary>
+        /// A symbol specified using a font character
+        /// </summary>
+        Font,
+
+        /// <summary>
+        /// A vector symbol defined using a W2D stream
+        /// </summary>
+        W2D,
+
+        /// <summary>
+        /// A vector symbol specifed from a block
+        /// </summary>
+        Block
+    }
+
+    /// <summary>
+    /// Defines common properties for all symbols
+    /// </summary>
+    public interface ISymbol
+    {
+        /// <summary>
+        /// Gets the type of symbol
+        /// </summary>
+        PointSymbolType Type { get; }
+
+        /// <summary>
+        /// Gets or sets the units that the sizes are specified in
+        /// </summary>
+        LengthUnitType Unit { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether the sizes are with respect to the earth or the user's display device
+        /// </summary>
+        SizeContextType SizeContext { get; set; }
+
+        /// <summary>
+        /// Gets or sets the width of the symbol. This is a double FDO expression. Does not apply to font symbols
+        /// </summary>
+        string SizeX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the height of the symbol. This is a double FDO expression.
+        /// </summary>
+        string SizeY { get; set; }
+
+        /// <summary>
+        /// Gets or sets the amount to rotate the symbol in degrees. This is a double FDO expression. Does not apply to line labels
+        /// </summary>
+        string Rotation { get; set; }
+
+        /// <summary>
+        /// Hint for the UI only. When the user enters a constant size for the width or height, the other dimension should be adjusted accordingly.  Does not apply to font symbols or labels.
+        /// </summary>
+        bool MaintainAspect { get; set; }
+
+        /// <summary>
+        /// Gets or sets the X offset for the symbol specified in symbol space. This is a double FDO expression. Does not apply to labels.
+        /// </summary>
+        string InsertionPointX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Y offset for the symbol specified in symbol space. This is a double FDO expression. Does not apply to labels.
+        /// </summary>
+        string InsertionPointY { get; set; }
+    }
+
+    /// <summary>
+    /// Advanced placement settings
+    /// </summary>
+    public interface IAdvancedPlacement
+    {
+        /// <summary>
+        /// Gets or sets the scale limit.
+        /// </summary>
+        /// <value>The scale limit.</value>
+        double ScaleLimit { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a text symbol
+    /// </summary>
+    public interface ITextSymbol : ISymbol, ICloneableLayerElement<ITextSymbol>
+    {
+        /// <summary>
+        /// Gets or sets the textual content
+        /// </summary>
+        string Text { get; set; }
+
+        /// <summary>
+        /// Gets or sets the name of the font
+        /// </summary>
+        string FontName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the foreground color
+        /// </summary>
+        string ForegroundColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the background color
+        /// </summary>
+        string BackgroundColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the background style
+        /// </summary>
+        BackgroundStyleType BackgroundStyle { get; set; }
+
+        /// <summary>
+        /// Gets or sets the horizontal alignment
+        /// </summary>
+        string HorizontalAlignment { get; set; }
+
+        /// <summary>
+        /// Gets or sets the vertical alignment
+        /// </summary>
+        string VerticalAlignment { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether to bold the text
+        /// </summary>
+        string Bold { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether to italicize the text
+        /// </summary>
+        string Italic { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether to underline the text
+        /// </summary>
+        string Underlined { get; set; }
+
+        /// <summary>
+        /// Gets or sets the advanced placement settings
+        /// </summary>
+        IAdvancedPlacement AdvancedPlacement { get; set; }
+    }
+
+    /// <summary>
+    /// Stylization of a predefined shape (ShapeType)
+    /// </summary>
+    public interface IMarkSymbol : ISymbol, ICloneableLayerElement<IMarkSymbol>
+    {
+        /// <summary>
+        /// Gets or sets the type of shape
+        /// </summary>
+        ShapeType Shape { get; set; }
+
+        /// <summary>
+        /// Gets or sets the fill settings
+        /// </summary>
+        IFill Fill { get; set; }
+
+        /// <summary>
+        /// Gets or sets the outline settings
+        /// </summary>
+        IStroke Edge { get; set; }
+    }
+
+    /// <summary>
+    /// Symbols that are specified by a font and character.
+    /// </summary>
+    public interface IFontSymbol : ISymbol, ICloneableLayerElement<IFontSymbol>
+    {
+        /// <summary>
+        /// Gets or sets the name of the font. If the font is not installed, the actual font used is application dependent.
+        /// </summary>
+        string FontName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the character
+        /// </summary>
+        string Character { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether to bold the text
+        /// </summary>
+        bool? Bold { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether to italicize the text
+        /// </summary>
+        bool? Italic { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether to underline the text
+        /// </summary>
+        bool? Underlined { get; set; }
+
+        /// <summary>
+        /// Gets or sets the foreground color
+        /// </summary>
+        string ForegroundColor { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a DWF-based W2D symbol
+    /// </summary>
+    public interface IW2DSymbol : ISymbol, ICloneableLayerElement<IW2DSymbol>
+    {
+        /// <summary>
+        /// Gets or sets the reference to the symbol
+        /// </summary>
+        ISymbolReference W2DSymbol { get; set; }
+
+        /// <summary>
+        /// Gets or sets the fill color
+        /// </summary>
+        string FillColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the line color
+        /// </summary>
+        string LineColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the text color
+        /// </summary>
+        string TextColor { get; set; }
+    }
+
+    /// <summary>
+    /// Symbols that are comprised of a raster.
+    /// </summary>
+    public interface IImageSymbol : ISymbol, ICloneableLayerElement<IImageSymbol>
+    {
+        /// <summary>
+        /// Gets or sets the image.
+        /// </summary>
+        /// <value>The image.</value>
+        IBaseImageSymbol Image { get; set; }
+    }
+
+    /// <summary>
+    /// The types of image symbol references
+    /// </summary>
+    public enum ImageSymbolReferenceType
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        SymbolReference,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Inline
+    }
+
+    /// <summary>
+    ///
+    /// </summary>
+    public interface IBaseImageSymbol
+    {
+        /// <summary>
+        /// Gets the type.
+        /// </summary>
+        /// <value>The type.</value>
+        ImageSymbolReferenceType Type { get; }
+    }
+
+    /// <summary>
+    /// Represents a reference to a symbol library item image
+    /// </summary>
+    public interface ISymbolReference : IBaseImageSymbol, ICloneableLayerElement<ISymbolReference>
+    {
+        /// <summary>
+        /// Gets or sets the resource id.
+        /// </summary>
+        /// <value>The resource id.</value>
+        string ResourceId { get; set; }
+
+        /// <summary>
+        /// Gets or sets the name of the library item.
+        /// </summary>
+        /// <value>The name of the library item.</value>
+        string LibraryItemName { get; set; }
+    }
+
+    /// <summary>
+    /// Represents an inline symbol image
+    /// </summary>
+    public interface IInlineImageSymbol : IBaseImageSymbol, ICloneableLayerElement<IInlineImageSymbol>
+    {
+        /// <summary>
+        /// Gets or sets the BinHex data for image
+        /// </summary>
+        byte[] Content { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a block symbol
+    /// </summary>
+    public interface IBlockSymbol : ISymbol, ICloneableLayerElement<IBlockSymbol>
+    {
+        /// <summary>
+        /// Gets or sets the name of the drawing
+        /// </summary>
+        string DrawingName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the name of the block
+        /// </summary>
+        string BlockName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color of the block
+        /// </summary>
+        string BlockColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color of the layer
+        /// </summary>
+        string LayerColor { get; set; }
+    }
+
+    /// <summary>
+    /// Symbolization characteristics for points.
+    /// </summary>
+    public interface IPointSymbolization2D : ICloneableLayerElement<IPointSymbolization2D>
+    {
+        /// <summary>
+        /// Gets or sets the symbol.
+        /// </summary>
+        /// <value>The symbol.</value>
+        ISymbol Symbol { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a fill
+    /// </summary>
+    public interface IFill : ICloneableLayerElement<IFill>
+    {
+        /// <summary>
+        /// Gets or sets the fill pattern
+        /// </summary>
+        string FillPattern { get; set; }
+
+        /// <summary>
+        /// Gets or sets the background color
+        /// </summary>
+        string BackgroundColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the foreground color
+        /// </summary>
+        string ForegroundColor { get; set; }
+    }
+
+    #endregion vector layer
+
+    #region raster layer
+
+    /// <summary>
+    /// Defines how to scale numbers into a color channel
+    /// </summary>
+    public interface IChannelBand
+    {
+        /// <summary>
+        /// Gets or sets the name of the band
+        /// </summary>
+        string Band { get; set; }
+
+        /// <summary>
+        /// Gets or sets the low band value. Default is low value found in band.  Band values less than this are snapped to this number
+        /// </summary>
+        double? LowBand { get; set; }
+
+        /// <summary>
+        /// Gets or sets the high band value. Default is high value found in band.  Band values greater than this are snapped to this number
+        /// </summary>
+        double? HighBand { get; set; }
+
+        /// <summary>
+        /// Gets or sets the low channel value. Default is 0.  Range is 0:255.  LowBand is mapped to this number.  LowChannel can be greater than HighChannel
+        /// </summary>
+        byte LowChannel { get; set; }
+
+        /// <summary>
+        /// Gets or sets the high channel value. Default is 255.  Range is 0:255
+        /// </summary>
+        byte HighChannel { get; set; }
+    }
+
+    /// <summary>
+    /// Specifies a color using distinct RGB values
+    /// </summary>
+    public interface IGridColorBands
+    {
+        /// <summary>
+        /// Gets or sets the red channel band
+        /// </summary>
+        IChannelBand RedBand { get; set; }
+
+        /// <summary>
+        /// Gets or sets the green channel band
+        /// </summary>
+        IChannelBand GreenBand { get; set; }
+
+        /// <summary>
+        /// Gets or sets the blue channel band
+        /// </summary>
+        IChannelBand BlueBand { get; set; }
+    }
+
+    /// <summary>
+    /// An explicit color
+    /// </summary>
+    public interface IExplicitColor
+    {
+        /// <summary>
+        /// Gets the type.
+        /// </summary>
+        /// <value>The type.</value>
+        ItemChoiceType Type { get; }
+    }
+
+    /// <summary>
+    /// An explicit color value
+    /// </summary>
+    public interface IExplictColorValue : IExplicitColor
+    {
+        /// <summary>
+        /// Gets the value.
+        /// </summary>
+        /// <value>The value.</value>
+        string Value { get; }
+    }
+
+    /// <summary>
+    /// An explicit color band
+    /// </summary>
+    public interface IExplicitColorBand : IExplicitColor
+    {
+        /// <summary>
+        /// Gets the band.
+        /// </summary>
+        /// <value>The band.</value>
+        string Band { get; }
+    }
+
+    /// <summary>
+    /// An explicit color band
+    /// </summary>
+    public interface IExplicitColorBands : IExplicitColor
+    {
+        /// <summary>
+        /// Gets the bands.
+        /// </summary>
+        /// <value>The bands.</value>
+        IGridColorBands Bands { get; }
+    }
+
+    /// <summary>
+    /// A grid color
+    /// </summary>
+    public interface IGridColor
+    {
+        /// <summary>
+        /// Gets or sets the color of the explicit.
+        /// </summary>
+        /// <value>The color of the explicit.</value>
+        IExplicitColor ExplicitColor { get; set; }
+
+        /// <summary>
+        /// Set the color
+        /// </summary>
+        /// <param name="htmlColor"></param>
+        void SetValue(string htmlColor);
+
+        /// <summary>
+        /// Gets the html color value
+        /// </summary>
+        /// <returns></returns>
+        string GetValue();
+    }
+
+    /// <summary>
+    /// A grid color rule
+    /// </summary>
+    public interface IGridColorRule
+    {
+        /// <summary>
+        /// Gets or sets the label for the rule to be displayed in the legend
+        /// </summary>
+        string LegendLabel { get; set; }
+
+        /// <summary>
+        /// Gets or sets a filter for the rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization
+        /// </summary>
+        string Filter { get; set; }
+
+        /// <summary>
+        /// Gets or sets a label for the rule.  Does not apply to GridColorRule
+        /// </summary>
+        ITextSymbol Label { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color.
+        /// </summary>
+        /// <value>The color.</value>
+        IGridColor Color { get; set; }
+    }
+
+    /// <summary>
+    /// Specifies how to shade given a band and a light source
+    /// </summary>
+    public interface IHillShade
+    {
+        /// <summary>
+        /// Gets or sets the name of the band used for the computation
+        /// </summary>
+        string Band { get; set; }
+
+        /// <summary>
+        /// Gets or sets the azimuth of the sun in degrees
+        /// </summary>
+        double Azimuth { get; set; }
+
+        /// <summary>
+        /// Gets or sets the altitude of the sun in degrees
+        /// </summary>
+        double Altitude { get; set; }
+
+        /// <summary>
+        /// Gets or sets the scale factor applied to the band prior to computing hillshade.  Defaults to 1 if not specified
+        /// </summary>
+        double ScaleFactor { get; set; }
+    }
+
+    /// <summary>
+    /// A grid color style
+    /// </summary>
+    public interface IGridColorStyle
+    {
+        /// <summary>
+        /// Gets or sets the hill shade.
+        /// </summary>
+        /// <value>The hill shade.</value>
+        IHillShade HillShade { get; set; }
+
+        /// <summary>
+        /// Gets or sets the transparency color. If a pixel color prior to factoring in HillShade is this value then the pixel is transparent
+        /// </summary>
+        string TransparencyColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the brightness factor
+        /// </summary>
+        double? BrightnessFactor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the contrast factor
+        /// </summary>
+        double? ContrastFactor { get; set; }
+
+        /// <summary>
+        /// Gets the color rules for this style
+        /// </summary>
+        IEnumerable<IGridColorRule> ColorRule { get; }
+
+        /// <summary>
+        /// Gets the number of color rules
+        /// </summary>
+        int ColorRuleCount { get; }
+
+        /// <summary>
+        /// Gets the color rule at the specified index
+        /// </summary>
+        /// <param name="index"></param>
+        /// <returns></returns>
+        IGridColorRule GetColorRuleAt(int index);
+
+        /// <summary>
+        /// Adds a color rule to this style
+        /// </summary>
+        /// <param name="rule"></param>
+        void AddColorRule(IGridColorRule rule);
+
+        /// <summary>
+        /// Removes the specified color rule from this style
+        /// </summary>
+        /// <param name="rule"></param>
+        void RemoveColorRule(IGridColorRule rule);
+
+        /// <summary>
+        /// Creates a default hillshade
+        /// </summary>
+        /// <returns></returns>
+        IHillShade CreateHillShade();
+    }
+
+    /// <summary>
+    /// A grid surface style
+    /// </summary>
+    public interface IGridSurfaceStyle
+    {
+        /// <summary>
+        /// Gets or sets the band to use for 3D data
+        /// </summary>
+        string Band { get; set; }
+
+        /// <summary>
+        /// Gets or sets the value that determines which input value is mapped to zero elevation.  Defaults to 0 if not specified
+        /// </summary>
+        double ZeroValue { get; set; }
+
+        /// <summary>
+        /// Gets or sets the value that determines how to scale the inputs into a consistent elevation.  Defaults to 1 if not specified
+        /// </summary>
+        double ScaleFactor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the default color to use if no ColorStyle is defined at a pixel
+        /// </summary>
+        string DefaultColor { get; set; }
+    }
+
+    /// <summary>
+    /// A grid scale range
+    /// </summary>
+    public interface IGridScaleRange
+    {
+        /// <summary>
+        /// Gets or sets the zoomed in part of the scale range.  Defaults to 0 if not specified.  Inclusive
+        /// </summary>
+        double? MinScale { get; set; }
+
+        /// <summary>
+        /// Gets or sets the zoomed out part of the scale range.  Defaults to the application's maximum value if not specified.  Exclusive
+        /// </summary>
+        double? MaxScale { get; set; }
+
+        /// <summary>
+        /// Defines the height field of the grid
+        /// </summary>
+        IGridSurfaceStyle SurfaceStyle { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color style.
+        /// </summary>
+        /// <value>The color style.</value>
+        IGridColorStyle ColorStyle { get; set; }
+
+        /// <summary>
+        /// When the user has zoomed in by this amount, a request for more detailed raster data is made
+        /// </summary>
+        double RebuildFactor { get; set; }
+
+        /// <summary>
+        /// Creates a default grid color style
+        /// </summary>
+        /// <returns></returns>
+        IGridColorStyle CreateColorStyle();
+
+        /// <summary>
+        /// Creates a default grid surface style
+        /// </summary>
+        /// <returns></returns>
+        IGridSurfaceStyle CreateSurfaceStyle();
+    }
+
+    #endregion raster layer
+
+    #region Layer Definition 1.1.0 interfaces
+
+    /// <summary>
+    /// Type of elevation
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum ElevationTypeType
+    {
+        /// <remarks/>
+        RelativeToGround,
+
+        /// <remarks/>
+        Absolute,
+    }
+
+    /// <summary>
+    /// Represents a composite style definition
+    /// </summary>
+    public interface ICompositeTypeStyle : IVectorStyle, IRuleCollection<ICompositeRule>
+    {
+        /// <summary>
+        /// Gets a display string for data-binding purposes
+        /// </summary>
+        string DisplayString { get; }
+
+        /// <summary>
+        /// Gets the composite rules.
+        /// </summary>
+        /// <value>The composite rules.</value>
+        IEnumerable<ICompositeRule> CompositeRule { get; }
+
+        /// <summary>
+        /// Adds the composite rule.
+        /// </summary>
+        /// <param name="compRule">The comp rule.</param>
+        void AddCompositeRule(ICompositeRule compRule);
+
+        /// <summary>
+        /// Removes the composite rule.
+        /// </summary>
+        /// <param name="compRule">The comp rule.</param>
+        void RemoveCompositeRule(ICompositeRule compRule);
+    }
+
+    /// <summary>
+    /// Represents a composite rule
+    /// </summary>
+    public interface ICompositeRule : IVectorRule
+    {
+        /// <summary>
+        /// Gets or sets the composite symbolization.
+        /// </summary>
+        /// <value>The composite symbolization.</value>
+        ICompositeSymbolization CompositeSymbolization { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a composite symbolization
+    /// </summary>
+    public interface ICompositeSymbolization
+    {
+        /// <summary>
+        /// Gets the symbol instances.
+        /// </summary>
+        /// <value>The symbol instances.</value>
+        IEnumerable<ISymbolInstance> SymbolInstance { get; }
+
+        /// <summary>
+        /// Adds the symbol instance.
+        /// </summary>
+        /// <param name="inst">The inst.</param>
+        void AddSymbolInstance(ISymbolInstance inst);
+
+        /// <summary>
+        /// Removes the symbol instance.
+        /// </summary>
+        /// <param name="inst">The inst.</param>
+        void RemoveSymbolInstance(ISymbolInstance inst);
+
+        /// <summary>
+        /// Creates a symbol reference.
+        /// </summary>
+        /// <param name="resourceId"></param>
+        /// <returns></returns>
+        ISymbolInstance CreateSymbolReference(string resourceId);
+
+        /// <summary>
+        /// Creates an inline simple symbol instance
+        /// </summary>
+        /// <param name="symDef"></param>
+        /// <returns></returns>
+        ISymbolInstance CreateInlineSimpleSymbol(ISimpleSymbolDefinition symDef);
+
+        /// <summary>
+        /// Creates an inline compound symbol instance
+        /// </summary>
+        /// <param name="compDef"></param>
+        /// <returns></returns>
+        ISymbolInstance CreateInlineCompoundSymbol(ICompoundSymbolDefinition compDef);
+
+        /// <summary>
+        /// Returns the current symbolization as XML
+        /// </summary>
+        /// <returns></returns>
+        string ToXml();
+
+        /// <summary>
+        /// Updates this symbolization with the given XML. The given XML must be composite symbolization XML
+        /// </summary>
+        /// <param name="xml"></param>
+        void UpdateFromXml(string xml);
+
+        /// <summary>
+        /// Removes all symbol instances
+        /// </summary>
+        void RemoveAllSymbolInstances();
+    }
+
+    /// <summary>
+    /// Represents a parameter override
+    /// </summary>
+    public interface IParameterOverride
+    {
+        /// <summary>
+        /// Gets or sets the name of the symbol definition containing that parameter being overridden
+        /// </summary>
+        string SymbolName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the identifier of the parameter being overridden
+        /// </summary>
+        string ParameterIdentifier { get; set; }
+
+        /// <summary>
+        /// Gets or sets the override value for the parameter
+        /// </summary>
+        string ParameterValue { get; set; }
+    }
+
+    /// <summary>
+    /// A collection of parameter overrides
+    /// </summary>
+    public interface IParameterOverrideCollection
+    {
+        /// <summary>
+        /// Gets the parameter overrides.
+        /// </summary>
+        /// <value>The parameter overrides.</value>
+        IEnumerable<IParameterOverride> Override { get; }
+
+        /// <summary>
+        /// Gets the number of parameter overrides
+        /// </summary>
+        int Count { get; }
+
+        /// <summary>
+        /// Gets the parameter override at the specified index
+        /// </summary>
+        /// <param name="index"></param>
+        /// <returns></returns>
+        IParameterOverride this[int index] { get; }
+
+        /// <summary>
+        /// Adds the parameter override.
+        /// </summary>
+        /// <param name="ov">The parameter override</param>
+        void AddOverride(IParameterOverride ov);
+
+        /// <summary>
+        /// Removes the parameter override.
+        /// </summary>
+        /// <param name="ov">The parameter override</param>
+        void RemoveOverride(IParameterOverride ov);
+
+        /// <summary>
+        /// Creates a parameter override
+        /// </summary>
+        /// <param name="symbol">The symbol name</param>
+        /// <param name="name">The name of the parameter to override</param>
+        /// <returns></returns>
+        IParameterOverride CreateParameterOverride(string symbol, string name);
+    }
+
+    /// <summary>
+    /// Represents elevation settings
+    /// </summary>
+    public interface IElevationSettings
+    {
+        /// <summary>
+        /// Gets or sets the Z offset.
+        /// </summary>
+        /// <value>The Z offset.</value>
+        string ZOffset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Z extrusion.
+        /// </summary>
+        /// <value>The Z extrusion.</value>
+        string ZExtrusion { get; set; }
+
+        /// <summary>
+        /// Gets or sets the type of the Z offset.
+        /// </summary>
+        /// <value>The type of the Z offset.</value>
+        ElevationTypeType ZOffsetType { get; set; }
+
+        /// <summary>
+        /// Gets or sets the unit.
+        /// </summary>
+        /// <value>The unit.</value>
+        LengthUnitType Unit { get; set; }
+    }
+
+    #endregion Layer Definition 1.1.0 interfaces
+
+    #region Layer Definition 1.2.0 interfaces
+
+    /// <summary>
+    /// The types of usage context
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum UsageContextType
+    {
+        /// <remarks/>
+        Unspecified,
+
+        /// <remarks/>
+        Point,
+
+        /// <remarks/>
+        Line,
+
+        /// <remarks/>
+        Area,
+    }
+
+    /// <summary>
+    /// The types of geometry context
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum GeometryContextType
+    {
+        /// <remarks/>
+        Unspecified,
+
+        /// <remarks/>
+        Point,
+
+        /// <remarks/>
+        LineString,
+
+        /// <remarks/>
+        Polygon,
+    }
+
+    /// <summary>
+    /// Provides legend labeling information for a theme
+    /// </summary>
+    public interface IThemeLabel
+    {
+        /// <summary>
+        /// Gets or sets the legend description for the theme
+        /// </summary>
+        string Description { get; set; }
+
+        /// <summary>
+        /// Gets or sets the default legend format to use for each category
+        /// </summary>
+        string CategoryFormat { get; set; }
+    }
+
+    /// <summary>
+    /// Version 2 of parameter overrides that supports theme labels. Applies to v1.2.0 of the Layer Definition schema
+    /// </summary>
+    public interface IParameterOverride2 : IParameterOverride
+    {
+        /// <summary>
+        /// Gets or sets the theme label.
+        /// </summary>
+        /// <value>The theme label.</value>
+        IThemeLabel ThemeLabel { get; set; }
+    }
+
+    /// <summary>
+    /// Version 2 of symbol instance that supports rendering passes and specific contexts. Applies to v1.2.0 of the Layer Definition schema
+    /// </summary>
+    public interface ISymbolInstance2 : ISymbolInstance
+    {
+        /// <summary>
+        /// Gets or sets the rendering pass.
+        /// </summary>
+        /// <value>The rendering pass.</value>
+        string RenderingPass { get; set; }
+
+        /// <summary>
+        /// Gets or sets the usage context.
+        /// </summary>
+        /// <value>The usage context.</value>
+        UsageContextType UsageContext { get; set; }
+
+        /// <summary>
+        /// Gets or sets the geometry context.
+        /// </summary>
+        /// <value>The geometry context.</value>
+        GeometryContextType GeometryContext { get; set; }
+    }
+
+    #endregion Layer Definition 1.2.0 interfaces
+
+    #region Layer Definition 1.3.0 interfaces
+
+    /// <summary>
+    /// A point vector style introduced in the v1.3.0 layer definition schema
+    /// </summary>
+    public interface IPointVectorStyle2 : IPointVectorStyle
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether [show in legend].
+        /// </summary>
+        /// <value><c>true</c> if [show in legend]; otherwise, <c>false</c>.</value>
+        bool ShowInLegend { get; set; }
+    }
+
+    /// <summary>
+    /// A line vector style introduced in the v1.3.0 layer definition schema
+    /// </summary>
+    public interface ILineVectorStyle2 : ILineVectorStyle
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether [show in legend].
+        /// </summary>
+        /// <value><c>true</c> if [show in legend]; otherwise, <c>false</c>.</value>
+        bool ShowInLegend { get; set; }
+    }
+
+    /// <summary>
+    /// An area vector style introduced in the v1.3.0 layer definition schema
+    /// </summary>
+    public interface IAreaVectorStyle2 : IAreaVectorStyle
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether [show in legend].
+        /// </summary>
+        /// <value><c>true</c> if [show in legend]; otherwise, <c>false</c>.</value>
+        bool ShowInLegend { get; set; }
+    }
+
+    /// <summary>
+    /// A composite style introduced in the v1.3.0 layer definition schema
+    /// </summary>
+    public interface ICompositeTypeStyle2 : ICompositeTypeStyle
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether [show in legend].
+        /// </summary>
+        /// <value><c>true</c> if [show in legend]; otherwise, <c>false</c>.</value>
+        bool ShowInLegend { get; set; }
+    }
+
+    #endregion Layer Definition 1.3.0 interfaces
+
+    #region Extension Methods
+
+    /// <summary>
+    /// Extension method clas
+    /// </summary>
+    public static class ExtensionMethods
+    {
+        /// <summary>
+        /// Sets the color of the block.
+        /// </summary>
+        /// <param name="sym">The sym.</param>
+        /// <param name="c">The c.</param>
+        public static void SetBlockColor(this IBlockSymbol sym, Color c)
+        {
+            Check.NotNull(sym, "sym");
+            sym.BlockColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Sets the color of the layer.
+        /// </summary>
+        /// <param name="sym">The sym.</param>
+        /// <param name="c">The c.</param>
+        public static void SetLayerColor(this IBlockSymbol sym, Color c)
+        {
+            Check.NotNull(sym, "sym"); //NOXLATE
+            sym.LayerColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Applies properties (name, italic, bold, underline) from the characteristics of the specified font
+        /// </summary>
+        /// <param name="sym"></param>
+        /// <param name="f"></param>
+        public static void Apply(this IFontSymbol sym, Font f)
+        {
+            Check.NotNull(sym, "sym"); //NOXLATE
+            sym.FontName = f.Name;
+            sym.Italic = f.Italic;
+            sym.Bold = f.Bold;
+            sym.Underlined = f.Underline;
+        }
+
+        /// <summary>
+        /// Sets the color of the foreground.
+        /// </summary>
+        /// <param name="sym">The sym.</param>
+        /// <param name="c">The c.</param>
+        public static void SetForegroundColor(this IFontSymbol sym, Color c)
+        {
+            Check.NotNull(sym, "sym"); //NOXLATE
+            sym.ForegroundColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Determines whether the vector layer has scale ranges
+        /// </summary>
+        /// <param name="vl">The vl.</param>
+        /// <returns>
+        /// 	<c>true</c> if vector layer has scale ranges; otherwise, <c>false</c>.
+        /// </returns>
+        public static bool HasVectorScaleRanges(this IVectorLayerDefinition vl)
+        {
+            Check.NotNull(vl, "vl"); //NOXLATE
+            return vl.GetScaleRangeCount() > 0;
+        }
+
+        /// <summary>
+        /// Gets the number of scale ranges in this vector layer
+        /// </summary>
+        /// <param name="vl"></param>
+        /// <returns></returns>
+        public static int GetScaleRangeCount(this IVectorLayerDefinition vl)
+        {
+            Check.NotNull(vl, "vl"); //NOXLATE
+            var list = new List<IVectorScaleRange>(vl.VectorScaleRange);
+            return list.Count;
+        }
+
+        /// <summary>
+        /// Purge the specified scale range of the following styles
+        /// </summary>
+        /// <param name="range"></param>
+        /// <param name="geomTypes">The geometry types to remove</param>
+        public static void RemoveStyles(this IVectorScaleRange range, IEnumerable<string> geomTypes)
+        {
+            Check.NotNull(range, "range"); //NOXLATE
+            Check.NotNull(geomTypes, "geomTypes"); //NOXLATE
+
+            List<IVectorStyle> remove = new List<IVectorStyle>();
+
+            foreach (var geomType in geomTypes)
+            {
+                if (geomType.ToLower().Equals("curve")) //NOXLATE
+                {
+                    range.LineStyle = null;
+                }
+                else if (geomType.ToLower().Equals("point")) //NOXLATE
+                {
+                    range.PointStyle = null;
+                }
+                else if (geomType.ToLower().Equals("surface")) //NOXLATE
+                {
+                    range.AreaStyle = null;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Removes the styles.
+        /// </summary>
+        /// <param name="range">The range.</param>
+        /// <param name="geomTypes">The geom types.</param>
+        public static void RemoveStyles(this IVectorScaleRange range, params string[] geomTypes)
+        {
+            range.RemoveStyles(geomTypes);
+        }
+
+        private static IFdoSpatialContext FindSpatialContext(FdoSpatialContextList spatialContexts, string scName)
+        {
+            foreach (IFdoSpatialContext sc in spatialContexts.SpatialContext)
+            {
+                if (sc.Name == scName)
+                    return sc;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Gets the referenced schema of this vector layer
+        /// </summary>
+        /// <param name="vl"></param>
+        /// <returns></returns>
+        public static string GetSchema(this IVectorLayerDefinition vl)
+        {
+            if (string.IsNullOrEmpty(vl.FeatureName) || !vl.FeatureName.Contains(":")) //NOXLATE
+                return string.Empty;
+            else
+                return vl.FeatureName.Split(':')[0]; //NOXLATE
+        }
+
+        /// <summary>
+        /// Sets the color of the fill.
+        /// </summary>
+        /// <param name="sym">The sym.</param>
+        /// <param name="c">The c.</param>
+        public static void SetFillColor(this IW2DSymbol sym, Color c)
+        {
+            Check.NotNull(sym, "sym"); //NOXLATE
+            sym.FillColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Sets the color of the line.
+        /// </summary>
+        /// <param name="sym">The sym.</param>
+        /// <param name="c">The c.</param>
+        public static void SetLineColor(this IW2DSymbol sym, Color c)
+        {
+            Check.NotNull(sym, "sym"); //NOXLATE
+            sym.LineColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Sets the color of the text.
+        /// </summary>
+        /// <param name="sym">The sym.</param>
+        /// <param name="c">The c.</param>
+        public static void SetTextColor(this IW2DSymbol sym, Color c)
+        {
+            Check.NotNull(sym, "sym"); //NOXLATE
+            sym.TextColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Sets the color of the foreground.
+        /// </summary>
+        /// <param name="sym">The sym.</param>
+        /// <param name="c">The c.</param>
+        public static void SetForegroundColor(this ITextSymbol sym, Color c)
+        {
+            Check.NotNull(sym, "sym"); //NOXLATE
+            sym.ForegroundColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Sets the color of the background.
+        /// </summary>
+        /// <param name="sym">The sym.</param>
+        /// <param name="c">The c.</param>
+        public static void SetBackgroundColor(this ITextSymbol sym, Color c)
+        {
+            Check.NotNull(sym, "sym"); //NOXLATE
+            sym.BackgroundColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Applies properties (name, italic, bold, underline) from the characteristics of the specified font
+        /// </summary>
+        /// <param name="sym"></param>
+        /// <param name="f"></param>
+        public static void Apply(this ITextSymbol sym, Font f)
+        {
+            Check.NotNull(sym, "sym"); //NOXLATE
+            sym.FontName = f.Name;
+            sym.Italic = f.Italic.ToString();
+            sym.Bold = f.Bold.ToString();
+            sym.Underlined = f.Underline.ToString();
+        }
+
+        /// <summary>
+        /// Sets the color of the background.
+        /// </summary>
+        /// <param name="fil">The fil.</param>
+        /// <param name="c">The c.</param>
+        public static void SetBackgroundColor(this IFill fil, Color c)
+        {
+            Check.NotNull(fil, "fil"); //NOXLATE
+            fil.BackgroundColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Sets the color of the foreground.
+        /// </summary>
+        /// <param name="fil">The fil.</param>
+        /// <param name="c">The c.</param>
+        public static void SetForegroundColor(this IFill fil, Color c)
+        {
+            Check.NotNull(fil, "fil"); //NOXLATE
+            fil.ForegroundColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Sets the color of the transparency.
+        /// </summary>
+        /// <param name="style">The style.</param>
+        /// <param name="c">The c.</param>
+        public static void SetTransparencyColor(this IGridColorStyle style, Color c)
+        {
+            Check.NotNull(style, "style"); //NOXLATE
+            style.TransparencyColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Sets the default color.
+        /// </summary>
+        /// <param name="style">The style.</param>
+        /// <param name="c">The c.</param>
+        public static void SetDefaultColor(this IGridSurfaceStyle style, Color c)
+        {
+            Check.NotNull(style, "style"); //NOXLATE
+            style.DefaultColor = Utility.SerializeHTMLColor(c, true);
+        }
+
+        /// <summary>
+        /// Removes all rules from a composite style
+        /// </summary>
+        /// <param name="style"></param>
+        public static void RemoveAllRules(this ICompositeTypeStyle style)
+        {
+            Check.NotNull(style, "style"); //NOXLATE
+
+            var remove = new List<ICompositeRule>();
+            foreach (var r in style.CompositeRule)
+                remove.Add(r);
+
+            foreach (var r in remove)
+            {
+                style.RemoveCompositeRule(r);
+            }
+        }
+
+        /// <summary>
+        /// Defines a parameter for a simple symbol definition
+        /// </summary>
+        /// <param name="simpleSym"></param>
+        /// <param name="identifier"></param>
+        /// <param name="defaultValue"></param>
+        /// <param name="displayName"></param>
+        /// <param name="description"></param>
+        /// <param name="dataType"></param>
+        /// <returns>The defined parameter</returns>
+        public static IParameter DefineParameter(this ISimpleSymbolDefinition simpleSym, string identifier, string defaultValue, string displayName, string description, string dataType)
+        {
+            Check.NotNull(simpleSym, "simpleSym");
+            var p = simpleSym.CreateParameter();
+            p.Identifier = identifier;
+            p.DefaultValue = defaultValue;
+            p.DisplayName = displayName;
+            p.Description = description;
+            p.DataType = dataType;
+            simpleSym.ParameterDefinition.AddParameter(p);
+            return p;
+        }
+
+        /// <summary>
+        /// Adds a parameter override
+        /// </summary>
+        /// <param name="overrides"></param>
+        /// <param name="symbolName"></param>
+        /// <param name="paramName"></param>
+        /// <param name="paramValue"></param>
+        /// <returns>The added parameter override</returns>
+        public static IParameterOverride AddOverride(this IParameterOverrideCollection overrides, string symbolName, string paramName, string paramValue)
+        {
+            Check.NotNull(overrides, "overrides");
+            var ov = overrides.CreateParameterOverride(symbolName, paramName);
+            ov.ParameterValue = paramValue;
+            overrides.AddOverride(ov);
+            return ov;
+        }
+    }
+
+    #endregion Extension Methods
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/GridLayerDefinitionImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/GridLayerDefinitionImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/GridLayerDefinitionImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,732 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Xml;
+
+#pragma warning disable 1591, 0114, 0108
+
+#if LDF_110
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_1_0
+#elif LDF_120
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_2_0
+#elif LDF_130
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_3_0
+#elif LDF_230
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v2_3_0
+#elif LDF_240
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v2_4_0
+#else
+
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_0_0
+#endif
+{
+    using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+    using System.Xml.Serialization;
+
+    partial class GridLayerDefinitionType : IRasterLayerDefinition
+    {
+        [XmlIgnore]
+        public override LayerType LayerType
+        {
+            get { return LayerType.Raster; }
+        }
+
+        [XmlIgnore]
+        string ISubLayerDefinition.ResourceId
+        {
+            get { return this.ResourceId; }
+            set { this.ResourceId = value; }
+        }
+
+        [XmlIgnore]
+        string IRasterLayerDefinition.FeatureName
+        {
+            get
+            {
+                return this.FeatureName;
+            }
+            set
+            {
+                this.FeatureName = value;
+            }
+        }
+
+        [XmlIgnore]
+        string IRasterLayerDefinition.Geometry
+        {
+            get
+            {
+                return this.Geometry;
+            }
+            set
+            {
+                this.Geometry = value;
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<IGridScaleRange> IRasterLayerDefinition.GridScaleRange
+        {
+            get
+            {
+                foreach (var gsr in this.GridScaleRange)
+                {
+                    yield return gsr;
+                }
+            }
+        }
+
+        public void AddGridScaleRange(IGridScaleRange range)
+        {
+            var gsr = range as GridScaleRangeType;
+            if (gsr != null)
+            {
+                this.GridScaleRange.Add(gsr);
+            }
+        }
+
+        public void RemoveGridScaleRange(IGridScaleRange range)
+        {
+            var gsr = range as GridScaleRangeType;
+            if (gsr != null)
+            {
+                this.GridScaleRange.Remove(gsr);
+            }
+        }
+
+        public int IndexOfScaleRange(IGridScaleRange range)
+        {
+            var gsr = range as GridScaleRangeType;
+            if (gsr != null)
+            {
+                this.GridScaleRange.IndexOf(gsr);
+            }
+            return -1;
+        }
+
+        public IGridScaleRange GetScaleRangeAt(int index)
+        {
+            return this.GridScaleRange[index];
+        }
+
+        [XmlIgnore]
+        public int GridScaleRangeCount { get { return this.GridScaleRange.Count; } }
+    }
+
+    partial class ChannelBandType : IChannelBand
+    {
+        [XmlIgnore]
+        string IChannelBand.Band
+        {
+            get
+            {
+                return this.Band;
+            }
+            set
+            {
+                this.Band = value;
+            }
+        }
+
+        [XmlIgnore]
+        double? IChannelBand.LowBand
+        {
+            get
+            {
+                return this.LowBandSpecified ? new Nullable<double>(this.LowBand) : null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.LowBand = value.Value;
+                    this.LowBandSpecified = true;
+                }
+                else
+                {
+                    this.LowBandSpecified = false;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        double? IChannelBand.HighBand
+        {
+            get
+            {
+                return this.HighBandSpecified ? new Nullable<double>(this.HighBand) : null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.HighBand = value.Value;
+                    this.HighBandSpecified = true;
+                }
+                else
+                {
+                    this.HighBandSpecified = false;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        byte IChannelBand.LowChannel
+        {
+            get
+            {
+                return this.LowChannel;
+            }
+            set
+            {
+                this.LowChannel = value;
+            }
+        }
+
+        [XmlIgnore]
+        byte IChannelBand.HighChannel
+        {
+            get
+            {
+                return this.HighChannel;
+            }
+            set
+            {
+                this.HighChannel = value;
+            }
+        }
+    }
+
+    partial class GridColorBandsType : IGridColorBands
+    {
+        [XmlIgnore]
+        IChannelBand IGridColorBands.RedBand
+        {
+            get
+            {
+                return this.RedBand;
+            }
+            set
+            {
+                this.RedBand = (ChannelBandType)value;
+            }
+        }
+
+        [XmlIgnore]
+        IChannelBand IGridColorBands.GreenBand
+        {
+            get
+            {
+                return this.GreenBand;
+            }
+            set
+            {
+                this.GreenBand = (ChannelBandType)value;
+            }
+        }
+
+        [XmlIgnore]
+        IChannelBand IGridColorBands.BlueBand
+        {
+            get
+            {
+                return this.BlueBand;
+            }
+            set
+            {
+                this.BlueBand = (ChannelBandType)value;
+            }
+        }
+    }
+
+    //Class that addresses the shoddy impedence mismatch between the xsd
+    //and the generated code
+    internal abstract class ExplicitColorBase : IExplicitColor
+    {
+        [XmlIgnore]
+        public abstract ItemChoiceType Type { get; }
+    }
+
+    //Class that addresses the shoddy impedence mismatch between the xsd
+    //and the generated code
+    internal class ExplicitColorBand : ExplicitColorBase, IExplicitColorBand
+    {
+        [XmlIgnore]
+        public string Band { get; set; }
+
+        [XmlIgnore]
+        public override ItemChoiceType Type
+        {
+            get { return ItemChoiceType.Band; }
+        }
+    }
+
+    //Class that addresses the shoddy impedence mismatch between the xsd
+    //and the generated code
+    internal class ExplicitColor : ExplicitColorBase, IExplictColorValue
+    {
+        [XmlIgnore]
+        public string Value { get; set; }
+
+        [XmlIgnore]
+        public override ItemChoiceType Type
+        {
+            get { return ItemChoiceType.ExplicitColor; }
+        }
+    }
+
+    //Class that addresses the shoddy impedence mismatch between the xsd
+    //and the generated code
+    internal class ExplicitColorBands : ExplicitColorBase, IExplicitColorBands
+    {
+        [XmlIgnore]
+        public IGridColorBands Bands { get; set; }
+
+        [XmlIgnore]
+        public override ItemChoiceType Type
+        {
+            get { return ItemChoiceType.Bands; }
+        }
+    }
+
+    partial class GridColorType : IGridColor
+    {
+        [XmlIgnore]
+        IExplicitColor IGridColor.ExplicitColor
+        {
+            get
+            {
+                return ParseItem();
+            }
+            set
+            {
+                switch (this.ItemElementName)
+                {
+                    case ItemChoiceType.Band:
+                        this.Item = ((ExplicitColorBand)value).Band;
+                        break;
+
+                    case ItemChoiceType.Bands:
+                        this.Item = ((ExplicitColorBands)value).Bands;
+                        break;
+
+                    case ItemChoiceType.ExplicitColor:
+                        this.Item = ((ExplicitColor)value).Value;
+                        break;
+                }
+            }
+        }
+
+        private IExplicitColor ParseItem()
+        {
+            if (this.Item == null)
+                return null;
+
+            switch (this.ItemElementName)
+            {
+                case ItemChoiceType.Band:
+                    return new ExplicitColorBand() { Band = (string)this.Item };
+
+                case ItemChoiceType.Bands:
+                    return new ExplicitColorBands() { Bands = (IGridColorBands)this.Item };
+
+                case ItemChoiceType.ExplicitColor:
+                    return new ExplicitColor() { Value = (string)this.Item };
+            }
+
+            throw new Exception(); //Should never get here
+        }
+
+        public void SetValue(string htmlColor)
+        {
+            this.ItemElementName = ItemChoiceType.ExplicitColor;
+            this.Item = htmlColor;
+        }
+
+        public string GetValue()
+        {
+            if (this.Item != null && this.ItemElementName == ItemChoiceType.ExplicitColor)
+            {
+                return this.Item.ToString();
+            }
+            return null;
+        }
+    }
+
+    partial class GridColorRuleType : IGridColorRule
+    {
+        [XmlIgnore]
+        string IGridColorRule.LegendLabel
+        {
+            get
+            {
+                return this.LegendLabel;
+            }
+            set
+            {
+                this.LegendLabel = value;
+            }
+        }
+
+        [XmlIgnore]
+        string IGridColorRule.Filter
+        {
+            get
+            {
+                return this.Filter;
+            }
+            set
+            {
+                this.Filter = value;
+            }
+        }
+
+        [XmlIgnore]
+        ITextSymbol IGridColorRule.Label
+        {
+            get
+            {
+                return this.Label;
+            }
+            set
+            {
+                this.Label = (TextSymbolType)value;
+            }
+        }
+
+        [XmlIgnore]
+        IGridColor IGridColorRule.Color
+        {
+            get
+            {
+                return this.Color;
+            }
+            set
+            {
+                this.Color = (GridColorType)value;
+            }
+        }
+    }
+
+    partial class HillShadeType : IHillShade
+    {
+        [XmlIgnore]
+        string IHillShade.Band
+        {
+            get
+            {
+                return this.Band;
+            }
+            set
+            {
+                this.Band = value;
+            }
+        }
+
+        [XmlIgnore]
+        double IHillShade.Azimuth
+        {
+            get
+            {
+                return this.Azimuth;
+            }
+            set
+            {
+                this.Azimuth = value;
+            }
+        }
+
+        [XmlIgnore]
+        double IHillShade.Altitude
+        {
+            get
+            {
+                return this.Altitude;
+            }
+            set
+            {
+                this.Altitude = value;
+            }
+        }
+
+        [XmlIgnore]
+        double IHillShade.ScaleFactor
+        {
+            get
+            {
+                return this.ScaleFactor;
+            }
+            set
+            {
+                this.ScaleFactor = value;
+            }
+        }
+    }
+
+    partial class GridColorStyleType : IGridColorStyle
+    {
+        [XmlIgnore]
+        IHillShade IGridColorStyle.HillShade
+        {
+            get
+            {
+                return this.HillShade;
+            }
+            set
+            {
+                this.HillShade = (HillShadeType)value;
+            }
+        }
+
+        [XmlIgnore]
+        string IGridColorStyle.TransparencyColor
+        {
+            get
+            {
+                return this.TransparencyColor == null ? string.Empty : this.TransparencyColor.ToString();
+            }
+            set
+            {
+                this.TransparencyColor = value;
+            }
+        }
+
+        [XmlIgnore]
+        double? IGridColorStyle.BrightnessFactor
+        {
+            get
+            {
+                return this.BrightnessFactor;
+            }
+            set
+            {
+                this.BrightnessFactor = value.HasValue ? value.Value : default(double);
+            }
+        }
+
+        [XmlIgnore]
+        double? IGridColorStyle.ContrastFactor
+        {
+            get
+            {
+                return this.ContrastFactor;
+            }
+            set
+            {
+                this.ContrastFactor = value.HasValue ? value.Value : default(double);
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<IGridColorRule> IGridColorStyle.ColorRule
+        {
+            get
+            {
+                foreach (var cr in this.ColorRule)
+                {
+                    yield return cr;
+                }
+            }
+        }
+
+        void IGridColorStyle.AddColorRule(IGridColorRule rule)
+        {
+            var cr = rule as GridColorRuleType;
+            if (cr != null)
+                this.ColorRule.Add((GridColorRuleType)cr);
+        }
+
+        void IGridColorStyle.RemoveColorRule(IGridColorRule rule)
+        {
+            var cr = rule as GridColorRuleType;
+            if (cr != null)
+                this.ColorRule.Remove((GridColorRuleType)cr);
+        }
+
+        [XmlIgnore]
+        public int ColorRuleCount
+        {
+            get { return this.ColorRule.Count; }
+        }
+
+        public IGridColorRule GetColorRuleAt(int index)
+        {
+            return this.ColorRule[index];
+        }
+
+        public IHillShade CreateHillShade()
+        {
+            return new HillShadeType();
+        }
+    }
+
+    partial class GridSurfaceStyleType : IGridSurfaceStyle
+    {
+        [XmlIgnore]
+        string IGridSurfaceStyle.Band
+        {
+            get
+            {
+                return this.Band;
+            }
+            set
+            {
+                this.Band = value;
+            }
+        }
+
+        [XmlIgnore]
+        double IGridSurfaceStyle.ZeroValue
+        {
+            get
+            {
+                return this.ZeroValue;
+            }
+            set
+            {
+                this.ZeroValue = value;
+            }
+        }
+
+        [XmlIgnore]
+        double IGridSurfaceStyle.ScaleFactor
+        {
+            get
+            {
+                return this.ScaleFactor;
+            }
+            set
+            {
+                this.ScaleFactor = value;
+            }
+        }
+
+        [XmlIgnore]
+        string IGridSurfaceStyle.DefaultColor
+        {
+            get
+            {
+                return this.DefaultColor;
+            }
+            set
+            {
+                this.DefaultColor = value;
+            }
+        }
+    }
+
+    partial class GridScaleRangeType : IGridScaleRange
+    {
+        [XmlIgnore]
+        double? IGridScaleRange.MinScale
+        {
+            get
+            {
+                return this.MinScale;
+            }
+            set
+            {
+                if (value.HasValue)
+                    this.MinScale = value.Value;
+            }
+        }
+
+        [XmlIgnore]
+        double? IGridScaleRange.MaxScale
+        {
+            get
+            {
+                return this.MaxScaleSpecified ? new Nullable<double>(this.MaxScale) : null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.MaxScale = value.Value;
+                    this.MaxScaleSpecified = true;
+                }
+                else
+                {
+                    this.MaxScaleSpecified = false;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        IGridSurfaceStyle IGridScaleRange.SurfaceStyle
+        {
+            get
+            {
+                return this.SurfaceStyle;
+            }
+            set
+            {
+                this.SurfaceStyle = (GridSurfaceStyleType)value;
+            }
+        }
+
+        [XmlIgnore]
+        IGridColorStyle IGridScaleRange.ColorStyle
+        {
+            get
+            {
+                return this.ColorStyle;
+            }
+            set
+            {
+                this.ColorStyle = (GridColorStyleType)value;
+            }
+        }
+
+        [XmlIgnore]
+        double IGridScaleRange.RebuildFactor
+        {
+            get
+            {
+                return this.RebuildFactor;
+            }
+            set
+            {
+                this.RebuildFactor = value;
+            }
+        }
+
+        public IGridColorStyle CreateColorStyle()
+        {
+            return new GridColorStyleType()
+            {
+                ColorRule = new System.ComponentModel.BindingList<GridColorRuleType>(),
+                HillShade = new HillShadeType()
+            };
+        }
+
+        public IGridSurfaceStyle CreateSurfaceStyle()
+        {
+            return new GridSurfaceStyleType();
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/LayerElementFactoryImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/LayerElementFactoryImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/LayerElementFactoryImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,486 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.SymbolDefinition;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+#pragma warning disable 1591, 0114, 0108
+
+#if LDF_110
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_1_0
+#elif LDF_120
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_2_0
+#elif LDF_130
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_3_0
+#elif LDF_230
+
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v2_3_0
+#elif LDF_240
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v2_4_0
+#else
+
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_0_0
+#endif
+{
+    /// <summary>
+    /// A publically accessible entry point primarily used for registration with the <see cref="ObjectFactory"/> and
+    /// <see cref="ResourceTypeRegistry"/> classes
+    /// </summary>
+    public static class LdfEntryPoint
+    {
+        public static ILayerDefinition CreateDefault(LayerType type)
+        {
+            return LayerDefinition.CreateDefault(type);
+        }
+
+        public static IResource Deserialize(string xml)
+        {
+            return LayerDefinition.Deserialize(xml);
+        }
+
+        public static Stream Serialize(IResource res)
+        {
+            var ldf = (ILayerDefinition)res;
+            var vl = ldf.SubLayer as IVectorLayerDefinition;
+            if (vl != null)
+            {
+                foreach (var vsr in vl.VectorScaleRange)
+                {
+                    var vsr2 = vsr as IVectorScaleRange2;
+                    if (vsr2 != null)
+                    {
+                        var ctss = vsr2.CompositeStyle;
+                        if (ctss != null)
+                        {
+                            foreach (var cts in ctss)
+                            {
+                                foreach (var crs in cts.CompositeRule)
+                                {
+                                    var csym = crs.CompositeSymbolization;
+                                    if (csym != null)
+                                    {
+                                        foreach (var si in csym.SymbolInstance)
+                                        {
+                                            if (si.Reference.Type == OSGeo.MapGuide.ObjectModels.SymbolDefinition.SymbolInstanceType.Inline)
+                                            {
+                                                var symBase = ((ISymbolInstanceReferenceInline)si.Reference).SymbolDefinition;
+                                                symBase.RemoveSchemaAttributes();
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            return res.SerializeToStream();
+        }
+    }
+
+    partial class LayerDefinition : ILayerElementFactory
+    {
+        public static ILayerDefinition CreateDefault(LayerType type)
+        {
+            var lyr = new LayerDefinition();
+            switch (type)
+            {
+                case LayerType.Drawing:
+                    lyr.CreateDrawingLayer();
+                    break;
+
+                case LayerType.Raster:
+                    lyr.CreateRasterLayer();
+                    break;
+
+                case LayerType.Vector:
+                    lyr.CreateVectorLayer();
+                    break;
+            }
+            return lyr;
+        }
+
+        protected virtual VectorLayerDefinitionType CreateVectorLayerInstance()
+        {
+            return new VectorLayerDefinitionType();
+        }
+
+        protected virtual VectorScaleRangeType CreateVectorScaleRangeInstance()
+        {
+            return new VectorScaleRangeType()
+            {
+                Items = new System.ComponentModel.BindingList<object>(),
+                AreaStyle = CreateDefaultAreaStyle(),
+                LineStyle = CreateDefaultLineStyle(),
+                PointStyle = CreateDefaultPointStyle()
+            };
+        }
+
+        public void CreateVectorLayer()
+        {
+            var vl = this.CreateVectorLayerInstance();
+            /*
+            var vl = new VectorLayerDefinitionType()
+            {
+#if LDF_240
+                Watermarks = new System.ComponentModel.BindingList<OSGeo.MapGuide.ObjectModels.WatermarkDefinition.v2_4_0.WatermarkType>()
+#elif LDF_230
+                Watermarks = new System.ComponentModel.BindingList<OSGeo.MapGuide.ObjectModels.WatermarkDefinition.v2_3_0.WatermarkType>()
+#endif
+            };
+             */
+
+            //TODO: Create composite type style if 1.2 or 1.3 schema
+
+            vl.VectorScaleRange = new System.ComponentModel.BindingList<VectorScaleRangeType>();
+            var defaultRange = this.CreateVectorScaleRangeInstance();
+            /*
+            var defaultRange = new VectorScaleRangeType()
+            {
+                Items = new System.ComponentModel.BindingList<object>(),
+                AreaStyle = CreateDefaultAreaStyle(),
+                LineStyle = CreateDefaultLineStyle(),
+                PointStyle = CreateDefaultPointStyle(),
+#if LDF_100 || LDF_110
+#else
+                CompositeStyle = new ICompositeTypeStyle[] { CreateDefaultCompositeStyle() }
+#endif
+            };
+             */
+            vl.VectorScaleRange.Add(defaultRange);
+
+            this.Item = vl;
+        }
+
+        public void CreateRasterLayer()
+        {
+            var gl = new GridLayerDefinitionType()
+            {
+                GridScaleRange = new System.ComponentModel.BindingList<GridScaleRangeType>(),
+            };
+
+            gl.AddGridScaleRange(new GridScaleRangeType()
+            {
+                ColorStyle = new GridColorStyleType()
+                {
+                    ColorRule = new System.ComponentModel.BindingList<GridColorRuleType>()
+                    {
+                        new GridColorRuleType() {
+                            LegendLabel = string.Empty,
+                            Color = new GridColorType()
+                        },
+                        new GridColorRuleType() {
+                            LegendLabel = string.Empty,
+                            Color = new GridColorType()
+                        }
+                    }
+                },
+                RebuildFactor = 1.0
+            });
+
+            gl.GetScaleRangeAt(0).ColorStyle.GetColorRuleAt(0).Color.SetValue("000000"); //NOXLATE
+            gl.GetScaleRangeAt(0).ColorStyle.GetColorRuleAt(1).Color.SetValue("FFFFFF"); //NOXLATE
+
+            this.Item = gl;
+        }
+
+        public void CreateDrawingLayer()
+        {
+            this.Item = new DrawingLayerDefinitionType();
+        }
+
+        /// <summary>
+        /// Creates a fill
+        /// </summary>
+        /// <param name="pattern"></param>
+        /// <param name="background"></param>
+        /// <param name="foreground"></param>
+        /// <returns></returns>
+        public IFill CreateFill(string pattern, System.Drawing.Color background, System.Drawing.Color foreground)
+        {
+            return new FillType()
+            {
+                BackgroundColor = Utility.SerializeHTMLColor(background, true),
+                FillPattern = pattern,
+                ForegroundColor = Utility.SerializeHTMLColor(foreground, true)
+            };
+        }
+
+        /// <summary>
+        /// Creates a line stroke with default settings
+        /// </summary>
+        /// <param name="color"></param>
+        /// <returns></returns>
+        public IStroke CreateStroke(System.Drawing.Color color)
+        {
+            return new StrokeType()
+            {
+                Color = Utility.SerializeHTMLColor(color, true),
+                LineStyle = "Solid", //NOXLATE
+                Thickness = "1", //NOXLATE
+                Unit = LengthUnitType.Points
+            };
+        }
+
+        public IStroke CreateDefaultStroke()
+        {
+            return CreateStroke(Color.Black);
+        }
+
+        public IPointVectorStyle CreateDefaultPointStyle()
+        {
+            IPointVectorStyle pts = new PointTypeStyleType()
+            {
+                PointRule = new System.ComponentModel.BindingList<PointRuleType>()
+            };
+            pts.AddRule(CreateDefaultPointRule());
+            return pts;
+        }
+
+        public ILineVectorStyle CreateDefaultLineStyle()
+        {
+            ILineVectorStyle lts = new LineTypeStyleType()
+            {
+                LineRule = new System.ComponentModel.BindingList<LineRuleType>()
+            };
+            lts.AddRule(CreateDefaultLineRule());
+            return lts;
+        }
+
+        public IAreaVectorStyle CreateDefaultAreaStyle()
+        {
+            IAreaVectorStyle ats = new AreaTypeStyleType()
+            {
+                AreaRule = new System.ComponentModel.BindingList<AreaRuleType>()
+            };
+            ats.AddRule(CreateDefaultAreaRule());
+            return ats;
+        }
+
+        public IVectorScaleRange CreateVectorScaleRange()
+        {
+            return new VectorScaleRangeType()
+            {
+                Items = new System.ComponentModel.BindingList<object>(),
+                AreaStyle = CreateDefaultAreaStyle(),
+                LineStyle = CreateDefaultLineStyle(),
+                PointStyle = CreateDefaultPointStyle()
+            };
+        }
+
+        public IFill CreateDefaultFill()
+        {
+            return CreateFill("Solid", Color.White, Color.White); //NOXLATE
+        }
+
+        public IMarkSymbol CreateDefaultMarkSymbol()
+        {
+            IMarkSymbol sym = new MarkSymbolType()
+            {
+                SizeContext = SizeContextType.DeviceUnits,
+                MaintainAspect = true,
+                Shape = ShapeType.Square,
+                Rotation = "0", //NOXLATE
+                SizeX = "10", //NOXLATE
+                SizeY = "10", //NOXLATE
+                Unit = LengthUnitType.Points
+            };
+            sym.Edge = CreateDefaultStroke();
+            sym.Fill = CreateDefaultFill();
+            return sym;
+        }
+
+        public IFontSymbol CreateDefaultFontSymbol()
+        {
+            IFontSymbol sym = new FontSymbolType()
+            {
+                SizeContext = SizeContextType.DeviceUnits,
+                MaintainAspect = true,
+                FontName = "Arial", //NOXLATE
+                Rotation = "0", //NOXLATE
+                SizeX = "10", //NOXLATE
+                SizeY = "10", //NOXLATE
+                Unit = LengthUnitType.Points
+            };
+            sym.SetForegroundColor(Color.Black);
+            return sym;
+        }
+
+        public IPointSymbolization2D CreateDefaultPointSymbolization2D()
+        {
+            IPointSymbolization2D sym = new PointSymbolization2DType();
+            sym.Symbol = CreateDefaultMarkSymbol();
+            return sym;
+        }
+
+        public IPointRule CreateDefaultPointRule()
+        {
+            IPointRule pr = new PointRuleType()
+            {
+                LegendLabel = string.Empty
+            };
+            pr.PointSymbolization2D = CreateDefaultPointSymbolization2D();
+            return pr;
+        }
+
+        public IAreaRule CreateDefaultAreaRule()
+        {
+            IAreaRule ar = new AreaRuleType()
+            {
+                LegendLabel = string.Empty
+            };
+            ar.AreaSymbolization2D = CreateDefaultAreaSymbolizationFill();
+            return ar;
+        }
+
+        public IAreaSymbolizationFill CreateDefaultAreaSymbolizationFill()
+        {
+            IAreaSymbolizationFill fill = new AreaSymbolizationFillType();
+            fill.Fill = CreateDefaultFill();
+            fill.Stroke = CreateDefaultStroke();
+
+            return fill;
+        }
+
+        public ILineRule CreateDefaultLineRule()
+        {
+            ILineRule lr = new LineRuleType()
+            {
+                LegendLabel = "",
+                Items = new System.ComponentModel.BindingList<StrokeType>()
+            };
+            lr.AddStroke(CreateDefaultStroke());
+            return lr;
+        }
+
+        public IAdvancedPlacement CreateDefaultAdvancedPlacement(double scaleLimit)
+        {
+            return new TextSymbolTypeAdvancedPlacement() { ScaleLimit = scaleLimit };
+        }
+
+        public ITextSymbol CreateDefaultTextSymbol()
+        {
+            return new TextSymbolType()
+            {
+                AdvancedPlacement = null,
+                BackgroundColor = Utility.SerializeHTMLColor(Color.White, true),
+                BackgroundStyle = BackgroundStyleType.Transparent,
+                Bold = "false", //NOXLATE
+                FontName = "Arial", //NOXLATE
+                ForegroundColor = Utility.SerializeHTMLColor(Color.Black, true),
+                HorizontalAlignment = "'Center'", //NOXLATE
+                Italic = "false", //NOXLATE
+                Rotation = "0", //NOXLATE
+                SizeContext = SizeContextType.DeviceUnits,
+                SizeX = "10", //NOXLATE
+                SizeY = "10", //NOXLATE
+                Text = string.Empty,
+                Underlined = "false", //NOXLATE
+                Unit = LengthUnitType.Points,
+                VerticalAlignment = "'Baseline'" //NOXLATE
+            };
+        }
+
+        public IW2DSymbol CreateDefaultW2DSymbol(string symbolLibrary, string symbolName)
+        {
+            return new W2DSymbolType()
+            {
+                W2DSymbol = new W2DSymbolTypeW2DSymbol()
+                {
+                    ResourceId = symbolLibrary,
+                    LibraryItemName = symbolName
+                },
+            };
+        }
+
+        public virtual ICompositeRule CreateDefaultCompositeRule()
+        {
+#if LDF_100
+            throw new NotImplementedException();
+#else
+            return new CompositeRule()
+            {
+                LegendLabel = string.Empty,
+                CompositeSymbolization = new CompositeSymbolization()
+                {
+                    SymbolInstance = new System.ComponentModel.BindingList<SymbolInstance>()
+                }
+            };
+#endif
+        }
+
+        public virtual ICompositeTypeStyle CreateDefaultCompositeStyle()
+        {
+#if LDF_100
+            throw new NotImplementedException();
+#else
+            var cts = new CompositeTypeStyle()
+            {
+                CompositeRule = new System.ComponentModel.BindingList<CompositeRule>(),
+#if LDF_110 || LDF_120
+#else
+                ShowInLegend = true,
+#endif
+            };
+            cts.AddCompositeRule(CreateDefaultCompositeRule());
+            return cts;
+#endif
+        }
+
+        public virtual IUrlData CreateUrlData()
+        {
+#if LDF_240
+            return new URLDataType();
+#else
+            throw new NotImplementedException();
+#endif
+        }
+
+        public virtual ICompositeSymbolization CloneCompositeSymbolization(ICompositeSymbolization sym)
+        {
+#if LDF_100
+            throw new NotImplementedException();
+#else
+            var csym = (CompositeSymbolization)sym;
+            //Use quick and dirty XML in'n'out cloning to ensure no existing child references are
+            //carried over
+            var clone = CompositeSymbolization.Deserialize(csym.Serialize());
+            /*
+            foreach (var oldInst in csym.SymbolInstance)
+            {
+                System.Diagnostics.Debug.WriteLine("old symbol instance: {0}", oldInst.GetHashCode());
+            }
+            foreach (var newInst in clone.SymbolInstance)
+            {
+                System.Diagnostics.Debug.WriteLine("new symbol instance: {0}", newInst.GetHashCode());
+            }*/
+            return clone;
+#endif
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/VectorLayerDefinitionImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/VectorLayerDefinitionImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LayerDefinition/v1_0_0/VectorLayerDefinitionImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,2467 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Xml;
+
+#pragma warning disable 1591, 0114, 0108
+
+#if LDF_110
+
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_1_0
+#elif LDF_120
+
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_2_0
+#elif LDF_130
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_3_0
+#elif LDF_230
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v2_3_0
+#elif LDF_240
+
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v2_4_0
+#else
+
+namespace OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_0_0
+#endif
+{
+    using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+    using OSGeo.MapGuide.ObjectModels.SymbolDefinition;
+    using System.Xml.Serialization;
+
+    abstract partial class BaseLayerDefinitionType : ISubLayerDefinition
+#if LDF_230 || LDF_240
+, ISubLayerDefinition2
+#endif
+    {
+        [XmlIgnore]
+        public abstract LayerType LayerType { get; }
+
+#if LDF_230 || LDF_240
+
+        [XmlIgnore]
+        IEnumerable<IWatermark> IWatermarkCollection.Watermarks
+        {
+            get
+            {
+                foreach (var wm in this.Watermarks)
+                    yield return wm;
+            }
+        }
+
+        IWatermark IWatermarkCollection.AddWatermark(IWatermarkDefinition watermark)
+        {
+            return WatermarkCollectionUtil.AddWatermark(this.Watermarks, watermark);
+        }
+
+        void IWatermarkCollection.RemoveWatermark(IWatermark watermark)
+        {
+            WatermarkCollectionUtil.RemoveWatermark(this.Watermarks, watermark);
+        }
+
+        [XmlIgnore]
+        int IWatermarkCollection.WatermarkCount
+        {
+            get { return this.Watermarks.Count; }
+        }
+
+#endif
+    }
+
+    partial class NameStringPairType : INameStringPair
+    {
+        [XmlIgnore]
+        string INameStringPair.Name
+        {
+            get
+            {
+                return this.Name;
+            }
+            set
+            {
+                this.Name = value;
+            }
+        }
+
+        [XmlIgnore]
+        string INameStringPair.Value
+        {
+            get
+            {
+                return this.Value;
+            }
+            set
+            {
+                this.Value = value;
+            }
+        }
+    }
+
+    partial class VectorScaleRangeType : IVectorScaleRange
+#if !LDF_100
+, IVectorScaleRange2
+#endif
+    {
+        #region Missing generated stuff
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        private bool minScaleFieldSpecified;
+
+        [System.Xml.Serialization.XmlIgnoreAttribute()]
+        public bool MinScaleSpecified
+        {
+            get
+            {
+                return this.minScaleFieldSpecified;
+            }
+            set
+            {
+                if ((minScaleFieldSpecified.Equals(value) != true))
+                {
+                    this.minScaleFieldSpecified = value;
+                    this.OnPropertyChanged("MinScaleSpecified"); //NOXLATE
+                }
+            }
+        }
+
+        #endregion Missing generated stuff
+
+        [XmlIgnore]
+        public IAreaVectorStyle AreaStyle
+        {
+            get
+            {
+                foreach (var item in this.itemsField)
+                {
+                    if (typeof(IAreaVectorStyle).IsAssignableFrom(item.GetType()))
+                        return (IAreaVectorStyle)item;
+                }
+
+                return null;
+            }
+            set
+            {
+                //Remove old one if it exists
+                var item = this.AreaStyle;
+                if (item != null)
+                {
+                    this.itemsField.Remove(item);
+                }
+                //Put the new one in if it is not null
+                if (value != null)
+                {
+                    this.itemsField.Add(value);
+                }
+            }
+        }
+
+        [XmlIgnore]
+        public ILineVectorStyle LineStyle
+        {
+            get
+            {
+                foreach (var item in this.itemsField)
+                {
+                    if (typeof(ILineVectorStyle).IsAssignableFrom(item.GetType()))
+                        return (ILineVectorStyle)item;
+                }
+
+                return null;
+            }
+            set
+            {
+                //Remove old one if it exists
+                var item = this.LineStyle;
+                if (item != null)
+                {
+                    this.itemsField.Remove(item);
+                }
+                //Put the new one in if it is not null
+                if (value != null)
+                {
+                    this.itemsField.Add(value);
+                }
+            }
+        }
+
+        [XmlIgnore]
+        public IPointVectorStyle PointStyle
+        {
+            get
+            {
+                foreach (var item in this.itemsField)
+                {
+                    if (typeof(IPointVectorStyle).IsAssignableFrom(item.GetType()))
+                        return (IPointVectorStyle)item;
+                }
+
+                return null;
+            }
+            set
+            {
+                //Remove old one if it exists
+                var item = this.PointStyle;
+                if (item != null)
+                {
+                    this.itemsField.Remove(item);
+                }
+                //Put the new one in if it is not null
+                if (value != null)
+                {
+                    this.itemsField.Add(value);
+                }
+            }
+        }
+
+        [XmlIgnore]
+        double? IVectorScaleRange.MinScale
+        {
+            get
+            {
+                return this.MinScaleSpecified ? new Nullable<double>(this.MinScale) : null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.MinScaleSpecified = true;
+                    this.MinScale = value.Value;
+                }
+                else
+                {
+                    this.MinScaleSpecified = false;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        double? IVectorScaleRange.MaxScale
+        {
+            get
+            {
+                return this.MaxScaleSpecified ? new Nullable<double>(this.MaxScale) : null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.MaxScaleSpecified = true;
+                    this.MaxScale = value.Value;
+                }
+                else
+                {
+                    this.MaxScaleSpecified = false;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        public IList<IVectorStyle> AllStyles
+        {
+            get { return (IList<IVectorStyle>)this.Items; }
+        }
+
+        IVectorScaleRange IVectorScaleRange.Clone()
+        {
+            return VectorScaleRangeType.Deserialize(this.Serialize());
+        }
+
+#if LDF_110 || LDF_120
+
+        [XmlIgnore]
+        public IEnumerable<ICompositeTypeStyle> CompositeStyle
+        {
+            get
+            {
+                foreach (var item in this.itemsField)
+                {
+                    if (typeof(ICompositeTypeStyle).IsAssignableFrom(item.GetType()))
+                        yield return (ICompositeTypeStyle)item;
+                }
+            }
+            set
+            {
+                //Clear old ones
+                var remove = new List<object>();
+                foreach (var item in this.itemsField)
+                {
+                    if (typeof(ICompositeTypeStyle).IsAssignableFrom(item.GetType()))
+                        remove.Add(item);
+                }
+
+                foreach (var obj in remove)
+                {
+                    this.itemsField.Remove(obj);
+                }
+
+                //Put the new ones in if it is not null
+                if (value != null)
+                {
+                    foreach (var item in value)
+                    {
+                        if (!typeof(ICompositeTypeStyle).IsAssignableFrom(item.GetType()))
+                            throw new InvalidOperationException(Strings.ErrorObjectNotICompositeTypeStyle);
+
+                        this.itemsField.Add(item);
+                    }
+                }
+            }
+        }
+
+#elif LDF_130 || LDF_230 || LDF_240
+
+        [XmlIgnore]
+        public IEnumerable<ICompositeTypeStyle> CompositeStyle
+        {
+            get
+            {
+                foreach (var item in this.itemsField)
+                {
+                    if (typeof(ICompositeTypeStyle2).IsAssignableFrom(item.GetType()))
+                        yield return (ICompositeTypeStyle2)item;
+                }
+            }
+            set
+            {
+                //Clear old ones
+                var remove = new List<object>();
+                foreach (var item in this.itemsField)
+                {
+                    if (typeof(ICompositeTypeStyle2).IsAssignableFrom(item.GetType()))
+                        remove.Add(item);
+                }
+
+                foreach (var obj in remove)
+                {
+                    this.itemsField.Remove(obj);
+                }
+
+                //Put the new ones in if it is not null
+                if (value != null)
+                {
+                    foreach (var item in value)
+                    {
+                        if (!typeof(ICompositeTypeStyle2).IsAssignableFrom(item.GetType()))
+                            throw new InvalidOperationException(Strings.ErrorObjectNotICompositeTypeStyle);
+
+                        this.itemsField.Add(item);
+                    }
+                }
+            }
+        }
+
+#endif
+
+#if LDF_100
+#else
+
+        IElevationSettings IVectorScaleRange2.ElevationSettings
+        {
+            get { return this.ElevationSettings; }
+            set { this.ElevationSettings = (ElevationSettingsType)value; }
+        }
+
+        IElevationSettings IVectorScaleRange2.Create(string zOffset, string zExtrusion, ElevationTypeType zOffsetType, LengthUnitType unit)
+        {
+            return new ElevationSettingsType()
+            {
+                ZOffset = zOffset,
+                ZOffsetType = zOffsetType,
+                ZExtrusion = zExtrusion,
+                Unit = unit
+            };
+        }
+
+        [XmlIgnore]
+        int IVectorScaleRange2.CompositeStyleCount
+        {
+            get
+            {
+                int count = 0;
+                foreach (var item in this.itemsField)
+                {
+                    if (typeof(ICompositeTypeStyle).IsAssignableFrom(item.GetType()))
+                        count++;
+                }
+                return count;
+            }
+        }
+
+#endif
+    }
+
+#if LDF_100
+#else
+
+    partial class ElevationSettingsType : IElevationSettings { }
+
+#endif
+
+#if LDF_100
+
+    partial class StrokeType : IStroke
+#else
+
+    partial class StrokeType : IStroke, IStroke2
+#endif
+    {
+        internal StrokeType()
+        {
+        }
+
+        IStroke ICloneableLayerElement<IStroke>.Clone()
+        {
+            return StrokeType.Deserialize(this.Serialize());
+        }
+
+#if LDF_100
+#else
+
+        IStroke2 ICloneableLayerElement<IStroke2>.Clone()
+        {
+            return StrokeType.Deserialize(this.Serialize());
+        }
+
+#endif
+    }
+
+    partial class FillType : IFill
+    {
+        internal FillType()
+        {
+        }
+
+        IFill ICloneableLayerElement<IFill>.Clone()
+        {
+            return FillType.Deserialize(this.Serialize());
+        }
+    }
+
+    partial class AreaTypeStyleType : IAreaVectorStyle
+#if LDF_130 || LDF_230 || LDF_240
+, IAreaVectorStyle2
+#endif
+    {
+        [XmlIgnore]
+        IEnumerable<IAreaRule> IAreaVectorStyle.Rules
+        {
+            get
+            {
+                foreach (var ar in this.AreaRule)
+                {
+                    yield return ar;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        int IVectorStyle.RuleCount
+        {
+            get
+            {
+                if (this.AreaRule != null)
+                    return this.AreaRule.Count;
+                return 0;
+            }
+        }
+
+        void IAreaVectorStyle.RemoveAllRules()
+        {
+            this.AreaRule.Clear();
+        }
+
+        void IAreaVectorStyle.AddRule(IAreaRule rule)
+        {
+            var ar = rule as AreaRuleType;
+            if (ar != null)
+                this.AreaRule.Add(ar);
+        }
+
+        void IAreaVectorStyle.RemoveRule(IAreaRule rule)
+        {
+            var ar = rule as AreaRuleType;
+            if (ar != null)
+                this.AreaRule.Remove(ar);
+        }
+
+        [XmlIgnore]
+        StyleType IVectorStyle.StyleType
+        {
+            get { return StyleType.Area; }
+        }
+
+        #region IRuleCollection<IAreaRule> Members
+
+        public int IndexOfRule(IAreaRule rule)
+        {
+            var r = rule as AreaRuleType;
+            if (r != null)
+                return this.AreaRule.IndexOf(r);
+            return -1;
+        }
+
+        public IAreaRule GetRuleAt(int index)
+        {
+            return this.AreaRule[index];
+        }
+
+        public bool MoveUp(IAreaRule rule)
+        {
+            var r = rule as AreaRuleType;
+            if (r != null)
+            {
+                return CollectionUtil.MoveUp(this.AreaRule, r);
+            }
+            return false;
+        }
+
+        public bool MoveDown(IAreaRule rule)
+        {
+            var r = rule as AreaRuleType;
+            if (r != null)
+            {
+                return CollectionUtil.MoveDown(this.AreaRule, r);
+            }
+            return false;
+        }
+
+        #endregion IRuleCollection<IAreaRule> Members
+
+        #region IRuleCollection Members
+
+        IVectorRule IRuleCollection.GetRuleAt(int index)
+        {
+            return this.AreaRule[index];
+        }
+
+        public int IndexOfRule(IVectorRule rule)
+        {
+            var r = rule as AreaRuleType;
+            if (r != null)
+                return this.AreaRule.IndexOf(r);
+            return -1;
+        }
+
+        public bool MoveUp(IVectorRule rule)
+        {
+            var r = rule as AreaRuleType;
+            if (r != null)
+            {
+                return CollectionUtil.MoveUp(this.AreaRule, r);
+            }
+            return false;
+        }
+
+        public bool MoveDown(IVectorRule rule)
+        {
+            var r = rule as AreaRuleType;
+            if (r != null)
+            {
+                return CollectionUtil.MoveDown(this.AreaRule, r);
+            }
+            return false;
+        }
+
+        #endregion IRuleCollection Members
+    }
+
+    internal static class CollectionUtil
+    {
+        public static bool MoveUp<T>(IList<T> list, T obj)
+        {
+            var idx = list.IndexOf(obj);
+            if (idx == 0) //Already at top
+                return false;
+
+            var newIdx = idx - 1;
+            //Get object at index
+            var obj2 = list[newIdx];
+            //Swap them
+            list[idx] = obj2;
+            list[newIdx] = obj;
+
+            return true;
+        }
+
+        public static bool MoveDown<T>(IList<T> list, T obj)
+        {
+            var idx = list.IndexOf(obj);
+            if (idx == list.Count - 1) //Already at bottom
+                return false;
+
+            var newIdx = idx + 1;
+            //Get object at index
+            var obj2 = list[newIdx];
+            //Swap them
+            list[idx] = obj2;
+            list[newIdx] = obj;
+
+            return true;
+        }
+    }
+
+    partial class AreaRuleType : IAreaRule
+    {
+        [XmlIgnore]
+        IAreaSymbolizationFill IAreaRule.AreaSymbolization2D
+        {
+            get
+            {
+                return this.Item;
+            }
+            set
+            {
+                this.Item = (AreaSymbolizationFillType)value;
+            }
+        }
+
+        [XmlIgnore]
+        ITextSymbol IBasicVectorRule.Label
+        {
+            get
+            {
+                return this.Label;
+            }
+            set
+            {
+                this.Label = (TextSymbolType)value;
+            }
+        }
+    }
+
+    partial class PointTypeStyleType : IPointVectorStyle
+#if LDF_130 || LDF_230 || LDF_240
+, IPointVectorStyle2
+#endif
+    {
+        [XmlIgnore]
+        public IEnumerable<IPointRule> Rules
+        {
+            get
+            {
+                foreach (var pr in this.PointRule)
+                {
+                    yield return pr;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        int IVectorStyle.RuleCount
+        {
+            get
+            {
+                if (this.PointRule != null)
+                    return this.PointRule.Count;
+                return 0;
+            }
+        }
+
+        public void RemoveAllRules()
+        {
+            this.PointRule.Clear();
+        }
+
+        public void AddRule(IPointRule rule)
+        {
+            var pr = rule as PointRuleType;
+            if (pr != null)
+                this.PointRule.Add(pr);
+        }
+
+        public void RemoveRule(IPointRule rule)
+        {
+            var pr = rule as PointRuleType;
+            if (pr != null)
+                this.PointRule.Remove(pr);
+        }
+
+        [XmlIgnore]
+        public StyleType StyleType
+        {
+            get { return StyleType.Point; }
+        }
+
+        #region IRuleCollection<IPointRule> Members
+
+        public int IndexOfRule(IPointRule rule)
+        {
+            var pr = rule as PointRuleType;
+            if (pr != null)
+                return this.PointRule.IndexOf(pr);
+            return -1;
+        }
+
+        public IPointRule GetRuleAt(int index)
+        {
+            return this.PointRule[index];
+        }
+
+        public bool MoveUp(IPointRule rule)
+        {
+            var pr = rule as PointRuleType;
+            if (pr != null)
+                return CollectionUtil.MoveUp(this.PointRule, pr);
+            return false;
+        }
+
+        public bool MoveDown(IPointRule rule)
+        {
+            var pr = rule as PointRuleType;
+            if (pr != null)
+                return CollectionUtil.MoveDown(this.PointRule, pr);
+            return false;
+        }
+
+        #endregion IRuleCollection<IPointRule> Members
+
+        #region IRuleCollection Members
+
+        IVectorRule IRuleCollection.GetRuleAt(int index)
+        {
+            return this.PointRule[index];
+        }
+
+        public int IndexOfRule(IVectorRule rule)
+        {
+            var pr = rule as PointRuleType;
+            if (pr != null)
+                return this.PointRule.IndexOf(pr);
+            return -1;
+        }
+
+        public bool MoveUp(IVectorRule rule)
+        {
+            var pr = rule as PointRuleType;
+            if (pr != null)
+                return CollectionUtil.MoveUp(this.PointRule, pr);
+            return false;
+        }
+
+        public bool MoveDown(IVectorRule rule)
+        {
+            var pr = rule as PointRuleType;
+            if (pr != null)
+                return CollectionUtil.MoveDown(this.PointRule, pr);
+            return false;
+        }
+
+        #endregion IRuleCollection Members
+    }
+
+    partial class PointRuleType : IPointRule
+    {
+        [XmlIgnore]
+        ITextSymbol IBasicVectorRule.Label
+        {
+            get
+            {
+                return this.Label;
+            }
+            set
+            {
+                this.Label = (TextSymbolType)value;
+            }
+        }
+
+        [XmlIgnore]
+        IPointSymbolization2D IPointRule.PointSymbolization2D
+        {
+            get { return this.Item; }
+            set { this.Item = (PointSymbolization2DType)value; }
+        }
+    }
+
+    partial class PointSymbolization2DType : IPointSymbolization2D
+    {
+        [XmlIgnore]
+        ISymbol IPointSymbolization2D.Symbol
+        {
+            get { return (ISymbol)this.Item; }
+            set { this.Item = (SymbolType)value; }
+        }
+
+        IPointSymbolization2D ICloneableLayerElement<IPointSymbolization2D>.Clone()
+        {
+            return PointSymbolization2DType.Deserialize(this.Serialize());
+        }
+    }
+
+    partial class LineTypeStyleType : ILineVectorStyle
+#if LDF_130 || LDF_230 || LDF_240
+, ILineVectorStyle2
+#endif
+    {
+        [XmlIgnore]
+        public IEnumerable<ILineRule> Rules
+        {
+            get
+            {
+                foreach (var lr in this.LineRule)
+                {
+                    yield return lr;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        int IVectorStyle.RuleCount
+        {
+            get
+            {
+                if (this.LineRule != null)
+                    return this.LineRule.Count;
+                return 0;
+            }
+        }
+
+        public ILineRule GetRuleAt(int index)
+        {
+            return this.LineRule[index];
+        }
+
+        public void RemoveAllRules()
+        {
+            this.LineRule.Clear();
+        }
+
+        public void AddRule(ILineRule rule)
+        {
+            var lr = rule as LineRuleType;
+            if (lr != null)
+                this.LineRule.Add(lr);
+        }
+
+        public void RemoveRule(ILineRule rule)
+        {
+            var lr = rule as LineRuleType;
+            if (lr != null)
+                this.LineRule.Remove(lr);
+        }
+
+        [XmlIgnore]
+        public StyleType StyleType
+        {
+            get { return StyleType.Line; }
+        }
+
+        #region IRuleCollection<ILineRule> Members
+
+        public int IndexOfRule(ILineRule rule)
+        {
+            var lr = rule as LineRuleType;
+            if (lr != null)
+                return this.LineRule.IndexOf(lr);
+            return -1;
+        }
+
+        public bool MoveUp(ILineRule rule)
+        {
+            var lr = rule as LineRuleType;
+            if (lr != null)
+                return CollectionUtil.MoveUp(this.LineRule, lr);
+            return false;
+        }
+
+        public bool MoveDown(ILineRule rule)
+        {
+            var lr = rule as LineRuleType;
+            if (lr != null)
+                return CollectionUtil.MoveDown(this.LineRule, lr);
+            return false;
+        }
+
+        #endregion IRuleCollection<ILineRule> Members
+
+        #region IRuleCollection Members
+
+        IVectorRule IRuleCollection.GetRuleAt(int index)
+        {
+            return this.LineRule[index];
+        }
+
+        public int IndexOfRule(IVectorRule rule)
+        {
+            var lr = rule as LineRuleType;
+            if (lr != null)
+                return this.LineRule.IndexOf(lr);
+            return -1;
+        }
+
+        public bool MoveUp(IVectorRule rule)
+        {
+            var lr = rule as LineRuleType;
+            if (lr != null)
+                return CollectionUtil.MoveUp(this.LineRule, lr);
+            return false;
+        }
+
+        public bool MoveDown(IVectorRule rule)
+        {
+            var lr = rule as LineRuleType;
+            if (lr != null)
+                return CollectionUtil.MoveDown(this.LineRule, lr);
+            return false;
+        }
+
+        #endregion IRuleCollection Members
+    }
+
+    partial class LineRuleType : ILineRule
+    {
+        [XmlIgnore]
+        IEnumerable<IStroke> ILineRule.Strokes
+        {
+            get
+            {
+                foreach (var str in this.Items)
+                {
+                    yield return str;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        int ILineRule.StrokeCount
+        {
+            get { return this.Items.Count; }
+        }
+
+        void ILineRule.SetStrokes(IEnumerable<IStroke> strokes)
+        {
+            Check.NotNull(strokes, "strokes"); //NOXLATE
+            this.Items.Clear();
+            foreach (var stroke in strokes)
+            {
+                var st = stroke as StrokeType;
+                if (st != null)
+                    this.Items.Add(st);
+            }
+        }
+
+        void ILineRule.AddStroke(IStroke stroke)
+        {
+            var st = stroke as StrokeType;
+            if (st != null)
+                this.Items.Add(st);
+        }
+
+        void ILineRule.RemoveStroke(IStroke stroke)
+        {
+            var st = stroke as StrokeType;
+            if (st != null)
+                this.Items.Remove(st);
+        }
+
+        [XmlIgnore]
+        ITextSymbol IBasicVectorRule.Label
+        {
+            get
+            {
+                return this.Label;
+            }
+            set
+            {
+                this.Label = (TextSymbolType)value;
+            }
+        }
+    }
+
+    partial class TextSymbolType : ITextSymbol
+    {
+        [XmlIgnore]
+        IAdvancedPlacement ITextSymbol.AdvancedPlacement
+        {
+            get
+            {
+                return this.AdvancedPlacement;
+            }
+            set
+            {
+                this.AdvancedPlacement = (TextSymbolTypeAdvancedPlacement)value;
+            }
+        }
+
+        [XmlIgnore]
+        string ITextSymbol.Text
+        {
+            get
+            {
+                return this.Text;
+            }
+            set
+            {
+                this.Text = value;
+            }
+        }
+
+        [XmlIgnore]
+        string ITextSymbol.FontName
+        {
+            get
+            {
+                return this.FontName;
+            }
+            set
+            {
+                this.FontName = value;
+            }
+        }
+
+        [XmlIgnore]
+        string ITextSymbol.ForegroundColor
+        {
+            get
+            {
+                return this.ForegroundColor;
+            }
+            set
+            {
+                this.ForegroundColor = value;
+            }
+        }
+
+        [XmlIgnore]
+        string ITextSymbol.BackgroundColor
+        {
+            get
+            {
+                return this.BackgroundColor;
+            }
+            set
+            {
+                this.BackgroundColor = value;
+            }
+        }
+
+        [XmlIgnore]
+        BackgroundStyleType ITextSymbol.BackgroundStyle
+        {
+            get
+            {
+                return this.BackgroundStyle;
+            }
+            set
+            {
+                this.BackgroundStyle = value;
+            }
+        }
+
+        [XmlIgnore]
+        string ITextSymbol.HorizontalAlignment
+        {
+            get
+            {
+                return this.HorizontalAlignment;
+            }
+            set
+            {
+                this.HorizontalAlignment = value;
+            }
+        }
+
+        [XmlIgnore]
+        string ITextSymbol.VerticalAlignment
+        {
+            get
+            {
+                return this.VerticalAlignment;
+            }
+            set
+            {
+                this.VerticalAlignment = value;
+            }
+        }
+
+        [XmlIgnore]
+        string ITextSymbol.Bold
+        {
+            get
+            {
+                return this.Bold;
+            }
+            set
+            {
+                this.Bold = value;
+            }
+        }
+
+        [XmlIgnore]
+        string ITextSymbol.Italic
+        {
+            get
+            {
+                return this.Italic;
+            }
+            set
+            {
+                this.Italic = value;
+            }
+        }
+
+        [XmlIgnore]
+        string ITextSymbol.Underlined
+        {
+            get
+            {
+                return this.Underlined;
+            }
+            set
+            {
+                this.Underlined = value;
+            }
+        }
+
+        [XmlIgnore]
+        public override PointSymbolType Type
+        {
+            get { return PointSymbolType.Font; }
+        }
+
+        ITextSymbol ICloneableLayerElement<ITextSymbol>.Clone()
+        {
+            return TextSymbolType.Deserialize(this.Serialize());
+        }
+    }
+
+    partial class MarkSymbolType : IMarkSymbol
+    {
+        [XmlIgnore]
+        ShapeType IMarkSymbol.Shape
+        {
+            get
+            {
+                return this.Shape;
+            }
+            set
+            {
+                this.Shape = value;
+            }
+        }
+
+        [XmlIgnore]
+        IFill IMarkSymbol.Fill
+        {
+            get
+            {
+                return (IFill)this.Fill;
+            }
+            set
+            {
+                this.Fill = (FillType)value;
+            }
+        }
+
+        [XmlIgnore]
+        IStroke IMarkSymbol.Edge
+        {
+            get
+            {
+                return (IStroke)this.Edge;
+            }
+            set
+            {
+                this.Edge = (StrokeType)value;
+            }
+        }
+
+        [XmlIgnore]
+        public override PointSymbolType Type
+        {
+            get { return PointSymbolType.Mark; }
+        }
+
+        IMarkSymbol ICloneableLayerElement<IMarkSymbol>.Clone()
+        {
+            return MarkSymbolType.Deserialize(this.Serialize());
+        }
+    }
+
+    internal class ImageBinaryContainer : IInlineImageSymbol
+    {
+        [XmlIgnore]
+        public byte[] Content
+        {
+            get;
+            set;
+        }
+
+        [XmlIgnore]
+        public ImageSymbolReferenceType Type
+        {
+            get { return ImageSymbolReferenceType.Inline; }
+        }
+
+        IInlineImageSymbol ICloneableLayerElement<IInlineImageSymbol>.Clone()
+        {
+            byte[] array = null;
+            if (this.Content != null)
+            {
+                array = new byte[this.Content.Length];
+                Array.Copy(this.Content, array, this.Content.Length);
+            }
+            return new ImageBinaryContainer()
+            {
+                Content = array
+            };
+        }
+    }
+
+    partial class ImageSymbolType : IImageSymbol
+    {
+        [XmlIgnore]
+        IBaseImageSymbol IImageSymbol.Image
+        {
+            get
+            {
+                IBaseImageSymbol img = null;
+                if (this.Item == null)
+                    return null;
+
+                if (typeof(byte[]).IsAssignableFrom(this.Item.GetType()))
+                    img = new ImageBinaryContainer() { Content = (byte[])this.Item };
+                else
+                    img = (ISymbolReference)this.Item;
+                return img;
+            }
+            set
+            {
+                if (typeof(IInlineImageSymbol).IsAssignableFrom(value.GetType()))
+                    this.Item = ((IInlineImageSymbol)value).Content;
+                else
+                    this.Item = (ImageSymbolTypeImage)value;
+            }
+        }
+
+        [XmlIgnore]
+        public override PointSymbolType Type
+        {
+            get { return PointSymbolType.Image; }
+        }
+
+        IImageSymbol ICloneableLayerElement<IImageSymbol>.Clone()
+        {
+            return ImageSymbolType.Deserialize(this.Serialize());
+        }
+    }
+
+    abstract partial class SymbolType : ISymbol
+    {
+        [XmlIgnore]
+        LengthUnitType ISymbol.Unit
+        {
+            get
+            {
+                return this.Unit;
+            }
+            set
+            {
+                this.Unit = value;
+            }
+        }
+
+        [XmlIgnore]
+        SizeContextType ISymbol.SizeContext
+        {
+            get
+            {
+                return this.SizeContext;
+            }
+            set
+            {
+                this.SizeContext = value;
+            }
+        }
+
+        [XmlIgnore]
+        bool ISymbol.MaintainAspect
+        {
+            get
+            {
+                return this.MaintainAspect;
+            }
+            set
+            {
+                this.MaintainAspect = true;
+            }
+        }
+
+        [XmlIgnore]
+        public abstract PointSymbolType Type { get; }
+
+        [XmlIgnore]
+        string ISymbol.InsertionPointY
+        {
+            get
+            {
+                return this.InsertionPointY.ToString();
+            }
+            set
+            {
+                this.InsertionPointY = Convert.ToDouble(value);
+            }
+        }
+    }
+
+    partial class FontSymbolType : IFontSymbol
+    {
+        [XmlIgnore]
+        string IFontSymbol.FontName
+        {
+            get
+            {
+                return this.FontName;
+            }
+            set
+            {
+                this.FontName = value;
+            }
+        }
+
+        [XmlIgnore]
+        string IFontSymbol.Character
+        {
+            get
+            {
+                return this.Character;
+            }
+            set
+            {
+                this.Character = value;
+            }
+        }
+
+        [XmlIgnore]
+        bool? IFontSymbol.Bold
+        {
+            get
+            {
+                return this.BoldSpecified ? new Nullable<bool>(this.Bold) : null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.Bold = value.Value;
+                    this.BoldSpecified = true;
+                }
+                else
+                {
+                    this.BoldSpecified = false;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        bool? IFontSymbol.Italic
+        {
+            get
+            {
+                return this.ItalicSpecified ? new Nullable<bool>(this.Italic) : null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.Italic = value.Value;
+                    this.ItalicSpecified = true;
+                }
+                else
+                {
+                    this.ItalicSpecified = false;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        bool? IFontSymbol.Underlined
+        {
+            get
+            {
+                return this.UnderlinedSpecified ? new Nullable<bool>(this.Underlined) : null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.Underlined = value.Value;
+                    this.UnderlinedSpecified = true;
+                }
+                else
+                {
+                    this.UnderlinedSpecified = false;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        string IFontSymbol.ForegroundColor
+        {
+            get
+            {
+                return this.ForegroundColor;
+            }
+            set
+            {
+                this.ForegroundColor = value;
+            }
+        }
+
+        [XmlIgnore]
+        public override PointSymbolType Type
+        {
+            get { return PointSymbolType.Font; }
+        }
+
+        IFontSymbol ICloneableLayerElement<IFontSymbol>.Clone()
+        {
+            return FontSymbolType.Deserialize(this.Serialize());
+        }
+    }
+
+    partial class BlockSymbolType : IBlockSymbol
+    {
+        [XmlIgnore]
+        string IBlockSymbol.DrawingName
+        {
+            get
+            {
+                return this.DrawingName;
+            }
+            set
+            {
+                this.DrawingName = value;
+            }
+        }
+
+        [XmlIgnore]
+        string IBlockSymbol.BlockName
+        {
+            get
+            {
+                return this.BlockName;
+            }
+            set
+            {
+                this.BlockName = value;
+            }
+        }
+
+        [XmlIgnore]
+        string IBlockSymbol.BlockColor
+        {
+            get
+            {
+                return this.BlockColor;
+            }
+            set
+            {
+                this.BlockColor = value;
+            }
+        }
+
+        [XmlIgnore]
+        string IBlockSymbol.LayerColor
+        {
+            get
+            {
+                return this.LayerColor;
+            }
+            set
+            {
+                this.LayerColor = value;
+            }
+        }
+
+        [XmlIgnore]
+        public override PointSymbolType Type
+        {
+            get { return PointSymbolType.Block; }
+        }
+
+        IBlockSymbol ICloneableLayerElement<IBlockSymbol>.Clone()
+        {
+            return BlockSymbolType.Deserialize(this.Serialize());
+        }
+    }
+
+    partial class W2DSymbolType : IW2DSymbol
+    {
+        [XmlIgnore]
+        ISymbolReference IW2DSymbol.W2DSymbol
+        {
+            get
+            {
+                return (ISymbolReference)this.W2DSymbol;
+            }
+            set
+            {
+                this.W2DSymbol = (W2DSymbolTypeW2DSymbol)value;
+            }
+        }
+
+        [XmlIgnore]
+        string IW2DSymbol.FillColor
+        {
+            get
+            {
+                return this.FillColor;
+            }
+            set
+            {
+                this.FillColor = value;
+            }
+        }
+
+        [XmlIgnore]
+        string IW2DSymbol.LineColor
+        {
+            get
+            {
+                return this.LineColor;
+            }
+            set
+            {
+                this.LineColor = value;
+            }
+        }
+
+        [XmlIgnore]
+        string IW2DSymbol.TextColor
+        {
+            get
+            {
+                return this.TextColor;
+            }
+            set
+            {
+                this.TextColor = value;
+            }
+        }
+
+        [XmlIgnore]
+        public override PointSymbolType Type
+        {
+            get { return PointSymbolType.W2D; }
+        }
+
+        IW2DSymbol ICloneableLayerElement<IW2DSymbol>.Clone()
+        {
+            return W2DSymbolType.Deserialize(this.Serialize());
+        }
+    }
+
+    partial class W2DSymbolTypeW2DSymbol : ISymbolReference
+    {
+        [XmlIgnore]
+        ImageSymbolReferenceType IBaseImageSymbol.Type
+        {
+            get { return ImageSymbolReferenceType.SymbolReference; }
+        }
+
+        ISymbolReference ICloneableLayerElement<ISymbolReference>.Clone()
+        {
+            return W2DSymbolTypeW2DSymbol.Deserialize(this.Serialize());
+        }
+    }
+
+    partial class ImageSymbolTypeImage : ISymbolReference
+    {
+        [XmlIgnore]
+        string ISymbolReference.ResourceId
+        {
+            get
+            {
+                return this.ResourceId == null ? string.Empty : this.ResourceId.ToString();
+            }
+            set
+            {
+                this.ResourceId = value;
+            }
+        }
+
+        [XmlIgnore]
+        string ISymbolReference.LibraryItemName
+        {
+            get
+            {
+                return this.LibraryItemName == null ? string.Empty : this.LibraryItemName.ToString();
+            }
+            set
+            {
+                this.LibraryItemName = value;
+            }
+        }
+
+        [XmlIgnore]
+        ImageSymbolReferenceType IBaseImageSymbol.Type
+        {
+            get { return ImageSymbolReferenceType.SymbolReference; }
+        }
+
+        ISymbolReference ICloneableLayerElement<ISymbolReference>.Clone()
+        {
+            return ImageSymbolTypeImage.Deserialize(this.Serialize());
+        }
+    }
+
+    partial class TextSymbolTypeAdvancedPlacement : IAdvancedPlacement
+    {
+    }
+
+    partial class AreaSymbolizationFillType : IAreaSymbolizationFill
+    {
+        [XmlIgnore]
+        IFill IAreaSymbolizationFill.Fill
+        {
+            get
+            {
+                return this.Fill;
+            }
+            set
+            {
+                this.Fill = (FillType)value;
+            }
+        }
+
+        [XmlIgnore]
+        IStroke IAreaSymbolizationFill.Stroke
+        {
+            get
+            {
+                return this.Stroke;
+            }
+            set
+            {
+                this.Stroke = (StrokeType)value;
+            }
+        }
+
+        IAreaSymbolizationFill ICloneableLayerElement<IAreaSymbolizationFill>.Clone()
+        {
+            return AreaSymbolizationFillType.Deserialize(this.Serialize());
+        }
+    }
+
+    partial class LayerDefinition : ILayerDefinition
+    {
+        //internal LayerDefinition() { }
+
+#if LDF_110
+        private static readonly Version RES_VERSION = new Version(1, 1, 0);
+#elif LDF_120
+        private static readonly Version RES_VERSION = new Version(1, 2, 0);
+#elif LDF_130
+        private static readonly Version RES_VERSION = new Version(1, 3, 0);
+#elif LDF_230
+        private static readonly Version RES_VERSION = new Version(2, 3, 0);
+#elif LDF_240
+        private static readonly Version RES_VERSION = new Version(2, 4, 0);
+#else
+        private static readonly Version RES_VERSION = new Version(1, 0, 0);
+#endif
+
+        private string _resId;
+
+        [XmlIgnore]
+        public string ResourceID
+        {
+            get
+            {
+                return _resId;
+            }
+            set
+            {
+                if (!ResourceIdentifier.Validate(value))
+                    throw new InvalidOperationException(Strings.ErrorInvalidResourceIdentifier);
+
+                var res = new ResourceIdentifier(value);
+                if (res.Extension != ResourceTypes.LayerDefinition.ToString())
+                    throw new InvalidOperationException(string.Format(Strings.ErrorUnexpectedResourceType, res.ToString(), ResourceTypes.LayerDefinition));
+
+                _resId = value;
+                this.OnPropertyChanged("ResourceID"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public string ResourceType
+        {
+            get
+            {
+                return ResourceTypes.LayerDefinition.ToString();
+            }
+        }
+
+        [XmlIgnore]
+        public virtual Version ResourceVersion
+        {
+            get
+            {
+                return RES_VERSION;
+            }
+        }
+
+        object ICloneable.Clone()
+        {
+            return this.Clone();
+        }
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] //NOXLATE
+        public string ValidatingSchema
+        {
+#if LDF_110
+            get { return "LayerDefinition-1.1.0.xsd"; } //NOXLATE
+#elif LDF_120
+            get { return "LayerDefinition-1.2.0.xsd"; } //NOXLATE
+#elif LDF_130
+            get { return "LayerDefinition-1.3.0.xsd"; } //NOXLATE
+#elif LDF_230
+            get { return "LayerDefinition-2.3.0.xsd"; } //NOXLATE
+#elif LDF_240
+            get { return "LayerDefinition-2.4.0.xsd"; } //NOXLATE
+#else
+            get { return ResourceTypes.LayerDefinition.ToString() + "-" + this.ResourceVersion.ToString() + ".xsd"; } //NOXLATE
+#endif
+            set { }
+        }
+
+        [XmlIgnore]
+        public bool IsStronglyTyped
+        {
+            get { return true; }
+        }
+
+        [XmlIgnore]
+        public ISubLayerDefinition SubLayer
+        {
+            get { return this.Item; }
+        }
+
+        public INameStringPair CreatePair(string name, string value)
+        {
+            return new NameStringPairType() { Name = name, Value = value };
+        }
+    }
+
+    partial class DrawingLayerDefinitionType : IDrawingLayerDefinition
+    {
+        [XmlIgnore]
+        public override LayerType LayerType
+        {
+            get { return LayerType.Drawing; }
+        }
+
+        [XmlIgnore]
+        string ISubLayerDefinition.ResourceId
+        {
+            get { return this.ResourceId; }
+            set { this.ResourceId = value; }
+        }
+    }
+
+    partial class VectorLayerDefinitionType : IVectorLayerDefinition
+#if LDF_240
+, IVectorLayerDefinition2
+#endif
+    {
+        [XmlIgnore]
+        public override LayerType LayerType
+        {
+            get { return LayerType.Vector; }
+        }
+
+        [XmlIgnore]
+        string ISubLayerDefinition.ResourceId
+        {
+            get { return this.ResourceId; }
+            set { this.ResourceId = value; }
+        }
+
+        [XmlIgnore]
+        string IVectorLayerDefinition.FeatureName
+        {
+            get { return this.FeatureName; }
+            set { this.FeatureName = value; }
+        }
+
+        [XmlIgnore]
+        string IVectorLayerDefinition.Geometry
+        {
+            get { return this.Geometry; }
+            set { this.Geometry = value; }
+        }
+
+        [XmlIgnore]
+        string IVectorLayerDefinition.Url
+        {
+#if LDF_240
+            get
+            {
+                if (this.urlDataField == null)
+                    return string.Empty;
+                else
+                    return this.urlDataField.Content;
+            }
+            set
+            {
+                if (!string.IsNullOrEmpty(value))
+                {
+                    if (this.urlDataField == null)
+                        this.urlDataField = new URLDataType();
+                    this.urlDataField.Content = value;
+                    OnPropertyChanged("Url"); //NOXLATE
+                }
+                else
+                {
+                    //NOTE: None of the other URLData properties seem to be used atm
+                    //hence why we are nulling this
+                    this.urlDataField = null;
+                    OnPropertyChanged("Url"); //NOXLATE
+                }
+            }
+#else
+            get { return this.Url; }
+            set { this.Url = value; }
+#endif
+        }
+
+        [XmlIgnore]
+        string IVectorLayerDefinition.ToolTip
+        {
+            get { return this.ToolTip; }
+            set { this.ToolTip = value; }
+        }
+
+        [XmlIgnore]
+        string IVectorLayerDefinition.Filter
+        {
+            get { return this.Filter; }
+            set { this.Filter = value; }
+        }
+
+        [XmlIgnore]
+        IEnumerable<IVectorScaleRange> IVectorLayerDefinition.VectorScaleRange
+        {
+            get
+            {
+                foreach (var vsr in this.VectorScaleRange)
+                {
+                    yield return vsr;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<INameStringPair> IVectorLayerDefinition.PropertyMapping
+        {
+            get
+            {
+                foreach (var pair in this.PropertyMapping)
+                {
+                    yield return pair;
+                }
+            }
+        }
+
+        INameStringPair IVectorLayerDefinition.GetPropertyMapping(string name)
+        {
+            foreach (var p in this.PropertyMapping)
+            {
+                if (p.Name == name)
+                    return p;
+            }
+            return null;
+        }
+
+        INameStringPair IVectorLayerDefinition.GetPropertyMappingAt(int index)
+        {
+            if (index < 0 || index >= this.PropertyMapping.Count)
+                throw new ArgumentOutOfRangeException();
+
+            var item = this.PropertyMapping[index];
+            return item;
+        }
+
+        void IVectorLayerDefinition.AddVectorScaleRange(IVectorScaleRange range)
+        {
+            var r = range as VectorScaleRangeType;
+            if (r != null)
+                this.VectorScaleRange.Add(r);
+        }
+
+        void IVectorLayerDefinition.RemoveVectorScaleRange(IVectorScaleRange range)
+        {
+            var r = range as VectorScaleRangeType;
+            if (r != null)
+                this.VectorScaleRange.Remove(r);
+        }
+
+        void IVectorLayerDefinition.AddPropertyMapping(INameStringPair pair)
+        {
+            var p = pair as NameStringPairType;
+            if (p != null)
+                this.PropertyMapping.Add(p);
+        }
+
+        void IVectorLayerDefinition.RemovePropertyMapping(INameStringPair pair)
+        {
+            var p = pair as NameStringPairType;
+            if (p != null)
+                this.PropertyMapping.Remove(p);
+        }
+
+        int IVectorLayerDefinition.GetPosition(INameStringPair pair)
+        {
+            var p = pair as NameStringPairType;
+            if (p != null)
+                return this.PropertyMapping.IndexOf(p);
+
+            return -1;
+        }
+
+        int IVectorLayerDefinition.MoveUp(INameStringPair pair)
+        {
+            int pos = ((IVectorLayerDefinition)this).GetPosition(pair);
+            if (pos > 0)
+            {
+                int dest = pos - 1;
+                var p = this.PropertyMapping[dest];
+                var p2 = (NameStringPairType)pair;
+
+                //Swap
+                this.PropertyMapping[dest] = p2;
+                this.PropertyMapping[pos] = p;
+
+                return dest;
+            }
+            return -1;
+        }
+
+        int IVectorLayerDefinition.MoveDown(INameStringPair pair)
+        {
+            int pos = ((IVectorLayerDefinition)this).GetPosition(pair);
+            if (pos < this.PropertyMapping.Count - 1)
+            {
+                int dest = pos + 1;
+                var p = this.PropertyMapping[dest];
+                var p2 = (NameStringPairType)pair;
+
+                //Swap
+                this.PropertyMapping[dest] = p2;
+                this.PropertyMapping[pos] = p;
+
+                return dest;
+            }
+            return -1;
+        }
+
+        void IVectorLayerDefinition.RemoveAllScaleRanges()
+        {
+            this.VectorScaleRange.Clear();
+        }
+
+        int IVectorLayerDefinition.IndexOfScaleRange(IVectorScaleRange range)
+        {
+            var r = range as VectorScaleRangeType;
+            if (r != null)
+                return this.VectorScaleRange.IndexOf(r);
+
+            return -1;
+        }
+
+        IVectorScaleRange IVectorLayerDefinition.GetScaleRangeAt(int index)
+        {
+            if (index >= this.VectorScaleRange.Count)
+                return null;
+
+            return this.VectorScaleRange[index];
+        }
+
+        [XmlIgnore]
+        Version IVectorLayerDefinition.SymbolDefinitionVersion
+        {
+            get
+            {
+#if LDF_110
+                return new Version(1, 0, 0);
+#elif LDF_120 || LDF_130 || LDF_230
+                return new Version(1, 1, 0);
+#elif LDF_240
+                return new Version(2, 4, 0);
+#else
+                return null;
+#endif
+            }
+        }
+
+#if LDF_240
+
+        [XmlIgnore]
+        IUrlData IVectorLayerDefinition2.UrlData
+        {
+            get
+            {
+                return this.UrlData;
+            }
+            set
+            {
+                this.UrlData = (URLDataType)value;
+            }
+        }
+
+#endif
+
+        void IVectorLayerDefinition.ClearPropertyMappings()
+        {
+            propertyMappingField.Clear();
+        }
+    }
+
+    #region Composite Symbolization
+
+#if !LDF_100
+
+    partial class CompositeRule : ICompositeRule
+    {
+        [XmlIgnore]
+        ICompositeSymbolization ICompositeRule.CompositeSymbolization
+        {
+            get
+            {
+                return this.CompositeSymbolization;
+            }
+            set
+            {
+                this.CompositeSymbolization = (CompositeSymbolization)value;
+            }
+        }
+    }
+
+    partial class CompositeSymbolization : ICompositeSymbolization
+    {
+        [XmlIgnore]
+        IEnumerable<ISymbolInstance> ICompositeSymbolization.SymbolInstance
+        {
+            get
+            {
+                foreach (var sym in this.SymbolInstance)
+                {
+                    yield return sym;
+                }
+            }
+        }
+
+        public string ToXml()
+        {
+            return this.Serialize();
+        }
+
+        public void UpdateFromXml(string xml)
+        {
+            var compsym = CompositeSymbolization.Deserialize(xml);
+            this.SymbolInstance.Clear();
+            foreach (var sym in compsym.SymbolInstance)
+            {
+                this.AddSymbolInstance(sym);
+            }
+        }
+
+        public void AddSymbolInstance(ISymbolInstance inst)
+        {
+            var sym = inst as SymbolInstance;
+            if (sym != null)
+                this.SymbolInstance.Add(sym);
+        }
+
+        public void RemoveSymbolInstance(ISymbolInstance inst)
+        {
+            var sym = inst as SymbolInstance;
+            if (sym != null)
+                this.SymbolInstance.Remove(sym);
+        }
+
+        public void RemoveAllSymbolInstances()
+        {
+            this.SymbolInstance.Clear();
+        }
+
+        public ISymbolInstance CreateSymbolReference(string resourceId)
+        {
+            return new SymbolInstance()
+            {
+                Item = resourceId,
+                ParameterOverrides = new ParameterOverrides()
+                {
+                    Override = new BindingList<Override>()
+                },
+            };
+        }
+
+        public ISymbolInstance CreateInlineSimpleSymbol(ISimpleSymbolDefinition symDef)
+        {
+            return new SymbolInstance()
+            {
+#if LDF_110
+                Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_0_0.SimpleSymbolDefinition)symDef,
+#elif LDF_120 || LDF_130 || LDF_230
+                Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_1_0.SimpleSymbolDefinition)symDef,
+#else
+                Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v2_4_0.SimpleSymbolDefinition)symDef,
+#endif
+                ParameterOverrides = new ParameterOverrides()
+                {
+                    Override = new BindingList<Override>()
+                }
+            };
+        }
+
+        public ISymbolInstance CreateInlineCompoundSymbol(ICompoundSymbolDefinition compDef)
+        {
+            return new SymbolInstance()
+            {
+#if LDF_110
+                Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_0_0.CompoundSymbolDefinition)compDef,
+#elif LDF_120 || LDF_130 || LDF_230
+                Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_1_0.CompoundSymbolDefinition)compDef,
+#else
+                Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v2_4_0.CompoundSymbolDefinition)compDef,
+#endif
+                ParameterOverrides = new ParameterOverrides()
+                {
+                    Override = new BindingList<Override>()
+                }
+            };
+        }
+    }
+
+    partial class SymbolInstance : ISymbolInstance
+#if LDF_100 || LDF_110
+#else
+, ISymbolInstance2
+#endif
+    {
+        [XmlIgnore]
+        IParameterOverrideCollection ISymbolInstance.ParameterOverrides
+        {
+            get { return this.ParameterOverrides; }
+        }
+
+        [XmlIgnore]
+        public ISymbolInstanceReference Reference
+        {
+            get
+            {
+                var libId = this.Item as string;
+#if LDF_110
+                var simpSym = this.Item as OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_0_0.SimpleSymbolDefinition;
+                var compSym = this.Item as OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_0_0.CompoundSymbolDefinition;
+#elif LDF_120 || LDF_130 || LDF_230
+                var simpSym = this.Item as OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_1_0.SimpleSymbolDefinition;
+                var compSym = this.Item as OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_1_0.CompoundSymbolDefinition;
+#else
+                var simpSym = this.Item as OSGeo.MapGuide.ObjectModels.SymbolDefinition.v2_4_0.SimpleSymbolDefinition;
+                var compSym = this.Item as OSGeo.MapGuide.ObjectModels.SymbolDefinition.v2_4_0.CompoundSymbolDefinition;
+#endif
+                if (libId != null)
+                    return new SymbolInstanceLibrary() { ResourceId = libId };
+                else if (simpSym != null)
+                    return new SymbolInstanceInline() { SymbolDefinition = simpSym };
+                else if (compSym != null)
+                    return new SymbolInstanceInline() { SymbolDefinition = compSym };
+                return null;
+            }
+            set
+            {
+                var sr = value as ISymbolInstanceReferenceLibrary;
+                var ir = value as ISymbolInstanceReferenceInline;
+                if (sr != null)
+                {
+                    this.Item = sr.ResourceId;
+                }
+                else if (ir != null)
+                {
+#if LDF_110
+                    if (ir.SymbolDefinition.Type == SymbolDefinitionType.Simple)
+                        this.Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_0_0.SimpleSymbolDefinition)ir.SymbolDefinition;
+                    else if (ir.SymbolDefinition.Type == SymbolDefinitionType.Compound)
+                        this.Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_0_0.CompoundSymbolDefinition)ir.SymbolDefinition;
+#elif LDF_120 || LDF_130 || LDF_230
+                    if (ir.SymbolDefinition.Type == SymbolDefinitionType.Simple)
+                        this.Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_1_0.SimpleSymbolDefinition)ir.SymbolDefinition;
+                    else if (ir.SymbolDefinition.Type == SymbolDefinitionType.Compound)
+                        this.Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_1_0.CompoundSymbolDefinition)ir.SymbolDefinition;
+#else
+                    if (ir.SymbolDefinition.Type == SymbolDefinitionType.Simple)
+                        this.Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v2_4_0.SimpleSymbolDefinition)ir.SymbolDefinition;
+                    else if (ir.SymbolDefinition.Type == SymbolDefinitionType.Compound)
+                        this.Item = (OSGeo.MapGuide.ObjectModels.SymbolDefinition.v2_4_0.CompoundSymbolDefinition)ir.SymbolDefinition;
+#endif
+                }
+                this.Item = null;
+            }
+        }
+    }
+
+    partial class SymbolInstanceLibrary : ISymbolInstanceReferenceLibrary
+    {
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        private string _resId;
+
+        [XmlIgnore]
+        public string ResourceId
+        {
+            get { return _resId; }
+            set
+            {
+                if (_resId == value) return;
+                _resId = value;
+                OnPropertyChanged("ResourceId"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public SymbolInstanceType Type
+        {
+            get { return SymbolInstanceType.Reference; }
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        private void OnPropertyChanged(string name)
+        {
+            var handler = this.PropertyChanged;
+            if (handler != null)
+                handler(this, new PropertyChangedEventArgs(name));
+        }
+    }
+
+    partial class SymbolInstanceInline : ISymbolInstanceReferenceInline
+    {
+        [XmlIgnore]
+        public ISymbolDefinitionBase SymbolDefinition
+        {
+            get;
+            set;
+        }
+
+        [XmlIgnore]
+        public SymbolInstanceType Type
+        {
+            get { return SymbolInstanceType.Inline; }
+        }
+    }
+
+    partial class ParameterOverrides : IParameterOverrideCollection
+    {
+        [XmlIgnore]
+        IEnumerable<IParameterOverride> IParameterOverrideCollection.Override
+        {
+            get
+            {
+                foreach (var ov in this.Override)
+                {
+                    yield return ov;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        public int Count
+        {
+            get { return this.Override.Count; }
+        }
+
+        [XmlIgnore]
+        public IParameterOverride this[int index]
+        {
+            get
+            {
+                if (index >= this.Override.Count)
+                    throw new ArgumentOutOfRangeException();
+
+                return this.Override[index];
+            }
+        }
+
+        public void AddOverride(IParameterOverride ov)
+        {
+            var o = ov as Override;
+            if (o != null)
+                this.Override.Add(o);
+        }
+
+        public void RemoveOverride(IParameterOverride ov)
+        {
+            var o = ov as Override;
+            if (o != null)
+                this.Override.Remove(o);
+        }
+
+        public IParameterOverride CreateParameterOverride(string symbol, string name)
+        {
+            return new Override()
+            {
+                ParameterIdentifier = name,
+                SymbolName = symbol
+            };
+        }
+    }
+
+    partial class Override : IParameterOverride
+    {
+    }
+
+    partial class CompositeTypeStyle : ICompositeTypeStyle
+#if LDF_130 || LDF_230 || LDF_240
+, ICompositeTypeStyle2
+#endif
+    {
+        [XmlIgnore]
+        string ICompositeTypeStyle.DisplayString
+        {
+            get
+            {
+                return Strings.CompositeStyleDisplayString;
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<ICompositeRule> ICompositeTypeStyle.CompositeRule
+        {
+            get
+            {
+                foreach (var cr in this.CompositeRule)
+                {
+                    yield return cr;
+                }
+            }
+        }
+
+        public void AddCompositeRule(ICompositeRule compRule)
+        {
+            var cr = compRule as CompositeRule;
+            if (cr != null)
+                this.CompositeRule.Add(cr);
+        }
+
+        public void RemoveCompositeRule(ICompositeRule compRule)
+        {
+            var cr = compRule as CompositeRule;
+            if (cr != null)
+                this.CompositeRule.Remove(cr);
+        }
+
+        [XmlIgnore]
+        public StyleType StyleType
+        {
+            get { return StyleType.Composite; }
+        }
+
+        [XmlIgnore]
+        public int RuleCount
+        {
+            get { return this.CompositeRule.Count; }
+        }
+
+    #region IRuleCollection<ICompositeRule> Members
+
+        public int IndexOfRule(ICompositeRule rule)
+        {
+            var cr = rule as CompositeRule;
+            if (cr != null)
+                return this.CompositeRule.IndexOf(cr);
+            return -1;
+        }
+
+        public ICompositeRule GetRuleAt(int index)
+        {
+            return this.CompositeRule[index];
+        }
+
+        public bool MoveUp(ICompositeRule rule)
+        {
+            var cr = rule as CompositeRule;
+            if (cr != null)
+                return CollectionUtil.MoveUp(this.CompositeRule, cr);
+            return false;
+        }
+
+        public bool MoveDown(ICompositeRule rule)
+        {
+            var cr = rule as CompositeRule;
+            if (cr != null)
+                return CollectionUtil.MoveDown(this.CompositeRule, cr);
+            return false;
+        }
+
+    #endregion IRuleCollection<ICompositeRule> Members
+
+    #region IRuleCollection Members
+
+        public int IndexOfRule(IVectorRule rule)
+        {
+            var cr = rule as CompositeRule;
+            if (cr != null)
+                return this.CompositeRule.IndexOf(cr);
+            return -1;
+        }
+
+        IVectorRule IRuleCollection.GetRuleAt(int index)
+        {
+            return this.CompositeRule[index];
+        }
+
+        public bool MoveUp(IVectorRule rule)
+        {
+            var cr = rule as CompositeRule;
+            if (cr != null)
+                return CollectionUtil.MoveUp(this.CompositeRule, cr);
+            return false;
+        }
+
+        public bool MoveDown(IVectorRule rule)
+        {
+            var cr = rule as CompositeRule;
+            if (cr != null)
+                return CollectionUtil.MoveDown(this.CompositeRule, cr);
+            return false;
+        }
+
+    #endregion IRuleCollection Members
+    }
+
+#endif
+
+    #endregion Composite Symbolization
+
+#if LDF_240
+
+    partial class URLDataType : IUrlData
+    {
+    }
+
+#endif
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/LoadProcedureInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/LoadProcedureInterfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/LoadProcedureInterfaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,342 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.LoadProcedure
+{
+    /// <summary>
+    /// Defines how to handle duplicate SDF2 keys (not supported by Maestro)
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum SdfKeyTreatmentType
+    {
+        /// <remarks/>
+        AutogenerateAll,
+
+        /// <remarks/>
+        DiscardDuplicates,
+
+        /// <remarks/>
+        MergeDuplicates,
+    }
+
+    /// <summary>
+    /// The types of load procedures
+    /// </summary>
+    public enum LoadType
+    {
+        /// <summary>
+        /// A Load Procedure for SDF 3.0 files
+        /// </summary>
+        Sdf,
+
+        /// <summary>
+        /// A Load Procedure for SHP files
+        /// </summary>
+        Shp,
+
+        /// <summary>
+        /// A Load Procedure for DWF files
+        /// </summary>
+        Dwf,
+
+        /// <summary>
+        /// A Load Procedure for Raster files (not supported by Maestro)
+        /// </summary>
+        Raster,
+
+        /// <summary>
+        /// A Load Procedure for DWG files (not supported by Maestro)
+        /// </summary>
+        Dwg,
+
+        /// <summary>
+        /// A Load Procedure for SQLite files
+        /// </summary>
+        Sqlite
+    }
+
+    /// <summary>
+    /// Represents Load Procedures
+    /// </summary>
+    public interface ILoadProcedure : IResource
+    {
+        /// <summary>
+        /// Gets the type of the sub.
+        /// </summary>
+        /// <value>The type of the sub.</value>
+        IBaseLoadProcedure SubType { get; }
+    }
+
+    /// <summary>
+    /// A DWG load procedure. Execution not supported by Maestro
+    /// </summary>
+    public interface IDwgLoadProcedure : IBaseLoadProcedure
+    {
+    }
+
+    /// <summary>
+    /// A raster load procedure. Execution not supported by Maestro
+    /// </summary>
+    public interface IRasterLoadProcedure : IBaseLoadProcedure
+    {
+    }
+
+    /// <summary>
+    /// Base type of all load procedures. All Load Procedures at the minimum require
+    /// the following information:
+    ///
+    /// <list type="number">
+    ///     <item>
+    ///         <description>A list of source files.</description>
+    ///     </item>
+    ///     <item>
+    ///         <description>The root path to load into</description>
+    ///     </item>
+    ///     <item>
+    ///         <description>The folder where spatial data sources will be created [optional, but useless if not specified]</description>
+    ///     </item>
+    ///     <item>
+    ///         <description>The folder where layers will be created [optional. dependent on #3]</description>
+    ///     </item>
+    /// </list>
+    ///
+    /// Once initialized, load procedures can be executed via <see cref="M:OSGeo.MapGuide.MaestroAPI.MgServerConnectionBase.ExecuteLoadProcedure(OSGeo.MapGuide.ObjectModels.LoadProcedure.ILoadProcedure,OSGeo.MapGuide.MaestroAPI.LengthyOperationProgressCallBack,System.Boolean)"/> method
+    ///
+    /// Because Load Procedures are also resources, they can be saved into the library repository via the <see cref="M:OSGeo.MapGuide.MaestroAPI.Services.IResourceService.SaveResource(OSGeo.MapGuide.MaestroAPI.Resource.IResource)"/> method
+    /// and retrieved from the repository via the <see cref="M:OSGeo.MapGuide.MaestroAPI.Services.IResourceService.GetResource(System.String)"/> method
+    /// </summary>
+    public interface IBaseLoadProcedure : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets the type.
+        /// </summary>
+        /// <value>The type.</value>
+        LoadType Type { get; }
+
+        /// <summary>
+        /// Gets the source files.
+        /// </summary>
+        /// <value>The source files.</value>
+        BindingList<string> SourceFile { get; }
+
+        /// <summary>
+        /// Adds the file.
+        /// </summary>
+        /// <param name="file">The file.</param>
+        void AddFile(string file);
+
+        /// <summary>
+        /// Removes the file.
+        /// </summary>
+        /// <param name="file">The file.</param>
+        void RemoveFile(string file);
+
+        /// <summary>
+        /// Gets or sets the root path.
+        /// </summary>
+        /// <value>The root path.</value>
+        string RootPath { get; set; }
+
+        /// <summary>
+        /// Gets or sets the coordinate system to use if none found in the source file.
+        /// </summary>
+        /// <value>The coordinate system.</value>
+        string CoordinateSystem { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether to create a spatial data source for each source
+        /// file. The spatial data sources will be created under the <see cref="SpatialDataSourcesFolder"/>
+        /// under the <see cref="SpatialDataSourcesPath"/>
+        /// </summary>
+        /// <value>
+        /// 	<c>true</c> if [generate spatial data sources]; otherwise, <c>false</c>.
+        /// </value>
+        bool GenerateSpatialDataSources { get; set; }
+
+        /// <summary>
+        /// Gets or sets the spatial data sources path.
+        /// </summary>
+        /// <value>The spatial data sources path.</value>
+        string SpatialDataSourcesPath { get; set; }
+
+        /// <summary>
+        /// Gets or sets the spatial data sources folder.
+        /// </summary>
+        /// <value>The spatial data sources folder.</value>
+        string SpatialDataSourcesFolder { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether to create a layer for each spatial data source that
+        /// is created. This will be created in the <see cref="LayersFolder"/> under the <see cref="LayersPath"/>
+        /// </summary>
+        /// <value><c>true</c> if [generate layers]; otherwise, <c>false</c>.</value>
+        bool GenerateLayers { get; set; }
+
+        /// <summary>
+        /// Gets or sets the layers path.
+        /// </summary>
+        /// <value>The layers path.</value>
+        string LayersPath { get; set; }
+
+        /// <summary>
+        /// Gets or sets the layers folder.
+        /// </summary>
+        /// <value>The layers folder.</value>
+        string LayersFolder { get; set; }
+
+        /// <summary>
+        /// Gets or sets the generate maps. Not supported by Maestro
+        /// </summary>
+        /// <value>The generate maps.</value>
+        bool? GenerateMaps { get; set; }
+
+        /// <summary>
+        /// Gets or sets the maps path. Not supported by Maestro
+        /// </summary>
+        /// <value>The maps path.</value>
+        string MapsPath { get; set; }
+
+        /// <summary>
+        /// Gets or sets the maps folder. Not supported by Maestro
+        /// </summary>
+        /// <value>The maps folder.</value>
+        string MapsFolder { get; set; }
+
+        /// <summary>
+        /// Not supported by Maestro
+        /// </summary>
+        bool? GenerateSymbolLibraries { get; set; }
+
+        /// <summary>
+        /// Not supported by Maestro
+        /// </summary>
+        string SymbolLibrariesPath { get; set; }
+
+        /// <summary>
+        /// Not supported by Maestro
+        /// </summary>
+        string SymbolLibrariesFolder { get; set; }
+
+        /// <summary>
+        /// Gets or sets the resource id that were created as part of executing this load procedure
+        /// </summary>
+        /// <value>The resource id.</value>
+        BindingList<string> ResourceId { get; set; }
+    }
+
+    /// <summary>
+    /// Extension method class
+    /// </summary>
+    public static class BaseLoadProcedureExtensions
+    {
+        /// <summary>
+        /// Adds a group of files to this load procedure
+        /// </summary>
+        /// <param name="proc"></param>
+        /// <param name="files"></param>
+        public static void AddFiles(this IBaseLoadProcedure proc, IEnumerable<string> files)
+        {
+            Check.NotNull(proc, "proc"); //NOXLATE
+            Check.NotNull(files, "files"); //NOXLATE
+            foreach (var f in files)
+            {
+                proc.AddFile(f);
+            }
+        }
+    }
+
+    /// <summary>
+    /// A DWF load procedure. Execution is supported with limitations
+    /// </summary>
+    public interface IDwfLoadProcedure : IBaseLoadProcedure
+    {
+    }
+
+    /// <summary>
+    /// A SDF load procedure. Execution is supported with limitations
+    /// </summary>
+    /// <remarks>
+    /// The SDF Load Procedure has the following limitations when executed by Maestro
+    /// <list type="bullet">
+    /// <item><description>The input SDF files must be SDF3 files. Loading of SDF2 files is not supported</description></item>
+    /// </list>
+    /// </remarks>
+    public interface ISdfLoadProcedure : IBaseLoadProcedure
+    {
+        /// <summary>
+        /// Not supported by Maestro
+        /// </summary>
+        double Generalization { get; set; }
+
+        /// <summary>
+        /// Not supported by Maestro
+        /// </summary>
+        SdfKeyTreatmentType SdfKeyTreatment { get; set; }
+    }
+
+    /// <summary>
+    /// A SHP load procedure. Execution is supported with limitations
+    /// </summary>
+    /// <remarks>
+    /// The SHP Load Procedure has the following limitations when executed by Maestro
+    /// <list type="bullet">
+    /// <item><description>Generalization is not supported</description></item>
+    /// <item><description>Conversion to SDF is not supported</description></item>
+    /// </list>
+    /// </remarks>
+    public interface IShpLoadProcedure : IBaseLoadProcedure
+    {
+        /// <summary>
+        /// Not supported by Maestro
+        /// </summary>
+        double Generalization { get; set; }
+
+        /// <summary>
+        /// Not supported by Maestro
+        /// </summary>
+        bool ConvertToSdf { get; set; }
+    }
+
+    /// <summary>
+    /// A SQLite load procedure. Execution is supported with limitations
+    /// </summary>
+    /// <remarks>
+    /// <para>SQLite load procedures can only be saved to a server whose site version is 2.2 or higher</para>
+    /// <para>The SQLite Load Procedure has the following limitations when executed by Maestro</para>
+    /// <list type="bullet">
+    /// <item><description>Generalization is not supported</description></item>
+    /// </list>
+    /// </remarks>
+    public interface ISqliteLoadProcedure : IBaseLoadProcedure
+    {
+        /// <summary>
+        /// Not supported by Maestro
+        /// </summary>
+        double Generalization { get; set; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/v1_0_0/LoadProcedureFactoryImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/v1_0_0/LoadProcedureFactoryImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/v1_0_0/LoadProcedureFactoryImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,115 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+#pragma warning disable 1591, 0114, 0108
+
+#if LP110
+namespace OSGeo.MapGuide.ObjectModels.LoadProcedure.v1_1_0
+#elif LP220
+namespace OSGeo.MapGuide.ObjectModels.LoadProcedure.v2_2_0
+#else
+
+namespace OSGeo.MapGuide.ObjectModels.LoadProcedure.v1_0_0
+#endif
+{
+    /// <summary>
+    /// Helper class for registration with <see cref="OSGeo.MapGuide.ObjectModels.ObjectFactory"/> and <see cref="OSGeo.MapGuide.MaestroAPI.ResourceTypeRegistry"/> classes
+    /// </summary>
+    public static class LoadProcEntryPoint
+    {
+        private const string ARBITRARY_XYM = "LOCAL_CS[\"Non-Earth (Meter)\", LOCAL_DATUM[\"Local Datum\", 0], UNIT[\"Meter\", 1], AXIS[\"X\", EAST], AXIS[\"Y\", NORTH]]"; //NOXLATE
+
+        private static void ApplyDefaults(LoadProcedureType lt)
+        {
+            lt.RootPath = "Library://"; //NOXLATE
+            lt.CoordinateSystem = ARBITRARY_XYM;
+            lt.SpatialDataSourcesPath = string.Empty;
+            lt.SpatialDataSourcesFolder = "Data"; //NOXLATE
+            lt.LayersPath = string.Empty;
+            lt.LayersFolder = "Layers"; //NOXLATE
+            lt.GenerateMaps = false;
+            lt.GenerateLayers = true;
+            lt.GenerateSpatialDataSources = true;
+            lt.SourceFile = new System.ComponentModel.BindingList<string>();
+        }
+
+        public static ILoadProcedure CreateDefaultSdf()
+        {
+            var proc = new LoadProcedure()
+            {
+                Item = new SdfLoadProcedureType() { Generalization = 100.0 }
+            };
+            ApplyDefaults(proc.Item);
+            return proc;
+        }
+
+        public static ILoadProcedure CreateDefaultShp()
+        {
+            var proc = new LoadProcedure()
+            {
+                Item = new ShpLoadProcedureType() { Generalization = 100.0, ConvertToSdf = false }
+            };
+            ApplyDefaults(proc.Item);
+            return proc;
+        }
+
+        public static ILoadProcedure CreateDefaultDwf()
+        {
+            var proc = new LoadProcedure()
+            {
+                Item = new DwfLoadProcedureType()
+            };
+            ApplyDefaults(proc.Item);
+            return proc;
+        }
+
+        public static IResource Deserialize(string xml)
+        {
+            return LoadProcedure.Deserialize(xml);
+        }
+
+        public static Stream Serialize(IResource res)
+        {
+            return res.SerializeToStream();
+        }
+
+#if LP220
+
+        public static ILoadProcedure CreateDefaultSqlite()
+        {
+            var proc = new LoadProcedure()
+            {
+                Item = new SQLiteLoadProcedureType() { Generalization = 100.0 }
+            };
+            ApplyDefaults(proc.Item);
+            return proc;
+        }
+
+#endif
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/v1_0_0/LoadProcedureImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/v1_0_0/LoadProcedureImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/LoadProcedure/v1_0_0/LoadProcedureImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,259 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+#pragma warning disable 1591, 0114, 0108
+
+#if LP110
+namespace OSGeo.MapGuide.ObjectModels.LoadProcedure.v1_1_0
+#elif LP220
+namespace OSGeo.MapGuide.ObjectModels.LoadProcedure.v2_2_0
+#else
+
+namespace OSGeo.MapGuide.ObjectModels.LoadProcedure.v1_0_0
+#endif
+{
+    partial class LoadProcedure : ILoadProcedure
+    {
+#if LP110
+        private static readonly Version RES_VERSION = new Version(1, 1, 0);
+#elif LP220
+        private static readonly Version RES_VERSION = new Version(2, 2, 0);
+#else
+        private static readonly Version RES_VERSION = new Version(1, 0, 0);
+#endif
+
+        private string _resId;
+
+        [XmlIgnore]
+        public string ResourceID
+        {
+            get
+            {
+                return _resId;
+            }
+            set
+            {
+                if (!ResourceIdentifier.Validate(value))
+                    throw new InvalidOperationException(Strings.ErrorInvalidResourceIdentifier);
+
+                var res = new ResourceIdentifier(value);
+                if (res.Extension != ResourceTypes.LoadProcedure.ToString())
+                    throw new InvalidOperationException(string.Format(Strings.ErrorUnexpectedResourceType, res.ToString(), ResourceTypes.LoadProcedure));
+
+                _resId = value;
+                this.OnPropertyChanged("ResourceID"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public string ResourceType
+        {
+            get
+            {
+                return ResourceTypes.LoadProcedure.ToString();
+            }
+        }
+
+        [XmlIgnore]
+        public Version ResourceVersion
+        {
+            get
+            {
+                return RES_VERSION;
+            }
+        }
+
+        object ICloneable.Clone()
+        {
+            return this.Clone();
+        }
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] //NOXLATE
+        public string ValidatingSchema
+        {
+#if LP110
+            get { return "LoadProcedure-1.1.0.xsd"; } //NOXLATE
+#elif LP220
+            get { return "LoadProcedure-2.2.0.xsd"; } //NOXLATE
+#else
+            get { return "LoadProcedure-1.0.0.xsd"; } //NOXLATE
+#endif
+            set { }
+        }
+
+        [XmlIgnore]
+        public bool IsStronglyTyped
+        {
+            get { return true; }
+        }
+
+        [XmlIgnore]
+        IBaseLoadProcedure ILoadProcedure.SubType
+        {
+            get { return (IBaseLoadProcedure)this.Item; }
+        }
+    }
+
+    abstract partial class LoadProcedureType : IBaseLoadProcedure
+    {
+        public void AddFile(string file)
+        {
+            if (!this.sourceFileField.Contains(file))
+            {
+                this.sourceFileField.Add(file);
+            }
+        }
+
+        public void AddFiles(IEnumerable<string> files)
+        {
+            Check.NotNull(files, "files"); //NOXLATE
+
+            var _files = this.sourceFileField;
+            foreach (var f in files)
+            {
+                if (!_files.Contains(f))
+                    _files.Add(f);
+            }
+        }
+
+        public void RemoveFile(string file)
+        {
+            Check.NotEmpty(file, "file"); //NOXLATE
+
+            if (this.sourceFileField.Contains(file))
+            {
+                this.sourceFileField.Remove(file);
+            }
+        }
+
+        [XmlIgnore]
+        bool? IBaseLoadProcedure.GenerateMaps
+        {
+            get
+            {
+                return this.GenerateMapsSpecified ?
+                    new Nullable<bool>(this.GenerateMaps) :
+                    null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.GenerateMaps = value.Value;
+                    this.GenerateMapsSpecified = true;
+                }
+                else
+                {
+                    this.GenerateMapsSpecified = false;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        bool? IBaseLoadProcedure.GenerateSymbolLibraries
+        {
+            get
+            {
+                return this.GenerateSymbolLibrariesSpecified ?
+                    new Nullable<bool>(this.GenerateSymbolLibraries) :
+                    null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.GenerateSymbolLibraries = value.Value;
+                    this.GenerateSymbolLibrariesSpecified = true;
+                }
+                else
+                {
+                    this.GenerateSymbolLibrariesSpecified = false;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        public abstract LoadType Type { get; }
+    }
+
+    partial class SdfLoadProcedureType : ISdfLoadProcedure
+    {
+        [XmlIgnore]
+        public override LoadType Type
+        {
+            get { return LoadType.Sdf; }
+        }
+    }
+
+    partial class ShpLoadProcedureType : IShpLoadProcedure
+    {
+        [XmlIgnore]
+        public override LoadType Type
+        {
+            get { return LoadType.Shp; }
+        }
+    }
+
+    partial class DwfLoadProcedureType : IDwfLoadProcedure
+    {
+        [XmlIgnore]
+        public override LoadType Type
+        {
+            get { return LoadType.Dwf; }
+        }
+    }
+
+    partial class DwgLoadProcedureType : IDwgLoadProcedure
+    {
+        [XmlIgnore]
+        public override LoadType Type
+        {
+            get { return LoadType.Dwg; }
+        }
+    }
+
+    partial class RasterLoadProcedureType : IRasterLoadProcedure
+    {
+        [XmlIgnore]
+        public override LoadType Type
+        {
+            get { return LoadType.Raster; }
+        }
+    }
+
+#if LP220
+    partial class SQLiteLoadProcedureType : ISqliteLoadProcedure
+    {
+        [XmlIgnore]
+        public override LoadType Type
+        {
+            get { return LoadType.Sqlite; }
+        }
+    }
+#endif
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/MapDefinition/MapDefinitionInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/MapDefinition/MapDefinitionInterfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/MapDefinition/MapDefinitionInterfaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,1008 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.Common;
+using OSGeo.MapGuide.ObjectModels.WatermarkDefinition;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.MapDefinition
+{
+    public delegate void GetSpatialExtentsEventHandler(object sender, GetSpatialExtentsEventArgs e);
+
+    public class GetSpatialExtentsEventArgs
+    {
+        public GetSpatialExtentsEventArgs(string mapCoordSys)
+        {
+            this.MapCoordinateSystem = mapCoordSys;
+        }
+
+        /// <summary>
+        /// Gets the extents of the requested layer in the Map's coordinate system. Handlers of this event should
+        /// set this property
+        /// </summary>
+        public IEnvelope Extents { get; set; }
+
+        /// <summary>
+        /// Gets or sets the coordinate system of the requested layer
+        /// </summary>
+        public string LayerCoordinateSystem { get; set; }
+
+        /// <summary>
+        /// Gets whether a handler has set the requested information
+        /// </summary>
+        public bool IsSet
+        {
+            get
+            {
+                return this.Extents != null && !string.IsNullOrEmpty(this.LayerCoordinateSystem);
+            }
+        }
+
+        /// <summary>
+        /// Gets the Map Definition coordinate system
+        /// </summary>
+        public string MapCoordinateSystem { get; private set; }
+    }
+
+    /// <summary>
+    /// Represents the base interface of map definitions and their runtime forms
+    /// </summary>
+    public interface IMapDefinitionBase
+    {
+        /// <summary>
+        /// Gets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; }
+
+        /// <summary>
+        /// Gets the coordinate system. Layers whose coordinate system does
+        /// not match will be re-projecte to this coordinate system when rendering
+        /// </summary>
+        /// <value>The coordinate system.</value>
+        string CoordinateSystem { get; }
+
+        /// <summary>
+        /// Gets or sets the color of the background.
+        /// </summary>
+        /// <value>The color of the background.</value>
+        Color BackgroundColor { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a Map Definition
+    /// </summary>
+    public interface IMapDefinition : IResource, IMapDefinitionBase, INotifyPropertyChanged
+    {
+        /// <summary>
+        /// If true, the first layer added to this map definition will automatically set the extents
+        /// based on that layer's added extents. Default is false
+        /// </summary>
+        bool SetExtentsFromFirstAddedLayer { get; set; }
+
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the coordinate system. Layers whose coordinate system does
+        /// not match will be re-projected to this coordinate system when rendering
+        /// </summary>
+        /// <value>The coordinate system.</value>
+        string CoordinateSystem { get; set; }
+
+        /// <summary>
+        /// Gets or sets the extents.
+        /// </summary>
+        /// <value>The extents.</value>
+        IEnvelope Extents { get; set; }
+
+        /// <summary>
+        /// Sets the extents.
+        /// </summary>
+        /// <param name="minx">The minx.</param>
+        /// <param name="miny">The miny.</param>
+        /// <param name="maxx">The maxx.</param>
+        /// <param name="maxy">The maxy.</param>
+        void SetExtents(double minx, double miny, double maxx, double maxy);
+
+        /// <summary>
+        /// Gets or sets the metadata.
+        /// </summary>
+        /// <value>The metadata.</value>
+        string Metadata { get; set; }
+
+        /// <summary>
+        /// Returns the base map section of this map definition. Ensure <see cref="InitBaseMap"/>
+        /// is called first before accessing this property
+        /// </summary>
+        IBaseMapDefinition BaseMap { get; }
+
+        /// <summary>
+        /// Initializes the base map section of this map definition. Subsequent calls
+        /// do nothing, unless you have cleared the section via <see cref="RemoveBaseMap"/>
+        /// </summary>
+        void InitBaseMap();
+
+        /// <summary>
+        /// Clears the base map section of this map definition. If you want to rebuild
+        /// this section, ensure <see cref="InitBaseMap"/> is called
+        /// </summary>
+        void RemoveBaseMap();
+
+        /// <summary>
+        /// Gets the map layers.
+        /// </summary>
+        /// <value>The map layers.</value>
+        IEnumerable<IMapLayer> MapLayer { get; }
+
+        /// <summary>
+        /// Raised when a map layer is added
+        /// </summary>
+        event GetSpatialExtentsEventHandler RequestLayerExtents;
+
+        /// <summary>
+        /// Inserts a layer into this map at the specified index in the map's layer collection
+        /// </summary>
+        /// <param name="index"></param>
+        /// <param name="groupName"></param>
+        /// <param name="layerName"></param>
+        /// <param name="layerDefinitionId"></param>
+        /// <returns></returns>
+        IMapLayer InsertLayer(int index, string groupName, string layerName, string layerDefinitionId);
+
+        /// <summary>
+        /// Adds a layer to this map. If this is the first layer to be added, the coordinate system
+        /// of this map and its extents will be set to the coordinate system and extents of this layer
+        /// if this has not been set already.
+        /// </summary>
+        /// <remarks>
+        /// The layer is added to the beginning of the list. That is, if you called <see cref="M:OSGeo.MapGuide.ObjectModels.MapDefinition.IMapDefinition.GetIndex(OSGeo.MapGuide.ObjectModels.MapDefinition.IMapLayer)"/>
+        /// on your newly added layer, it will return 0. From a display perspective, your newly added layer will be at the top of the map's draw order when you create a runtime map from this map definition
+        /// </remarks>
+        /// <param name="groupName"></param>
+        /// <param name="layerName"></param>
+        /// <param name="resourceId"></param>
+        /// <returns></returns>
+        IMapLayer AddLayer(string groupName, string layerName, string resourceId);
+
+        /// <summary>
+        /// Adds a layer to this map. If this is the first layer to be added, the coordinate system
+        /// of this map and its extents will be set to the coordinate system and extents of this layer
+        /// if this has not been set already.
+        /// </summary>
+        /// <param name="layerToInsertAbove">The layer to insert above in the draw order</param>
+        /// <param name="groupName">The name of the group this layer belongs to. If null or empty, this layer will not belong to any group</param>
+        /// <param name="layerName">The name of this layer. This must be unique</param>
+        /// <param name="resourceId">The layer definition id</param>
+        /// <returns>The added layer</returns>
+        IMapLayer AddLayer(IMapLayer layerToInsertAbove, string groupName, string layerName, string resourceId);
+
+        /// <summary>
+        /// Removes the layer.
+        /// </summary>
+        /// <param name="layer">The layer.</param>
+        void RemoveLayer(IMapLayer layer);
+
+        /// <summary>
+        /// Gets the index of the specified layer
+        /// </summary>
+        /// <param name="layer">The layer.</param>
+        /// <returns></returns>
+        int GetIndex(IMapLayer layer);
+
+        /// <summary>
+        /// Moves the layer up the draw order
+        /// </summary>
+        /// <param name="layer">The layer.</param>
+        /// <returns>The new index of the moved layer. -1 is returned if the layer does not belong to the map</returns>
+        int MoveUp(IMapLayer layer);
+
+        /// <summary>
+        /// Moves the layer down the draw order.
+        /// </summary>
+        /// <param name="layer">The layer.</param>
+        /// <returns>The new index of the moved layer. -1 is returned if the layer does not belong to the map</returns>
+        int MoveDown(IMapLayer layer);
+
+        /// <summary>
+        /// Gets the map layer groups.
+        /// </summary>
+        /// <value>The map layer groups.</value>
+        IEnumerable<IMapLayerGroup> MapLayerGroup { get; }
+
+        /// <summary>
+        /// Adds the group. The group will be added to the end of the list
+        /// </summary>
+        /// <param name="groupName">Name of the group.</param>
+        /// <returns></returns>
+        IMapLayerGroup AddGroup(string groupName);
+
+        /// <summary>
+        /// Removes the group
+        /// </summary>
+        /// <param name="group"></param>
+        void RemoveGroup(IMapLayerGroup group);
+
+        /// <summary>
+        /// Gets the index of the specified group
+        /// </summary>
+        /// <param name="group"></param>
+        /// <returns></returns>
+        int GetIndex(IMapLayerGroup group);
+
+        /// <summary>
+        /// Moves the specified layer to the top of the draw order
+        /// </summary>
+        /// <param name="layer"></param>
+        void SetTopDrawOrder(IMapLayer layer);
+
+        /// <summary>
+        /// Moves the specified layer to the bottom of the draw order
+        /// </summary>
+        /// <param name="layer"></param>
+        void SetBottomDrawOrder(IMapLayer layer);
+
+        /// <summary>
+        /// Inserts the layer at the specified index
+        /// </summary>
+        /// <param name="idx"></param>
+        /// <param name="layer"></param>
+        void InsertLayer(int idx, IMapLayer layer);
+
+        /// <summary>
+        /// Moves a Map Group down the presentation order
+        /// </summary>
+        /// <param name="group"></param>
+        /// <returns>The new index of the moved group. -1 is returned if the group does not belong to the map</returns>
+        int MoveDownGroup(IMapLayerGroup group);
+
+        /// <summary>
+        /// Moves a Map Group up the presentation order
+        /// </summary>
+        /// <param name="group"></param>
+        /// <returns>The new index of the moved group. -1 is returned if the group does not belong to the map</returns>
+        int MoveUpGroup(IMapLayerGroup group);
+
+        /// <summary>
+        /// Removes all dynamic groups from this Map Definition
+        /// </summary>
+        void RemoveAllGroups();
+
+        /// <summary>
+        /// Removes all dynamic layers from this Map Definition
+        /// </summary>
+        void RemoveAllLayers();
+    }
+
+    /// <summary>
+    /// Represents a Map Definition with support for watermarks. Corresponds to schema version 2.3.0
+    /// </summary>
+    public interface IMapDefinition2 : IMapDefinition, IWatermarkCollection
+    {
+    }
+
+    /// <summary>
+    /// Extension methdo class
+    /// </summary>
+    public static class BaseMapDefinitionExtensions
+    {
+        /// <summary>
+        /// Gets the minimum finite display scale
+        /// </summary>
+        /// <param name="map"></param>
+        /// <returns></returns>
+        public static double GetMinScale(this IBaseMapDefinition map)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            if (map.ScaleCount == 0)
+                return 0.0;
+
+            var scales = new List<double>(map.FiniteDisplayScale);
+            scales.Sort();
+            return scales[0];
+        }
+
+        /// <summary>
+        /// Gets the maximum finite display scale
+        /// </summary>
+        /// <param name="map"></param>
+        /// <returns></returns>
+        public static double GetMaxScale(this IBaseMapDefinition map)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            if (map.ScaleCount == 0)
+                return 0.0;
+
+            var scales = new List<double>(map.FiniteDisplayScale);
+            scales.Sort();
+            return scales[scales.Count - 1];
+        }
+
+        /// <summary>
+        /// Gets the parent group for the specified layer
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="layer"></param>
+        /// <returns></returns>
+        public static IBaseMapGroup GetGroupForLayer(this IBaseMapDefinition map, IBaseMapLayer layer)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            foreach (var group in map.BaseMapLayerGroup)
+            {
+                foreach (var tl in group.BaseMapLayer)
+                {
+                    if (tl == layer)
+                        return group;
+                }
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Gets whether this base map group has tiled layers
+        /// </summary>
+        /// <param name="grp"></param>
+        /// <returns></returns>
+        public static bool HasLayers(this IBaseMapGroup grp)
+        {
+            Check.NotNull(grp, "grp"); //NOXLATE
+            return new List<IBaseMapLayer>(grp.BaseMapLayer).Count > 0;
+        }
+
+        /// <summary>
+        /// Gets whether this base map has tiled layers
+        /// </summary>
+        /// <param name="map"></param>
+        /// <returns></returns>
+        public static bool HasLayers(this IBaseMapDefinition map)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            if (!map.HasGroups())
+                return false;
+
+            foreach (var group in map.BaseMapLayerGroup)
+            {
+                if (group.HasLayers())
+                    return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// Gets whether this base map has groups
+        /// </summary>
+        /// <param name="map"></param>
+        /// <returns></returns>
+        public static bool HasGroups(this IBaseMapDefinition map)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            return new List<IBaseMapGroup>(map.BaseMapLayerGroup).Count > 0;
+        }
+
+        /// <summary>
+        /// Gets the first base map group
+        /// </summary>
+        /// <param name="map"></param>
+        /// <returns></returns>
+        public static IBaseMapGroup GetFirstGroup(this IBaseMapDefinition map)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            var list = new List<IBaseMapGroup>(map.BaseMapLayerGroup);
+            if (list.Count > 0)
+                return list[0];
+            return null;
+        }
+
+        /// <summary>
+        /// Gets whether a tiled layer of the specified name exists.
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="layerName"></param>
+        /// <returns></returns>
+        public static bool LayerExists(this IBaseMapDefinition map, string layerName)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            Check.NotEmpty(layerName, "layerName"); //NOXLATE
+
+            foreach (var group in map.BaseMapLayerGroup)
+            {
+                foreach (var layer in group.BaseMapLayer)
+                {
+                    if (layerName.Equals(layer.Name))
+                        return true;
+                }
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// Gets the base map group of the specified name
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="groupName"></param>
+        /// <returns></returns>
+        public static IBaseMapGroup GetGroup(this IBaseMapDefinition map, string groupName)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            Check.NotEmpty(groupName, "groupName"); //NOXLATE
+            foreach (var group in map.BaseMapLayerGroup)
+            {
+                if (groupName.Equals(group.Name))
+                    return group;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Gets whether the specified base map group exists
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="groupName"></param>
+        /// <returns></returns>
+        public static bool GroupExists(this IBaseMapDefinition map, string groupName)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            Check.NotEmpty(groupName, "groupName"); //NOXLATE
+            foreach (var group in map.BaseMapLayerGroup)
+            {
+                if (groupName.Equals(group.Name))
+                    return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// Gets the tiled layers for the specified base map group
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="groupName"></param>
+        /// <returns></returns>
+        public static IEnumerable<IBaseMapLayer> GetLayersForGroup(this IBaseMapDefinition map, string groupName)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            Check.NotEmpty(groupName, "groupName"); //NOXLATE
+
+            foreach (var group in map.BaseMapLayerGroup)
+            {
+                if (groupName.Equals(group.Name))
+                {
+                    return group.BaseMapLayer;
+                }
+            }
+
+            return new IBaseMapLayer[0];
+        }
+    }
+
+    /// <summary>
+    /// Extension method class
+    /// </summary>
+    public static class MapDefinitionExtensions
+    {
+        /// <summary>
+        /// Adds the specified finite display scale to the Map Definition
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="scale"></param>
+        public static void AddFiniteDisplayScale(this IMapDefinition map, double scale)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+
+            if (map.BaseMap != null)
+                map.InitBaseMap();
+
+            map.BaseMap.AddFiniteDisplayScale(scale);
+        }
+
+        /// <summary>
+        /// Removes the specified finite display scale from the Map Definition
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="scale"></param>
+        /// <param name="bDetachIfEmpty"></param>
+        public static void RemoveFiniteDisplayScale(this IMapDefinition map, double scale, bool bDetachIfEmpty)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+
+            if (map.BaseMap == null)
+                return;
+
+            map.BaseMap.RemoveFiniteDisplayScale(scale);
+            if (map.BaseMap.GroupCount == 0 && map.BaseMap.ScaleCount == 0 && bDetachIfEmpty)
+                map.RemoveBaseMap();
+        }
+
+        /// <summary>
+        /// Removes all finite display scales from the Map Definition
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="bDetachIfEmpty"></param>
+        public static void RemoveAllFiniteDisplayScales(this IMapDefinition map, bool bDetachIfEmpty)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+
+            if (map.BaseMap == null)
+                return;
+
+            map.BaseMap.RemoveAllScales();
+            if (map.BaseMap.GroupCount == 0 && map.BaseMap.ScaleCount == 0 && bDetachIfEmpty)
+                map.RemoveBaseMap();
+        }
+
+        /// <summary>
+        /// Adds the specified base layer group to the map definition
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static IBaseMapGroup AddBaseLayerGroup(this IMapDefinition map, string name)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            Check.NotEmpty(name, "name"); //NOXLATE
+
+            if (map.BaseMap == null)
+                map.InitBaseMap();
+
+            return map.BaseMap.AddBaseLayerGroup(name);
+        }
+
+        /// <summary>
+        /// Removes the given base layer group from the Map Definition
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="group"></param>
+        /// <param name="bDetachIfEmpty"></param>
+        public static void RemoveBaseLayerGroup(this IMapDefinition map, IBaseMapGroup group, bool bDetachIfEmpty)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            if (null == group)
+                return;
+
+            if (map.BaseMap == null)
+                return;
+
+            map.BaseMap.RemoveBaseLayerGroup(group);
+            if (map.BaseMap.GroupCount == 0 && map.BaseMap.GroupCount == 0 && bDetachIfEmpty)
+                map.RemoveBaseMap();
+        }
+
+        /// <summary>
+        /// Updates the group name references of all layers belonging to a particular group
+        /// </summary>
+        /// <param name="map">The map.</param>
+        /// <param name="oldGroupName">Old name of the group.</param>
+        /// <param name="newGroupName">New name of the group.</param>
+        public static void UpdateDynamicGroupName(this IMapDefinition map, string oldGroupName, string newGroupName)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            Check.NotEmpty(oldGroupName, "oldGroupName"); //NOXLATE
+            Check.NotEmpty(newGroupName, "newGroupName"); //NOXLATE
+            var layers = map.GetLayersForGroup(oldGroupName);
+            var groups = map.GetGroupsForGroup(oldGroupName);
+            foreach (var l in layers)
+            {
+                l.Group = newGroupName;
+            }
+            foreach (var g in groups)
+            {
+                g.Group = newGroupName;
+            }
+        }
+
+        /// <summary>
+        /// Removes a layer group and all layers associated with this group
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="groupName"></param>
+        /// <returns>The number of layers removed. Returns 0 if the group is empty or does not exist</returns>
+        public static int RemoveLayerGroupAndChildLayers(this IMapDefinition map, string groupName)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            Check.NotEmpty(groupName, "groupName"); //NOXLATE
+
+            var affectedParentGroups = new Dictionary<string, List<IMapLayerGroup>>();
+            IMapLayerGroup group = null;
+            foreach (var grp in map.MapLayerGroup)
+            {
+                if (grp.Name == groupName)
+                    group = grp;
+
+                string parentGroupName = grp.Group;
+                if (!string.IsNullOrEmpty(parentGroupName))
+                {
+                    if (!affectedParentGroups.ContainsKey(parentGroupName))
+                        affectedParentGroups[parentGroupName] = new List<IMapLayerGroup>();
+                    affectedParentGroups[parentGroupName].Add(grp);
+                }
+            }
+
+            if (group != null)
+            {
+                List<IMapLayer> layers = new List<IMapLayer>(map.GetLayersForGroup(groupName));
+
+                int removed = 0;
+                //Remove layers first
+                foreach (var l in layers)
+                {
+                    map.RemoveLayer(l);
+                    removed++;
+                }
+                //Then the group
+                map.RemoveGroup(group);
+
+                //Then see if any child groups are under this group and remove them too
+                if (affectedParentGroups.ContainsKey(group.Name))
+                {
+                    for (int i = 0; i < affectedParentGroups[group.Name].Count; i++)
+                    {
+                        var removeMe = affectedParentGroups[group.Name][i];
+                        removed += map.RemoveLayerGroupAndChildLayers(removeMe.Name);
+                    }
+                }
+
+                return removed;
+            }
+            return 0;
+        }
+
+        /// <summary>
+        /// Get a layer by its name
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static IMapLayer GetLayerByName(this IMapDefinition map, string name)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            Check.NotEmpty(name, "name"); //NOXLATE
+            foreach (var layer in map.MapLayer)
+            {
+                if (name.Equals(layer.Name))
+                    return layer;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Gets a group by its name
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static IMapLayerGroup GetGroupByName(this IMapDefinition map, string name)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            foreach (var group in map.MapLayerGroup)
+            {
+                if (name.Equals(group.Name))
+                    return group;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Gets the number of layers (non-tiled) on this map
+        /// </summary>
+        /// <param name="map"></param>
+        /// <returns></returns>
+        public static int GetLayerCount(this IMapDefinition map)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            return new List<IMapLayer>(map.MapLayer).Count;
+        }
+
+        /// <summary>
+        /// Gets the number of groups (non-tiled) on this map
+        /// </summary>
+        /// <param name="map"></param>
+        /// <returns></returns>
+        public static int GetGroupCount(this IMapDefinition map)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            return new List<IMapLayerGroup>(map.MapLayerGroup).Count;
+        }
+
+        /// <summary>
+        /// Gets all the layers that belong to the specified group
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static IEnumerable<IMapLayer> GetLayersForGroup(this IMapDefinition map, string name)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            foreach (var layer in map.MapLayer)
+            {
+                if (name.Equals(layer.Group))
+                    yield return layer;
+            }
+        }
+
+        /// <summary>
+        /// Gets all the groups that belong to the specified group
+        /// </summary>
+        /// <param name="map"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static IEnumerable<IMapLayerGroup> GetGroupsForGroup(this IMapDefinition map, string name)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            foreach (var group in map.MapLayerGroup)
+            {
+                if (name.Equals(group.Group))
+                    yield return group;
+            }
+        }
+
+        /// <summary>
+        /// Gets all that layers that do not belong to a group
+        /// </summary>
+        /// <param name="map"></param>
+        /// <returns></returns>
+        public static IEnumerable<IMapLayer> GetLayersWithoutGroups(this IMapDefinition map)
+        {
+            Check.NotNull(map, "map"); //NOXLATE
+            foreach (var layer in map.MapLayer)
+            {
+                if (string.IsNullOrEmpty(layer.Group))
+                    yield return layer;
+            }
+        }
+    }
+
+    /// <summary>
+    /// Represents the tiled map portion of the Map Definition
+    /// </summary>
+    public interface IBaseMapDefinition
+    {
+        /// <summary>
+        /// Gets the finite display scales
+        /// </summary>
+        IEnumerable<double> FiniteDisplayScale { get; }
+
+        /// <summary>
+        /// Adds the finite display scale.
+        /// </summary>
+        /// <param name="value">The value.</param>
+        void AddFiniteDisplayScale(double value);
+
+        /// <summary>
+        /// Removes the finite display scale.
+        /// </summary>
+        /// <param name="value">The value.</param>
+        void RemoveFiniteDisplayScale(double value);
+
+        /// <summary>
+        /// Gets the scale count.
+        /// </summary>
+        /// <value>The scale count.</value>
+        int ScaleCount { get; }
+
+        /// <summary>
+        /// Removes the scale at the specified index
+        /// </summary>
+        /// <param name="index">The index.</param>
+        void RemoveScaleAt(int index);
+
+        /// <summary>
+        /// Gets the scale at the specified index
+        /// </summary>
+        /// <param name="index">The index.</param>
+        /// <returns></returns>
+        double GetScaleAt(int index);
+
+        /// <summary>
+        /// Gets the base map layer groups.
+        /// </summary>
+        /// <value>The base map layer groups.</value>
+        IEnumerable<IBaseMapGroup> BaseMapLayerGroup { get; }
+
+        /// <summary>
+        /// Gets the group count.
+        /// </summary>
+        /// <value>The group count.</value>
+        int GroupCount { get; }
+
+        /// <summary>
+        /// Gets the group at the specified index
+        /// </summary>
+        /// <param name="index">The index.</param>
+        /// <returns></returns>
+        IBaseMapGroup GetGroupAt(int index);
+
+        /// <summary>
+        /// Adds the base layer group.
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <returns></returns>
+        IBaseMapGroup AddBaseLayerGroup(string name);
+
+        /// <summary>
+        /// Removes the base layer group.
+        /// </summary>
+        /// <param name="group">The group.</param>
+        void RemoveBaseLayerGroup(IBaseMapGroup group);
+
+        /// <summary>
+        /// Removes all scales.
+        /// </summary>
+        void RemoveAllScales();
+    }
+
+    /// <summary>
+    /// Base legend element
+    /// </summary>
+    public interface IMapLegendElementBase : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether [show in legend].
+        /// </summary>
+        /// <value><c>true</c> if [show in legend]; otherwise, <c>false</c>.</value>
+        bool ShowInLegend { get; set; }
+
+        /// <summary>
+        /// Gets or sets the legend label.
+        /// </summary>
+        /// <value>The legend label.</value>
+        string LegendLabel { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether [expand in legend].
+        /// </summary>
+        /// <value><c>true</c> if [expand in legend]; otherwise, <c>false</c>.</value>
+        bool ExpandInLegend { get; set; }
+    }
+
+    /// <summary>
+    /// Base layer interface
+    /// </summary>
+    public interface IBaseMapLayer : IMapLegendElementBase
+    {
+        /// <summary>
+        /// Gets or sets the resource id.
+        /// </summary>
+        /// <value>The resource id.</value>
+        string ResourceId { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether this <see cref="IBaseMapLayer"/> is selectable.
+        /// </summary>
+        /// <value><c>true</c> if selectable; otherwise, <c>false</c>.</value>
+        bool Selectable { get; set; }
+    }
+
+    /// <summary>
+    /// Tiled map group
+    /// </summary>
+    public interface IBaseMapGroup : IMapLegendElementBase
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether this <see cref="IBaseMapGroup"/> is visible.
+        /// </summary>
+        /// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
+        bool Visible { get; set; }
+
+        /// <summary>
+        /// Gets the base map layers.
+        /// </summary>
+        /// <value>The base map layers.</value>
+        IEnumerable<IBaseMapLayer> BaseMapLayer { get; }
+
+        /// <summary>
+        /// Adds the layer.
+        /// </summary>
+        /// <param name="layerName">Name of the layer.</param>
+        /// <param name="resourceId">The resource id.</param>
+        /// <returns></returns>
+        IBaseMapLayer AddLayer(string layerName, string resourceId);
+
+        /// <summary>
+        /// Removes the base map layer.
+        /// </summary>
+        /// <param name="layer">The layer.</param>
+        void RemoveBaseMapLayer(IBaseMapLayer layer);
+
+        /// <summary>
+        /// Insert the base map layer at the specified index
+        /// </summary>
+        /// <param name="index"></param>
+        /// <param name="layer"></param>
+        void InsertLayer(int index, IBaseMapLayer layer);
+
+        /// <summary>
+        /// Gets the index of the specified layer
+        /// </summary>
+        /// <param name="layer"></param>
+        /// <returns></returns>
+        int GetIndex(IBaseMapLayer layer);
+
+        /// <summary>
+        /// Moves the specified layer up.
+        /// </summary>
+        /// <param name="layer">The layer.</param>
+        /// <returns></returns>
+        int MoveUp(IBaseMapLayer layer);
+
+        /// <summary>
+        /// Moves the specified layer down.
+        /// </summary>
+        /// <param name="layer">The layer.</param>
+        /// <returns></returns>
+        int MoveDown(IBaseMapLayer layer);
+    }
+
+    /// <summary>
+    /// A dynamic map layer
+    /// </summary>
+    public interface IMapLayer : IBaseMapLayer
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether this <see cref="IMapLayer"/> is visible.
+        /// </summary>
+        /// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
+        bool Visible { get; set; }
+
+        /// <summary>
+        /// Gets or sets the group.
+        /// </summary>
+        /// <value>The group.</value>
+        string Group { get; set; }
+    }
+
+    /// <summary>
+    /// A dynamic map layer group
+    /// </summary>
+    public interface IMapLayerGroup : IMapLegendElementBase
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether this <see cref="IMapLayerGroup"/> is visible.
+        /// </summary>
+        /// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
+        bool Visible { get; set; }
+
+        /// <summary>
+        /// Gets or sets the group name. If null, it means this layer doesn't belong to any group
+        /// </summary>
+        /// <value>The group.</value>
+        string Group { get; set; }
+
+        /// <summary>
+        /// Gets the parent map definition
+        /// </summary>
+        /// <value>The parent map definition.</value>
+        IMapDefinition Parent { get; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/MapDefinition/v1_0_0/MapDefinitionImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/MapDefinition/v1_0_0/MapDefinitionImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/MapDefinition/v1_0_0/MapDefinitionImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,987 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.Common;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+#pragma warning disable 1591, 0114, 0108
+
+#if MDF_240
+namespace OSGeo.MapGuide.ObjectModels.MapDefinition.v2_4_0
+#elif MDF_230
+
+namespace OSGeo.MapGuide.ObjectModels.MapDefinition.v2_3_0
+#else
+
+namespace OSGeo.MapGuide.ObjectModels.MapDefinition.v1_0_0
+#endif
+{
+    partial class MapDefinitionType
+    {
+        internal MapDefinitionType()
+        {
+        }
+
+        [XmlIgnore]
+        public Color BackgroundColor
+        {
+            get
+            {
+                return this.backgroundColorField;
+            }
+            set
+            {
+                this.backgroundColorField = value;
+                OnPropertyChanged("BackgroundColor"); //NOXLATE
+            }
+        }
+
+        protected void DetachChangeListeners()
+        {
+            var handler = this.PropertyChanged;
+            if (handler != null)
+            {
+                foreach (var h in handler.GetInvocationList())
+                {
+                    this.PropertyChanged -= (PropertyChangedEventHandler)h;
+                }
+                handler = null;
+            }
+        }
+    }
+
+    public static class MdfEntryPoint
+    {
+        internal static MapDefinition CreateDefault()
+        {
+            return new MapDefinition()
+            {
+                Name = string.Empty,
+                CoordinateSystem = string.Empty,
+                Extents = new Box2DType() { MaxX = 0.0, MaxY = 0.0, MinX = 0.0, MinY = 0.0 },
+                BackgroundColor = Color.White,
+                MapLayer = new System.ComponentModel.BindingList<MapLayerType>(),
+                MapLayerGroup = new System.ComponentModel.BindingList<MapLayerGroupType>(),
+#if MDF_240
+                Watermarks = new BindingList<OSGeo.MapGuide.ObjectModels.WatermarkDefinition_2_4_0.WatermarkType>()
+#elif MDF_230
+                Watermarks = new BindingList<OSGeo.MapGuide.ObjectModels.WatermarkDefinition_2_3_0.WatermarkType>()
+#endif
+            };
+        }
+
+        public static IResource Deserialize(string xml)
+        {
+            var mdf = MapDefinition.Deserialize(xml);
+            foreach (var group in mdf.MapLayerGroup)
+            {
+                group.Parent = mdf;
+            }
+            return mdf;
+        }
+
+        public static Stream Serialize(IResource res)
+        {
+            return res.SerializeToStream();
+        }
+    }
+
+    partial class MapDefinition : IMapDefinition
+#if MDF_230 || MDF_240
+, IMapDefinition2
+#endif
+    {
+        internal MapDefinition()
+        {
+#if MDF_240
+            this.versionField = "2.4.0"; //NOXLATE
+#elif MDF_230
+            this.versionField = "2.3.0"; //NOXLATE
+#endif
+            this.SetExtentsFromFirstAddedLayer = false;
+        }
+
+#if MDF_240
+        private static readonly Version RES_VERSION = new Version(2, 4, 0);
+#elif MDF_230
+        private static readonly Version RES_VERSION = new Version(2, 3, 0);
+#else
+        private static readonly Version RES_VERSION = new Version(1, 0, 0);
+#endif
+
+        [XmlIgnore]
+        public bool SetExtentsFromFirstAddedLayer { get; set; }
+
+        private string _resId;
+
+        [XmlIgnore]
+        public string ResourceID
+        {
+            get
+            {
+                return _resId;
+            }
+            set
+            {
+                if (!ResourceIdentifier.Validate(value))
+                    throw new InvalidOperationException(Strings.ErrorInvalidResourceIdentifier);
+
+                var res = new ResourceIdentifier(value);
+                if (res.Extension != ResourceTypes.MapDefinition.ToString())
+                    throw new InvalidOperationException(string.Format(Strings.ErrorUnexpectedResourceType, res.ToString(), ResourceTypes.MapDefinition));
+
+                _resId = value;
+                this.OnPropertyChanged("ResourceID"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public virtual string ResourceType
+        {
+            get
+            {
+                return ResourceTypes.MapDefinition.ToString();
+            }
+        }
+
+        [XmlIgnore]
+        public Version ResourceVersion
+        {
+            get
+            {
+                return RES_VERSION;
+            }
+        }
+
+        internal void SortGroupList()
+        {
+        }
+
+        object ICloneable.Clone()
+        {
+            var mdf = this.Clone();
+            mdf.DetachChangeListeners();
+            return mdf;
+        }
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] //NOXLATE
+        public string ValidatingSchema
+        {
+#if MDF_240
+            get { return "MapDefinition-2.4.0.xsd"; } //NOXLATE
+#elif MDF_230
+            get { return "MapDefinition-2.3.0.xsd"; } //NOXLATE
+#else
+            get { return "MapDefinition-1.0.0.xsd"; } //NOXLATE
+#endif
+            set { }
+        }
+
+        [XmlIgnore]
+        public bool IsStronglyTyped
+        {
+            get { return true; }
+        }
+
+        /// <summary>
+        /// Inserts the layer at the specified index
+        /// </summary>
+        /// <param name="idx"></param>
+        /// <param name="layer"></param>
+        void IMapDefinition.InsertLayer(int idx, IMapLayer layer)
+        {
+            Check.IntBetween(idx, 0, this.MapLayer.Count, true, "idx (" + idx + ") between [" + 0 + "," + this.MapLayer.Count + "]"); //NOXLATE
+            Check.NotNull(layer, "layer"); //NOXLATE
+            var li = layer as MapLayerType;
+            if (li != null)
+            {
+                this.MapLayer.Insert(idx, li);
+                li.Parent = this;
+            }
+        }
+
+        void IMapDefinition.SetExtents(double minx, double miny, double maxx, double maxy)
+        {
+            if (this.Extents == null)
+            {
+                var ext = new Box2DType()
+                {
+                    MaxX = maxx,
+                    MaxY = maxy,
+                    MinX = minx,
+                    MinY = miny
+                };
+                this.Extents = ext;
+            }
+            else
+            {
+                this.Extents.MaxX = maxx;
+                this.Extents.MaxY = maxy;
+                this.Extents.MinX = minx;
+                this.Extents.MinY = miny;
+                OnPropertyChanged("Extents"); //NOXLATE
+            }
+        }
+
+        public IMapLayerGroup AddGroup(string groupName)
+        {
+            Check.NotEmpty(groupName, "groupName"); //NOXLATE
+            Check.Precondition(this.GetGroupByName(groupName) == null, "<groupName> does not already exist"); //NOXLATE
+            if (this.MapLayerGroup == null)
+                this.MapLayerGroup = new System.ComponentModel.BindingList<MapLayerGroupType>();
+
+            var group = new MapLayerGroupType()
+            {
+                Parent = this,
+                ExpandInLegend = true,
+                LegendLabel = groupName,
+                Name = groupName,
+                ShowInLegend = true,
+                Visible = true,
+                Group = string.Empty
+            };
+            this.MapLayerGroup.Add(group);
+            OnPropertyChanged("MapLayerGroup"); //NOXLATE
+            return group;
+        }
+
+        public IMapLayer AddLayer(string groupName, string layerName, string layerDefinitionId)
+        {
+            Check.NotEmpty(layerName, "layerName"); //NOXLATE
+            Check.NotEmpty(layerDefinitionId, "layerDefinitionId"); //NOXLATE
+            Check.Precondition(ResourceIdentifier.Validate(layerDefinitionId), "ResourceIdentifier.Validate(layerDefinitionId)"); //NOXLATE
+            Check.Precondition(ResourceIdentifier.GetResourceTypeAsString(layerDefinitionId) == ResourceTypes.LayerDefinition.ToString(), "ResourceIdentifier.GetResourceTypeAsString(layerDefinitionId) == ResourceTypes.LayerDefinition.ToString()"); //NOXLATE
+            if (!string.IsNullOrEmpty(groupName))
+            {
+                Check.Precondition(this.GetGroupByName(groupName) != null, "There should be an existing group for <groupName>"); //NOXLATE
+            }
+            var layer = new MapLayerType()
+            {
+                Parent = this,
+                ExpandInLegend = true,
+                LegendLabel = layerName,
+                Name = layerName,
+                ResourceId = layerDefinitionId,
+                ShowInLegend = true,
+                Visible = true,
+                Selectable = true
+            };
+            layer.Group = string.IsNullOrEmpty(groupName) ? string.Empty : groupName;
+
+            this.MapLayer.Insert(0, layer);
+            OnPropertyChanged("MapLayer"); //NOXLATE
+
+            if (this.MapLayer.Count == 1) //First one
+            {
+                OnFirstLayerAdded(layer);
+            }
+
+            return layer;
+        }
+
+        /// <summary>
+        /// Raised when a layer has been added to this map definition
+        /// </summary>
+        public event GetSpatialExtentsEventHandler RequestLayerExtents;
+
+        private void OnFirstLayerAdded(MapLayerType layer)
+        {
+            //Do nothing if this is false
+            if (!this.SetExtentsFromFirstAddedLayer)
+                return;
+
+            var h = this.RequestLayerExtents;
+            if (h != null)
+            {
+                var e = new GetSpatialExtentsEventArgs(this.CoordinateSystem);
+                h(this, e);
+                if (e.IsSet)
+                {
+                    //Set the coordinate system if empty
+                    if (string.IsNullOrEmpty(this.CoordinateSystem))
+                    {
+                        this.CoordinateSystem = e.LayerCoordinateSystem;
+                    }
+                    //Set the bounds if empty
+                    if (IsEmpty(this.Extents))
+                    {
+                        var env = e.Extents;
+                        ((IMapDefinition)this).SetExtents(env.MinX, env.MinY, env.MaxX, env.MaxY);
+                    }
+                }
+            }
+        }
+
+        public IMapLayer InsertLayer(int index, string groupName, string layerName, string layerDefinitionId)
+        {
+            Check.IntBetween(index, 0, this.MapLayer.Count, true, "index (" + index + ") between [" + 0 + "," + this.MapLayer.Count + "]");
+            Check.NotEmpty(layerName, "layerName"); //NOXLATE
+            Check.NotEmpty(layerDefinitionId, "layerDefinitionId"); //NOXLATE
+            Check.Precondition(ResourceIdentifier.Validate(layerDefinitionId), "ResourceIdentifier.Validate(layerDefinitionId)"); //NOXLATE
+            Check.Precondition(ResourceIdentifier.GetResourceTypeAsString(layerDefinitionId) == ResourceTypes.LayerDefinition.ToString(), "ResourceIdentifier.GetResourceTypeAsString(layerDefinitionId) == ResourceTypes.LayerDefinition.ToString()"); //NOXLATE
+            if (!string.IsNullOrEmpty(groupName))
+            {
+                Check.NotNull(this.GetGroupByName(groupName), "Group for <groupName>"); //NOXLATE
+            }
+            var layer = new MapLayerType()
+            {
+                Parent = this,
+                ExpandInLegend = true,
+                LegendLabel = layerName,
+                Name = layerName,
+                ResourceId = layerDefinitionId,
+                ShowInLegend = true,
+                Visible = true,
+                Selectable = true
+            };
+            layer.Group = string.IsNullOrEmpty(groupName) ? string.Empty : groupName;
+            this.MapLayer.Insert(index, layer);
+            return layer;
+        }
+
+        public IMapLayer AddLayer(IMapLayer layerToInsertAbove, string groupName, string layerName, string layerDefinitionId)
+        {
+            Check.NotEmpty(layerName, "layerName"); //NOXLATE
+            Check.NotEmpty(layerDefinitionId, "layerDefinitionId"); //NOXLATE
+            Check.Precondition(ResourceIdentifier.Validate(layerDefinitionId), "ResourceIdentifier.Validate(layerDefinitionId)"); //NOXLATE
+            Check.Precondition(ResourceIdentifier.GetResourceTypeAsString(layerDefinitionId) == ResourceTypes.LayerDefinition.ToString(), "ResourceIdentifier.GetResourceTypeAsString(layerDefinitionId) == ResourceTypes.LayerDefinition.ToString()"); //NOXLATE
+            if (!string.IsNullOrEmpty(groupName))
+            {
+                Check.NotNull(this.GetGroupByName(groupName), "Group for <groupName>"); //NOXLATE
+            }
+            var layer = new MapLayerType()
+            {
+                Parent = this,
+                ExpandInLegend = true,
+                LegendLabel = layerName,
+                Name = layerName,
+                ResourceId = layerDefinitionId,
+                ShowInLegend = true,
+                Visible = true,
+                Selectable = true
+            };
+            layer.Group = string.IsNullOrEmpty(groupName) ? string.Empty : groupName;
+
+            if (layerToInsertAbove != null)
+            {
+                var clayerToInsertAbove = layerToInsertAbove as MapLayerType;
+                if (clayerToInsertAbove != null)
+                {
+                    var idx = this.MapLayer.IndexOf(clayerToInsertAbove);
+                    if (idx >= 0)
+                    {
+                        this.MapLayer.Insert(idx, layer);
+                    }
+                    else
+                    {
+                        this.MapLayer.Add(layer);
+                    }
+                }
+                else
+                {
+                    this.MapLayer.Add(layer);
+                }
+            }
+            else
+            {
+                this.MapLayer.Add(layer);
+            }
+            OnPropertyChanged("MapLayer"); //NOXLATE
+
+            if (this.MapLayer.Count == 1) //First one
+            {
+                OnFirstLayerAdded(layer);
+            }
+
+            return layer;
+        }
+
+        private static bool IsEmpty(Box2DType box2DType)
+        {
+            return box2DType == null ||
+                (box2DType.MaxX == 0.0 &&
+                box2DType.MaxY == 0.0 &&
+                box2DType.MinX == 0.0 &&
+                box2DType.MinY == 0.0);
+        }
+
+        [XmlIgnore]
+        OSGeo.MapGuide.ObjectModels.Common.IEnvelope IMapDefinition.Extents
+        {
+            get
+            {
+                return this.Extents;
+            }
+            set
+            {
+                if (value == null)
+                {
+                    this.Extents = null;
+                }
+                else
+                {
+                    if (this.Extents == null)
+                        this.Extents = new Box2DType();
+
+                    this.Extents.MaxX = value.MaxX;
+                    this.Extents.MaxY = value.MaxY;
+                    this.Extents.MinX = value.MinX;
+                    this.Extents.MinY = value.MinY;
+                }
+            }
+        }
+
+        [XmlIgnore]
+        IBaseMapDefinition IMapDefinition.BaseMap
+        {
+            get
+            {
+                return (IBaseMapDefinition)this.BaseMapDefinition;
+            }
+        }
+
+        void IMapDefinition.InitBaseMap()
+        {
+            if (this.BaseMapDefinition == null)
+            {
+                this.BaseMapDefinition = new MapDefinitionTypeBaseMapDefinition()
+                {
+                    Parent = (IMapDefinition)this,
+                    BaseMapLayerGroup = new System.ComponentModel.BindingList<BaseMapLayerGroupCommonType>(),
+                    FiniteDisplayScale = new System.ComponentModel.BindingList<double>()
+                };
+            }
+        }
+
+        void IMapDefinition.RemoveBaseMap()
+        {
+            this.BaseMapDefinition = null;
+        }
+
+        [XmlIgnore]
+        IEnumerable<IMapLayer> IMapDefinition.MapLayer
+        {
+            get
+            {
+                foreach (var layer in this.MapLayer)
+                {
+                    yield return layer;
+                }
+            }
+        }
+
+        void IMapDefinition.RemoveLayer(IMapLayer layer)
+        {
+            var lyr = layer as MapLayerType;
+            if (lyr != null)
+            {
+                this.MapLayer.Remove(lyr);
+                OnPropertyChanged("MapLayer"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<IMapLayerGroup> IMapDefinition.MapLayerGroup
+        {
+            get
+            {
+                foreach (var grp in this.MapLayerGroup)
+                {
+                    yield return grp;
+                }
+            }
+        }
+
+        void IMapDefinition.RemoveGroup(IMapLayerGroup group)
+        {
+            Check.NotNull(group, "group"); //NOXLATE
+            var grp = group as MapLayerGroupType;
+            if (grp != null)
+            {
+                this.MapLayerGroup.Remove(grp);
+                OnPropertyChanged("MapLayerGroup"); //NOXLATE
+            }
+        }
+
+        void IMapDefinition.RemoveAllGroups()
+        {
+            this.MapLayerGroup.Clear();
+        }
+
+        void IMapDefinition.RemoveAllLayers()
+        {
+            this.MapLayer.Clear();
+        }
+
+        int IMapDefinition.GetIndex(IMapLayer layer)
+        {
+            Check.NotNull(layer, "layer"); //NOXLATE
+            var lyr = layer as MapLayerType;
+            if (lyr != null)
+                return this.MapLayer.IndexOf(lyr);
+
+            return -1;
+        }
+
+        int IMapDefinition.MoveUp(IMapLayer layer)
+        {
+            Check.NotNull(layer, "layer"); //NOXLATE
+            int isrc = ((IMapDefinition)this).GetIndex(layer);
+            if (isrc > 0)
+            {
+                int idst = isrc - 1;
+
+                var src = this.MapLayer[isrc];
+                var dst = this.MapLayer[idst];
+
+                this.MapLayer[isrc] = dst;
+                this.MapLayer[idst] = src;
+
+                OnPropertyChanged("MapLayer"); //NOXLATE
+
+                return idst;
+            }
+            else if (isrc == 0)
+            {
+                return isrc; //Unchanged
+            }
+
+            return -1;
+        }
+
+        int IMapDefinition.MoveDown(IMapLayer layer)
+        {
+            Check.NotNull(layer, "layer"); //NOXLATE
+            int isrc = ((IMapDefinition)this).GetIndex(layer);
+            if (isrc < this.MapLayer.Count - 1)
+            {
+                int idst = isrc + 1;
+
+                var src = this.MapLayer[isrc];
+                var dst = this.MapLayer[idst];
+
+                this.MapLayer[isrc] = dst;
+                this.MapLayer[idst] = src;
+
+                OnPropertyChanged("MapLayer"); //NOXLATE
+
+                return idst;
+            }
+            else if (isrc == this.MapLayer.Count - 1)
+            {
+                return this.MapLayer.Count - 1; //Unchanged
+            }
+
+            return -1;
+        }
+
+        int IMapDefinition.MoveUpGroup(IMapLayerGroup group)
+        {
+            Check.NotNull(group, "group"); //NOXLATE
+            var grp = group as MapLayerGroupType;
+            if (grp != null)
+            {
+                var idx = this.MapLayerGroup.IndexOf(grp);
+                if (idx > 0)
+                {
+                    int idst = idx - 1;
+
+                    var src = this.MapLayerGroup[idx];
+                    var dst = this.MapLayerGroup[idst];
+
+                    this.MapLayerGroup[idx] = dst;
+                    this.MapLayerGroup[idst] = src;
+
+                    OnPropertyChanged("MapLayerGroup"); //NOXLATE
+
+                    return idst;
+                }
+                else if (idx == 0)
+                {
+                    return idx; //Unchanged
+                }
+            }
+
+            return -1;
+        }
+
+        int IMapDefinition.MoveDownGroup(IMapLayerGroup group)
+        {
+            Check.NotNull(group, "group"); //NOXLATE
+            var grp = group as MapLayerGroupType;
+            if (grp != null)
+            {
+                var idx = this.MapLayerGroup.IndexOf(grp);
+                if (idx < this.MapLayerGroup.Count - 1)
+                {
+                    int idst = idx + 1;
+
+                    var src = this.MapLayerGroup[idx];
+                    var dst = this.MapLayerGroup[idst];
+
+                    this.MapLayerGroup[idx] = dst;
+                    this.MapLayerGroup[idst] = src;
+
+                    OnPropertyChanged("MapLayerGroup"); //NOXLATE
+
+                    return idst;
+                }
+                else if (idx == this.MapLayerGroup.Count - 1)
+                {
+                    return this.MapLayerGroup.Count - 1; //Unchanged
+                }
+            }
+
+            return -1;
+        }
+
+        int IMapDefinition.GetIndex(IMapLayerGroup group)
+        {
+            Check.NotNull(group, "group"); //NOXLATE
+            var grp = group as MapLayerGroupType;
+            if (grp != null)
+                return this.MapLayerGroup.IndexOf(grp);
+
+            return -1;
+        }
+
+        void IMapDefinition.SetTopDrawOrder(IMapLayer layer)
+        {
+            Check.NotNull(layer, "layer"); //NOXLATE
+            int isrc = ((IMapDefinition)this).GetIndex(layer);
+            if (isrc > 0)
+            {
+                var src = this.MapLayer[isrc];
+
+                //take everything before this and shift them up one position
+                for (int i = isrc - 1; i >= 0; i--)
+                {
+                    this.MapLayer[i + 1] = this.MapLayer[i];
+                }
+
+                this.MapLayer[0] = src;
+                OnPropertyChanged("MapLayer"); //NOXLATE
+            }
+        }
+
+        void IMapDefinition.SetBottomDrawOrder(IMapLayer layer)
+        {
+            Check.NotNull(layer, "layer"); //NOXLATE
+            int isrc = ((IMapDefinition)this).GetIndex(layer);
+            if (isrc >= 0 && isrc < this.MapLayer.Count)
+            {
+                var src = this.MapLayer[isrc];
+
+                //take everything after this and shift them down one position
+                for (int i = isrc + 1; i < this.MapLayer.Count; i++)
+                {
+                    this.MapLayer[i - 1] = this.MapLayer[i];
+                }
+
+                this.MapLayer[this.MapLayer.Count - 1] = src;
+                OnPropertyChanged("MapLayer"); //NOXLATE
+            }
+        }
+
+#if MDF_230 || MDF_240
+
+        IEnumerable<IWatermark> IWatermarkCollection.Watermarks
+        {
+            get
+            {
+                foreach (var wm in this.Watermarks)
+                    yield return wm;
+            }
+        }
+
+        IWatermark IWatermarkCollection.AddWatermark(IWatermarkDefinition watermark)
+        {
+            return WatermarkCollectionUtil.AddWatermark(this.Watermarks, watermark);
+        }
+
+        void IWatermarkCollection.RemoveWatermark(IWatermark watermark)
+        {
+            WatermarkCollectionUtil.RemoveWatermark(this.Watermarks, watermark);
+        }
+
+        int IWatermarkCollection.WatermarkCount
+        {
+            get { return this.Watermarks.Count; }
+        }
+
+#endif
+    }
+
+    partial class Box2DType : IEnvelope
+    { }
+
+    partial class MapDefinitionTypeBaseMapDefinition : IBaseMapDefinition
+    {
+        [XmlIgnore]
+        public IMapDefinition Parent
+        {
+            get;
+            set;
+        }
+
+        void IBaseMapDefinition.RemoveScaleAt(int index)
+        {
+            this.FiniteDisplayScale.RemoveAt(index);
+        }
+
+        double IBaseMapDefinition.GetScaleAt(int index)
+        {
+            return this.FiniteDisplayScale[index];
+        }
+
+        [XmlIgnore]
+        int IBaseMapDefinition.GroupCount
+        {
+            get { return this.BaseMapLayerGroup.Count; }
+        }
+
+        IBaseMapGroup IBaseMapDefinition.GetGroupAt(int index)
+        {
+            return this.BaseMapLayerGroup[index];
+        }
+
+        [XmlIgnore]
+        int IBaseMapDefinition.ScaleCount
+        {
+            get { return this.FiniteDisplayScale.Count; }
+        }
+
+        [XmlIgnore]
+        IEnumerable<double> IBaseMapDefinition.FiniteDisplayScale
+        {
+            get
+            {
+                foreach (var scale in this.FiniteDisplayScale)
+                {
+                    yield return scale;
+                }
+            }
+        }
+
+        public void AddFiniteDisplayScale(double value)
+        {
+            this.FiniteDisplayScale.Add(value);
+        }
+
+        public void RemoveFiniteDisplayScale(double value)
+        {
+            this.FiniteDisplayScale.Remove(value);
+        }
+
+        void IBaseMapDefinition.RemoveAllScales()
+        {
+            this.FiniteDisplayScale.Clear();
+            OnPropertyChanged("FiniteDisplayScale"); //NOXLATE
+        }
+
+        [XmlIgnore]
+        IEnumerable<IBaseMapGroup> IBaseMapDefinition.BaseMapLayerGroup
+        {
+            get
+            {
+                foreach (var grp in this.BaseMapLayerGroup)
+                {
+                    yield return grp;
+                }
+            }
+        }
+
+        public IBaseMapGroup AddBaseLayerGroup(string name)
+        {
+            var grp = new BaseMapLayerGroupCommonType()
+            {
+                Parent = this.Parent,
+                Name = name,
+                BaseMapLayer = new System.ComponentModel.BindingList<BaseMapLayerType>(),
+                ExpandInLegend = true,
+                ShowInLegend = true,
+                LegendLabel = name,
+                Visible = true
+            };
+            this.BaseMapLayerGroup.Add(grp);
+
+            return grp;
+        }
+
+        public void RemoveBaseLayerGroup(IBaseMapGroup group)
+        {
+            var grp = group as BaseMapLayerGroupCommonType;
+            if (grp != null)
+                this.BaseMapLayerGroup.Remove(grp);
+        }
+    }
+
+    partial class MapLayerType : IMapLayer
+    {
+    }
+
+    partial class BaseMapLayerType : IBaseMapLayer
+    {
+        [XmlIgnore]
+        public IMapDefinition Parent
+        {
+            get;
+            set;
+        }
+    }
+
+    partial class MapLayerGroupType : IMapLayerGroup
+    {
+        [XmlIgnore]
+        public IMapDefinition Parent
+        {
+            get;
+            set;
+        }
+    }
+
+    partial class BaseMapLayerGroupCommonType : IBaseMapGroup
+    {
+        [XmlIgnore]
+        public IMapDefinition Parent
+        {
+            get;
+            set;
+        }
+
+        [XmlIgnore]
+        IEnumerable<IBaseMapLayer> IBaseMapGroup.BaseMapLayer
+        {
+            get
+            {
+                foreach (var lyr in this.BaseMapLayer)
+                {
+                    yield return lyr;
+                }
+            }
+        }
+
+        public int GetIndex(IBaseMapLayer layer)
+        {
+            var bl = layer as BaseMapLayerType;
+            if (bl != null)
+            {
+                return this.BaseMapLayer.IndexOf(bl);
+            }
+            return -1;
+        }
+
+        public void InsertLayer(int index, IBaseMapLayer layer)
+        {
+            var bl = layer as BaseMapLayerType;
+            if (bl != null)
+            {
+                this.BaseMapLayer.Insert(index, bl);
+            }
+        }
+
+        public IBaseMapLayer AddLayer(string layerName, string resourceId)
+        {
+            BaseMapLayerType layer = new BaseMapLayerType()
+            {
+                Parent = this.Parent,
+                ExpandInLegend = true,
+                LegendLabel = layerName,
+                Name = layerName,
+                ResourceId = resourceId,
+                ShowInLegend = true,
+                Selectable = true
+            };
+            this.BaseMapLayer.Add(layer);
+            OnPropertyChanged("BaseMapLayer"); //NOXLATE
+            return layer;
+        }
+
+        public void RemoveBaseMapLayer(IBaseMapLayer layer)
+        {
+            var lyr = layer as BaseMapLayerType;
+            if (lyr != null)
+            {
+                this.BaseMapLayer.Remove(lyr);
+                OnPropertyChanged("BaseMapLayer"); //NOXLATE
+            }
+        }
+
+        int IBaseMapGroup.MoveUp(IBaseMapLayer layer)
+        {
+            var lyr = layer as BaseMapLayerType;
+            if (lyr != null)
+            {
+                int isrc = this.BaseMapLayer.IndexOf(lyr);
+                if (isrc > 0)
+                {
+                    int idst = isrc - 1;
+                    var src = this.BaseMapLayer[isrc];
+                    var dst = this.BaseMapLayer[idst];
+
+                    //swap
+                    this.BaseMapLayer[isrc] = dst;
+                    this.BaseMapLayer[idst] = src;
+
+                    OnPropertyChanged("BaseMapLayer"); //NOXLATE
+
+                    return idst;
+                }
+            }
+
+            return -1;
+        }
+
+        int IBaseMapGroup.MoveDown(IBaseMapLayer layer)
+        {
+            var lyr = layer as BaseMapLayerType;
+            if (lyr != null)
+            {
+                int isrc = this.BaseMapLayer.IndexOf(lyr);
+                if (isrc < this.BaseMapLayer.Count - 1)
+                {
+                    int idst = isrc + 1;
+                    var src = this.BaseMapLayer[isrc];
+                    var dst = this.BaseMapLayer[idst];
+
+                    //swap
+                    this.BaseMapLayer[isrc] = dst;
+                    this.BaseMapLayer[idst] = src;
+
+                    OnPropertyChanged("BaseMapLayer"); //NOXLATE
+
+                    return idst;
+                }
+            }
+
+            return -1;
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/OSGeo.MapGuide.ObjectModels.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/OSGeo.MapGuide.ObjectModels.csproj	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/OSGeo.MapGuide.ObjectModels.csproj	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{48C5EB23-45AE-4C4C-8FAB-635428AE8CA1}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>OSGeo.MapGuide.ObjectModels</RootNamespace>
+    <AssemblyName>OSGeo.MapGuide.ObjectModels</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;LDF_100</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\Generated\ApplicationDefinition-1.0.0.designer.cs">
+      <Link>ApplicationDefinition\v1_0_0\ApplicationDefinition-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\ApplicationDefinitionInfo-1.0.0.designer.cs">
+      <Link>ApplicationDefinition\v1_0_0\ApplicationDefinitionInfo-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\DrawingSectionList-1.0.0.designer.cs">
+      <Link>Common\DrawingSectionList-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\DrawingSectionResourceList-1.0.0.designer.cs">
+      <Link>Common\DrawingSectionResourceList-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\DrawingSource-1.0.0.designer.cs">
+      <Link>DrawingSource\v1_0_0\DrawingSource-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\Envelope-1.0.0.designer.cs">
+      <Link>Common\Envelope-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\FdoLongTransactionList-1.0.0.designer.cs">
+      <Link>Common\FdoLongTransactionList-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\FdoSpatialContextList-1.0.0.designer.cs">
+      <Link>Common\FdoSpatialContextList-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\FeatureSource-1.0.0.designer.cs">
+      <Link>FeatureSource\v1_0_0\FeatureSource-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\LayerDefinition-1.0.0.designer.cs">
+      <Link>LayerDefinition\v1_0_0\LayerDefinition-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\LayerDefinition-1.1.0.designer.cs">
+      <Link>LayerDefinition\v1_1_0\LayerDefinition-1.1.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\LayerDefinition-1.2.0.designer.cs">
+      <Link>LayerDefinition\v1_2_0\LayerDefinition-1.2.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\LayerDefinition-1.3.0.designer.cs">
+      <Link>LayerDefinition\v1_3_0\LayerDefinition-1.3.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\LayerDefinition-2.3.0.designer.cs">
+      <Link>LayerDefinition\v2_3_0\LayerDefinition-2.3.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\LayerDefinition-2.4.0.designer.cs">
+      <Link>LayerDefinition\v2_4_0\LayerDefinition-2.4.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\LoadProcedure-1.0.0.designer.cs">
+      <Link>LoadProcedure\v1_0_0\LoadProcedure-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\LoadProcedure-1.1.0.designer.cs">
+      <Link>LoadProcedure\v1_1_0\LoadProcedure-1.1.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\LoadProcedure-2.2.0.designer.cs">
+      <Link>LoadProcedure\v2_4_0\LoadProcedure-2.2.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\MapDefinition-1.0.0.designer.cs">
+      <Link>MapDefinition\v1_0_0\MapDefinition-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\PrintLayout-1.0.0.designer.cs">
+      <Link>PrintLayout\v1.0.0\PrintLayout-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\RepositoryList-1.0.0.designer.cs">
+      <Link>Common\RepositoryList-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\ResourceDataList-1.0.0.designer.cs">
+      <Link>Common\ResourceDataList-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\ResourceList-1.0.0.designer.cs">
+      <Link>Common\ResourceList-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\ResourcePackageManifest-1.0.0.designer.cs">
+      <Link>Common\ResourcePackageManifest-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\ResourceReferenceList-1.0.0.designer.cs">
+      <Link>Common\ResourceReferenceList-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\SymbolDefinition-1.0.0.designer.cs">
+      <Link>SymbolDefinition\v1_0_0\SymbolDefinition-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\SymbolDefinition-1.1.0.designer.cs">
+      <Link>SymbolDefinition\v1_1_0\SymbolDefinition-1.1.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\SymbolDefinition-2.4.0.designer.cs">
+      <Link>SymbolDefinition\v2_4_0\SymbolDefinition-2.4.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\SymbolLibrary-1.0.0.designer.cs">
+      <Link>SymbolLibrary\v1.0.0\SymbolLibrary-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\WatermarkDefinition-2.3.0.designer.cs">
+      <Link>WatermarkDefinition\v2_3_0\WatermarkDefinition-2.3.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\WatermarkDefinition-2.4.0.designer.cs">
+      <Link>WatermarkDefinition\v2_4_0\WatermarkDefinition-2.4.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="..\Generated\WebLayout-1.0.0.designer.cs">
+      <Link>WebLayout\v1_0_0\WebLayout-1.0.0.designer.cs</Link>
+    </Compile>
+    <Compile Include="ApplicationDefinition\v1_0_0\ApplicationDefinitionImpl.cs" />
+    <Compile Include="ApplicationDefinition\v1_0_0\ApplicationDefinitionInfoImpl.cs" />
+    <Compile Include="ApplicationDefinition\ApplicationDefinitionInterfaces.cs" />
+    <Compile Include="BaseSerializable.cs" />
+    <Compile Include="Check.cs" />
+    <Compile Include="Common\ExpressionDataType.cs" />
+    <Compile Include="Common\ExtendedDataType.cs" />
+    <Compile Include="Common\Geometries.cs" />
+    <Compile Include="Common\IEnvelope.cs" />
+    <Compile Include="Common\IExpressionPropertySource.cs" />
+    <Compile Include="Common\IFdoSerializable.cs" />
+    <Compile Include="Common\IFdoSpatialContext.cs" />
+    <Compile Include="Common\ILongTransaction.cs" />
+    <Compile Include="Common\IRepositoryItem.cs" />
+    <Compile Include="Common\IResourceIdReference.cs" />
+    <Compile Include="Common\ResourceItems.cs" />
+    <Compile Include="Common\ResourceList.cs" />
+    <Compile Include="DrawingSource\v1_0_0\DrawingSourceImpl.cs" />
+    <Compile Include="DrawingSource\DrawingSourceInterfaces.cs" />
+    <Compile Include="FeatureSource\FeatureSourceInterfaces.cs" />
+    <Compile Include="FeatureSource\v1_0_0\FeatureSourceImpl.cs" />
+    <Compile Include="IO\ReadOnlyRewindableStream.cs" />
+    <Compile Include="IO\Utf8XmlWriter.cs" />
+    <Compile Include="IResource.cs" />
+    <Compile Include="IVersionedEntity.cs" />
+    <Compile Include="LayerDefinition\v1_0_0\GridLayerDefinitionImpl.cs" />
+    <Compile Include="LayerDefinition\LayerDefinitionInterfaces.cs" />
+    <Compile Include="LayerDefinition\v1_0_0\LayerElementFactoryImpl.cs" />
+    <Compile Include="LayerDefinition\v1_0_0\VectorLayerDefinitionImpl.cs" />
+    <Compile Include="LoadProcedure\v1_0_0\LoadProcedureImpl.cs" />
+    <Compile Include="LoadProcedure\v1_0_0\LoadProcedureFactoryImpl.cs" />
+    <Compile Include="LoadProcedure\LoadProcedureInterfaces.cs" />
+    <Compile Include="MapDefinition\v1_0_0\MapDefinitionImpl.cs" />
+    <Compile Include="MapDefinition\MapDefinitionInterfaces.cs" />
+    <Compile Include="ObjectFactory.cs" />
+    <Compile Include="PrintLayout\v1.0.0\PrintLayoutImpl.cs" />
+    <Compile Include="PrintLayout\PrintLayoutInterfaces.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ResourceContentVersionChecker.cs" />
+    <Compile Include="ResourceIdentifier.cs" />
+    <Compile Include="ResourceTypeDescriptor.cs" />
+    <Compile Include="ResourceTypeRegistry.cs" />
+    <Compile Include="ResourceTypes.cs" />
+    <Compile Include="Strings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Strings.resx</DependentUpon>
+    </Compile>
+    <Compile Include="SymbolDefinition\v1_0_0\SymbolDefinitionImpl.cs" />
+    <Compile Include="SymbolDefinition\SymbolDefinitionInterfaces.cs" />
+    <Compile Include="SymbolLibrary\v1.0.0\SymbolLibraryImpl.cs" />
+    <Compile Include="SymbolLibrary\SymbolLibraryInterfaces.cs" />
+    <Compile Include="UntypedResource.cs" />
+    <Compile Include="Utility.cs" />
+    <Compile Include="WatermarkDefinition\WatermarkDefinitionInterfaces.cs" />
+    <Compile Include="WebLayout\v1_0_0\WebLayoutImpl.cs" />
+    <Compile Include="WebLayout\WebLayoutInterfaces.cs" />
+    <Compile Include="XmlNamespaces.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Strings.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,87 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.Common;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    public class ObjectFactory
+    {
+        /// <summary>
+        /// Creates an envelope (bounding box)
+        /// </summary>
+        /// <param name="minx"></param>
+        /// <param name="miny"></param>
+        /// <param name="maxx"></param>
+        /// <param name="maxy"></param>
+        /// <returns></returns>
+        public static IEnvelope CreateEnvelope(double minx, double miny, double maxx, double maxy)
+        {
+            if (minx > maxx)
+                throw new ArgumentException("minx > maxx", "minx"); //NOXLATE
+
+            if (miny > maxy)
+                throw new ArgumentException("miny > maxy", "miny"); //NOXLATE
+
+            return new Envelope()
+            {
+                LowerLeftCoordinate = new EnvelopeLowerLeftCoordinate()
+                {
+                    X = minx,
+                    Y = miny
+                },
+                UpperRightCoordinate = new EnvelopeUpperRightCoordinate()
+                {
+                    X = maxx,
+                    Y = maxy
+                }
+            };
+        }
+
+        /// <summary>
+        /// Creates a 2d point
+        /// </summary>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        /// <returns></returns>
+        public static IPoint2D CreatePoint2D(double x, double y)
+        {
+            return new Point2DImpl() { X = x, Y = y };
+        }
+
+        /// <summary>
+        /// Creates a 3d point
+        /// </summary>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        /// <param name="z"></param>
+        /// <returns></returns>
+        public static IPoint3D CreatePoint3D(double x, double y, double z)
+        {
+            return new Point3DImpl() { X = x, Y = y, Z = z };
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/PrintLayout/PrintLayoutInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/PrintLayout/PrintLayoutInterfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/PrintLayout/PrintLayoutInterfaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,338 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.PrintLayout
+{
+    /// <summary>
+    /// Print Layouts
+    /// </summary>
+    public interface IPrintLayout : IResource
+    {
+        /// <summary>
+        /// Gets the page properties.
+        /// </summary>
+        /// <value>The page properties.</value>
+        IPrintLayoutPageProperties PageProperties { get; }
+
+        /// <summary>
+        /// Gets the layout properties.
+        /// </summary>
+        /// <value>The layout properties.</value>
+        IPrintLayoutProperties LayoutProperties { get; }
+
+        /// <summary>
+        /// Creates the size of the logo.
+        /// </summary>
+        /// <param name="width">The width.</param>
+        /// <param name="height">The height.</param>
+        /// <param name="units">The units.</param>
+        /// <returns></returns>
+        ISize CreateLogoSize(float width, float height, string units);
+
+        /// <summary>
+        /// Creates the font.
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <param name="height">The height.</param>
+        /// <param name="units">The units.</param>
+        /// <returns></returns>
+        IFont CreateFont(string name, float height, string units);
+
+        /// <summary>
+        /// Creates the logo position.
+        /// </summary>
+        /// <param name="left">The left.</param>
+        /// <param name="bottom">The bottom.</param>
+        /// <param name="units">The units.</param>
+        /// <returns></returns>
+        IPosition CreateLogoPosition(float left, float bottom, string units);
+
+        /// <summary>
+        /// Creates the text position.
+        /// </summary>
+        /// <param name="left">The left.</param>
+        /// <param name="bottom">The bottom.</param>
+        /// <param name="units">The units.</param>
+        /// <returns></returns>
+        IPosition CreateTextPosition(float left, float bottom, string units);
+
+        /// <summary>
+        /// Gets the custom logos.
+        /// </summary>
+        /// <value>The custom logos.</value>
+        IEnumerable<ILogo> CustomLogos { get; }
+
+        /// <summary>
+        /// Creates the logo.
+        /// </summary>
+        /// <param name="symbolLibraryId">The symbol library id.</param>
+        /// <param name="symbolName">Name of the symbol.</param>
+        /// <param name="size">The size.</param>
+        /// <param name="position">The position.</param>
+        /// <returns></returns>
+        ILogo CreateLogo(string symbolLibraryId, string symbolName, ISize size, IPosition position);
+
+        /// <summary>
+        /// Adds the logo.
+        /// </summary>
+        /// <param name="logo">The logo.</param>
+        void AddLogo(ILogo logo);
+
+        /// <summary>
+        /// Removes the logo.
+        /// </summary>
+        /// <param name="logo">The logo.</param>
+        void RemoveLogo(ILogo logo);
+
+        /// <summary>
+        /// Gets the custom text elements.
+        /// </summary>
+        /// <value>The custom text elements.</value>
+        IEnumerable<IText> CustomText { get; }
+
+        /// <summary>
+        /// Creates the text element.
+        /// </summary>
+        /// <param name="value">The value.</param>
+        /// <param name="font">The font.</param>
+        /// <param name="text">The text.</param>
+        /// <returns></returns>
+        IText CreateText(string value, IFont font, IPosition text);
+
+        /// <summary>
+        /// Adds the text.
+        /// </summary>
+        /// <param name="text">The text.</param>
+        void AddText(IText text);
+
+        /// <summary>
+        /// Removes the text.
+        /// </summary>
+        /// <param name="text">The text.</param>
+        void RemoveText(IText text);
+    }
+
+    /// <summary>
+    /// Page properties of the print layout
+    /// </summary>
+    public interface IPrintLayoutPageProperties : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the color of the background.
+        /// </summary>
+        /// <value>The color of the background.</value>
+        Color BackgroundColor { get; set; }
+    }
+
+    /// <summary>
+    /// Layout properties of the print layout
+    /// </summary>
+    public interface IPrintLayoutProperties : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether [show title].
+        /// </summary>
+        /// <value><c>true</c> if [show title]; otherwise, <c>false</c>.</value>
+        bool ShowTitle { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether [show legend].
+        /// </summary>
+        /// <value><c>true</c> if [show legend]; otherwise, <c>false</c>.</value>
+        bool ShowLegend { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether [show scale bar].
+        /// </summary>
+        /// <value><c>true</c> if [show scale bar]; otherwise, <c>false</c>.</value>
+        bool ShowScaleBar { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether [show north arrow].
+        /// </summary>
+        /// <value><c>true</c> if [show north arrow]; otherwise, <c>false</c>.</value>
+        bool ShowNorthArrow { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether [show URL].
+        /// </summary>
+        /// <value><c>true</c> if [show URL]; otherwise, <c>false</c>.</value>
+        bool ShowURL { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether [show date time].
+        /// </summary>
+        /// <value><c>true</c> if [show date time]; otherwise, <c>false</c>.</value>
+        bool ShowDateTime { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether [show custom logos].
+        /// </summary>
+        /// <value><c>true</c> if [show custom logos]; otherwise, <c>false</c>.</value>
+        bool ShowCustomLogos { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether [show custom text].
+        /// </summary>
+        /// <value><c>true</c> if [show custom text]; otherwise, <c>false</c>.</value>
+        bool ShowCustomText { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a position
+    /// </summary>
+    public interface IPosition : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the left margin.
+        /// </summary>
+        /// <value>The left margin.</value>
+        float Left { get; set; }
+
+        /// <summary>
+        /// Gets or sets the bottom margin.
+        /// </summary>
+        /// <value>The bottom margin.</value>
+        float Bottom { get; set; }
+
+        /// <summary>
+        /// Gets or sets the units.
+        /// </summary>
+        /// <value>The units.</value>
+        string Units { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a size
+    /// </summary>
+    public interface ISize : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the width.
+        /// </summary>
+        /// <value>The width.</value>
+        float Width { get; set; }
+
+        /// <summary>
+        /// Gets or sets the height.
+        /// </summary>
+        /// <value>The height.</value>
+        float Height { get; set; }
+
+        /// <summary>
+        /// Gets or sets the units.
+        /// </summary>
+        /// <value>The units.</value>
+        string Units { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a logo
+    /// </summary>
+    public interface ILogo : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets the position.
+        /// </summary>
+        /// <value>The position.</value>
+        IPosition Position { get; }
+
+        /// <summary>
+        /// Gets or sets the resource id.
+        /// </summary>
+        /// <value>The resource id.</value>
+        string ResourceId { get; set; }
+
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets the size.
+        /// </summary>
+        /// <value>The size.</value>
+        ISize Size { get; }
+
+        /// <summary>
+        /// Gets or sets the rotation.
+        /// </summary>
+        /// <value>The rotation.</value>
+        float? Rotation { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a font
+    /// </summary>
+    public interface IFont : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the height.
+        /// </summary>
+        /// <value>The height.</value>
+        float Height { get; set; }
+
+        /// <summary>
+        /// Gets or sets the units.
+        /// </summary>
+        /// <value>The units.</value>
+        string Units { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a text element
+    /// </summary>
+    public interface IText : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets the position.
+        /// </summary>
+        /// <value>The position.</value>
+        IPosition Position { get; }
+
+        /// <summary>
+        /// Gets the font.
+        /// </summary>
+        /// <value>The font.</value>
+        IFont Font { get; }
+
+        /// <summary>
+        /// Gets or sets the value.
+        /// </summary>
+        /// <value>The value.</value>
+        string Value { get; set; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/PrintLayout/v1.0.0/PrintLayoutImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/PrintLayout/v1.0.0/PrintLayoutImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/PrintLayout/v1.0.0/PrintLayoutImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,318 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+#pragma warning disable 1591, 0114, 0108
+
+namespace OSGeo.MapGuide.ObjectModels.PrintLayout.v1_0_0
+{
+    partial class PrintLayout : IPrintLayout
+    {
+        internal PrintLayout()
+        {
+        }
+
+        private static readonly Version RES_VERSION = new Version(1, 0, 0);
+
+        private string _resId;
+
+        [XmlIgnore]
+        public string ResourceID
+        {
+            get
+            {
+                return _resId;
+            }
+            set
+            {
+                if (!ResourceIdentifier.Validate(value))
+                    throw new InvalidOperationException(Strings.ErrorInvalidResourceIdentifier);
+
+                var res = new ResourceIdentifier(value);
+                if (res.Extension != ResourceTypes.PrintLayout.ToString())
+                    throw new InvalidOperationException(string.Format(Strings.ErrorUnexpectedResourceType, res.ToString(), ResourceTypes.PrintLayout));
+
+                _resId = value;
+                this.OnPropertyChanged("ResourceID"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public string ResourceType
+        {
+            get
+            {
+                return ResourceTypes.PrintLayout.ToString();
+            }
+        }
+
+        [XmlIgnore]
+        public Version ResourceVersion
+        {
+            get
+            {
+                return RES_VERSION;
+            }
+        }
+
+        object ICloneable.Clone()
+        {
+            return this.Clone();
+        }
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] //NOXLATE
+        public string ValidatingSchema
+        {
+            get { return "PrintLayout-1.0.0.xsd"; } //NOXLATE
+            set { }
+        }
+
+        [XmlIgnore]
+        public bool IsStronglyTyped
+        {
+            get { return true; }
+        }
+
+        [XmlIgnore]
+        IPrintLayoutPageProperties IPrintLayout.PageProperties
+        {
+            get { return this.PageProperties; }
+        }
+
+        [XmlIgnore]
+        IPrintLayoutProperties IPrintLayout.LayoutProperties
+        {
+            get { return this.LayoutProperties; }
+        }
+
+        [XmlIgnore]
+        IEnumerable<ILogo> IPrintLayout.CustomLogos
+        {
+            get
+            {
+                foreach (var logo in this.CustomLogos)
+                {
+                    yield return logo;
+                }
+            }
+        }
+
+        void IPrintLayout.RemoveLogo(ILogo logo)
+        {
+            var l = logo as PrintLayoutLogo;
+            if (l != null)
+            {
+                this.CustomLogos.Remove(l);
+                OnPropertyChanged("CustomLogos"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<IText> IPrintLayout.CustomText
+        {
+            get
+            {
+                foreach (var text in this.CustomText)
+                {
+                    yield return text;
+                }
+            }
+        }
+
+        void IPrintLayout.AddText(IText text)
+        {
+            var t = text as PrintLayoutText;
+            if (t != null)
+            {
+                this.CustomText.Add(t);
+                OnPropertyChanged("CustomText"); //NOXLATE
+            }
+        }
+
+        void IPrintLayout.RemoveText(IText text)
+        {
+            var t = text as PrintLayoutText;
+            if (t != null)
+            {
+                this.CustomText.Remove(t);
+                OnPropertyChanged("CustomText"); //NOXLATE
+            }
+        }
+
+        ISize IPrintLayout.CreateLogoSize(float width, float height, string units)
+        {
+            return new PrintLayoutLogoSize() { Width = width, Height = height, Units = units };
+        }
+
+        IPosition IPrintLayout.CreateLogoPosition(float left, float bottom, string units)
+        {
+            return new PrintLayoutLogoPosition() { Left = left, Bottom = bottom, Units = units };
+        }
+
+        IPosition IPrintLayout.CreateTextPosition(float left, float bottom, string units)
+        {
+            return new PrintLayoutTextPosition() { Left = left, Bottom = bottom, Units = units };
+        }
+
+        IFont IPrintLayout.CreateFont(string name, float height, string units)
+        {
+            return new PrintLayoutTextFont() { Name = name, Height = height, Units = units };
+        }
+
+        ILogo IPrintLayout.CreateLogo(string symbolLibraryId, string symbolName, ISize size, IPosition position)
+        {
+            var logo = new PrintLayoutLogo()
+            {
+                Name = symbolName,
+                ResourceId = symbolLibraryId,
+                Position = (PrintLayoutLogoPosition)position,
+                Size = (PrintLayoutLogoSize)size
+            };
+
+            return logo;
+        }
+
+        void IPrintLayout.AddLogo(ILogo logo)
+        {
+            var l = logo as PrintLayoutLogo;
+            if (l != null)
+            {
+                this.CustomLogos.Add(l);
+                OnPropertyChanged("CustomLogos"); //NOXLATE
+            }
+        }
+
+        IText IPrintLayout.CreateText(string value, IFont font, IPosition pos)
+        {
+            var text = new PrintLayoutText()
+            {
+                Font = (PrintLayoutTextFont)font,
+                Position = (PrintLayoutTextPosition)pos,
+                Value = value
+            };
+            return text;
+        }
+    }
+
+    partial class PrintLayoutPageProperties : IPrintLayoutPageProperties
+    {
+        [XmlIgnore]
+        System.Drawing.Color IPrintLayoutPageProperties.BackgroundColor
+        {
+            get
+            {
+                int r;
+                int g;
+                int b;
+                if (int.TryParse(this.BackgroundColor.Red, out r) &&
+                    int.TryParse(this.BackgroundColor.Green, out g) &&
+                    int.TryParse(this.BackgroundColor.Blue, out b))
+                {
+                    return System.Drawing.Color.FromArgb(r, g, b);
+                }
+                return new System.Drawing.Color();
+            }
+            set
+            {
+                this.BackgroundColor.Red = value.R.ToString();
+                this.BackgroundColor.Green = value.G.ToString();
+                this.BackgroundColor.Blue = value.B.ToString();
+            }
+        }
+    }
+
+    partial class PrintLayoutLayoutProperties : IPrintLayoutProperties
+    {
+    }
+
+    partial class PrintLayoutLogo : ILogo
+    {
+        [XmlIgnore]
+        IPosition ILogo.Position
+        {
+            get { return this.Position; }
+        }
+
+        [XmlIgnore]
+        ISize ILogo.Size
+        {
+            get { return this.Size; }
+        }
+
+        [XmlIgnore]
+        float? ILogo.Rotation
+        {
+            get
+            {
+                return this.RotationSpecified ? new Nullable<float>(this.Rotation) : null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.Rotation = value.Value;
+                    this.RotationSpecified = true;
+                }
+                else
+                {
+                    this.RotationSpecified = false;
+                }
+            }
+        }
+    }
+
+    partial class PrintLayoutLogoPosition : IPosition
+    {
+    }
+
+    partial class PrintLayoutLogoSize : ISize
+    {
+    }
+
+    partial class PrintLayoutText : IText
+    {
+        [XmlIgnore]
+        IPosition IText.Position
+        {
+            get { return this.Position; }
+        }
+
+        [XmlIgnore]
+        IFont IText.Font
+        {
+            get { return this.Font; }
+        }
+    }
+
+    partial class PrintLayoutTextFont : IFont
+    {
+    }
+
+    partial class PrintLayoutTextPosition : IPosition
+    {
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Properties/AssemblyInfo.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Properties/AssemblyInfo.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OSGeo.MapGuide.ObjectModels")]
+[assembly: AssemblyDescription("MapGuide Object Model Library")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Open Source Geospatial Foundation")]
+[assembly: AssemblyCopyright("Copyright (c) 2014, Jackie Ng")]
+[assembly: AssemblyProduct("OSGeo.MapGuide.ObjectModels")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("b7638193-e61e-4f87-a775-31dd931fb0bd")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("2.6.0.0")]
+[assembly: AssemblyFileVersion("2.6.0.0")]
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceContentVersionChecker.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceContentVersionChecker.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceContentVersionChecker.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,127 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+using System.Xml;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    /// <summary>
+    /// Inspects a resource content stream to determine the version of the resource content within
+    ///
+    /// The stream to be inspected is copied and the inspection is made on the copy
+    /// </summary>
+    public sealed class ResourceContentVersionChecker : IDisposable
+    {
+        private XmlReader _reader;
+        private Stream _stream;
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="stream">The resource content stream. Inspection is done on a copy of this stream</param>
+        public ResourceContentVersionChecker(Stream stream)
+        {
+            var ms = new MemoryStream();
+            Utility.CopyStream(stream, ms);
+            ms.Position = 0L; //Rewind
+            _stream = ms;
+            _reader = new XmlTextReader(_stream);
+        }
+
+        /// <summary>
+        /// Alternate constructor
+        /// </summary>
+        /// <param name="xmlContent"></param>
+        public ResourceContentVersionChecker(string xmlContent)
+        {
+            _stream = new MemoryStream(Encoding.UTF8.GetBytes(xmlContent));
+        }
+
+        private ResourceTypeDescriptor _rtd;
+
+        /// <summary>
+        /// Gets the resource content version
+        /// </summary>
+        /// <returns></returns>
+        public ResourceTypeDescriptor GetVersion()
+        {
+            if (_rtd == null)
+            {
+                _rtd = GetVersionFromXmlStream(_stream);
+            }
+            return _rtd;
+        }
+
+        /// <summary>
+        /// Gets the version from XML stream.
+        /// </summary>
+        /// <param name="ms">The ms.</param>
+        /// <returns></returns>
+        public static ResourceTypeDescriptor GetVersionFromXmlStream(Stream ms)
+        {
+            string version = "1.0.0"; //NOXLATE
+            using (var xr = XmlReader.Create(ms))
+            {
+                xr.MoveToContent();
+                if (!xr.HasAttributes)
+                    throw new SerializationException();
+
+                try
+                {
+                    //Parse version number from ResourceType-x.y.z.xsd
+                    string xsd = xr.GetAttribute("xsi:noNamespaceSchemaLocation"); //NOXLATE
+                    if (xsd == null)
+                        return null;
+
+                    int start = (xsd.LastIndexOf("-")); //NOXLATE
+                    int end = xsd.IndexOf(".xsd") - 1; //NOXLATE
+                    version = xsd.Substring(start + 1, xsd.Length - end);
+                    string typeStr = xsd.Substring(0, start);
+
+                    return new ResourceTypeDescriptor(typeStr, version);
+                }
+                finally
+                {
+                    xr.Close();
+                }
+            }
+        }
+
+        /// <summary>
+        /// Disposes this instance
+        /// </summary>
+        public void Dispose()
+        {
+            if (_stream != null)
+                _stream.Dispose();
+
+            if (_reader != null)
+                _reader.Close();
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceIdentifier.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceIdentifier.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceIdentifier.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,644 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    /// <summary>
+    /// This class contains all the required code for maintaining resource identifiers.
+    /// It has implicit conversions to and from a string, which makes it much easier to use.
+    /// It has both static methods that operate on strings, as well as a class that can be manipulated.
+    /// </summary>
+    public class ResourceIdentifier
+    {
+        /// <summary>
+        /// The actual ResourceID
+        /// </summary>
+        private string m_id;
+
+        /// <summary>
+        /// Constructs a new ResourceIdentifier with the given full path
+        /// </summary>
+        /// <param name="resourceId">The path of the resource to refence</param>
+        public ResourceIdentifier(string resourceId)
+        {
+            m_id = resourceId;
+        }
+
+        /// <summary>
+        /// Constructs a new ResourceIdentifier, based on an existing one.
+        /// </summary>
+        /// <param name="id">The resource identifier to copy</param>
+        public ResourceIdentifier(ResourceIdentifier id)
+        {
+            m_id = id.m_id;
+        }
+
+        /// <summary>
+        /// Constructs a new library based resource identifier
+        /// </summary>
+        /// <param name="name">The name of the resource, may include path information with the \"/\" character</param>
+        /// <param name="type">The type of resource the identifier names</param>
+        public ResourceIdentifier(string name, ResourceTypes type)
+        {
+            if (string.IsNullOrEmpty(name))
+                throw new ArgumentNullException("name"); //NOXLATE
+            if (name.IndexOf(".") > 0 || name.IndexOf("//") > 0 || name.IndexOf(":") > 0) //NOXLATE
+                throw new ArgumentException(Strings.ErrorResourceIdentifierInvalidChars, "name"); //NOXLATE
+            if (!Enum.IsDefined(typeof(ResourceTypes), type))
+                throw new ArgumentException(Strings.ErrorUnknownResourceType, "type"); //NOXLATE
+            m_id = ROOT_IDENTIFIER + name + ResourceName(type, true);
+        }
+
+        private static string ResourceName(ResourceTypes type)
+        {
+            return ResourceName(type, false);
+        }
+
+        private static string ResourceName(ResourceTypes type, bool prefixWithDot)
+        {
+            if (type == ResourceTypes.Folder || !prefixWithDot)
+                return type.ToString();
+            else
+                return "." + type.ToString(); //NOXLATE
+        }
+
+        private const string ROOT_IDENTIFIER = "Library://"; //NOXLATE
+
+        /// <summary>
+        /// Constructs a new session based resource identifier
+        /// </summary>
+        /// <param name="name">The name of the resource, may include path information with the \"/\" character</param>
+        /// <param name="type">The type of resource the identifier names</param>
+        /// <param name="sessionId">The session id to use</param>
+        public ResourceIdentifier(string name, ResourceTypes type, string sessionId)
+            : this(name, type)
+        {
+            this.ConvertToSession(sessionId);
+        }
+
+        /// <summary>
+        /// Gets a value indicating if the resource is blank
+        /// </summary>
+        public bool IsEmpty { get { return string.IsNullOrEmpty(m_id); } }
+
+        /// <summary>
+        /// Gets or sets the name of the resource
+        /// </summary>
+        public string Name
+        {
+            get { return GetName(m_id); }
+            set { m_id = SetName(m_id, value); }
+        }
+
+        /// <summary>
+        /// Gets or sets the name and extension of the resource
+        /// </summary>
+        public string Fullname
+        {
+            get { return GetFullname(m_id); }
+            set { m_id = SetName(m_id, value); }
+        }
+
+        /// <summary>
+        /// Gets or sets the extension of the resourceId
+        /// </summary>
+        public string Extension
+        {
+            get { return GetExtension(m_id); }
+            set { m_id = SetExtension(m_id, value); }
+        }
+
+        /// <summary>
+        /// Gets the full path of the resource, that is the path without repository information
+        /// </summary>
+        public string Fullpath
+        {
+            get { return GetFullpath(m_id); }
+            set { m_id = SetPath(m_id, value); }
+        }
+
+        /// <summary>
+        /// Gets the path of the resource, that is the path without repository information and no extension
+        /// </summary>
+        public string Path
+        {
+            get { return GetPath(m_id); }
+            set { m_id = SetPath(m_id, value); }
+        }
+
+        /// <summary>
+        /// Gets or sets the path to the resource, including the repository
+        /// </summary>
+        public string RepositoryPath
+        {
+            get { return GetRepositoryPath(m_id); }
+            set { m_id = SetRepositoryPath(m_id, value); }
+        }
+
+        /// <summary>
+        /// Gets a value indicating if the resource is in the library repository
+        /// </summary>
+        public bool IsInLibrary
+        {
+            get { return GetRepository(m_id) == ROOT_IDENTIFIER; }
+        }
+
+        /// <summary>
+        /// Gets a value indicating if the resource is in the session repository
+        /// </summary>
+        public bool IsInSessionRepository
+        {
+            get { return !this.IsInLibrary; }
+        }
+
+        /// <summary>
+        /// Converts this instance to be in the library repository
+        /// </summary>
+        public void ConvertToLibrary()
+        {
+            m_id = ResourceIdentifier.ConvertToLibrary(m_id);
+        }
+
+        /// <summary>
+        /// Converts this instance to be in the session repository
+        /// </summary>
+        /// <param name="sessionId">The sessionid</param>
+        public void ConvertToSession(string sessionId)
+        {
+            m_id = ResourceIdentifier.ConvertToSession(m_id, sessionId);
+        }
+
+        /// <summary>
+        /// Helper operator that makes using the resource identifiers easier
+        /// </summary>
+        /// <param name="id">The id to convert to a string</param>
+        /// <returns>The converted string</returns>
+        public static implicit operator string(ResourceIdentifier id)
+        {
+            return id == null ? null : id.m_id;
+        }
+
+        /// <summary>
+        /// Helper operator that makes using the resource identifiers easier
+        /// </summary>
+        /// <param name="id">The id to convert into a resource indetifier class</param>
+        /// <returns>The resource identifier</returns>
+        public static implicit operator ResourceIdentifier(string id)
+        {
+            return new ResourceIdentifier(id);
+        }
+
+        /// <summary>
+        /// Returns the full resource id as a string
+        /// </summary>
+        /// <returns>The full resource id as a string</returns>
+        public override string ToString()
+        {
+            return m_id;
+        }
+
+        /// <summary>
+        /// Gets the resource type
+        /// </summary>
+        public string ResourceType
+        {
+            get { return GetResourceTypeAsString(m_id); }
+        }
+
+        /// <summary>
+        /// Gets the length of the resource identifier as a string
+        /// </summary>
+        public int Length { get { return m_id == null ? 0 : m_id.Length; } }
+
+        /// <summary>
+        /// Gets or sets the full resource identifier
+        /// </summary>
+        public string ResourceId
+        {
+            get { return m_id; }
+            set { m_id = value; }
+        }
+
+        /// <summary>
+        /// Gets a value indicating if the resource identifier points to a folder
+        /// </summary>
+        public bool IsFolder
+        {
+            get { return ResourceIdentifier.IsFolderResource(m_id); }
+        }
+
+        /// <summary>
+        /// Gets a value indicating if the resource identifier is valid
+        /// </summary>
+        public bool IsValid
+        {
+            get { return ResourceIdentifier.Validate(m_id); }
+        }
+
+        /// <summary>
+        /// Normalizes the identifier, that is prepends a slash if the identifier points to a folder
+        /// </summary>
+        public void Normalize()
+        {
+            m_id = ResourceIdentifier.Normalize(m_id);
+        }
+
+        /// <summary>
+        /// Gets the containing folder path for the resource, including the repository
+        /// </summary>
+        public string ParentFolder
+        {
+            get { return ResourceIdentifier.GetParentFolder(m_id, true /* Because it was initialized with a ResourceTypes enum */); }
+        }
+
+        #region Static handlers
+
+        /// <summary>
+        /// Gets the name of a resource, given its identifier
+        /// </summary>
+        /// <param name="identifier">The identifier to look for</param>
+        /// <returns>The name of the resource</returns>
+        public static string GetName(string identifier)
+        {
+            if (string.IsNullOrEmpty(identifier))
+                throw new ArgumentNullException("identifier"); //NOXLATE
+
+            string temp = GetPath(identifier);
+
+            if (string.IsNullOrEmpty(temp))
+                throw new ArgumentException(Strings.ErrorInvalidResourceIdentifier, "identifier"); //NOXLATE
+
+            return temp.Substring(temp.LastIndexOf("/") + 1); //NOXLATE
+        }
+
+        /// <summary>
+        /// Sets the name of the resource, with or without the extension
+        /// </summary>
+        /// <param name="identifier">The identifier to give a new name</param>
+        /// <param name="newname">The new name to assign</param>
+        /// <returns>The renamed identifier</returns>
+        public static string SetName(string identifier, string newname)
+        {
+            string temp = GetPath(identifier);
+            if (identifier.EndsWith("/")) //NOXLATE
+            {
+                if (!newname.EndsWith("/")) //NOXLATE
+                    newname += "/"; //NOXLATE
+            }
+            else
+                newname += "." + GetExtension(identifier); //NOXLATE
+
+            if (newname.IndexOf("/") > 0) //NOXLATE
+                throw new ArgumentException(Strings.ErrorResourceIdentifierNameInvalidChars, "newname");
+            temp = temp.Substring(0, temp.Length - GetName(identifier).Length) + newname;
+
+            return GetRepository(identifier) + temp;
+        }
+
+        /// <summary>
+        /// Sets the path of the identifier, with or without the extension
+        /// </summary>
+        /// <param name="identifier">The identifier to update</param>
+        /// <param name="newpath">The new path to user, with or without the extension</param>
+        /// <returns>The new identifier</returns>
+        public static string SetPath(string identifier, string newpath)
+        {
+            string temp = GetPath(identifier);
+            if (!identifier.EndsWith("/")) //NOXLATE
+                newpath += "." + GetExtension(identifier); //NOXLATE
+
+            return GetRepository(identifier) + newpath + (identifier.EndsWith("/") ? "/" : ""); //NOXLATE
+        }
+
+        /// <summary>
+        /// Changes the extension of the given resource
+        /// </summary>
+        /// <param name="identifier">The identifier to change the extension for</param>
+        /// <param name="newextension">The new extension to use</param>
+        /// <returns>The renmaed identifier</returns>
+        public static string SetExtension(string identifier, string newextension)
+        {
+            if (identifier.EndsWith("/")) //NOXLATE
+                throw new Exception(Strings.ErrorResourceIdCannotChangeExtensionForFolder);
+
+            if (!newextension.StartsWith(".")) //NOXLATE
+                newextension = "." + newextension; //NOXLATE
+
+            if (newextension.LastIndexOf(".") > 0) //NOXLATE
+                throw new ArgumentException(Strings.ErrorResourceIdInvalidExtension, "newextension"); //NOXLATE
+
+            return identifier.Substring(0, identifier.Length - GetExtension(identifier).Length - 1) + newextension;
+        }
+
+        /// <summary>
+        /// Gets the repository part of a resource identifier, eg.: "Library://" or "Session:xxxx//"
+        /// </summary>
+        /// <param name="identifier"></param>
+        /// <returns></returns>
+        public static string GetRepository(string identifier)
+        {
+            if (string.IsNullOrEmpty(identifier))
+                throw new ArgumentNullException("identifier"); //NOXLATE
+            int ix = identifier.IndexOf("//"); //NOXLATE
+            if (ix <= 0)
+                throw new ArgumentException(Strings.ErrorInvalidResourceIdentifier, "identifier"); //NOXLATE
+
+            string repo = identifier.Substring(0, ix);
+            if (repo != "Library:" && !repo.StartsWith("Session:")) //NOXLATE
+                throw new ArgumentException(Strings.ErrorInvalidResourceIdentifierType, "identifier"); //NOXLATE
+
+            return repo + "//"; //NOXLATE
+        }
+
+        /// <summary>
+        /// Returns the full path of the resource, that is the resourceId without the repository information
+        /// </summary>
+        /// <param name="identifier">The identifier to get the path from</param>
+        /// <returns>The path of the identifier</returns>
+        public static string GetFullpath(string identifier)
+        {
+            if (string.IsNullOrEmpty(identifier))
+                throw new ArgumentNullException("identifier"); //NOXLATE
+            return identifier.Substring(GetRepository(identifier).Length);
+        }
+
+        /// <summary>
+        /// Returns the path of the resource, that is the resourceId without the repository information and extension
+        /// </summary>
+        /// <param name="identifier">The identifier to get the path from</param>
+        /// <returns>The path of the identifier</returns>
+        public static string GetPath(string identifier)
+        {
+            if (string.IsNullOrEmpty(identifier))
+                throw new ArgumentNullException("identifier"); //NOXLATE
+            return identifier.Substring(GetRepository(identifier).Length, identifier.Length - GetExtension(identifier).Length - GetRepository(identifier).Length - 1);
+        }
+
+        /// <summary>
+        /// Gets the type of this resource.
+        /// </summary>
+        /// <remarks>Use this method over <see cref="M:OSGeo.MapGuide.MaestroAPI.Resource.ResourceIdentifier.GetResourceType"/> if the Maestro API may not be aware of the new resource type</remarks>
+        /// <param name="identifier"></param>
+        /// <returns></returns>
+        public static string GetResourceTypeAsString(string identifier)
+        {
+            return GetExtension(identifier);
+        }
+
+        /// <summary>
+        /// Gets the known type of the resource.
+        /// </summary>
+        /// <param name="identifier">The identifier.</param>
+        /// <returns></returns>
+        private static ResourceTypes GetResourceType(string identifier)
+        {
+            var ext = GetExtension(identifier);
+            if (ext == "Map") //NOXLATE
+                return ResourceTypes.RuntimeMap;
+            else
+                return (ResourceTypes)Enum.Parse(typeof(ResourceTypes), ext);
+        }
+
+        /// <summary>
+        /// Returns the extension of a resource identifier
+        /// </summary>
+        /// <param name="identifier">The identifier to get the extension from</param>
+        /// <returns>The extension of the identifier</returns>
+        private static string GetExtension(string identifier)
+        {
+            if (string.IsNullOrEmpty(identifier))
+                throw new ArgumentNullException("identifier"); //NOXLATE
+
+            if (identifier.EndsWith("/")) //NOXLATE
+                return string.Empty;
+
+            int ix = identifier.LastIndexOf("."); //NOXLATE
+            if (ix <= 0)
+                throw new ArgumentException(Strings.ErrorInvalidResourceIdentifier, "identifier"); //NOXLATE
+
+            return identifier.Substring(ix + 1);
+        }
+
+        /// <summary>
+        /// Converts a resource id to be placed in the library
+        /// </summary>
+        /// <param name="identifier">The identifier to convert</param>
+        /// <returns>The converted identifier</returns>
+        public static string ConvertToLibrary(string identifier)
+        {
+            return ROOT_IDENTIFIER + identifier.Substring(GetRepository(identifier).Length);
+        }
+
+        /// <summary>
+        /// Converts a resource id to be placed in the library
+        /// </summary>
+        /// <param name="identifier">The identifier to convert</param>
+        /// <param name="sessionId">The session id of the repository it should be placed in</param>
+        /// <returns>The converted identifier</returns>
+        public static string ConvertToSession(string identifier, string sessionId)
+        {
+            return "Session:" + sessionId + "//" + identifier.Substring(GetRepository(identifier).Length); //NOXLATE
+        }
+
+        /// <summary>
+        /// Gets the name and extension of the identifier
+        /// </summary>
+        /// <param name="identifier">The identifier to extract the information from</param>
+        /// <returns>The full name of the identifier</returns>
+        public static string GetFullname(string identifier)
+        {
+            if (identifier.EndsWith("/")) //NOXLATE
+                return GetName(identifier);
+            else
+                return GetName(identifier) + "." + GetExtension(identifier); //NOXLATE
+        }
+
+        /// <summary>
+        /// Determines if a resource identifier is valid
+        /// </summary>
+        /// <param name="identifier">The identifier to validate</param>
+        /// <param name="strict">If true, will check if the type of the resource id is one that is supported by Maestro</param>
+        /// <returns>A value indicating if the identifier is valid</returns>
+        public static bool Validate(string identifier, bool strict = true)
+        {
+            try
+            {
+                GetRepository(identifier);
+                if (identifier.IndexOf(".") < 0 && !identifier.EndsWith("/")) //NOXLATE
+                    return false;
+
+                if (identifier == ROOT_IDENTIFIER)
+                    return true;
+
+                if (IsFolderResource(identifier))
+                    return true;
+
+                if (strict)
+                {
+                    var rt = GetResourceType(identifier);
+                }
+            }
+            catch
+            {
+                return false;
+            }
+
+            return true;
+        }
+
+        /// <summary>
+        /// Returns a value indicating if the resource points to a folder
+        /// </summary>
+        /// <param name="identifier">The identifier to evaluate</param>
+        /// <returns>A value indicating if the resource points to a folder</returns>
+        public static bool IsFolderResource(string identifier)
+        {
+            return identifier.EndsWith("/"); //NOXLATE
+        }
+
+        /// <summary>
+        /// Normalizes a identifier, that is prepends a slash if it is a folder resource
+        /// </summary>
+        /// <param name="identifier">The identifier to normalize</param>
+        /// <returns>The normalized identifier</returns>
+        public static string Normalize(string identifier)
+        {
+            if (identifier.LastIndexOf(".") <= identifier.LastIndexOf("/") && !identifier.EndsWith("/")) //NOXLATE
+                return identifier + "/"; //NOXLATE
+            else
+                return identifier;
+        }
+
+        /// <summary>
+        /// Determines if a resource identifier is valid and of the desired type
+        /// </summary>
+        /// <param name="identifier">The identifier to validate</param>
+        /// <param name="type">The type the resource identifer must be</param>
+        /// <returns>A value indicating if the identifier is valid</returns>
+        public static bool Validate(string identifier, ResourceTypes type)
+        {
+            if (!Validate(identifier))
+                return false;
+
+            if (type == ResourceTypes.Folder)
+                return IsFolderResource(identifier);
+            else
+                return ResourceName(type) == GetExtension(identifier);
+        }
+
+        /// <summary>
+        /// Returns the path that contains the resource, including the repository
+        /// </summary>
+        /// <param name="identifier">The resource identifier to use</param>
+        /// <returns>The folder for the identifier</returns>
+        public static string GetRepositoryPath(string identifier)
+        {
+            if (!Validate(identifier))
+                throw new Exception("Invalid resource id: " + identifier); //NOXLATE
+            identifier = Normalize(identifier);
+
+            return identifier.Substring(0, identifier.LastIndexOf("/", identifier.Length)) + "/"; //NOXLATE
+        }
+
+        /// <summary>
+        /// Sets the path including the repository to the given value
+        /// </summary>
+        /// <param name="identifier">The identifier to change the folder for</param>
+        /// <param name="folder">The new folder</param>
+        /// <returns>An identifier in the new folder</returns>
+        public static string SetRepositoryPath(string identifier, string folder)
+        {
+            if (!folder.StartsWith("Library:") && !folder.StartsWith("Session:")) //NOXLATE
+            {
+                string res = identifier.EndsWith("/") ? string.Empty : GetFullname(identifier); //NOXLATE
+                string repo = GetRepository(identifier);
+                if (!folder.EndsWith("/") && !string.IsNullOrEmpty(folder)) //NOXLATE
+                    folder += "/"; //NOXLATE
+                return repo + folder + res;
+            }
+            else if (GetExtension(identifier) == string.Empty)
+            {
+                if (!folder.EndsWith("/")) //NOXLATE
+                    folder += "/"; //NOXLATE
+                return folder;
+            }
+            else
+            {
+                if (!folder.EndsWith("/")) //NOXLATE
+                    folder += "/"; //NOXLATE
+                return folder + GetFullname(identifier);
+            }
+        }
+
+        /// <summary>
+        /// Gets the parent folder.
+        /// </summary>
+        /// <param name="identifier">The identifier.</param>
+        /// <returns></returns>
+        public static string GetParentFolder(string identifier)
+        {
+            return GetParentFolder(identifier, false);
+        }
+
+        /// <summary>
+        /// Gets the parent folder.
+        /// </summary>
+        /// <param name="identifier">The identifier.</param>
+        /// <param name="strict">If true, the type of the identifier must be one that is supported by Maestro</param>
+        /// <returns></returns>
+        private static string GetParentFolder(string identifier, bool strict)
+        {
+            if (!Validate(identifier, strict))
+                throw new Exception(Strings.ErrorInvalidResourceIdentifier);
+            identifier = Normalize(identifier);
+
+            if (identifier == GetRepository(identifier))
+                return identifier;
+
+            if (identifier.EndsWith("/")) //NOXLATE
+                identifier = identifier.Remove(identifier.Length - 1);
+
+            identifier = identifier.Remove(identifier.LastIndexOf("/") + 1); //NOXLATE
+
+            return identifier;
+        }
+
+        #endregion Static handlers
+
+        /// <summary>
+        /// Determines whether this resource id is session-based
+        /// </summary>
+        /// <param name="resourceID">The resource ID.</param>
+        /// <returns>
+        /// 	<c>true</c> if this resource id is session-based; otherwise, <c>false</c>.
+        /// </returns>
+        public static bool IsSessionBased(string resourceID)
+        {
+            return resourceID.StartsWith("Session:"); //NOXLATE
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeDescriptor.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeDescriptor.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeDescriptor.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,193 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    /// <summary>
+    /// Represents a unique resource type / version pair
+    /// </summary>
+    public class ResourceTypeDescriptor
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="ResourceTypeDescriptor"/> class.
+        /// </summary>
+        /// <param name="resType">Type of the res.</param>
+        /// <param name="ver">The ver.</param>
+        public ResourceTypeDescriptor(string resType, string ver)
+        {
+            Check.NotEmpty(resType, "resType"); //NOXLATE
+            Check.NotEmpty(ver, "ver"); //NOXLATE
+
+            this.ResourceType = resType;
+            this.Version = ver;
+        }
+
+        /// <summary>
+        /// Gets the name of the validating XML schema
+        /// </summary>
+        public string XsdName
+        {
+            get
+            {
+                return ResourceType + "-" + Version + ".xsd"; //NOXLATE
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the type of the resource.
+        /// </summary>
+        /// <value>The type of the resource.</value>
+        public string ResourceType { get; set; }
+
+        /// <summary>
+        /// Gets or sets the version.
+        /// </summary>
+        /// <value>The version.</value>
+        public string Version { get; set; }
+
+        /// <summary>
+        /// Determines whether the specified <see cref="System.Object"/> is equal to this instance.
+        /// </summary>
+        /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param>
+        /// <returns>
+        /// 	<c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.
+        /// </returns>
+        /// <exception cref="T:System.NullReferenceException">
+        /// The <paramref name="obj"/> parameter is null.
+        /// </exception>
+        public override bool Equals(object obj)
+        {
+            var desc = obj as ResourceTypeDescriptor;
+            if (desc == null)
+                return false;
+
+            return this.ToString() == desc.ToString();
+        }
+
+        /// <summary>
+        /// Returns a <see cref="System.String"/> that represents this instance.
+        /// </summary>
+        /// <returns>
+        /// A <see cref="System.String"/> that represents this instance.
+        /// </returns>
+        public override string ToString()
+        {
+            return this.ResourceType + this.Version;
+        }
+
+        /// <summary>
+        /// Returns a hash code for this instance.
+        /// </summary>
+        /// <returns>
+        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+        /// </returns>
+        public override int GetHashCode()
+        {
+            return this.ToString().GetHashCode();
+        }
+
+        /// <summary>
+        /// Application Definition v1.0.0
+        /// </summary>
+        public static ResourceTypeDescriptor ApplicationDefinition
+        {
+            get { return new ResourceTypeDescriptor("ApplicationDefinition", "1.0.0"); } //NOXLATE
+        }
+
+        /// <summary>
+        /// Feature Source v1.0.0
+        /// </summary>
+        public static ResourceTypeDescriptor FeatureSource
+        {
+            get { return new ResourceTypeDescriptor("FeatureSource", "1.0.0"); } //NOXLATE
+        }
+
+        /// <summary>
+        /// Drawing Source v1.0.0
+        /// </summary>
+        public static ResourceTypeDescriptor DrawingSource
+        {
+            get { return new ResourceTypeDescriptor("DrawingSource", "1.0.0"); } //NOXLATE
+        }
+
+        /// <summary>
+        /// Layer Definition v1.0.0
+        /// </summary>
+        public static ResourceTypeDescriptor LayerDefinition
+        {
+            get { return new ResourceTypeDescriptor("LayerDefinition", "1.0.0"); } //NOXLATE
+        }
+
+        /// <summary>
+        /// Load Procedure v1.0.0
+        /// </summary>
+        public static ResourceTypeDescriptor LoadProcedure
+        {
+            get { return new ResourceTypeDescriptor("LoadProcedure", "1.0.0"); } //NOXLATE
+        }
+
+        /// <summary>
+        /// Map Definition v1.0.0
+        /// </summary>
+        public static ResourceTypeDescriptor MapDefinition
+        {
+            get { return new ResourceTypeDescriptor("MapDefinition", "1.0.0"); } //NOXLATE
+        }
+
+        /// <summary>
+        /// Print Layout v1.0.0
+        /// </summary>
+        public static ResourceTypeDescriptor PrintLayout
+        {
+            get { return new ResourceTypeDescriptor("PrintLayout", "1.0.0"); } //NOXLATE
+        }
+
+        /// <summary>
+        /// Symbol Library v1.0.0
+        /// </summary>
+        public static ResourceTypeDescriptor SymbolLibrary
+        {
+            get { return new ResourceTypeDescriptor("SymbolLibrary", "1.0.0"); } //NOXLATE
+        }
+
+        /// <summary>
+        /// Symbol Definition v1.0.0
+        /// </summary>
+        public static ResourceTypeDescriptor SymbolDefinition
+        {
+            get { return new ResourceTypeDescriptor("SymbolDefinition", "1.0.0"); } //NOXLATE
+        }
+
+        /// <summary>
+        /// Web Layout v1.0.0
+        /// </summary>
+        public static ResourceTypeDescriptor WebLayout
+        {
+            get { return new ResourceTypeDescriptor("WebLayout", "1.0.0"); } //NOXLATE
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,299 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+using System.Xml;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    /// <summary>
+    ///
+    /// </summary>
+    public delegate IResource ResourceDeserializationCallback(string xml);
+
+    /// <summary>
+    ///
+    /// </summary>
+    public delegate Stream ResourceSerializationCallback(IResource res);
+
+    /// <summary>
+    /// A resource serializer
+    /// </summary>
+    public class ResourceSerializer
+    {
+        /// <summary>
+        /// Gets or sets the serialize method.
+        /// </summary>
+        /// <value>The serialize method.</value>
+        public ResourceSerializationCallback Serialize { get; set; }
+
+        /// <summary>
+        /// Gets or sets the deserialize method.
+        /// </summary>
+        /// <value>The deserialize method.</value>
+        public ResourceDeserializationCallback Deserialize { get; set; }
+    }
+
+    //TODO: Expand on documentation as this is an important class
+
+    /// <summary>
+    /// A registry of serializers allowing automatic serialization/deserialization of any XML
+    /// content based on its version and resource type.
+    /// </summary>
+    public static class ResourceTypeRegistry
+    {
+        private static Dictionary<ResourceTypeDescriptor, ResourceSerializer> _serializers;
+
+        static ResourceTypeRegistry()
+        {
+            _serializers = new Dictionary<ResourceTypeDescriptor, ResourceSerializer>();
+
+            //ApplicationDefinition 1.0.0
+            _serializers.Add(
+                ResourceTypeDescriptor.ApplicationDefinition,
+                new ResourceSerializer()
+                {
+                    Serialize = (res) => { return res.SerializeToStream(); },
+                    Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.ApplicationDefinition.v1_0_0.ApplicationDefinitionType.Deserialize(xml); }
+                });
+
+            //DrawingSource 1.0.0
+            _serializers.Add(
+                ResourceTypeDescriptor.DrawingSource,
+                new ResourceSerializer()
+                {
+                    Serialize = (res) => { return res.SerializeToStream(); },
+                    Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.DrawingSource.v1_0_0.DrawingSource.Deserialize(xml); }
+                });
+
+            //FeatureSource 1.0.0
+            _serializers.Add(
+                ResourceTypeDescriptor.FeatureSource,
+                new ResourceSerializer()
+                {
+                    Serialize = (res) => { return res.SerializeToStream(); },
+                    Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.FeatureSource.v1_0_0.FeatureSourceType.Deserialize(xml); }
+                });
+
+            //LayerDefinition 1.0.0
+            _serializers.Add(
+                ResourceTypeDescriptor.LayerDefinition,
+                new ResourceSerializer()
+                {
+                    Serialize = (res) => { return res.SerializeToStream(); },
+                    Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_0_0.LayerDefinition.Deserialize(xml); }
+                });
+
+            //LoadProcedure 1.0.0
+            _serializers.Add(
+                ResourceTypeDescriptor.LoadProcedure,
+                new ResourceSerializer()
+                {
+                    Serialize = (res) => { return res.SerializeToStream(); },
+                    Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.LoadProcedure.v1_0_0.LoadProcedure.Deserialize(xml); }
+                });
+
+            //MapDefinition 1.0.0
+            _serializers.Add(
+                ResourceTypeDescriptor.MapDefinition,
+                new ResourceSerializer()
+                {
+                    Serialize = (res) => { return OSGeo.MapGuide.ObjectModels.MapDefinition.v1_0_0.MdfEntryPoint.Serialize(res); },
+                    Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.MapDefinition.v1_0_0.MdfEntryPoint.Deserialize(xml); }
+                });
+
+            //PrintLayout 1.0.0
+            _serializers.Add(
+                ResourceTypeDescriptor.PrintLayout,
+                new ResourceSerializer()
+                {
+                    Serialize = (res) => { return res.SerializeToStream(); },
+                    Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.PrintLayout.v1_0_0.PrintLayout.Deserialize(xml); }
+                });
+
+            //SymbolDefinition 1.0.0
+            _serializers.Add(
+                ResourceTypeDescriptor.SymbolDefinition,
+                new ResourceSerializer()
+                {
+                    Serialize = (res) => { return res.SerializeToStream(); },
+                    Deserialize = (xml) =>
+                    {
+                        //HACK: We have to peek at the XML to determine if this is simple or compound.
+                        var doc = new XmlDocument();
+                        doc.LoadXml(xml);
+                        if (doc.DocumentElement.Name == "SimpleSymbolDefinition") //NOXLATE
+                        {
+                            return OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_0_0.SimpleSymbolDefinition.Deserialize(xml);
+                        }
+                        else
+                        {
+                            if (doc.DocumentElement.Name == "CompoundSymbolDefinition") //NOXLATE
+                                return OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_0_0.CompoundSymbolDefinition.Deserialize(xml);
+                            else //WTF?
+                                throw new SerializationException(Strings.ErrorCouldNotDetermineSymbolType);
+                        }
+                    }
+                });
+
+            //SymbolLibrary 1.0.0
+            _serializers.Add(
+                ResourceTypeDescriptor.SymbolLibrary,
+                new ResourceSerializer()
+                {
+                    Serialize = (res) => { return res.SerializeToStream(); },
+                    Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.SymbolLibrary.v1_0_0.SymbolLibraryType.Deserialize(xml); }
+                });
+
+            //WebLayout 1.0.0
+            _serializers.Add(
+                ResourceTypeDescriptor.WebLayout,
+                new ResourceSerializer()
+                {
+                    Serialize = (res) => { return res.SerializeToStream(); },
+                    Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.WebLayout.v1_0_0.WebLayoutType.Deserialize(xml); }
+                });
+        }
+
+        /// <summary>
+        /// Registers a resource serializer
+        /// </summary>
+        /// <param name="desc">The desc.</param>
+        /// <param name="serializer">The serializer.</param>
+        public static void RegisterResource(ResourceTypeDescriptor desc, ResourceSerializer serializer)
+        {
+            if (_serializers.ContainsKey(desc))
+                throw new ArgumentException(string.Format(Strings.ERR_SERIALIZER_ALREADY_REGISTERED, desc.ResourceType, desc.Version), "desc"); //NOXLATE
+
+            _serializers.Add(desc, serializer);
+        }
+
+        /// <summary>
+        /// Registers a resource serializer
+        /// </summary>
+        /// <param name="desc">The desc.</param>
+        /// <param name="serializeMethod">The serialize method.</param>
+        /// <param name="deserializeMethod">The deserialize method.</param>
+        public static void RegisterResource(ResourceTypeDescriptor desc, ResourceSerializationCallback serializeMethod, ResourceDeserializationCallback deserializeMethod)
+        {
+            RegisterResource(desc, new ResourceSerializer() { Deserialize = deserializeMethod, Serialize = serializeMethod });
+        }
+
+        internal static void Init()
+        {
+            //does nothing, it's just for kicking the static constructor into gear
+        }
+
+        /// <summary>
+        /// Deserializes the specified stream for the specified resource type.
+        /// </summary>
+        /// <param name="resourceType">Type of the resource.</param>
+        /// <param name="stream">The stream.</param>
+        /// <returns></returns>
+        public static IResource Deserialize(string resourceType, Stream stream)
+        {
+            //UGLY: We have to peek inside the stream to determine the version number
+
+            //House the stream inside a rewindable memory stream
+            using (var ms = new MemoryStream())
+            {
+                Utility.CopyStream(stream, ms);
+                ms.Position = 0L; //Rewind
+
+                var rd = ResourceContentVersionChecker.GetVersionFromXmlStream(ms);
+                Debug.Assert(rd.ResourceType.Equals(resourceType.ToString()));
+
+                ms.Position = 0L; //Rewind
+
+                using (var reader = new StreamReader(ms))
+                {
+                    var xml = reader.ReadToEnd();
+                    if (_serializers.ContainsKey(rd))
+                        return _serializers[rd].Deserialize(xml);
+                    else
+                        return new UntypedResource(xml, resourceType, rd.Version);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Serializes the specified resource.
+        /// </summary>
+        /// <param name="res">The resource.</param>
+        /// <returns></returns>
+        public static Stream Serialize(IResource res)
+        {
+            var rd = res.GetResourceTypeDescriptor();
+            if (!_serializers.ContainsKey(rd))
+            {
+                var utr = res as UntypedResource;
+                if (utr == null)
+                    throw new SerializationException(Strings.ERR_NO_SERIALIZER + rd.ToString());
+                return utr.SerializeToStream();
+            }
+
+            return _serializers[rd].Serialize(res);
+        }
+
+        /// <summary>
+        /// Serializes the specified resource.
+        /// </summary>
+        /// <param name="res"></param>
+        /// <returns></returns>
+        public static string SerializeAsString(IResource res)
+        {
+            using (var stream = Serialize(res))
+            {
+                using (var sr = new StreamReader(stream))
+                {
+                    return sr.ReadToEnd();
+                }
+            }
+        }
+
+        /// <summary>
+        /// Deserializes the specified XML.
+        /// </summary>
+        /// <param name="xml">The XML.</param>
+        /// <returns></returns>
+        public static IResource Deserialize(string xml)
+        {
+            var checker = new ResourceContentVersionChecker(xml);
+            var rd = checker.GetVersion();
+            if (rd == null)
+                throw new SerializationException(Strings.ERR_NOT_RESOURCE_CONTENT_XML);
+
+            if (!_serializers.ContainsKey(rd))
+            {
+                return new UntypedResource(xml, rd.ResourceType, rd.Version);
+            }
+
+            return _serializers[rd].Deserialize(xml);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypes.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypes.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypes.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,105 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    /// <summary>
+    /// Represents the common resource types in MapGuide
+    /// </summary>
+    public enum ResourceTypes
+    {
+        /// <summary>
+        /// Map Definition
+        /// </summary>
+        MapDefinition,
+
+        /// <summary>
+        /// Layer Definition
+        /// </summary>
+        LayerDefinition,
+
+        /// <summary>
+        /// Feature Source
+        /// </summary>
+        FeatureSource,
+
+        /// <summary>
+        /// Web Layout
+        /// </summary>
+        WebLayout,
+
+        /// <summary>
+        /// Runtime Map
+        /// </summary>
+        RuntimeMap,
+
+        /// <summary>
+        /// Folder
+        /// </summary>
+        Folder,
+
+        /// <summary>
+        /// Fusion Flexible Layout
+        /// </summary>
+        ApplicationDefinition,
+
+        /// <summary>
+        /// Print Layout
+        /// </summary>
+        PrintLayout,
+
+        /// <summary>
+        /// Symbol Definition
+        /// </summary>
+        SymbolDefinition,
+
+        /// <summary>
+        /// Load Procedure
+        /// </summary>
+        LoadProcedure,
+
+        /// <summary>
+        /// Drawing Source
+        /// </summary>
+        DrawingSource,
+
+        /// <summary>
+        /// DWF-based Symbol Library
+        /// </summary>
+        SymbolLibrary,
+
+        /// <summary>
+        /// A watermark
+        /// </summary>
+        WatermarkDefinition,
+
+        /// <summary>
+        /// A selection for a runtime map
+        /// </summary>
+        Selection
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Strings.Designer.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Strings.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Strings.Designer.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,882 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.18444
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OSGeo.MapGuide.ObjectModels {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Strings {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Strings() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OSGeo.MapGuide.ObjectModels.Strings", typeof(Strings).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to This feature source does not connect an externally aliased file.
+        /// </summary>
+        internal static string ERR_FS_NO_ALIAS {
+            get {
+                return ResourceManager.GetString("ERR_FS_NO_ALIAS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to This feature source does not connect to an embedded data file.
+        /// </summary>
+        internal static string ERR_FS_NO_EMBEDDED_DATA {
+            get {
+                return ResourceManager.GetString("ERR_FS_NO_EMBEDDED_DATA", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Could not find matching serializer for this resource: .
+        /// </summary>
+        internal static string ERR_NO_SERIALIZER {
+            get {
+                return ResourceManager.GetString("ERR_NO_SERIALIZER", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to XML content does not match any known resource.
+        /// </summary>
+        internal static string ERR_NOT_RESOURCE_CONTENT_XML {
+            get {
+                return ResourceManager.GetString("ERR_NOT_RESOURCE_CONTENT_XML", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to A resource serializer has already been registered for {0} v{1}.
+        /// </summary>
+        internal static string ERR_SERIALIZER_ALREADY_REGISTERED {
+            get {
+                return ResourceManager.GetString("ERR_SERIALIZER_ALREADY_REGISTERED", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Bad document. Expected attribute: {0}.
+        /// </summary>
+        internal static string ErrorBadDocumentExpectedAttribute {
+            get {
+                return ResourceManager.GetString("ErrorBadDocumentExpectedAttribute", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Bad document. Expected element {0}.
+        /// </summary>
+        internal static string ErrorBadDocumentExpectedElement {
+            get {
+                return ResourceManager.GetString("ErrorBadDocumentExpectedElement", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Bad document. Invalid bounding box.
+        /// </summary>
+        internal static string ErrorBadDocumentInvalidBbox {
+            get {
+                return ResourceManager.GetString("ErrorBadDocumentInvalidBbox", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Bad HTML color: {0}.
+        /// </summary>
+        internal static string ErrorBadHtmlColor {
+            get {
+                return ResourceManager.GetString("ErrorBadHtmlColor", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Commerical layer options are only available for non-MapGuide maps.
+        /// </summary>
+        internal static string ErrorCmsOptionsOnMapGuideMap {
+            get {
+                return ResourceManager.GetString("ErrorCmsOptionsOnMapGuideMap", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Could not determine symbol type.
+        /// </summary>
+        internal static string ErrorCouldNotDetermineSymbolType {
+            get {
+                return ResourceManager.GetString("ErrorCouldNotDetermineSymbolType", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid resource identifier.
+        /// </summary>
+        internal static string ErrorInvalidResourceIdentifier {
+            get {
+                return ResourceManager.GetString("ErrorInvalidResourceIdentifier", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid resource identifier type. Must be Library or Session.
+        /// </summary>
+        internal static string ErrorInvalidResourceIdentifierType {
+            get {
+                return ResourceManager.GetString("ErrorInvalidResourceIdentifierType", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Overlay options are only applicable to MapGuide maps.
+        /// </summary>
+        internal static string ErrorOverlayOptionsOnNonMapGuideMap {
+            get {
+                return ResourceManager.GetString("ErrorOverlayOptionsOnNonMapGuideMap", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Cannot change extension for a folder.
+        /// </summary>
+        internal static string ErrorResourceIdCannotChangeExtensionForFolder {
+            get {
+                return ResourceManager.GetString("ErrorResourceIdCannotChangeExtensionForFolder", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The resource name must not contain ':', \"//\" or '.'.
+        /// </summary>
+        internal static string ErrorResourceIdentifierInvalidChars {
+            get {
+                return ResourceManager.GetString("ErrorResourceIdentifierInvalidChars", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The new name must not contain the \"/\" character.
+        /// </summary>
+        internal static string ErrorResourceIdentifierNameInvalidChars {
+            get {
+                return ResourceManager.GetString("ErrorResourceIdentifierNameInvalidChars", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The supplied extension is invalid.
+        /// </summary>
+        internal static string ErrorResourceIdInvalidExtension {
+            get {
+                return ResourceManager.GetString("ErrorResourceIdInvalidExtension", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Unexpected resource type for {0}. Expected {1}.
+        /// </summary>
+        internal static string ErrorUnexpectedResourceType {
+            get {
+                return ResourceManager.GetString("ErrorUnexpectedResourceType", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The given type is not a known resource type.
+        /// </summary>
+        internal static string ErrorUnknownResourceType {
+            get {
+                return ResourceManager.GetString("ErrorUnknownResourceType", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Not a folder resource id: {0}.
+        /// </summary>
+        internal static string NotAFolder {
+            get {
+                return ResourceManager.GetString("NotAFolder", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Precondition failure: .
+        /// </summary>
+        internal static string PrecondFailure {
+            get {
+                return ResourceManager.GetString("PrecondFailure", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to String is empty: .
+        /// </summary>
+        internal static string PrecondStringEmpty {
+            get {
+                return ResourceManager.GetString("PrecondStringEmpty", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Value is null: .
+        /// </summary>
+        internal static string PrecondValueNull {
+            get {
+                return ResourceManager.GetString("PrecondValueNull", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Display information about this application.
+        /// </summary>
+        internal static string WL_Desc_About {
+            get {
+                return ResourceManager.GetString("WL_Desc_About", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Create buffers around the selected features.
+        /// </summary>
+        internal static string WL_Desc_Buffer {
+            get {
+                return ResourceManager.GetString("WL_Desc_Buffer", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Clear the current selection.
+        /// </summary>
+        internal static string WL_Desc_ClearSelection {
+            get {
+                return ResourceManager.GetString("WL_Desc_ClearSelection", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Copy current view of map to clipboard.
+        /// </summary>
+        internal static string WL_Desc_Copy {
+            get {
+                return ResourceManager.GetString("WL_Desc_Copy", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Get Printer-friendly page.
+        /// </summary>
+        internal static string WL_Desc_GetPrintablePage {
+            get {
+                return ResourceManager.GetString("WL_Desc_GetPrintablePage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Launch help for this application.
+        /// </summary>
+        internal static string WL_Desc_Help {
+            get {
+                return ResourceManager.GetString("WL_Desc_Help", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom to initial map center and scale.
+        /// </summary>
+        internal static string WL_Desc_InitialCenterScale {
+            get {
+                return ResourceManager.GetString("WL_Desc_InitialCenterScale", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Fit the extents of the map to the window.
+        /// </summary>
+        internal static string WL_Desc_InitialMapView {
+            get {
+                return ResourceManager.GetString("WL_Desc_InitialMapView", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Click to enable/disable display of map tooltips.
+        /// </summary>
+        internal static string WL_Desc_MapTip {
+            get {
+                return ResourceManager.GetString("WL_Desc_MapTip", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Measure distances on the map.
+        /// </summary>
+        internal static string WL_Desc_Measure {
+            get {
+                return ResourceManager.GetString("WL_Desc_Measure", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Go to next view.
+        /// </summary>
+        internal static string WL_Desc_NextView {
+            get {
+                return ResourceManager.GetString("WL_Desc_NextView", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Drag the map to view areas out of range.
+        /// </summary>
+        internal static string WL_Desc_Pan {
+            get {
+                return ResourceManager.GetString("WL_Desc_Pan", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Pan down by a preset increment.
+        /// </summary>
+        internal static string WL_Desc_PanDown {
+            get {
+                return ResourceManager.GetString("WL_Desc_PanDown", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Pan left by a preset increment.
+        /// </summary>
+        internal static string WL_Desc_PanLeft {
+            get {
+                return ResourceManager.GetString("WL_Desc_PanLeft", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Pan right by a preset increment.
+        /// </summary>
+        internal static string WL_Desc_PanRight {
+            get {
+                return ResourceManager.GetString("WL_Desc_PanRight", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Pan up by a preset increment.
+        /// </summary>
+        internal static string WL_Desc_PanUp {
+            get {
+                return ResourceManager.GetString("WL_Desc_PanUp", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Go to previous view.
+        /// </summary>
+        internal static string WL_Desc_PrevView {
+            get {
+                return ResourceManager.GetString("WL_Desc_PrevView", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Print with optional layout.
+        /// </summary>
+        internal static string WL_Desc_Print {
+            get {
+                return ResourceManager.GetString("WL_Desc_Print", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Refresh map to reload all layers keeping current center and scale.
+        /// </summary>
+        internal static string WL_Desc_RefreshMap {
+            get {
+                return ResourceManager.GetString("WL_Desc_RefreshMap", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Select features by clicking and dragging.
+        /// </summary>
+        internal static string WL_Desc_Select {
+            get {
+                return ResourceManager.GetString("WL_Desc_Select", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Click and drag to select all features that fall within.
+        /// </summary>
+        internal static string WL_Desc_SelectPolygon {
+            get {
+                return ResourceManager.GetString("WL_Desc_SelectPolygon", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Click and drag to select all features inside the circle.
+        /// </summary>
+        internal static string WL_Desc_SelectRadius {
+            get {
+                return ResourceManager.GetString("WL_Desc_SelectRadius", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Select features that fall within currently selected areas.
+        /// </summary>
+        internal static string WL_Desc_SelectWithin {
+            get {
+                return ResourceManager.GetString("WL_Desc_SelectWithin", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Return to previous task page.
+        /// </summary>
+        internal static string WL_Desc_TaskBack {
+            get {
+                return ResourceManager.GetString("WL_Desc_TaskBack", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Forward to next task page.
+        /// </summary>
+        internal static string WL_Desc_TaskForward {
+            get {
+                return ResourceManager.GetString("WL_Desc_TaskForward", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Return to home task page.
+        /// </summary>
+        internal static string WL_Desc_TaskHome {
+            get {
+                return ResourceManager.GetString("WL_Desc_TaskHome", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to View a list of available tasks.
+        /// </summary>
+        internal static string WL_Desc_TaskList {
+            get {
+                return ResourceManager.GetString("WL_Desc_TaskList", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to View Options.
+        /// </summary>
+        internal static string WL_Desc_ViewOptions {
+            get {
+                return ResourceManager.GetString("WL_Desc_ViewOptions", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom dynamically by clicking and dragging.
+        /// </summary>
+        internal static string WL_Desc_ZoomDynamic {
+            get {
+                return ResourceManager.GetString("WL_Desc_ZoomDynamic", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom in by a preset increment.
+        /// </summary>
+        internal static string WL_Desc_ZoomIn {
+            get {
+                return ResourceManager.GetString("WL_Desc_ZoomIn", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom out by a preset increment.
+        /// </summary>
+        internal static string WL_Desc_ZoomOut {
+            get {
+                return ResourceManager.GetString("WL_Desc_ZoomOut", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom in on an area.
+        /// </summary>
+        internal static string WL_Desc_ZoomRect {
+            get {
+                return ResourceManager.GetString("WL_Desc_ZoomRect", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom to the extents of selected features.
+        /// </summary>
+        internal static string WL_Desc_ZoomSelection {
+            get {
+                return ResourceManager.GetString("WL_Desc_ZoomSelection", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to About.
+        /// </summary>
+        internal static string WL_Label_About {
+            get {
+                return ResourceManager.GetString("WL_Label_About", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Buffer.
+        /// </summary>
+        internal static string WL_Label_Buffer {
+            get {
+                return ResourceManager.GetString("WL_Label_Buffer", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Clear Selection.
+        /// </summary>
+        internal static string WL_Label_ClearSelection {
+            get {
+                return ResourceManager.GetString("WL_Label_ClearSelection", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Copy.
+        /// </summary>
+        internal static string WL_Label_Copy {
+            get {
+                return ResourceManager.GetString("WL_Label_Copy", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Get Printable Page.
+        /// </summary>
+        internal static string WL_Label_GetPrintablePage {
+            get {
+                return ResourceManager.GetString("WL_Label_GetPrintablePage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Help.
+        /// </summary>
+        internal static string WL_Label_Help {
+            get {
+                return ResourceManager.GetString("WL_Label_Help", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Initial Center and Scale.
+        /// </summary>
+        internal static string WL_Label_InitialCenterScale {
+            get {
+                return ResourceManager.GetString("WL_Label_InitialCenterScale", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Initial Map View.
+        /// </summary>
+        internal static string WL_Label_InitialMapView {
+            get {
+                return ResourceManager.GetString("WL_Label_InitialMapView", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Measure.
+        /// </summary>
+        internal static string WL_Label_Measure {
+            get {
+                return ResourceManager.GetString("WL_Label_Measure", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Next View.
+        /// </summary>
+        internal static string WL_Label_NextView {
+            get {
+                return ResourceManager.GetString("WL_Label_NextView", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Pan Mode.
+        /// </summary>
+        internal static string WL_Label_Pan {
+            get {
+                return ResourceManager.GetString("WL_Label_Pan", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Pan Down.
+        /// </summary>
+        internal static string WL_Label_PanDown {
+            get {
+                return ResourceManager.GetString("WL_Label_PanDown", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Pan Left.
+        /// </summary>
+        internal static string WL_Label_PanLeft {
+            get {
+                return ResourceManager.GetString("WL_Label_PanLeft", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Pan Right.
+        /// </summary>
+        internal static string WL_Label_PanRight {
+            get {
+                return ResourceManager.GetString("WL_Label_PanRight", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Pan Up.
+        /// </summary>
+        internal static string WL_Label_PanUp {
+            get {
+                return ResourceManager.GetString("WL_Label_PanUp", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Previous View.
+        /// </summary>
+        internal static string WL_Label_PrevView {
+            get {
+                return ResourceManager.GetString("WL_Label_PrevView", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Print.
+        /// </summary>
+        internal static string WL_Label_Print {
+            get {
+                return ResourceManager.GetString("WL_Label_Print", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Refresh Map.
+        /// </summary>
+        internal static string WL_Label_RefreshMap {
+            get {
+                return ResourceManager.GetString("WL_Label_RefreshMap", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Select.
+        /// </summary>
+        internal static string WL_Label_Select {
+            get {
+                return ResourceManager.GetString("WL_Label_Select", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Select More.
+        /// </summary>
+        internal static string WL_Label_SelectMore {
+            get {
+                return ResourceManager.GetString("WL_Label_SelectMore", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Select Polygon.
+        /// </summary>
+        internal static string WL_Label_SelectPolygon {
+            get {
+                return ResourceManager.GetString("WL_Label_SelectPolygon", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Select Radius.
+        /// </summary>
+        internal static string WL_Label_SelectRadius {
+            get {
+                return ResourceManager.GetString("WL_Label_SelectRadius", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Select Within.
+        /// </summary>
+        internal static string WL_Label_SelectWithin {
+            get {
+                return ResourceManager.GetString("WL_Label_SelectWithin", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Back.
+        /// </summary>
+        internal static string WL_Label_TaskBack {
+            get {
+                return ResourceManager.GetString("WL_Label_TaskBack", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Forward.
+        /// </summary>
+        internal static string WL_Label_TaskForward {
+            get {
+                return ResourceManager.GetString("WL_Label_TaskForward", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Home.
+        /// </summary>
+        internal static string WL_Label_TaskHome {
+            get {
+                return ResourceManager.GetString("WL_Label_TaskHome", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Task List.
+        /// </summary>
+        internal static string WL_Label_TaskList {
+            get {
+                return ResourceManager.GetString("WL_Label_TaskList", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to View Options.
+        /// </summary>
+        internal static string WL_Label_ViewOptions {
+            get {
+                return ResourceManager.GetString("WL_Label_ViewOptions", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom.
+        /// </summary>
+        internal static string WL_Label_Zoom {
+            get {
+                return ResourceManager.GetString("WL_Label_Zoom", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom Dynamic.
+        /// </summary>
+        internal static string WL_Label_ZoomDynamic {
+            get {
+                return ResourceManager.GetString("WL_Label_ZoomDynamic", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom In.
+        /// </summary>
+        internal static string WL_Label_ZoomIn {
+            get {
+                return ResourceManager.GetString("WL_Label_ZoomIn", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom Out.
+        /// </summary>
+        internal static string WL_Label_ZoomOut {
+            get {
+                return ResourceManager.GetString("WL_Label_ZoomOut", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom Rectangle.
+        /// </summary>
+        internal static string WL_Label_ZoomRect {
+            get {
+                return ResourceManager.GetString("WL_Label_ZoomRect", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Zoom Selection.
+        /// </summary>
+        internal static string WL_Label_ZoomSelection {
+            get {
+                return ResourceManager.GetString("WL_Label_ZoomSelection", resourceCulture);
+            }
+        }
+    }
+}

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Strings.resx
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Strings.resx	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Strings.resx	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,393 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="ErrorBadDocumentExpectedAttribute" xml:space="preserve">
+    <value>Bad document. Expected attribute: {0}</value>
+  </data>
+  <data name="ErrorBadDocumentExpectedElement" xml:space="preserve">
+    <value>Bad document. Expected element {0}</value>
+  </data>
+  <data name="ErrorBadDocumentInvalidBbox" xml:space="preserve">
+    <value>Bad document. Invalid bounding box</value>
+  </data>
+  <data name="ErrorBadHtmlColor" xml:space="preserve">
+    <value>Bad HTML color: {0}</value>
+  </data>
+  <data name="ErrorCmsOptionsOnMapGuideMap" xml:space="preserve">
+    <value>Commerical layer options are only available for non-MapGuide maps</value>
+  </data>
+  <data name="ErrorCouldNotDetermineSymbolType" xml:space="preserve">
+    <value>Could not determine symbol type</value>
+  </data>
+  <data name="ErrorInvalidResourceIdentifier" xml:space="preserve">
+    <value>Invalid resource identifier</value>
+  </data>
+  <data name="ErrorInvalidResourceIdentifierType" xml:space="preserve">
+    <value>Invalid resource identifier type. Must be Library or Session</value>
+  </data>
+  <data name="ErrorOverlayOptionsOnNonMapGuideMap" xml:space="preserve">
+    <value>Overlay options are only applicable to MapGuide maps</value>
+  </data>
+  <data name="ErrorResourceIdCannotChangeExtensionForFolder" xml:space="preserve">
+    <value>Cannot change extension for a folder</value>
+  </data>
+  <data name="ErrorResourceIdentifierInvalidChars" xml:space="preserve">
+    <value>The resource name must not contain ':', \"//\" or '.'</value>
+  </data>
+  <data name="ErrorResourceIdentifierNameInvalidChars" xml:space="preserve">
+    <value>The new name must not contain the \"/\" character</value>
+  </data>
+  <data name="ErrorResourceIdInvalidExtension" xml:space="preserve">
+    <value>The supplied extension is invalid</value>
+  </data>
+  <data name="ErrorUnexpectedResourceType" xml:space="preserve">
+    <value>Unexpected resource type for {0}. Expected {1}</value>
+  </data>
+  <data name="ErrorUnknownResourceType" xml:space="preserve">
+    <value>The given type is not a known resource type</value>
+  </data>
+  <data name="ERR_FS_NO_ALIAS" xml:space="preserve">
+    <value>This feature source does not connect an externally aliased file</value>
+  </data>
+  <data name="ERR_FS_NO_EMBEDDED_DATA" xml:space="preserve">
+    <value>This feature source does not connect to an embedded data file</value>
+  </data>
+  <data name="ERR_NOT_RESOURCE_CONTENT_XML" xml:space="preserve">
+    <value>XML content does not match any known resource</value>
+  </data>
+  <data name="ERR_NO_SERIALIZER" xml:space="preserve">
+    <value>Could not find matching serializer for this resource: </value>
+  </data>
+  <data name="ERR_SERIALIZER_ALREADY_REGISTERED" xml:space="preserve">
+    <value>A resource serializer has already been registered for {0} v{1}</value>
+  </data>
+  <data name="NotAFolder" xml:space="preserve">
+    <value>Not a folder resource id: {0}</value>
+  </data>
+  <data name="PrecondFailure" xml:space="preserve">
+    <value>Precondition failure: </value>
+  </data>
+  <data name="PrecondStringEmpty" xml:space="preserve">
+    <value>String is empty: </value>
+  </data>
+  <data name="PrecondValueNull" xml:space="preserve">
+    <value>Value is null: </value>
+  </data>
+  <data name="WL_Desc_About" xml:space="preserve">
+    <value>Display information about this application</value>
+  </data>
+  <data name="WL_Desc_Buffer" xml:space="preserve">
+    <value>Create buffers around the selected features</value>
+  </data>
+  <data name="WL_Desc_ClearSelection" xml:space="preserve">
+    <value>Clear the current selection</value>
+  </data>
+  <data name="WL_Desc_Copy" xml:space="preserve">
+    <value>Copy current view of map to clipboard</value>
+  </data>
+  <data name="WL_Desc_GetPrintablePage" xml:space="preserve">
+    <value>Get Printer-friendly page</value>
+  </data>
+  <data name="WL_Desc_Help" xml:space="preserve">
+    <value>Launch help for this application</value>
+  </data>
+  <data name="WL_Desc_InitialCenterScale" xml:space="preserve">
+    <value>Zoom to initial map center and scale</value>
+  </data>
+  <data name="WL_Desc_InitialMapView" xml:space="preserve">
+    <value>Fit the extents of the map to the window</value>
+  </data>
+  <data name="WL_Desc_MapTip" xml:space="preserve">
+    <value>Click to enable/disable display of map tooltips</value>
+  </data>
+  <data name="WL_Desc_Measure" xml:space="preserve">
+    <value>Measure distances on the map</value>
+  </data>
+  <data name="WL_Desc_NextView" xml:space="preserve">
+    <value>Go to next view</value>
+  </data>
+  <data name="WL_Desc_Pan" xml:space="preserve">
+    <value>Drag the map to view areas out of range</value>
+  </data>
+  <data name="WL_Desc_PanDown" xml:space="preserve">
+    <value>Pan down by a preset increment</value>
+  </data>
+  <data name="WL_Desc_PanLeft" xml:space="preserve">
+    <value>Pan left by a preset increment</value>
+  </data>
+  <data name="WL_Desc_PanRight" xml:space="preserve">
+    <value>Pan right by a preset increment</value>
+  </data>
+  <data name="WL_Desc_PanUp" xml:space="preserve">
+    <value>Pan up by a preset increment</value>
+  </data>
+  <data name="WL_Desc_PrevView" xml:space="preserve">
+    <value>Go to previous view</value>
+  </data>
+  <data name="WL_Desc_Print" xml:space="preserve">
+    <value>Print with optional layout</value>
+  </data>
+  <data name="WL_Desc_RefreshMap" xml:space="preserve">
+    <value>Refresh map to reload all layers keeping current center and scale</value>
+  </data>
+  <data name="WL_Desc_Select" xml:space="preserve">
+    <value>Select features by clicking and dragging</value>
+  </data>
+  <data name="WL_Desc_SelectPolygon" xml:space="preserve">
+    <value>Click and drag to select all features that fall within</value>
+  </data>
+  <data name="WL_Desc_SelectRadius" xml:space="preserve">
+    <value>Click and drag to select all features inside the circle</value>
+  </data>
+  <data name="WL_Desc_SelectWithin" xml:space="preserve">
+    <value>Select features that fall within currently selected areas</value>
+  </data>
+  <data name="WL_Desc_TaskBack" xml:space="preserve">
+    <value>Return to previous task page</value>
+  </data>
+  <data name="WL_Desc_TaskForward" xml:space="preserve">
+    <value>Forward to next task page</value>
+  </data>
+  <data name="WL_Desc_TaskHome" xml:space="preserve">
+    <value>Return to home task page</value>
+  </data>
+  <data name="WL_Desc_TaskList" xml:space="preserve">
+    <value>View a list of available tasks</value>
+  </data>
+  <data name="WL_Desc_ViewOptions" xml:space="preserve">
+    <value>View Options</value>
+  </data>
+  <data name="WL_Desc_ZoomDynamic" xml:space="preserve">
+    <value>Zoom dynamically by clicking and dragging</value>
+  </data>
+  <data name="WL_Desc_ZoomIn" xml:space="preserve">
+    <value>Zoom in by a preset increment</value>
+  </data>
+  <data name="WL_Desc_ZoomOut" xml:space="preserve">
+    <value>Zoom out by a preset increment</value>
+  </data>
+  <data name="WL_Desc_ZoomRect" xml:space="preserve">
+    <value>Zoom in on an area</value>
+  </data>
+  <data name="WL_Desc_ZoomSelection" xml:space="preserve">
+    <value>Zoom to the extents of selected features</value>
+  </data>
+  <data name="WL_Label_About" xml:space="preserve">
+    <value>About</value>
+  </data>
+  <data name="WL_Label_Buffer" xml:space="preserve">
+    <value>Buffer</value>
+  </data>
+  <data name="WL_Label_ClearSelection" xml:space="preserve">
+    <value>Clear Selection</value>
+  </data>
+  <data name="WL_Label_Copy" xml:space="preserve">
+    <value>Copy</value>
+  </data>
+  <data name="WL_Label_GetPrintablePage" xml:space="preserve">
+    <value>Get Printable Page</value>
+  </data>
+  <data name="WL_Label_Help" xml:space="preserve">
+    <value>Help</value>
+  </data>
+  <data name="WL_Label_InitialCenterScale" xml:space="preserve">
+    <value>Initial Center and Scale</value>
+  </data>
+  <data name="WL_Label_InitialMapView" xml:space="preserve">
+    <value>Initial Map View</value>
+  </data>
+  <data name="WL_Label_Measure" xml:space="preserve">
+    <value>Measure</value>
+  </data>
+  <data name="WL_Label_NextView" xml:space="preserve">
+    <value>Next View</value>
+  </data>
+  <data name="WL_Label_Pan" xml:space="preserve">
+    <value>Pan Mode</value>
+  </data>
+  <data name="WL_Label_PanDown" xml:space="preserve">
+    <value>Pan Down</value>
+  </data>
+  <data name="WL_Label_PanLeft" xml:space="preserve">
+    <value>Pan Left</value>
+  </data>
+  <data name="WL_Label_PanRight" xml:space="preserve">
+    <value>Pan Right</value>
+  </data>
+  <data name="WL_Label_PanUp" xml:space="preserve">
+    <value>Pan Up</value>
+  </data>
+  <data name="WL_Label_PrevView" xml:space="preserve">
+    <value>Previous View</value>
+  </data>
+  <data name="WL_Label_Print" xml:space="preserve">
+    <value>Print</value>
+  </data>
+  <data name="WL_Label_RefreshMap" xml:space="preserve">
+    <value>Refresh Map</value>
+  </data>
+  <data name="WL_Label_Select" xml:space="preserve">
+    <value>Select</value>
+  </data>
+  <data name="WL_Label_SelectMore" xml:space="preserve">
+    <value>Select More</value>
+  </data>
+  <data name="WL_Label_SelectPolygon" xml:space="preserve">
+    <value>Select Polygon</value>
+  </data>
+  <data name="WL_Label_SelectRadius" xml:space="preserve">
+    <value>Select Radius</value>
+  </data>
+  <data name="WL_Label_SelectWithin" xml:space="preserve">
+    <value>Select Within</value>
+  </data>
+  <data name="WL_Label_TaskBack" xml:space="preserve">
+    <value>Back</value>
+  </data>
+  <data name="WL_Label_TaskForward" xml:space="preserve">
+    <value>Forward</value>
+  </data>
+  <data name="WL_Label_TaskHome" xml:space="preserve">
+    <value>Home</value>
+  </data>
+  <data name="WL_Label_TaskList" xml:space="preserve">
+    <value>Task List</value>
+  </data>
+  <data name="WL_Label_ViewOptions" xml:space="preserve">
+    <value>View Options</value>
+  </data>
+  <data name="WL_Label_Zoom" xml:space="preserve">
+    <value>Zoom</value>
+  </data>
+  <data name="WL_Label_ZoomDynamic" xml:space="preserve">
+    <value>Zoom Dynamic</value>
+  </data>
+  <data name="WL_Label_ZoomIn" xml:space="preserve">
+    <value>Zoom In</value>
+  </data>
+  <data name="WL_Label_ZoomOut" xml:space="preserve">
+    <value>Zoom Out</value>
+  </data>
+  <data name="WL_Label_ZoomRect" xml:space="preserve">
+    <value>Zoom Rectangle</value>
+  </data>
+  <data name="WL_Label_ZoomSelection" xml:space="preserve">
+    <value>Zoom Selection</value>
+  </data>
+</root>
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/SymbolDefinitionInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/SymbolDefinitionInterfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/SymbolDefinitionInterfaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,1560 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.Common;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.SymbolDefinition
+{
+    /// <summary>
+    /// Defines the type of symbol instances
+    /// </summary>
+    public enum SymbolInstanceType
+    {
+        /// <summary>
+        /// A library reference to an existing symbol definition
+        /// </summary>
+        Reference,
+
+        /// <summary>
+        /// An inline symbol definition
+        /// </summary>
+        Inline
+    }
+
+    /// <summary>
+    /// Represents a symbol instance used for advanced cartographic stylization
+    /// </summary>
+    public interface ISymbolInstance
+    {
+        /// <summary>
+        /// Gets or sets the symbol reference
+        /// </summary>
+        ISymbolInstanceReference Reference { get; set; }
+
+        /// <summary>
+        /// Gets the parameter overrides for this symbol
+        /// </summary>
+        IParameterOverrideCollection ParameterOverrides { get; }
+
+        /// <summary>
+        /// Gets or sets the X scale
+        /// </summary>
+        string ScaleX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Y scale
+        /// </summary>
+        string ScaleY { get; set; }
+
+        /// <summary>
+        /// Gets or sets the X insertion offset
+        /// </summary>
+        string InsertionOffsetX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Y insertion offset
+        /// </summary>
+        string InsertionOffsetY { get; set; }
+
+        /// <summary>
+        /// Gets or sets the size context
+        /// </summary>
+        SizeContextType SizeContext { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether to draw this instance last
+        /// </summary>
+        string DrawLast { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether to check the exclusion region
+        /// </summary>
+        string CheckExclusionRegion { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether to add this instance to the exclusion region
+        /// </summary>
+        string AddToExclusionRegion { get; set; }
+
+        /// <summary>
+        /// Gets or sets the position algorithm
+        /// </summary>
+        string PositioningAlgorithm { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a symbol instance reference
+    /// </summary>
+    public interface ISymbolInstanceReference
+    {
+        /// <summary>
+        /// Gets the type
+        /// </summary>
+        SymbolInstanceType Type { get; }
+    }
+
+    /// <summary>
+    /// Represents a symbol instance reference by a resource id
+    /// </summary>
+    public interface ISymbolInstanceReferenceLibrary : ISymbolInstanceReference, IResourceIdReference
+    {
+    }
+
+    /// <summary>
+    /// Represents a symbol instance reference by a inline definition
+    /// </summary>
+    public interface ISymbolInstanceReferenceInline : ISymbolInstanceReference
+    {
+        /// <summary>
+        /// Gets or sets the inline definition
+        /// </summary>
+        ISymbolDefinitionBase SymbolDefinition { get; set; }
+    }
+
+    /// <summary>
+    /// Extension methods for symbol definitions
+    /// </summary>
+    public static class SymbolDefExtensions
+    {
+        /// <summary>
+        /// Gets the parameter definition for the given identifer
+        /// </summary>
+        /// <param name="sym"></param>
+        /// <param name="identifier"></param>
+        /// <returns></returns>
+        public static IParameter GetParameter(this ISymbolDefinitionBase sym, string identifier)
+        {
+            Check.NotNull(sym, "sym");
+            return sym.GetParameters().FirstOrDefault(x => x.Identifier == identifier);
+        }
+
+        /// <summary>
+        /// Gets the parameters.
+        /// </summary>
+        /// <param name="sym">The sym.</param>
+        /// <returns></returns>
+        public static IEnumerable<IParameter> GetParameters(this ISymbolDefinitionBase sym)
+        {
+            Check.NotNull(sym, "sym");
+            if (sym.Type == SymbolDefinitionType.Simple)
+                return ((ISimpleSymbolDefinition)sym).GetParameters();
+            else
+                return ((ICompoundSymbolDefinition)sym).GetParameters();
+        }
+
+        /// <summary>
+        /// Gets the parameters.
+        /// </summary>
+        /// <param name="ssym">The ssym.</param>
+        /// <returns></returns>
+        public static IEnumerable<IParameter> GetParameters(this ISimpleSymbolDefinition ssym)
+        {
+            Check.NotNull(ssym, "ssym");
+            return ssym.ParameterDefinition.Parameter;
+        }
+    }
+
+    #region Symbol Definition 1.0.0 interfaces
+
+    /// <summary>
+    /// Indicates the type of symbol definition
+    /// </summary>
+    public enum SymbolDefinitionType
+    {
+        /// <summary>
+        /// A simple symbol definition
+        /// </summary>
+        Simple,
+
+        /// <summary>
+        /// A compound symbol definition
+        /// </summary>
+        Compound
+    }
+
+    /// <summary>
+    /// Base interface of all symbol definitions
+    /// </summary>
+    public interface ISymbolDefinitionBase : IResource
+    {
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the description.
+        /// </summary>
+        /// <value>The description.</value>
+        string Description { get; set; }
+
+        /// <summary>
+        /// Gets the type of symbol definition
+        /// </summary>
+        SymbolDefinitionType Type { get; }
+
+        /// <summary>
+        /// Purges the schema and version attributes when serializing back to XML
+        /// </summary>
+        void RemoveSchemaAttributes();
+
+        /// <summary>
+        /// Sets the schema and version attributes
+        /// </summary>
+        void SetSchemaAttributes();
+    }
+
+    /// <summary>
+    /// Represents a simple symbol definition
+    /// </summary>
+    public interface ISimpleSymbolDefinition : ISymbolDefinitionBase
+    {
+        /// <summary>
+        /// Gets the graphics.
+        /// </summary>
+        /// <value>The graphics.</value>
+        IEnumerable<IGraphicBase> Graphics { get; }
+
+        /// <summary>
+        /// Adds the graphics.
+        /// </summary>
+        /// <param name="graphics">The graphics.</param>
+        void AddGraphics(IGraphicBase graphics);
+
+        /// <summary>
+        /// Removes the graphics.
+        /// </summary>
+        /// <param name="graphics">The graphics.</param>
+        void RemoveGraphics(IGraphicBase graphics);
+
+        /// <summary>
+        /// Gets or sets the resize box.
+        /// </summary>
+        /// <value>The resize box.</value>
+        IResizeBox ResizeBox { get; set; }
+
+        /// <summary>
+        /// Gets or sets the point usage.
+        /// </summary>
+        /// <value>The point usage.</value>
+        IPointUsage PointUsage { get; set; }
+
+        /// <summary>
+        /// Gets or sets the line usage.
+        /// </summary>
+        /// <value>The line usage.</value>
+        ILineUsage LineUsage { get; set; }
+
+        /// <summary>
+        /// Gets or sets the area usage.
+        /// </summary>
+        /// <value>The area usage.</value>
+        IAreaUsage AreaUsage { get; set; }
+
+        /// <summary>
+        /// Gets the parameter definition.
+        /// </summary>
+        /// <value>The parameter definition.</value>
+        IParameterDefinition ParameterDefinition { get; }
+
+        /// <summary>
+        /// Creates an image reference
+        /// </summary>
+        /// <param name="resourceId"></param>
+        /// <param name="dataName"></param>
+        /// <returns></returns>
+        IImageReference CreateImageReference(string resourceId, string dataName);
+
+        /// <summary>
+        /// Creates an inline image
+        /// </summary>
+        /// <param name="content"></param>
+        /// <returns></returns>
+        IInlineImage CreateInlineImage(byte[] content);
+
+        /// <summary>
+        /// Creates a point usage context
+        /// </summary>
+        /// <returns></returns>
+        IPointUsage CreatePointUsage();
+
+        /// <summary>
+        /// Creates a line usage context
+        /// </summary>
+        /// <returns></returns>
+        ILineUsage CreateLineUsage();
+
+        /// <summary>
+        /// Creates an area usage context
+        /// </summary>
+        /// <returns></returns>
+        IAreaUsage CreateAreaUsage();
+
+        /// <summary>
+        /// Creates a resize box
+        /// </summary>
+        /// <returns></returns>
+        IResizeBox CreateResizeBox();
+
+        /// <summary>
+        /// Creates the frame.
+        /// </summary>
+        /// <returns></returns>
+        ITextFrame CreateFrame();
+
+        /// <summary>
+        /// Creates the text graphics.
+        /// </summary>
+        /// <returns></returns>
+        ITextGraphic CreateTextGraphics();
+
+        /// <summary>
+        /// Creates the path graphics.
+        /// </summary>
+        /// <returns></returns>
+        IPathGraphic CreatePathGraphics();
+
+        /// <summary>
+        /// Creates the image graphics.
+        /// </summary>
+        /// <returns></returns>
+        IImageGraphic CreateImageGraphics();
+
+        /// <summary>
+        /// Creates the parameter.
+        /// </summary>
+        /// <returns></returns>
+        IParameter CreateParameter();
+
+        /// <summary>
+        /// Removes all graphic elements
+        /// </summary>
+        void ClearGraphics();
+    }
+
+    /// <summary>
+    /// Represents a compound symbol definition
+    /// </summary>
+    public interface ICompoundSymbolDefinition : ISymbolDefinitionBase
+    {
+        /// <summary>
+        /// Gets the simple symbols.
+        /// </summary>
+        /// <value>The simple symbols.</value>
+        IEnumerable<ISimpleSymbolReferenceBase> SimpleSymbol { get; }
+
+        /// <summary>
+        /// Adds the simple symbol.
+        /// </summary>
+        /// <param name="sym">The sym.</param>
+        void AddSimpleSymbol(ISimpleSymbolReferenceBase sym);
+
+        /// <summary>
+        /// Removes the simple symbol.
+        /// </summary>
+        /// <param name="sym">The sym.</param>
+        void RemoveSimpleSymbol(ISimpleSymbolReferenceBase sym);
+
+        /// <summary>
+        /// Creates an inline symbol definition reference
+        /// </summary>
+        /// <param name="sym"></param>
+        /// <returns></returns>
+        ISimpleSymbolReferenceBase CreateSimpleSymbol(ISimpleSymbolDefinition sym);
+
+        /// <summary>
+        /// Creates a resource id based symbol reference
+        /// </summary>
+        /// <param name="resourceId">The resource id.</param>
+        /// <returns></returns>
+        ISimpleSymbolReferenceBase CreateSymbolReference(string resourceId);
+
+        /// <summary>
+        /// Purges root element attributes from all inline Simple Symbol Definitions. This should be called
+        /// before serialization
+        /// </summary>
+        void PurgeSimpleSymbolAttributes();
+    }
+
+    /// <summary>
+    /// A collection of graphic elements
+    /// </summary>
+    public interface IGraphics
+    {
+        /// <summary>
+        /// Gets the elements.
+        /// </summary>
+        /// <value>The elements.</value>
+        IEnumerable<IGraphicBase> Elements { get; }
+
+        /// <summary>
+        /// Adds the graphic element.
+        /// </summary>
+        /// <param name="graphics">The graphics.</param>
+        void AddGraphicElement(IGraphicBase graphics);
+
+        /// <summary>
+        /// Removes the graphic element.
+        /// </summary>
+        /// <param name="graphics">The graphics.</param>
+        void RemoveGraphicElement(IGraphicBase graphics);
+    }
+
+    /// <summary>
+    /// Defines a resize box used with SimpleSymbolDefinitions
+    /// </summary>
+    public interface IResizeBox
+    {
+        /// <summary>
+        /// Gets or sets initial width of the resize box, in mm.  This must be greater than or equal to zero
+        /// </summary>
+        string SizeX { get; set; }
+
+        /// <summary>
+        /// Gets or sets initial height of the resize box, in mm.  This must be greater than or equal to zero
+        /// </summary>
+        string SizeY { get; set; }
+
+        /// <summary>
+        /// Gets or sets initial x-coordinate of the resize box center, in mm
+        /// </summary>
+        string PositionX { get; set; }
+
+        /// <summary>
+        /// Gets or sets initial y-coordinate of the resize box center, in mm
+        /// </summary>
+        string PositionY { get; set; }
+
+        /// <summary>
+        /// Gets or sets how the resize box grows in size.  This must evaluate to one of: GrowInX, GrowInY, GrowInXY, or GrowInXYMaintainAspect (default).
+        /// </summary>
+        string GrowControl { get; set; }
+    }
+
+    /// <summary>
+    /// Base usage interface
+    /// </summary>
+    public interface IUsageBase
+    {
+        /// <summary>
+        /// Specifies how the symbol angle is defined.  This must evaluate to one of: FromAngle (default) or FromGeometry
+        /// </summary>
+        string AngleControl { get; set; }
+
+        /// <summary>
+        /// Specifies the symbol angle, in degrees.  Only applies if AngleControl evaluates to FromAngle.  Defaults to 0
+        /// </summary>
+        string Angle { get; set; }
+    }
+
+    /// <summary>
+    /// Specifies how a symbol is used in the context of point features
+    /// </summary>
+    public interface IPointUsage : IUsageBase
+    {
+        /// <summary>
+        /// Specifies the horizontal offset to apply to the symbol origin, in mm.  This offset is applied before the symbol is scaled and rotated.  Defaults to 0
+        /// </summary>
+        string OriginOffsetX { get; set; }
+
+        /// <summary>
+        /// Specifies the vertical offset to apply to the symbol origin, in mm.  This offset is applied before the symbol is scaled and rotated.  Defaults to 0
+        /// </summary>
+        string OriginOffsetY { get; set; }
+    }
+
+    /// <summary>
+    /// Represents line usage
+    /// </summary>
+    public interface ILineUsage : IUsageBase
+    {
+        /// <summary>
+        /// Gets or sets the units control.
+        /// </summary>
+        /// <value>The units control.</value>
+        string UnitsControl { get; set; }
+
+        /// <summary>
+        /// Gets or sets the vertex control.
+        /// </summary>
+        /// <value>The vertex control.</value>
+        string VertexControl { get; set; }
+
+        /// <summary>
+        /// Gets or sets the start offset.
+        /// </summary>
+        /// <value>The start offset.</value>
+        string StartOffset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the end offset.
+        /// </summary>
+        /// <value>The end offset.</value>
+        string EndOffset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the repeat value
+        /// </summary>
+        /// <value>The repeat value.</value>
+        string Repeat { get; set; }
+
+        /// <summary>
+        /// Gets or sets the vertex angle limit.
+        /// </summary>
+        /// <value>The vertex angle limit.</value>
+        string VertexAngleLimit { get; set; }
+
+        /// <summary>
+        /// Gets or sets the vertex join.
+        /// </summary>
+        /// <value>The vertex join.</value>
+        string VertexJoin { get; set; }
+
+        /// <summary>
+        /// Gets or sets the vertex miter limit.
+        /// </summary>
+        /// <value>The vertex miter limit.</value>
+        string VertexMiterLimit { get; set; }
+
+        /// <summary>
+        /// Gets or sets the default path.
+        /// </summary>
+        /// <value>The default path.</value>
+        IPathGraphic DefaultPath { get; set; }
+    }
+
+    /// <summary>
+    /// Defines area usage
+    /// </summary>
+    public interface IAreaUsage : IUsageBase
+    {
+        /// <summary>
+        /// Gets or sets the origin control.
+        /// </summary>
+        /// <value>The origin control.</value>
+        string OriginControl { get; set; }
+
+        /// <summary>
+        /// Gets or sets the clipping control.
+        /// </summary>
+        /// <value>The clipping control.</value>
+        string ClippingControl { get; set; }
+
+        /// <summary>
+        /// Gets or sets the X origin.
+        /// </summary>
+        /// <value>The X origin.</value>
+        string OriginX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Y origin.
+        /// </summary>
+        /// <value>The Y origin.</value>
+        string OriginY { get; set; }
+
+        /// <summary>
+        /// Gets or sets the X repeat value.
+        /// </summary>
+        /// <value>The X repeat value.</value>
+        string RepeatX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Y repeat value
+        /// </summary>
+        /// <value>The Y repeat value.</value>
+        string RepeatY { get; set; }
+
+        /// <summary>
+        /// Gets or sets the width of the buffer.
+        /// </summary>
+        /// <value>The width of the buffer.</value>
+        string BufferWidth { get; set; }
+    }
+
+    /// <summary>
+    /// Enumerates the allowed DataType values
+    /// </summary>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
+    [System.SerializableAttribute()]
+    public enum DataType
+    {
+        /// <remarks/>
+        String,
+
+        /// <remarks/>
+        Boolean,
+
+        /// <remarks/>
+        Integer,
+
+        /// <remarks/>
+        Real,
+
+        /// <remarks/>
+        Color,
+    }
+
+    /// <summary>
+    /// Defines a parameter
+    /// </summary>
+    public interface IParameter : IExpressionPropertySource
+    {
+        /// <summary>
+        /// Gets or sets the identifier.
+        /// </summary>
+        /// <value>The identifier.</value>
+        string Identifier { get; set; }
+
+        /// <summary>
+        /// Gets or sets the default value.
+        /// </summary>
+        /// <value>The default value.</value>
+        string DefaultValue { get; set; }
+
+        /// <summary>
+        /// Gets or sets the display name.
+        /// </summary>
+        /// <value>The display name.</value>
+        string DisplayName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the description.
+        /// </summary>
+        /// <value>
+        /// The description.
+        /// </value>
+        string Description { get; set; }
+
+        /// <summary>
+        /// Gets or sets the type of the data.
+        /// </summary>
+        /// <value>The type of the data.</value>
+        string DataType { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a set of parameter definitions
+    /// </summary>
+    public interface IParameterDefinition
+    {
+        /// <summary>
+        /// Gets the parameters in this collection
+        /// </summary>
+        /// <value>The parameters.</value>
+        IEnumerable<IParameter> Parameter { get; }
+
+        /// <summary>
+        /// Adds a parameter to this collection
+        /// </summary>
+        /// <param name="param">The parameter.</param>
+        void AddParameter(IParameter param);
+
+        /// <summary>
+        /// Removes the given parameter from this collection
+        /// </summary>
+        /// <param name="param">The parameter.</param>
+        void RemoveParameter(IParameter param);
+    }
+
+    /// <summary>
+    /// Represents a simple symbol reference
+    /// </summary>
+    public interface ISimpleSymbolReferenceBase
+    {
+        /// <summary>
+        /// Gets the type.
+        /// </summary>
+        /// <value>The type.</value>
+        SimpleSymbolReferenceType Type { get; }
+
+        /// <summary>
+        /// Gets or sets the rendering pass.
+        /// </summary>
+        /// <value>The rendering pass.</value>
+        string RenderingPass { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a simple symbol reference by resource id
+    /// </summary>
+    public interface ISimpleSymbolLibraryReference : ISimpleSymbolReferenceBase, IResourceIdReference
+    {
+    }
+
+    /// <summary>
+    /// Represents a simple symbol reference by inline definition
+    /// </summary>
+    public interface ISimpleSymbolInlineReference : ISimpleSymbolReferenceBase
+    {
+        /// <summary>
+        /// Gets or sets the simple symbol definition.
+        /// </summary>
+        /// <value>The simple symbol definition.</value>
+        ISimpleSymbolDefinition SimpleSymbolDefinition { get; set; }
+    }
+
+    /// <summary>
+    /// The type of simple symbol reference
+    /// </summary>
+    public enum SimpleSymbolReferenceType
+    {
+        /// <summary>
+        /// External resource id reference
+        /// </summary>
+        Library,
+
+        /// <summary>
+        /// Inlined definition
+        /// </summary>
+        Inline,
+
+        /// <summary>
+        /// Undefined
+        /// </summary>
+        Undefined
+    }
+
+    /// <summary>
+    /// Defines the valid types of graphic elements
+    /// </summary>
+    public enum GraphicElementType
+    {
+        /// <summary>
+        /// Text
+        /// </summary>
+        Text,
+
+        /// <summary>
+        /// Images
+        /// </summary>
+        Image,
+
+        /// <summary>
+        /// A linear path containing one or more segments
+        /// </summary>
+        Path
+    }
+
+    /// <summary>
+    /// Represents the base interface of all graphics
+    /// </summary>
+    public interface IGraphicBase
+    {
+        /// <summary>
+        /// Gets or sets the resize control.
+        /// </summary>
+        /// <value>The resize control.</value>
+        string ResizeControl { get; set; }
+
+        /// <summary>
+        /// Gets the type of graphic element
+        /// </summary>
+        GraphicElementType Type { get; }
+    }
+
+    /// <summary>
+    /// A path
+    /// </summary>
+    public interface IPathGraphic : IGraphicBase
+    {
+        /// <summary>
+        /// Gets or sets the geometry.
+        /// </summary>
+        /// <value>The geometry.</value>
+        string Geometry { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color of the fill.
+        /// </summary>
+        /// <value>The color of the fill.</value>
+        string FillColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color of the line.
+        /// </summary>
+        /// <value>The color of the line.</value>
+        string LineColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the line weight.
+        /// </summary>
+        /// <value>The line weight.</value>
+        string LineWeight { get; set; }
+
+        /// <summary>
+        /// Gets or sets the line weight scalable.
+        /// </summary>
+        /// <value>The line weight scalable.</value>
+        string LineWeightScalable { get; set; }
+
+        /// <summary>
+        /// Gets or sets the line cap.
+        /// </summary>
+        /// <value>The line cap.</value>
+        string LineCap { get; set; }
+
+        /// <summary>
+        /// Gets or sets the line join.
+        /// </summary>
+        /// <value>The line join.</value>
+        string LineJoin { get; set; }
+
+        /// <summary>
+        /// Gets or sets the line miter limit.
+        /// </summary>
+        /// <value>The line miter limit.</value>
+        string LineMiterLimit { get; set; }
+    }
+
+    /// <summary>
+    /// An image reference
+    /// </summary>
+    public interface IImageReference : IImageBase
+    {
+        /// <summary>
+        /// Gets or sets the resource id.
+        /// </summary>
+        /// <value>The resource id.</value>
+        string ResourceId { get; set; }
+
+        /// <summary>
+        /// Gets or sets the name of the library item.
+        /// </summary>
+        /// <value>The name of the library item.</value>
+        string LibraryItemName { get; set; }
+    }
+
+    /// <summary>
+    /// The type of image
+    /// </summary>
+    public enum ImageType
+    {
+        /// <summary>
+        /// A reference to an image
+        /// </summary>
+        Reference,
+
+        /// <summary>
+        /// Inline content
+        /// </summary>
+        Inline
+    }
+
+    /// <summary>
+    /// Defines an image graphic
+    /// </summary>
+    public interface IImageGraphic : IGraphicBase
+    {
+        /// <summary>
+        /// Gets or sets the image content
+        /// </summary>
+        /// <remarks>
+        /// If the object being returned is an inline image, the object is a fresh instance whose
+        /// byte array refers to the same instance. That is to say:
+        /// <code>
+        /// IInlineImage img1 = (IInlineImage)imageGraphic.Item;
+        /// IInlineImage img2 = (IInlineImage)imageGraphic.Item;
+        ///
+        /// Object.ReferenceEquals(img1, img2);                 //false
+        /// Object.ReferenceEquals(img1.Content, img2.Content); //true
+        /// </code>
+        /// </remarks>
+        IImageBase Item { get; set; }
+
+        /// <summary>
+        /// Gets or sets the size X.
+        /// </summary>
+        /// <value>The size X.</value>
+        string SizeX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the size Y.
+        /// </summary>
+        /// <value>The size Y.</value>
+        string SizeY { get; set; }
+
+        /// <summary>
+        /// Gets or sets the size scalable.
+        /// </summary>
+        /// <value>The size scalable.</value>
+        string SizeScalable { get; set; }
+
+        /// <summary>
+        /// Gets or sets the angle.
+        /// </summary>
+        /// <value>The angle.</value>
+        string Angle { get; set; }
+
+        /// <summary>
+        /// Gets or sets the position X.
+        /// </summary>
+        /// <value>The position X.</value>
+        string PositionX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the position Y.
+        /// </summary>
+        /// <value>The position Y.</value>
+        string PositionY { get; set; }
+    }
+
+    /// <summary>
+    /// An image graphic
+    /// </summary>
+    public interface IImageBase
+    {
+        /// <summary>
+        /// Gets the type.
+        /// </summary>
+        /// <value>The type.</value>
+        ImageType Type { get; }
+    }
+
+    /// <summary>
+    /// Represents an inline image
+    /// </summary>
+    public interface IInlineImage : IImageBase
+    {
+        /// <summary>
+        /// Gets or sets the content.
+        /// </summary>
+        /// <value>The content.</value>
+        byte[] Content { get; set; }
+    }
+
+    /// <summary>
+    /// Represents an image refrence
+    /// </summary>
+    public interface IImageReferenceImage : IImageBase
+    {
+        /// <summary>
+        /// Gets or sets the reference.
+        /// </summary>
+        /// <value>The reference.</value>
+        IImageReference Reference { get; set; }
+    }
+
+    /// <summary>
+    /// A text frame
+    /// </summary>
+    public interface ITextFrame
+    {
+        /// <summary>
+        /// Gets or sets the color of the line.
+        /// </summary>
+        /// <value>The color of the line.</value>
+        string LineColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color of the fill.
+        /// </summary>
+        /// <value>The color of the fill.</value>
+        string FillColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the offset X.
+        /// </summary>
+        /// <value>The offset X.</value>
+        double? OffsetX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the offset Y.
+        /// </summary>
+        /// <value>The offset Y.</value>
+        double? OffsetY { get; set; }
+    }
+
+    /// <summary>
+    /// Text graphics
+    /// </summary>
+    public interface ITextGraphic : IGraphicBase
+    {
+        /// <summary>
+        /// Gets or sets the content.
+        /// </summary>
+        /// <value>The content.</value>
+        string Content { get; set; }
+
+        /// <summary>
+        /// Gets or sets the name of the font.
+        /// </summary>
+        /// <value>The name of the font.</value>
+        string FontName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the bold.
+        /// </summary>
+        /// <value>The bold.</value>
+        string Bold { get; set; }
+
+        /// <summary>
+        /// Gets or sets the italic.
+        /// </summary>
+        /// <value>The italic.</value>
+        string Italic { get; set; }
+
+        /// <summary>
+        /// Gets or sets the underlined.
+        /// </summary>
+        /// <value>The underlined.</value>
+        string Underlined { get; set; }
+
+        /// <summary>
+        /// Gets or sets the height.
+        /// </summary>
+        /// <value>The height.</value>
+        string Height { get; set; }
+
+        /// <summary>
+        /// Gets or sets the height scalable.
+        /// </summary>
+        /// <value>The height scalable.</value>
+        string HeightScalable { get; set; }
+
+        /// <summary>
+        /// Gets or sets the angle.
+        /// </summary>
+        /// <value>The angle.</value>
+        string Angle { get; set; }
+
+        /// <summary>
+        /// Gets or sets the position X.
+        /// </summary>
+        /// <value>The position X.</value>
+        string PositionX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the position Y.
+        /// </summary>
+        /// <value>The position Y.</value>
+        string PositionY { get; set; }
+
+        /// <summary>
+        /// Gets or sets the horizontal alignment.
+        /// </summary>
+        /// <value>The horizontal alignment.</value>
+        string HorizontalAlignment { get; set; }
+
+        /// <summary>
+        /// Gets or sets the vertical alignment.
+        /// </summary>
+        /// <value>The vertical alignment.</value>
+        string VerticalAlignment { get; set; }
+
+        /// <summary>
+        /// Gets or sets the justification.
+        /// </summary>
+        /// <value>The justification.</value>
+        string Justification { get; set; }
+
+        /// <summary>
+        /// Gets or sets the line spacing.
+        /// </summary>
+        /// <value>The line spacing.</value>
+        string LineSpacing { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color of the text.
+        /// </summary>
+        /// <value>The color of the text.</value>
+        string TextColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color of the ghost.
+        /// </summary>
+        /// <value>The color of the ghost.</value>
+        string GhostColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the frame.
+        /// </summary>
+        /// <value>The frame.</value>
+        ITextFrame Frame { get; set; }
+    }
+
+    /// <summary>
+    /// The possible values for grow control
+    /// </summary>
+    public enum GrowControl
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        GrowInX,
+
+        /// <summary>
+        ///
+        /// </summary>
+        GrowInY,
+
+        /// <summary>
+        ///
+        /// </summary>
+        GrowInXY,
+
+        /// <summary>
+        ///
+        /// </summary>
+        GrowInXYMaintainAspect,
+    }
+
+    /// <summary>
+    /// The types of angle control
+    /// </summary>
+    public enum AngleControl
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        FromAngle,
+
+        /// <summary>
+        ///
+        /// </summary>
+        FromGeometry,
+    }
+
+    /// <summary>
+    /// The types of units control
+    /// </summary>
+    public enum UnitsControl
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        Absolute,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Parametric,
+    }
+
+    /// <summary>
+    /// The types of vertex control
+    /// </summary>
+    public enum VertexControl
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        OverlapNone,
+
+        /// <summary>
+        ///
+        /// </summary>
+        OverlapDirect,
+
+        /// <summary>
+        /// Introduced with Symbol Definition 1.1.0 schema
+        /// </summary>
+        OverlapNoWrap,
+
+        /// <summary>
+        ///
+        /// </summary>
+        OverlapWrap,
+    }
+
+    /// <summary>
+    /// The types of vertex join
+    /// </summary>
+    public enum VertexJoin
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        None,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Bevel,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Round,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Miter,
+    }
+
+    /// <summary>
+    /// The types of origin control
+    /// </summary>
+    public enum OriginControl
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        Global,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Local,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Centroid,
+    }
+
+    /// <summary>
+    /// The types of clipping control
+    /// </summary>
+    public enum ClippingControl
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        Clip,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Inside,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Overlap
+    }
+
+    /// <summary>
+    /// The types of resize control
+    /// </summary>
+    public enum ResizeControl
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        ResizeNone,
+
+        /// <summary>
+        ///
+        /// </summary>
+        AddToResizeBox,
+
+        /// <summary>
+        ///
+        /// </summary>
+        AdjustToResizeBox,
+    }
+
+    /// <summary>
+    /// The types of line cap
+    /// </summary>
+    public enum LineCap
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        None,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Round,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Triangle,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Square,
+    }
+
+    /// <summary>
+    /// The types of line join
+    /// </summary>
+    public enum LineJoin
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        None,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Bevel,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Round,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Miter,
+    }
+
+    /// <summary>
+    /// The types of horizontal alignment
+    /// </summary>
+    public enum HorizontalAlignment
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        Left,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Center,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Right,
+    }
+
+    /// <summary>
+    /// The types of vertical alignment
+    /// </summary>
+    public enum VerticalAlignment
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        Bottom,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Baseline,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Halfline,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Capline,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Top,
+    }
+
+    /// <summary>
+    /// The types of justification
+    /// </summary>
+    public enum Justification
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        Left,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Center,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Right,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Justified,
+
+        /// <summary>
+        ///
+        /// </summary>
+        FromAlignment,
+    }
+
+    #endregion Symbol Definition 1.0.0 interfaces
+
+    #region Symbol Definition 1.1.0 interfaces
+
+    /// <summary>
+    /// An extension of the text element to support rich text. Introduced with the Symbol Definition 1.1.0 schema
+    /// </summary>
+    public interface ITextGraphic2 : ITextGraphic
+    {
+        /// <summary>
+        /// Gets or sets the type of rich text markup used to render the contents
+        /// </summary>
+        string Markup { get; set; }
+
+        /// <summary>
+        /// Gets or sets the text style attribute to create a line that runs on top of the text
+        /// </summary>
+        string Overlined { get; set; }
+
+        /// <summary>
+        /// Gets or sets the skew of shear angle to be applied to the text
+        /// </summary>
+        string ObliqueAngle { get; set; }
+
+        /// <summary>
+        /// Gets or sets the width scale applied to inter character spacing independent of the font character spacing
+        /// </summary>
+        string TrackSpacing { get; set; }
+    }
+
+    /// <summary>
+    /// Enumerates the allowed DataType values. Introduced with Symbol Definition 1.1.0 schema
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum DataType2
+    {
+        /// <remarks/>
+        String,
+
+        /// <remarks/>
+        Boolean,
+
+        /// <remarks/>
+        Integer,
+
+        /// <remarks/>
+        Real,
+
+        /// <remarks/>
+        Color,
+
+        /// <remarks/>
+        Angle,
+
+        /// <remarks/>
+        FillColor,
+
+        /// <remarks/>
+        LineColor,
+
+        /// <remarks/>
+        LineWeight,
+
+        /// <remarks/>
+        Content,
+
+        /// <remarks/>
+        Markup,
+
+        /// <remarks/>
+        FontName,
+
+        /// <remarks/>
+        Bold,
+
+        /// <remarks/>
+        Italic,
+
+        /// <remarks/>
+        Underlined,
+
+        /// <remarks/>
+        Overlined,
+
+        /// <remarks/>
+        ObliqueAngle,
+
+        /// <remarks/>
+        TrackSpacing,
+
+        /// <remarks/>
+        FontHeight,
+
+        /// <remarks/>
+        HorizontalAlignment,
+
+        /// <remarks/>
+        VerticalAlignment,
+
+        /// <remarks/>
+        Justification,
+
+        /// <remarks/>
+        LineSpacing,
+
+        /// <remarks/>
+        TextColor,
+
+        /// <remarks/>
+        GhostColor,
+
+        /// <remarks/>
+        FrameLineColor,
+
+        /// <remarks/>
+        FrameFillColor,
+
+        /// <remarks/>
+        StartOffset,
+
+        /// <remarks/>
+        EndOffset,
+
+        /// <remarks/>
+        RepeatX,
+
+        /// <remarks/>
+        RepeatY,
+    }
+
+    #endregion Symbol Definition 1.1.0 interfaces
+
+    #region Symbol Definition 2.4.0 interfaces
+
+    /// <summary>
+    /// Path with support for scaling. Only applicable for Symbol Definition schema
+    /// 2.4.0 and higher
+    /// </summary>
+    public interface IPathGraphic2 : IPathGraphic
+    {
+        /// <summary>
+        /// >The amount to scale the path geometry in the horizontal direction. This is only applied to the Geometry element. Defaults to 1 if not specified.
+        /// </summary>
+        string ScaleX { get; set; }
+
+        /// <summary>
+        /// The amount to scale the path geometry in the vertical direction. This is only applied to the Geometry element. Defaults to 1 if not specified
+        /// </summary>
+        string ScaleY { get; set; }
+    }
+
+    #endregion Symbol Definition 2.4.0 interfaces
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/v1_0_0/SymbolDefinitionImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/v1_0_0/SymbolDefinitionImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolDefinition/v1_0_0/SymbolDefinitionImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,924 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.Common;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+#pragma warning disable 1591, 0114, 0108
+
+#if SYM_DEF_240
+namespace OSGeo.MapGuide.ObjectModels.SymbolDefinition.v2_4_0
+#elif SYM_DEF_110
+namespace OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_1_0
+#else
+
+namespace OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_0_0
+#endif
+{
+    abstract partial class SymbolDefinitionBase : ISymbolDefinitionBase
+    {
+        public abstract void RemoveSchemaAttributes();
+
+        public abstract void SetSchemaAttributes();
+
+#if SYM_DEF_240
+        protected static readonly Version RES_VERSION = new Version(2, 4, 0);
+#elif SYM_DEF_110
+        protected static readonly Version RES_VERSION = new Version(1, 1, 0);
+#else
+        protected static readonly Version RES_VERSION = new Version(1, 0, 0);
+#endif
+
+        private string _resId;
+
+        [XmlIgnore]
+        public string ResourceID
+        {
+            get
+            {
+                return _resId;
+            }
+            set
+            {
+                if (!ResourceIdentifier.Validate(value))
+                    throw new InvalidOperationException(Strings.ErrorInvalidResourceIdentifier);
+
+                var res = new ResourceIdentifier(value);
+                if (res.Extension != ResourceTypes.SymbolDefinition.ToString())
+                    throw new InvalidOperationException(string.Format(Strings.ErrorUnexpectedResourceType, res.ToString(), ResourceTypes.SymbolDefinition));
+
+                _resId = value;
+                this.OnPropertyChanged("ResourceID"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public string ResourceType
+        {
+            get
+            {
+                return ResourceTypes.SymbolDefinition.ToString();
+            }
+        }
+
+        [XmlIgnore]
+        public Version ResourceVersion
+        {
+            get
+            {
+                return RES_VERSION;
+            }
+        }
+
+        object ICloneable.Clone()
+        {
+            return this.Clone();
+        }
+
+#if SYM_DEF_240
+        protected string _vschema = "SymbolDefinition-2.4.0.xsd"; //NOXLATE
+        public const string SCHEMA_NAME = "SymbolDefinition-2.4.0.xsd"; //NOXLATE
+#elif SYM_DEF_110
+        protected string _vschema = "SymbolDefinition-1.1.0.xsd"; //NOXLATE
+        public const string SCHEMA_NAME = "SymbolDefinition-1.1.0.xsd"; //NOXLATE
+#else
+        protected string _vschema = "SymbolDefinition-1.0.0.xsd"; //NOXLATE
+        public const string SCHEMA_NAME = "SymbolDefinition-1.0.0.xsd"; //NOXLATE
+#endif
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] //NOXLATE
+        public string ValidatingSchema
+        {
+            get { return _vschema; }
+            set { }
+        }
+
+        [XmlIgnore]
+        public bool IsStronglyTyped
+        {
+            get { return true; }
+        }
+
+        [XmlIgnore]
+        public abstract SymbolDefinitionType Type { get; }
+    }
+
+    partial class SimpleSymbolDefinition : ISimpleSymbolDefinition
+    {
+        public override void RemoveSchemaAttributes()
+        {
+            _vschema = null;
+            versionField = null;
+        }
+
+        public override void SetSchemaAttributes()
+        {
+            _vschema = SCHEMA_NAME;
+            versionField = RES_VERSION.Major + "." + RES_VERSION.Minor + "." + RES_VERSION.Build;
+        }
+
+        public static SimpleSymbolDefinition CreateDefault()
+        {
+            var simpleSym = new SimpleSymbolDefinition()
+            {
+                Graphics = new System.ComponentModel.BindingList<GraphicBase>(),
+                ParameterDefinition = new ParameterDefinition()
+                {
+                    Parameter = new System.ComponentModel.BindingList<Parameter>()
+                }
+            };
+            return simpleSym;
+        }
+
+        [XmlIgnore]
+        IEnumerable<IGraphicBase> ISimpleSymbolDefinition.Graphics
+        {
+            get
+            {
+                foreach (var g in this.Graphics)
+                {
+                    yield return g;
+                }
+            }
+        }
+
+        void ISimpleSymbolDefinition.ClearGraphics()
+        {
+            this.Graphics.Clear();
+        }
+
+        void ISimpleSymbolDefinition.AddGraphics(IGraphicBase graphics)
+        {
+            var g = graphics as GraphicBase;
+            if (g != null)
+            {
+                this.Graphics.Add(g);
+            }
+        }
+
+        void ISimpleSymbolDefinition.RemoveGraphics(IGraphicBase graphics)
+        {
+            var g = graphics as GraphicBase;
+            if (g != null)
+            {
+                this.Graphics.Remove(g);
+            }
+        }
+
+        [XmlIgnore]
+        IResizeBox ISimpleSymbolDefinition.ResizeBox
+        {
+            get
+            {
+                return resizeBoxField;
+            }
+            set
+            {
+                resizeBoxField = (ResizeBox)value;
+            }
+        }
+
+        [XmlIgnore]
+        IPointUsage ISimpleSymbolDefinition.PointUsage
+        {
+            get
+            {
+                return pointUsageField;
+            }
+            set
+            {
+                pointUsageField = (PointUsage)value;
+            }
+        }
+
+        [XmlIgnore]
+        ILineUsage ISimpleSymbolDefinition.LineUsage
+        {
+            get
+            {
+                return lineUsageField;
+            }
+            set
+            {
+                lineUsageField = (LineUsage)value;
+            }
+        }
+
+        [XmlIgnore]
+        IAreaUsage ISimpleSymbolDefinition.AreaUsage
+        {
+            get
+            {
+                return areaUsageField;
+            }
+            set
+            {
+                areaUsageField = (AreaUsage)value;
+            }
+        }
+
+        [XmlIgnore]
+        IParameterDefinition ISimpleSymbolDefinition.ParameterDefinition
+        {
+            get { return parameterDefinitionField; }
+        }
+
+        public IImageReference CreateImageReference(string resourceId, string dataName)
+        {
+            return new ImageReference()
+            {
+                ResourceId = resourceId,
+                LibraryItemName = dataName
+            };
+        }
+
+        public IInlineImage CreateInlineImage(byte[] content)
+        {
+            return new InlineImage() { Content = content };
+        }
+
+        public IPointUsage CreatePointUsage()
+        {
+            return new PointUsage()
+            {
+                //Angle = "0", //NOXLATE
+                //AngleControl = "'FromAngle'", //NOXLATE
+                //OriginOffsetX = "0.0", //NOXLATE
+                //OriginOffsetY = "0.0" //NOXLATE
+            };
+        }
+
+        public ILineUsage CreateLineUsage()
+        {
+            return new LineUsage()
+            {
+                //Angle = "0", //NOXLATE
+                //AngleControl = "'FromGeometry'", //NOXLATE
+                /*
+                DefaultPath = new Path()
+                {
+                },*/
+                //EndOffset = "0", //NOXLATE
+                //Repeat = "0", //NOXLATE
+                //StartOffset = "0", //NOXLATE
+                //UnitsControl = "'Absolute'", //NOXLATE
+                //VertexAngleLimit = "0", //NOXLATE
+                //VertexControl = "'OverlapNone'", //NOXLATE
+                //VertexJoin = "'Round'", //NOXLATE
+                //VertexMiterLimit = "5" //NOXLATE
+            };
+        }
+
+        public IAreaUsage CreateAreaUsage()
+        {
+            return new AreaUsage()
+            {
+                //Angle = "0", //NOXLATE
+                //AngleControl = "'FromAngle'", //NOXLATE
+                //BufferWidth = "0", //NOXLATE
+                //ClippingControl = "'Clip'", //NOXLATE
+                //OriginControl = "'Global'", //NOXLATE
+                //OriginX = "0", //NOXLATE
+                //OriginY = "0", //NOXLATE
+                //RepeatX = "0", //NOXLATE
+                //RepeatY = "0" //NOXLATE
+            };
+        }
+
+        public IResizeBox CreateResizeBox()
+        {
+            return new ResizeBox()
+            {
+                SizeX = "1.0", //NOXLATE
+                SizeY = "1.0", //NOXLATE
+                PositionX = "0.0", //NOXLATE
+                PositionY = "0.0", //NOXLATE
+                GrowControl = "\'GrowInXYMaintainAspect\'" //NOXLATE
+            };
+        }
+
+        public ITextFrame CreateFrame()
+        {
+            return new TextFrame() { };
+        }
+
+        public ITextGraphic CreateTextGraphics()
+        {
+            //Required for minimum content
+            return new Text() { Content = "", FontName = "'Arial'" };  //NOXLATE
+        }
+
+        public IPathGraphic CreatePathGraphics()
+        {
+            return new Path() { };
+        }
+
+        public IImageGraphic CreateImageGraphics()
+        {
+            //default to empty inline content
+            return new Image()
+            {
+                Item = new byte[0]
+            };
+        }
+
+        public IParameter CreateParameter()
+        {
+            return new Parameter()
+            {
+                Identifier = "", //NOXLATE
+                DefaultValue = "", //NOXLATE
+                Description = "", //NOXLATE
+                DisplayName = "", //NOXLATE
+            };
+        }
+
+        [XmlIgnore]
+        public override SymbolDefinitionType Type
+        {
+            get { return SymbolDefinitionType.Simple; }
+        }
+    }
+
+    public class InlineImage : IInlineImage
+    {
+        public byte[] Content
+        {
+            get;
+            set;
+        }
+
+        public ImageType Type
+        {
+            get { return ImageType.Inline; }
+        }
+    }
+
+#if SYM_DEF_240 || SYM_DEF_110
+    partial class Text : ITextGraphic2
+#else
+
+    partial class Text : ITextGraphic
+#endif
+    {
+        [XmlIgnore]
+        public override GraphicElementType Type
+        {
+            get { return GraphicElementType.Text; }
+        }
+
+        [XmlIgnore]
+        ITextFrame ITextGraphic.Frame
+        {
+            get
+            {
+                return this.Frame;
+            }
+            set
+            {
+                this.Frame = (TextFrame)value;
+            }
+        }
+    }
+
+    partial class TextFrame : ITextFrame
+    {
+        [XmlIgnore]
+        double? ITextFrame.OffsetX
+        {
+            get
+            {
+                double d;
+                if (!double.TryParse(this.OffsetX, out d))
+                    return d;
+                return null;
+            }
+            set
+            {
+                if (value.HasValue)
+                    this.OffsetX = value.Value.ToString(CultureInfo.InvariantCulture);
+                else
+                    this.OffsetX = null;
+            }
+        }
+
+        [XmlIgnore]
+        double? ITextFrame.OffsetY
+        {
+            get
+            {
+                double d;
+                if (!double.TryParse(this.OffsetY, out d))
+                    return d;
+                return null;
+            }
+            set
+            {
+                if (value.HasValue)
+                    this.OffsetY = value.Value.ToString(CultureInfo.InvariantCulture);
+                else
+                    this.OffsetY = null;
+            }
+        }
+    }
+
+    partial class ResizeBox : IResizeBox
+    {
+    }
+
+    partial class Graphics : IGraphics
+    {
+        [XmlIgnore]
+        public IEnumerable<IGraphicBase> Elements
+        {
+            get
+            {
+                foreach (var g in this.Items)
+                {
+                    yield return g;
+                }
+            }
+        }
+
+        public void AddGraphicElement(IGraphicBase graphics)
+        {
+            var g = graphics as GraphicBase;
+            if (g != null)
+            {
+                this.Items.Add(g);
+            }
+        }
+
+        public void RemoveGraphicElement(IGraphicBase graphics)
+        {
+            var g = graphics as GraphicBase;
+            if (g != null)
+            {
+                this.Items.Remove(g);
+            }
+        }
+    }
+
+    abstract partial class GraphicBase : IGraphicBase
+    {
+        public abstract GraphicElementType Type
+        {
+            get;
+        }
+    }
+
+    partial class Parameter : IParameter
+    {
+        [XmlIgnore]
+        string IParameter.DataType
+        {
+            get
+            {
+                return dataTypeField.ToString();
+            }
+            set
+            {
+#if SYM_DEF_110 || SYM_DEF_240
+                dataTypeField = (DataType2)Enum.Parse(typeof(DataType2), value);
+#else
+                dataTypeField = (DataType)Enum.Parse(typeof(DataType), value);
+#endif
+            }
+        }
+
+        string IExpressionPropertySource.Name
+        {
+            get { return this.Identifier; }
+        }
+
+        string IExpressionPropertySource.Description
+        {
+            get { return this.Description; }
+        }
+
+#if SYM_DEF_110 || SYM_DEF_240
+        static ExpressionDataType GetExpressionType(DataType2 dt)
+        {
+            switch (dt)
+            {
+                case DataType2.Angle:
+                    return ExpressionDataType.Sym_Angle;
+
+                case DataType2.Bold:
+                    return ExpressionDataType.Sym_Bold;
+
+                case DataType2.Boolean:
+                    return ExpressionDataType.Sym_Boolean;
+
+                case DataType2.Color:
+                    return ExpressionDataType.Sym_Color;
+
+                case DataType2.Content:
+                    return ExpressionDataType.Sym_Content;
+
+                case DataType2.EndOffset:
+                    return ExpressionDataType.Sym_EndOffset;
+
+                case DataType2.FillColor:
+                    return ExpressionDataType.Sym_FillColor;
+
+                case DataType2.FontHeight:
+                    return ExpressionDataType.Sym_FontHeight;
+
+                case DataType2.FontName:
+                    return ExpressionDataType.Sym_FontName;
+
+                case DataType2.FrameFillColor:
+                    return ExpressionDataType.Sym_FrameFillColor;
+
+                case DataType2.FrameLineColor:
+                    return ExpressionDataType.Sym_FrameLineColor;
+
+                case DataType2.GhostColor:
+                    return ExpressionDataType.Sym_GhostColor;
+
+                case DataType2.HorizontalAlignment:
+                    return ExpressionDataType.Sym_HorizontalAlignment;
+
+                case DataType2.Integer:
+                    return ExpressionDataType.Sym_Integer;
+
+                case DataType2.Italic:
+                    return ExpressionDataType.Sym_Italic;
+
+                case DataType2.Justification:
+                    return ExpressionDataType.Sym_Justification;
+
+                case DataType2.LineColor:
+                    return ExpressionDataType.Sym_LineColor;
+
+                case DataType2.LineSpacing:
+                    return ExpressionDataType.Sym_LineSpacing;
+
+                case DataType2.LineWeight:
+                    return ExpressionDataType.Sym_LineWeight;
+
+                case DataType2.Markup:
+                    return ExpressionDataType.Sym_Markup;
+
+                case DataType2.ObliqueAngle:
+                    return ExpressionDataType.Sym_ObliqueAngle;
+
+                case DataType2.Overlined:
+                    return ExpressionDataType.Sym_Overlined;
+
+                case DataType2.Real:
+                    return ExpressionDataType.Sym_Real;
+
+                case DataType2.RepeatX:
+                    return ExpressionDataType.Sym_RepeatX;
+
+                case DataType2.RepeatY:
+                    return ExpressionDataType.Sym_RepeatY;
+
+                case DataType2.StartOffset:
+                    return ExpressionDataType.Sym_StartOffset;
+
+                case DataType2.String:
+                    return ExpressionDataType.Sym_String;
+
+                case DataType2 .TextColor:
+                    return ExpressionDataType.Sym_TextColor;
+
+                case DataType2.TrackSpacing:
+                    return ExpressionDataType.Sym_TrackSpacing;
+
+                case DataType2.Underlined:
+                    return ExpressionDataType.Sym_Underlined;
+
+                case DataType2.VerticalAlignment:
+                    return ExpressionDataType.Sym_VerticalAlignment;
+            }
+            throw new ArgumentException();
+        }
+#else
+
+        private static ExpressionDataType GetExpressionType(DataType dt)
+        {
+            switch (dt)
+            {
+                case DataType.Boolean:
+                    return ExpressionDataType.Sym_Boolean;
+
+                case DataType.Color:
+                    return ExpressionDataType.Sym_Color;
+
+                case DataType.Integer:
+                    return ExpressionDataType.Sym_Integer;
+
+                case DataType.Real:
+                    return ExpressionDataType.Sym_Real;
+
+                case DataType.String:
+                    return ExpressionDataType.Sym_String;
+            }
+            throw new ArgumentException();
+        }
+
+#endif
+
+        ExpressionDataType IExpressionPropertySource.ExpressionType
+        {
+            get { return GetExpressionType(this.DataType); }
+        }
+    }
+
+    partial class ParameterDefinition : IParameterDefinition
+    {
+        [XmlIgnore]
+        IEnumerable<IParameter> IParameterDefinition.Parameter
+        {
+            get
+            {
+                foreach (var p in this.Parameter)
+                {
+                    yield return p;
+                }
+            }
+        }
+
+        public void AddParameter(IParameter param)
+        {
+            var p = param as Parameter;
+            if (p != null)
+            {
+                this.Parameter.Add(p);
+            }
+        }
+
+        public void RemoveParameter(IParameter param)
+        {
+            var p = param as Parameter;
+            if (p != null)
+            {
+                this.Parameter.Remove(p);
+            }
+        }
+    }
+
+    partial class LineUsage : ILineUsage
+    {
+        [XmlIgnore]
+        IPathGraphic ILineUsage.DefaultPath
+        {
+            get
+            {
+                return this.DefaultPath;
+            }
+            set
+            {
+                this.DefaultPath = (Path)value;
+            }
+        }
+    }
+
+    partial class PointUsage : IPointUsage
+    {
+    }
+
+    partial class AreaUsage : IAreaUsage
+    {
+    }
+
+    partial class Path : IPathGraphic
+#if SYM_DEF_240
+        , IPathGraphic2
+#endif
+    {
+        [XmlIgnore]
+        public override GraphicElementType Type
+        {
+            get { return GraphicElementType.Path; }
+        }
+    }
+
+    partial class CompoundSymbolDefinition : ICompoundSymbolDefinition
+    {
+        public override void RemoveSchemaAttributes()
+        {
+            _vschema = null;
+            versionField = null;
+            foreach (var sm in this.SimpleSymbol)
+            {
+                var ssym = sm.Item as ISimpleSymbolDefinition;
+                var csym = sm.Item as ICompoundSymbolDefinition;
+                if (ssym != null)
+                    ssym.RemoveSchemaAttributes();
+                else if (csym != null)
+                    csym.RemoveSchemaAttributes();
+            }
+        }
+
+        public override void SetSchemaAttributes()
+        {
+            _vschema = SCHEMA_NAME;
+            versionField = RES_VERSION.Major + "." + RES_VERSION.Minor + "." + RES_VERSION.Build;
+        }
+
+        public static CompoundSymbolDefinition CreateDefault()
+        {
+            var sym = new CompoundSymbolDefinition()
+            {
+                SimpleSymbol = new System.ComponentModel.BindingList<SimpleSymbol>(),
+            };
+            return sym;
+        }
+
+        [XmlIgnore]
+        IEnumerable<ISimpleSymbolReferenceBase> ICompoundSymbolDefinition.SimpleSymbol
+        {
+            get
+            {
+                foreach (var sym in this.SimpleSymbol)
+                {
+                    yield return sym;
+                }
+            }
+        }
+
+        void ICompoundSymbolDefinition.AddSimpleSymbol(ISimpleSymbolReferenceBase sym)
+        {
+            var symb = sym as SimpleSymbol;
+            if (symb != null)
+            {
+                this.SimpleSymbol.Add(symb);
+            }
+        }
+
+        void ICompoundSymbolDefinition.RemoveSimpleSymbol(ISimpleSymbolReferenceBase sym)
+        {
+            var symb = sym as SimpleSymbol;
+            if (symb != null)
+            {
+                this.SimpleSymbol.Remove(symb);
+            }
+        }
+
+        public ISimpleSymbolReferenceBase CreateSimpleSymbol(ISimpleSymbolDefinition sym)
+        {
+            var s = (SimpleSymbolDefinition)sym;
+            s.RemoveSchemaAttributes();
+            return new SimpleSymbol() { Item = s };
+        }
+
+        public ISimpleSymbolReferenceBase CreateSymbolReference(string resourceId)
+        {
+            return new SimpleSymbol() { Item = resourceId };
+        }
+
+        [XmlIgnore]
+        public override SymbolDefinitionType Type
+        {
+            get { return SymbolDefinitionType.Compound; }
+        }
+
+        public void PurgeSimpleSymbolAttributes()
+        {
+            foreach (var sym in this.SimpleSymbol)
+            {
+                if (sym.Type == SimpleSymbolReferenceType.Inline)
+                {
+                    var s = (SimpleSymbolDefinition)sym.Item;
+                    s.RemoveSchemaAttributes();
+                }
+            }
+        }
+    }
+
+    partial class SimpleSymbol : ISimpleSymbolInlineReference, ISimpleSymbolLibraryReference
+    {
+        [XmlIgnore]
+        ISimpleSymbolDefinition ISimpleSymbolInlineReference.SimpleSymbolDefinition
+        {
+            get
+            {
+                return (ISimpleSymbolDefinition)this.Item;
+            }
+            set
+            {
+                this.Item = value;
+            }
+        }
+
+        [XmlIgnore]
+        public SimpleSymbolReferenceType Type
+        {
+            get
+            {
+                if (this.Item != null)
+                {
+                    if (typeof(ISimpleSymbolDefinition).IsAssignableFrom(this.Item.GetType()))
+                        return SimpleSymbolReferenceType.Inline;
+                    else if (typeof(string) == this.Item.GetType())
+                        return SimpleSymbolReferenceType.Library;
+                }
+                return SimpleSymbolReferenceType.Undefined;
+            }
+        }
+
+        [XmlIgnore]
+        string IResourceIdReference.ResourceId
+        {
+            get
+            {
+                return (string)this.Item;
+            }
+            set
+            {
+                if (!ResourceIdentifier.Validate(value))
+                    throw new InvalidOperationException(Strings.ErrorInvalidResourceIdentifier);
+
+                var res = new ResourceIdentifier(value);
+                if (res.Extension != ResourceTypes.SymbolDefinition.ToString())
+                    throw new InvalidOperationException(string.Format(Strings.ErrorUnexpectedResourceType, res.ToString(), ResourceTypes.SymbolDefinition));
+
+                this.Item = value;
+                OnPropertyChanged("ResourceId"); //NOXLATE
+            }
+        }
+    }
+
+    partial class Image : IImageGraphic
+    {
+        [XmlIgnore]
+        public override GraphicElementType Type
+        {
+            get { return GraphicElementType.Image; }
+        }
+
+        [XmlIgnore]
+        IImageBase IImageGraphic.Item
+        {
+            get
+            {
+                byte[] content = this.Item as byte[];
+                ImageReference imageRef = this.Item as ImageReference;
+                if (content != null)
+                    return new InlineImage() { Content = content };
+                else if (imageRef != null)
+                    return imageRef;
+                else
+                    return null;
+            }
+            set
+            {
+                if (value != null)
+                {
+                    var inline = value as IInlineImage;
+                    var imageRef = value as IImageReference;
+                    if (inline != null)
+                        this.Item = inline.Content;
+                    else if (imageRef != null)
+                        this.Item = (ImageReference)imageRef;
+                }
+                else
+                {
+                    this.Item = null;
+                }
+            }
+        }
+    }
+
+    partial class ImageReference : ISymbolInstanceReferenceLibrary, IImageReference
+    {
+        [XmlIgnore]
+        SymbolInstanceType ISymbolInstanceReference.Type
+        {
+            get { return SymbolInstanceType.Reference; }
+        }
+
+        ImageType IImageBase.Type
+        {
+            get { return ImageType.Reference; }
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolLibrary/SymbolLibraryInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolLibrary/SymbolLibraryInterfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolLibrary/SymbolLibraryInterfaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,65 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.SymbolLibrary
+{
+    /// <summary>
+    /// A DWF-based symbol library
+    /// </summary>
+    public interface ISymbolLibrary : IResource
+    {
+        /// <summary>
+        /// Gets or sets the description.
+        /// </summary>
+        /// <value>The description.</value>
+        string Description { get; set; }
+
+        /// <summary>
+        /// Gets the symbol references
+        /// </summary>
+        /// <value>The symbol references.</value>
+        IEnumerable<ISymbol> Symbol { get; }
+    }
+
+    /// <summary>
+    /// A reference in a DWF symbol library
+    /// </summary>
+    public interface ISymbol
+    {
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the resource.
+        /// </summary>
+        /// <value>The resource.</value>
+        string Resource { get; set; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolLibrary/v1.0.0/SymbolLibraryImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolLibrary/v1.0.0/SymbolLibraryImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/SymbolLibrary/v1.0.0/SymbolLibraryImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,115 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+#pragma warning disable 1591, 0114, 0108
+
+namespace OSGeo.MapGuide.ObjectModels.SymbolLibrary.v1_0_0
+{
+    partial class SymbolLibraryType : ISymbolLibrary
+    {
+        internal SymbolLibraryType()
+        {
+        }
+
+        private static readonly Version RES_VERSION = new Version(1, 0, 0);
+
+        private string _resId;
+
+        [XmlIgnore]
+        public string ResourceID
+        {
+            get
+            {
+                return _resId;
+            }
+            set
+            {
+                if (!ResourceIdentifier.Validate(value))
+                    throw new InvalidOperationException("Not a valid resource identifier"); //LOCALIZE
+
+                var res = new ResourceIdentifier(value);
+                if (res.Extension != ResourceTypes.SymbolLibrary.ToString())
+                    throw new InvalidOperationException("Invalid resource identifier for this type of object: " + res.Extension); //LOCALIZE
+
+                _resId = value;
+                this.OnPropertyChanged("ResourceID");
+            }
+        }
+
+        [XmlIgnore]
+        public string ResourceType
+        {
+            get
+            {
+                return ResourceTypes.SymbolLibrary.ToString();
+            }
+        }
+
+        [XmlIgnore]
+        public Version ResourceVersion
+        {
+            get
+            {
+                return RES_VERSION;
+            }
+        }
+
+        object ICloneable.Clone()
+        {
+            return this.Clone();
+        }
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")]
+        public string ValidatingSchema
+        {
+            get { return "SymbolLibrary-1.0.0.xsd"; }
+            set { }
+        }
+
+        [XmlIgnore]
+        public bool IsStronglyTyped
+        {
+            get { return true; }
+        }
+
+        IEnumerable<ISymbol> ISymbolLibrary.Symbol
+        {
+            get
+            {
+                foreach (var sym in this.Symbol)
+                {
+                    yield return sym;
+                }
+            }
+        }
+    }
+
+    partial class SymbolType : ISymbol
+    {
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/UntypedResource.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/UntypedResource.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/UntypedResource.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,127 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+#pragma warning disable 1591, 0114, 0108
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    /// <summary>
+    /// Represents resource content that could not be deserialized into a corresponding
+    /// strongly-typed resource class. This is just a container of arbitrary xml content.
+    /// </summary>
+    public class UntypedResource : IResource
+    {
+        internal UntypedResource(string xml, string resourceType, string version)
+        {
+            this.XmlContent = xml;
+            this.ResourceType = resourceType;
+            this.ResourceVersion = new Version(version);
+        }
+
+        internal UntypedResource(string xml, string resourceType, Version version)
+        {
+            this.XmlContent = xml;
+            this.ResourceType = resourceType;
+            this.ResourceVersion = version;
+        }
+
+        /// <summary>
+        /// Gets the validating XML schema
+        /// </summary>
+        public string ValidatingSchema
+        {
+            get { return this.ResourceType + "-" + this.ResourceVersion.ToString() + ".xsd"; } //NOXLATE
+        }
+
+        /// <summary>
+        /// Gets or sets the resource id
+        /// </summary>
+        public string ResourceID
+        {
+            get;
+            set;
+        }
+
+        /// <summary>
+        /// Gets the resource type
+        /// </summary>
+        public string ResourceType
+        {
+            get;
+            private set;
+        }
+
+        /// <summary>
+        /// Gets or sets the XML content
+        /// </summary>
+        public string XmlContent
+        {
+            get;
+            set;
+        }
+
+        /// <summary>
+        /// Gets the XML form of this instance
+        /// </summary>
+        /// <returns></returns>
+        public string Serialize()
+        {
+            return this.XmlContent;
+        }
+
+        /// <summary>
+        /// Gets the resource version
+        /// </summary>
+        public Version ResourceVersion
+        {
+            get;
+            private set;
+        }
+
+        /// <summary>
+        /// Returns a clone of this instance
+        /// </summary>
+        /// <returns></returns>
+        public object Clone()
+        {
+            return this.MemberwiseClone();
+        }
+
+        /// <summary>
+        /// Raised when a property changes
+        /// </summary>
+        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+        /// <summary>
+        /// Gets whether this resource is strongly typed
+        /// </summary>
+        public bool IsStronglyTyped
+        {
+            get { return false; }
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Utility.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Utility.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Utility.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,330 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.IO;
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    /// <summary>
+    /// Utility methods
+    /// </summary>
+    public static class Utility
+    {
+        /// <summary>
+        /// Parses a color in HTML notation (ea. #ffaabbff)
+        /// </summary>
+        /// <param name="color">The HTML representation of the color</param>
+        /// <returns>The .Net color structure that matches the color</returns>
+        public static Color ParseHTMLColor(string color)
+        {
+            if (color.Length == 8)
+            {
+                int a = int.Parse(color.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
+                int r = int.Parse(color.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
+                int g = int.Parse(color.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
+                int b = int.Parse(color.Substring(6, 2), System.Globalization.NumberStyles.HexNumber);
+
+                return Color.FromArgb(a, r, g, b);
+            }
+            else if (color.Length == 6)
+            {
+                int r = int.Parse(color.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
+                int g = int.Parse(color.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
+                int b = int.Parse(color.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
+
+                return Color.FromArgb(r, g, b);
+            }
+            else
+                throw new Exception(string.Format(Strings.ErrorBadHtmlColor, color));
+        }
+
+        /// <summary>
+        /// Parses a color in HTML notation (ea. #ffaabbff)
+        /// </summary>
+        /// <param name="color">The HTML representation of the color</param>
+        /// <returns>The .Net color structure that matches the color</returns>
+        public static Color ParseHTMLColorRGBA(string color)
+        {
+            if (color.Length == 8)
+            {
+                int r = int.Parse(color.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
+                int g = int.Parse(color.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
+                int b = int.Parse(color.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
+                int a = int.Parse(color.Substring(6, 2), System.Globalization.NumberStyles.HexNumber);
+
+                return Color.FromArgb(a, r, g, b);
+            }
+            else if (color.Length == 6)
+            {
+                int r = int.Parse(color.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
+                int g = int.Parse(color.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
+                int b = int.Parse(color.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
+
+                return Color.FromArgb(r, g, b);
+            }
+            else
+                throw new Exception(string.Format(Strings.ErrorBadHtmlColor, color));
+        }
+
+        /// <summary>
+        /// Parses a color in HTML notation (ea. #ffaabbff)
+        /// </summary>
+        /// <param name="color">The HTML representation of the color</param>
+        /// <returns>The .Net color structure that matches the color</returns>
+        public static Color ParseHTMLColorARGB(string color)
+        {
+            if (color.Length == 8)
+            {
+                int a = int.Parse(color.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
+                int r = int.Parse(color.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
+                int g = int.Parse(color.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
+                int b = int.Parse(color.Substring(6, 2), System.Globalization.NumberStyles.HexNumber);
+
+                return Color.FromArgb(a, r, g, b);
+            }
+            else if (color.Length == 6)
+            {
+                int r = int.Parse(color.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
+                int g = int.Parse(color.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
+                int b = int.Parse(color.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
+
+                return Color.FromArgb(r, g, b);
+            }
+            else
+                throw new Exception(string.Format(Strings.ErrorBadHtmlColor, color));
+        }
+
+        /// <summary>
+        /// Returns the HTML ARGB representation of an .Net color structure
+        /// </summary>
+        /// <param name="color">The color to encode</param>
+        /// <param name="includeAlpha">A flag indicating if the color structures alpha value should be included</param>
+        /// <returns>The HTML representation of the color structure</returns>
+        public static string SerializeHTMLColor(Color color, bool includeAlpha)
+        {
+            string res = string.Empty;
+            if (includeAlpha)
+                res += color.A.ToString("x02"); //NOXLATE
+            res += color.R.ToString("x02"); //NOXLATE
+            res += color.G.ToString("x02"); //NOXLATE
+            res += color.B.ToString("x02"); //NOXLATE
+            return res;
+        }
+
+        /// <summary>
+        /// Returns the HTML RGBA representation of an .Net color structure
+        /// </summary>
+        /// <param name="color">The color to encode</param>
+        /// <param name="includeAlpha">A flag indicating if the color structures alpha value should be included</param>
+        /// <returns>The HTML representation of the color structure</returns>
+        public static string SerializeHTMLColorRGBA(Color color, bool includeAlpha)
+        {
+            string res = string.Empty;
+            res += color.R.ToString("x02"); //NOXLATE
+            res += color.G.ToString("x02"); //NOXLATE
+            res += color.B.ToString("x02"); //NOXLATE
+            if (includeAlpha)
+                res += color.A.ToString("x02"); //NOXLATE
+            return res;
+        }
+
+        /// <summary>
+        /// Returns the HTML ARGB representation of an .Net color structure
+        /// </summary>
+        /// <param name="color">The color to encode</param>
+        /// <param name="includeAlpha">A flag indicating if the color structures alpha value should be included</param>
+        /// <returns>The HTML representation of the color structure</returns>
+        public static string SerializeHTMLColorARGB(Color color, bool includeAlpha)
+        {
+            string res = string.Empty;
+            if (includeAlpha)
+                res += color.A.ToString("x02"); //NOXLATE
+            res += color.R.ToString("x02"); //NOXLATE
+            res += color.G.ToString("x02"); //NOXLATE
+            res += color.B.ToString("x02"); //NOXLATE
+            return res;
+        }
+
+        /// <summary>
+        /// Gets an fdo-related attribute from the specified xml element using the
+        /// unqualified name and trying again with the fdo: qualifier if it didn't exist
+        /// </summary>
+        /// <param name="node"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        internal static XmlAttribute GetFdoAttribute(XmlNode node, string name)
+        {
+            var att = node.Attributes[name];
+            if (att == null)
+                return node.Attributes["fdo:" + name]; //NOXLATE
+
+            return att;
+        }
+
+        /// <summary>
+        /// Gets an fdo-related element from the specified xml element using the
+        /// unqualified name and trying again with the fdo: qualifier if it didn't exist
+        /// </summary>
+        /// <param name="el"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        internal static XmlElement GetFdoElement(XmlElement el, string name)
+        {
+            var element = el[name];
+            if (element == null)
+                return el["fdo:" + name]; //NOXLATE
+            return element;
+        }
+
+        /// <summary>
+        /// Copies the content of a stream into another stream.
+        /// Automatically attempts to rewind the source stream.
+        /// </summary>
+        /// <param name="source">The source stream</param>
+        /// <param name="target">The target stream</param>
+        internal static void CopyStream(System.IO.Stream source, System.IO.Stream target)
+        {
+            CopyStream(source, target, true);
+        }
+
+        /// <summary>
+        /// Copies the content of a stream into another stream.
+        /// </summary>
+        /// <param name="source">The source stream</param>
+        /// <param name="target">The target stream</param>
+        /// <param name="rewind">True if the source stream should be rewound before being copied</param>
+        internal static void CopyStream(System.IO.Stream source, System.IO.Stream target, bool rewind)
+        {
+            int r;
+            byte[] buf = new byte[1024];
+
+            //bool rewound = false;
+            if (rewind)
+            {
+                if (source.CanSeek)
+                {
+                    try
+                    {
+                        source.Position = 0;
+                        //rewound = true;
+                    }
+                    catch { }
+                }
+                else
+                {
+                    ReadOnlyRewindableStream roSource = source as ReadOnlyRewindableStream;
+                    if (roSource != null && roSource.CanRewind)
+                    {
+                        roSource.Rewind();
+                        //rewound = true;
+                    }
+                }
+
+                //if (!rewound)
+                //    throw new InvalidOperationException("Could not rewind the source stream. Most likely the source stream does not support seeking or rewinding"); //LOCALIZEME
+            }
+
+            do
+            {
+                r = source.Read(buf, 0, buf.Length);
+                target.Write(buf, 0, r);
+            } while (r > 0);
+        }
+
+        /// <summary>
+        /// Creates a copy of the stream, with removed Utf8 BOM, if any
+        /// </summary>
+        /// <param name="ms">The stream to fix</param>
+        /// <returns>A stream with no Utf8 BOM</returns>
+        internal static System.IO.MemoryStream RemoveUTF8BOM(System.IO.MemoryStream ms)
+        {
+            //Skip UTF file header, since the MapGuide XmlParser is broken
+            ms.Position = 0;
+            byte[] utfheader = new byte[3];
+            if (ms.Read(utfheader, 0, utfheader.Length) == utfheader.Length)
+                if (utfheader[0] == 0xEF && utfheader[1] == 0xBB && utfheader[2] == 0xBF)
+                {
+                    ms.Position = 3;
+                    System.IO.MemoryStream mxs = new System.IO.MemoryStream();
+                    Utility.CopyStream(ms, mxs, false);
+                    mxs.Position = 0;
+                    return mxs;
+                }
+
+            ms.Position = 0;
+            return ms;
+        }
+
+        /// <summary>
+        /// Converts the specified name value collection into a connection string
+        /// </summary>
+        /// <param name="values"></param>
+        /// <returns></returns>
+        public static string ToConnectionString(NameValueCollection values)
+        {
+            List<string> tokens = new List<string>();
+
+            foreach (string name in values.Keys)
+            {
+                string value = values[name];
+                if (value.Contains(";")) //NOXLATE
+                    value = "\"" + value + "\""; //NOXLATE
+                tokens.Add(name + "=" + value); //NOXLATE
+            }
+
+            return string.Join(";", tokens.ToArray()); //NOXLATE
+        }
+
+        /// <summary>
+        /// Serializes the given object as a UTF-8 encoded XML string. Any BOM is stripped from the XML string
+        /// </summary>
+        /// <param name="serializer"></param>
+        /// <param name="o"></param>
+        /// <returns></returns>
+        internal static string NormalizedSerialize(XmlSerializer serializer, object o)
+        {
+            using (var ms = new MemoryStream())
+            {
+                using (var xw = new Utf8XmlWriter(ms))
+                {
+                    serializer.Serialize(xw, o);
+                    using (var ms2 = RemoveUTF8BOM(ms))
+                    {
+                        using (var sr = new StreamReader(ms2))
+                        {
+                            return sr.ReadToEnd();
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WatermarkDefinition/WatermarkDefinitionInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WatermarkDefinition/WatermarkDefinitionInterfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WatermarkDefinition/WatermarkDefinitionInterfaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,353 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using OSGeo.MapGuide.ObjectModels.SymbolDefinition;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.WatermarkDefinition
+{
+    /// <summary>
+    /// The allowed length units for a watermark position
+    /// </summary>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")] //NOXLATE
+    [System.SerializableAttribute()]
+    public enum UnitType
+    {
+        /// <remarks/>
+        Inches,
+
+        /// <remarks/>
+        Centimeters,
+
+        /// <remarks/>
+        Millimeters,
+
+        /// <remarks/>
+        Pixels,
+
+        /// <remarks/>
+        Points,
+    }
+
+    /// <summary>
+    /// The allowed horizontal alignment values for a watermark position
+    /// </summary>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")] //NOXLATE
+    [System.SerializableAttribute()]
+    public enum HorizontalAlignmentType
+    {
+        /// <remarks/>
+        Left,
+
+        /// <remarks/>
+        Center,
+
+        /// <remarks/>
+        Right,
+    }
+
+    /// <summary>
+    /// The context in which the watermark is displayed
+    /// </summary>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")] //NOXLATE
+    [System.SerializableAttribute()]
+    public enum UsageType
+    {
+        /// <remarks/>
+        WMS,
+
+        /// <remarks/>
+        Viewer,
+
+        /// <remarks/>
+        All,
+    }
+
+    /// <summary>
+    /// The allowed vertical alignments for a watermark position
+    /// </summary>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")] //NOXLATE
+    [System.SerializableAttribute()]
+    public enum VerticalAlignmentType
+    {
+        /// <remarks/>
+        Top,
+
+        /// <remarks/>
+        Center,
+
+        /// <remarks/>
+        Bottom,
+    }
+
+    /// <summary>
+    /// A watermark definition containing content, appearance and position information
+    /// </summary>
+    public interface IWatermarkDefinition : IResource, INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets a symbol definition defining the content of the watermark
+        /// </summary>
+        ISymbolDefinitionBase Content { get; set; }
+
+        /// <summary>
+        /// Gets or sets the appearance of the watermark
+        /// </summary>
+        IWatermarkAppearance Appearance { get; set; }
+
+        /// <summary>
+        /// Gets or sets the position of the watermark
+        /// </summary>
+        IPosition Position { get; set; }
+
+        /// <summary>
+        /// Creates the XY position.
+        /// </summary>
+        /// <returns></returns>
+        IXYPosition CreateXYPosition();
+
+        /// <summary>
+        /// Creates the tile position.
+        /// </summary>
+        /// <returns></returns>
+        ITilePosition CreateTilePosition();
+
+        /// <summary>
+        /// Gets the version of the Map Definition that can take this watermark
+        /// </summary>
+        Version SupportedMapDefinitionVersion { get; }
+
+        /// <summary>
+        /// Gets the version of the Layer Definition that can take this watermark
+        /// </summary>
+        Version SupportedLayerDefinitionVersion { get; }
+    }
+
+    /// <summary>
+    /// Defines the appearance of a watermark.
+    /// </summary>
+    public interface IWatermarkAppearance : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the transparency of the watermark in the range 0-100.  The default value is 0 (opaque)
+        /// </summary>
+        double Transparency { get; set; }
+
+        /// <summary>
+        /// Gets or sets the rotation of the watermark, in degrees, in the range 0-360.  The default value is 0
+        /// </summary>
+        double Rotation { get; set; }
+    }
+
+    /// <summary>
+    /// Defines the type of watermark position
+    /// </summary>
+    public enum PositionType
+    {
+        /// <summary>
+        /// X/Y based position
+        /// </summary>
+        XY,
+
+        /// <summary>
+        /// Tile-based position
+        /// </summary>
+        Tile
+    }
+
+    /// <summary>
+    /// Abstract base type used with all watermark positions
+    /// </summary>
+    public interface IPosition : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets the type of watermark position
+        /// </summary>
+        PositionType Type { get; }
+    }
+
+    /// <summary>
+    /// Positions a watermark at a single X/Y location
+    /// </summary>
+    public interface IXYPosition : IPosition
+    {
+        /// <summary>
+        /// Gets or sets the position along the X-axis
+        /// </summary>
+        IHorizontalPosition XPosition { get; set; }
+
+        /// <summary>
+        /// Gets or sets the position along the Y-axis
+        /// </summary>
+        IVerticalPosition YPosition { get; set; }
+    }
+
+    /// <summary>
+    /// Positions a watermark according to a regular grid
+    /// </summary>
+    public interface ITilePosition : IPosition
+    {
+        /// <summary>
+        /// Gets or sets the width of each tile in the grid
+        /// </summary>
+        double TileWidth { get; set; }
+
+        /// <summary>
+        /// Gets or sets the height of each tile in the grid
+        /// </summary>
+        double TileHeight { get; set; }
+
+        /// <summary>
+        /// Gets or sets the horizontal position of the watermark within a tile
+        /// </summary>
+        IHorizontalPosition HorizontalPosition { get; set; }
+
+        /// <summary>
+        /// Gets or sets the vertical position of the watermark within a tile
+        /// </summary>
+        IVerticalPosition VerticalPosition { get; set; }
+    }
+
+    /// <summary>
+    /// Represents the horizontal position of a watermark
+    /// </summary>
+    public interface IHorizontalPosition : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the horizontal offset for the position
+        /// </summary>
+        double Offset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the unit of the offset
+        /// </summary>
+        UnitType Unit { get; set; }
+
+        /// <summary>
+        /// Gets or sets the horizontal alignment for the position
+        /// </summary>
+        HorizontalAlignmentType Alignment { get; set; }
+    }
+
+    /// <summary>
+    /// Defines the vertical position of a watermark
+    /// </summary>
+    public interface IVerticalPosition : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the vertical offset for the position
+        /// </summary>
+        double Offset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the unit of the offset
+        /// </summary>
+        UnitType Unit { get; set; }
+
+        /// <summary>
+        /// Gets or sets the vertical alignment for the position
+        /// </summary>
+        VerticalAlignmentType Alignment { get; set; }
+    }
+
+    /// <summary>
+    /// Defines a collection of <see cref="IWatermark"/> instances
+    /// </summary>
+    public interface IWatermarkCollection
+    {
+        /// <summary>
+        /// Gets the watermarks used by this map definition
+        /// </summary>
+        IEnumerable<IWatermark> Watermarks { get; }
+
+        /// <summary>
+        /// Adds a watermark
+        /// </summary>
+        /// <param name="watermarkDef">The watermark definition to add</param>
+        /// <returns>The added watermark instance.</returns>
+        IWatermark AddWatermark(IWatermarkDefinition watermarkDef);
+
+        /// <summary>
+        /// Removes the specified watermark
+        /// </summary>
+        /// <param name="watermark"></param>
+        void RemoveWatermark(IWatermark watermark);
+
+        /// <summary>
+        /// Gets the number of watermarks used by this map definition
+        /// </summary>
+        int WatermarkCount { get; }
+    }
+
+    /// <summary>
+    /// A watermark instance used in a map definition or layer definition
+    /// </summary>
+    public interface IWatermark
+    {
+        /// <summary>
+        /// Gets or sets the name of the watermark
+        /// </summary>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets a library reference to an existing WatermarkDefinition
+        /// </summary>
+        string ResourceId { get; set; }
+
+        /// <summary>
+        /// Gets or sets the context in which the watermark is displayed.
+        /// </summary>
+        UsageType Usage { get; set; }
+
+        /// <summary>
+        /// If specified, overrides the appearance of the watermark definition
+        /// </summary>
+        IWatermarkAppearance AppearanceOverride { get; set; }
+
+        /// <summary>
+        /// If specified, overrides the position of the watermark definition
+        /// </summary>
+        IPosition PositionOverride { get; set; }
+
+        /// <summary>
+        /// Creates the default appearance.
+        /// </summary>
+        /// <returns></returns>
+        IWatermarkAppearance CreateDefaultAppearance();
+
+        /// <summary>
+        /// Creates the default XY position.
+        /// </summary>
+        /// <returns></returns>
+        IXYPosition CreateDefaultXYPosition();
+
+        /// <summary>
+        /// Creates the default tile position.
+        /// </summary>
+        /// <returns></returns>
+        ITilePosition CreateDefaultTilePosition();
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WebLayout/WebLayoutInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WebLayout/WebLayoutInterfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WebLayout/WebLayoutInterfaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,1303 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.WebLayout
+{
+    /// <summary>
+    /// Defines a region of the web layout where UI items can reside
+    /// </summary>
+    public enum WebLayoutRegion
+    {
+        /// <summary>
+        /// The context menu
+        /// </summary>
+        ContextMenu,
+
+        /// <summary>
+        /// The toolbar
+        /// </summary>
+        Toolbar,
+
+        /// <summary>
+        /// The task bar
+        /// </summary>
+        TaskBar
+    }
+
+    /// <summary>
+    /// Encompasses all built-in commands usable by the web layout (AJAX and DWF)
+    /// </summary>
+    public enum BuiltInCommandType : int
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        Pan = BasicCommandActionType.Pan,
+
+        /// <summary>
+        ///
+        /// </summary>
+        PanUp = BasicCommandActionType.PanUp,
+
+        /// <summary>
+        ///
+        /// </summary>
+        PanDown = BasicCommandActionType.PanDown,
+
+        /// <summary>
+        ///
+        /// </summary>
+        PanRight = BasicCommandActionType.PanRight,
+
+        /// <summary>
+        ///
+        /// </summary>
+        PanLeft = BasicCommandActionType.PanLeft,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Zoom = BasicCommandActionType.Zoom,
+
+        /// <summary>
+        ///
+        /// </summary>
+        ZoomIn = BasicCommandActionType.ZoomIn,
+
+        /// <summary>
+        ///
+        /// </summary>
+        ZoomOut = BasicCommandActionType.ZoomOut,
+
+        /// <summary>
+        ///
+        /// </summary>
+        ZoomRectangle = BasicCommandActionType.ZoomRectangle,
+
+        /// <summary>
+        ///
+        /// </summary>
+        ZoomToSelection = BasicCommandActionType.ZoomToSelection,
+
+        /// <summary>
+        ///
+        /// </summary>
+        FitToWindow = BasicCommandActionType.FitToWindow,
+
+        /// <summary>
+        ///
+        /// </summary>
+        PreviousView = BasicCommandActionType.PreviousView,
+
+        /// <summary>
+        ///
+        /// </summary>
+        NextView = BasicCommandActionType.NextView,
+
+        /// <summary>
+        ///
+        /// </summary>
+        RestoreView = BasicCommandActionType.RestoreView,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Select = BasicCommandActionType.Select,
+
+        /// <summary>
+        ///
+        /// </summary>
+        SelectRadius = BasicCommandActionType.SelectRadius,
+
+        /// <summary>
+        ///
+        /// </summary>
+        SelectPolygon = BasicCommandActionType.SelectPolygon,
+
+        /// <summary>
+        ///
+        /// </summary>
+        ClearSelection = BasicCommandActionType.ClearSelection,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Refresh = BasicCommandActionType.Refresh,
+
+        /// <summary>
+        ///
+        /// </summary>
+        CopyMap = BasicCommandActionType.CopyMap,
+
+        /// <summary>
+        ///
+        /// </summary>
+        About = BasicCommandActionType.About,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Buffer,
+
+        /// <summary>
+        ///
+        /// </summary>
+        SelectWithin,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Print,
+
+        /// <summary>
+        ///
+        /// </summary>
+        GetPrintablePage,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Measure,
+
+        /// <summary>
+        ///
+        /// </summary>
+        ViewOptions,
+
+        /// <summary>
+        ///
+        /// </summary>
+        Help,
+    }
+
+    /// <summary>
+    ///
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum BasicCommandActionType
+    {
+        /// <remarks/>
+        Pan,
+
+        /// <remarks/>
+        PanUp,
+
+        /// <remarks/>
+        PanDown,
+
+        /// <remarks/>
+        PanRight,
+
+        /// <remarks/>
+        PanLeft,
+
+        /// <remarks/>
+        Zoom,
+
+        /// <remarks/>
+        ZoomIn,
+
+        /// <remarks/>
+        ZoomOut,
+
+        /// <remarks/>
+        ZoomRectangle,
+
+        /// <remarks/>
+        ZoomToSelection,
+
+        /// <remarks/>
+        FitToWindow,
+
+        /// <remarks/>
+        PreviousView,
+
+        /// <remarks/>
+        NextView,
+
+        /// <remarks/>
+        RestoreView,
+
+        /// <remarks/>
+        Select,
+
+        /// <remarks/>
+        SelectRadius,
+
+        /// <remarks/>
+        SelectPolygon,
+
+        /// <remarks/>
+        ClearSelection,
+
+        /// <remarks/>
+        Refresh,
+
+        /// <remarks/>
+        CopyMap,
+
+        /// <remarks/>
+        About,
+
+        /// <remarks/>
+        MapTip,
+    }
+
+    /// <summary>
+    ///
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum UIItemFunctionType
+    {
+        /// <remarks/>
+        Separator,
+
+        /// <remarks/>
+        Command,
+
+        /// <remarks/>
+        Flyout,
+    }
+
+    /// <summary>
+    ///
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum TargetType
+    {
+        /// <remarks/>
+        TaskPane,
+
+        /// <remarks/>
+        NewWindow,
+
+        /// <remarks/>
+        SpecifiedFrame,
+    }
+
+    /// <summary>
+    ///
+    /// </summary>
+    [System.SerializableAttribute()]
+    public enum TargetViewerType
+    {
+        /// <remarks/>
+        Dwf,
+
+        /// <remarks/>
+        Ajax,
+
+        /// <remarks/>
+        All,
+    }
+
+    /// <summary>
+    /// Represents a result of a command import
+    /// </summary>
+    public class ImportedCommandResult
+    {
+        /// <summary>
+        /// Gets or sets the original name
+        /// </summary>
+        public string OriginalName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the imported name
+        /// </summary>
+        public string ImportedName { get; set; }
+
+        /// <summary>
+        /// Gets whether the name was changed when importing
+        /// </summary>
+        public bool NameChanged { get { return !this.ImportedName.Equals(this.OriginalName); } }
+
+        /// <summary>
+        /// Gets the string representation
+        /// </summary>
+        /// <returns></returns>
+        public override string ToString()
+        {
+            return string.Format("{0} => {1}", this.OriginalName, this.ImportedName); //NOXLATE
+        }
+    }
+
+    /// <summary>
+    /// The Web Layout
+    /// </summary>
+    public interface IWebLayout : IResource, INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Exports the specified commands to the specified file
+        /// </summary>
+        /// <param name="file"></param>
+        /// <param name="cmdNames"></param>
+        void ExportCustomCommands(string file, string[] cmdNames);
+
+        /// <summary>
+        /// Imports commands from the specified file
+        /// </summary>
+        /// <param name="file"></param>
+        /// <returns></returns>
+        ImportedCommandResult[] ImportCustomCommands(string file);
+
+        /// <summary>
+        /// Determines whether the specified command name is referenced in any regions
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <param name="region">The region.</param>
+        bool IsCommandReferenced(string name, out WebLayoutRegion[] region);
+
+        /// <summary>
+        /// Removes all references to the specified command name
+        /// </summary>
+        /// <param name="cmdName">Name of the command.</param>
+        /// <returns></returns>
+        int RemoveAllReferences(string cmdName);
+
+        /// <summary>
+        /// Gets a command by its name
+        /// </summary>
+        /// <param name="cmdName">Name of the command.</param>
+        /// <returns></returns>
+        ICommand GetCommandByName(string cmdName);
+
+        /// <summary>
+        /// Gets the custom commands.
+        /// </summary>
+        /// <returns></returns>
+        IEnumerable<ICommand> GetCustomCommands();
+
+        /// <summary>
+        /// Finds the command by its name in the specified menu.
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <param name="menu">The menu.</param>
+        /// <returns></returns>
+        bool FindCommand(string name, IMenu menu);
+
+        /// <summary>
+        /// Gets or sets the title.
+        /// </summary>
+        /// <value>The title.</value>
+        string Title { get; set; }
+
+        /// <summary>
+        /// Creates the default view.
+        /// </summary>
+        /// <returns></returns>
+        IMapView CreateDefaultView();
+
+        /// <summary>
+        /// Gets the map.
+        /// </summary>
+        /// <value>The map.</value>
+        IMap Map { get; }
+
+        /// <summary>
+        /// Gets the task pane.
+        /// </summary>
+        /// <value>The task pane.</value>
+        ITaskPane TaskPane { get; }
+
+        /// <summary>
+        /// Gets the tool bar.
+        /// </summary>
+        /// <value>The tool bar.</value>
+        IToolbar ToolBar { get; }
+
+        /// <summary>
+        /// Gets the information pane.
+        /// </summary>
+        /// <value>The information pane.</value>
+        IInformationPane InformationPane { get; }
+
+        /// <summary>
+        /// Gets the context menu.
+        /// </summary>
+        /// <value>The context menu.</value>
+        IContextMenu ContextMenu { get; }
+
+        /// <summary>
+        /// Gets the status bar.
+        /// </summary>
+        /// <value>The status bar.</value>
+        IStatusBar StatusBar { get; }
+
+        /// <summary>
+        /// Gets the zoom control.
+        /// </summary>
+        /// <value>The zoom control.</value>
+        IZoomControl ZoomControl { get; }
+
+        /// <summary>
+        /// Gets the command set.
+        /// </summary>
+        /// <value>The command set.</value>
+        ICommandSet CommandSet { get; }
+
+        /// <summary>
+        /// Creates the basic command.
+        /// </summary>
+        /// <param name="label">The label.</param>
+        /// <param name="tooltip">The tooltip.</param>
+        /// <param name="description">The description.</param>
+        /// <param name="iconName">Name of the icon.</param>
+        /// <param name="targets">The targets.</param>
+        /// <param name="action">The action.</param>
+        /// <returns></returns>
+        IBasicCommand CreateBasicCommand(string label, string tooltip, string description, string iconName, TargetViewerType targets, BasicCommandActionType action);
+
+        /// <summary>
+        /// Creates the flyout.
+        /// </summary>
+        /// <param name="label">The label.</param>
+        /// <param name="tooltip">The tooltip.</param>
+        /// <param name="description">The description.</param>
+        /// <param name="imageUrl">The image URL.</param>
+        /// <param name="disabledImageUrl">The disabled image URL.</param>
+        /// <param name="subItems">The sub items.</param>
+        /// <returns></returns>
+        IFlyoutItem CreateFlyout(
+            string label,
+            string tooltip,
+            string description,
+            string imageUrl,
+            string disabledImageUrl,
+            params IUIItem[] subItems);
+
+        /// <summary>
+        /// Creates the targeted command.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="name">The name.</param>
+        /// <param name="label">The label.</param>
+        /// <param name="tooltip">The tooltip.</param>
+        /// <param name="description">The description.</param>
+        /// <param name="iconName">Name of the icon.</param>
+        /// <param name="targets">The targets.</param>
+        /// <param name="target">The target.</param>
+        /// <param name="targetFrame">The target frame.</param>
+        /// <returns></returns>
+        T CreateTargetedCommand<T>(string name, string label, string tooltip, string description, string iconName, TargetViewerType targets, TargetType target, string targetFrame) where T : ITargetedCommand, new();
+
+        /// <summary>
+        /// Creates the command item.
+        /// </summary>
+        /// <param name="cmdName">Name of the CMD.</param>
+        /// <returns></returns>
+        ICommandItem CreateCommandItem(string cmdName);
+
+        /// <summary>
+        /// Creates the invoke URL command.
+        /// </summary>
+        /// <returns></returns>
+        IInvokeUrlCommand CreateInvokeUrlCommand();
+
+        /// <summary>
+        /// Creates the search command.
+        /// </summary>
+        /// <returns></returns>
+        ISearchCommand CreateSearchCommand();
+
+        /// <summary>
+        /// Creates the invoke script command.
+        /// </summary>
+        /// <returns></returns>
+        IInvokeScriptCommand CreateInvokeScriptCommand();
+
+        /// <summary>
+        /// Creates the separator.
+        /// </summary>
+        /// <returns></returns>
+        ISeparatorItem CreateSeparator();
+    }
+
+    /// <summary>
+    /// Web Layout from v1.1.0 schema
+    /// </summary>
+    public interface IWebLayout2 : IWebLayout
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether [enable ping server].
+        /// </summary>
+        /// <value><c>true</c> if [enable ping server]; otherwise, <c>false</c>.</value>
+        bool EnablePingServer { get; set; }
+    }
+
+    /// <summary>
+    /// Web Layout from v2.6.0 schema
+    /// </summary>
+    public interface IWebLayout3 : IWebLayout2
+    {
+        /// <summary>
+        /// Gets or sets the selection color
+        /// </summary>
+        string SelectionColor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the point selection buffer pixel tolerance
+        /// </summary>
+        int PointSelectionBuffer { get; set; }
+
+        /// <summary>
+        /// Gets or sets the map image format
+        /// </summary>
+        string MapImageFormat { get; set; }
+
+        /// <summary>
+        /// Gets or sets the selection image format
+        /// </summary>
+        string SelectionImageFormat { get; set; }
+
+        /// <summary>
+        /// Gets or sets the startup script code
+        /// </summary>
+        string StartupScript { get; set; }
+    }
+
+    /// <summary>
+    /// The map referenced in this web layout
+    /// </summary>
+    public interface IMap : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the resource id.
+        /// </summary>
+        /// <value>The resource id.</value>
+        string ResourceId { get; set; }
+
+        /// <summary>
+        /// Gets or sets the initial view.
+        /// </summary>
+        /// <value>The initial view.</value>
+        IMapView InitialView { get; set; }
+
+        /// <summary>
+        /// Gets or sets the hyperlink target for feature selection urls
+        /// </summary>
+        /// <value>The hyperlink target.</value>
+        TargetType HyperlinkTarget { get; set; }
+
+        /// <summary>
+        /// Gets or sets the hyperlink target frame for feature selection urls.
+        /// </summary>
+        /// <value>The hyperlink target frame.</value>
+        string HyperlinkTargetFrame { get; set; }
+    }
+
+    /// <summary>
+    /// The initial view of the map
+    /// </summary>
+    public interface IMapView : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the center X.
+        /// </summary>
+        /// <value>The center X.</value>
+        double CenterX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the center Y.
+        /// </summary>
+        /// <value>The center Y.</value>
+        double CenterY { get; set; }
+
+        /// <summary>
+        /// Gets or sets the scale.
+        /// </summary>
+        /// <value>The scale.</value>
+        double Scale { get; set; }
+    }
+
+    /// <summary>
+    /// A web layout element
+    /// </summary>
+    public interface IWebLayoutControl : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether this <see cref="IWebLayoutControl"/> is visible.
+        /// </summary>
+        /// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
+        bool Visible { get; set; }
+    }
+
+    /// <summary>
+    /// A resizable web layout element
+    /// </summary>
+    public interface IWebLayoutResizableControl
+    {
+        /// <summary>
+        /// Gets or sets the width.
+        /// </summary>
+        /// <value>The width.</value>
+        int Width { get; set; }
+    }
+
+    /// <summary>
+    /// A UI element
+    /// </summary>
+    public interface IUIItem
+    {
+        /// <summary>
+        /// Gets the parent menu.
+        /// </summary>
+        /// <value>The parent menu.</value>
+        IMenu Parent { get; }
+
+        /// <summary>
+        /// Gets or sets the function.
+        /// </summary>
+        /// <value>The function.</value>
+        UIItemFunctionType Function { get; set; }
+    }
+
+    /// <summary>
+    /// A UI element with localizable features
+    /// </summary>
+    public interface ILocalizable : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the tooltip.
+        /// </summary>
+        /// <value>The tooltip.</value>
+        string Tooltip { get; set; }
+
+        /// <summary>
+        /// Gets or sets the description.
+        /// </summary>
+        /// <value>The description.</value>
+        string Description { get; set; }
+
+        /// <summary>
+        /// Gets or sets the image URL.
+        /// </summary>
+        /// <value>The image URL.</value>
+        string ImageURL { get; set; }
+
+        /// <summary>
+        /// Gets or sets the disabled image URL.
+        /// </summary>
+        /// <value>The disabled image URL.</value>
+        string DisabledImageURL { get; set; }
+    }
+
+    /// <summary>
+    /// A separator item
+    /// </summary>
+    public interface ISeparatorItem : IUIItem { }
+
+    /// <summary>
+    /// A menu item that invokes a command
+    /// </summary>
+    public interface ICommandItem : IUIItem
+    {
+        /// <summary>
+        /// Gets or sets the command.
+        /// </summary>
+        /// <value>The command.</value>
+        string Command { get; set; }
+    }
+
+    /// <summary>
+    /// A flyout menu item
+    /// </summary>
+    public interface IFlyoutItem : IUIItem, IMenu, ILocalizable
+    {
+        /// <summary>
+        /// Gets or sets the label.
+        /// </summary>
+        /// <value>The label.</value>
+        string Label { get; set; }
+    }
+
+    /// <summary>
+    /// Represents a UI element that can have any number of child UI elements
+    /// </summary>
+    public interface IMenu
+    {
+        /// <summary>
+        /// Gets the item count.
+        /// </summary>
+        /// <value>The item count.</value>
+        int ItemCount { get; }
+
+        /// <summary>
+        /// Gets the items.
+        /// </summary>
+        /// <value>The items.</value>
+        IEnumerable<IUIItem> Items { get; }
+
+        /// <summary>
+        /// Moves the specified item up.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        /// <returns></returns>
+        bool MoveUp(IUIItem item);
+
+        /// <summary>
+        /// Moves the specified item down.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        /// <returns></returns>
+        bool MoveDown(IUIItem item);
+
+        /// <summary>
+        /// Gets the index of the specified item.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        /// <returns></returns>
+        int GetIndex(IUIItem item);
+
+        /// <summary>
+        /// Inserts the specified item at the specified index.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        /// <param name="index">The index.</param>
+        void Insert(IUIItem item, int index);
+
+        /// <summary>
+        /// Adds the item.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        void AddItem(IUIItem item);
+
+        /// <summary>
+        /// Removes the item.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        void RemoveItem(IUIItem item);
+    }
+
+    /// <summary>
+    /// Extension method class
+    /// </summary>
+    public static class MenuExtensions
+    {
+        /// <summary>
+        /// Adds items to the menu
+        /// </summary>
+        /// <param name="mnu"></param>
+        /// <param name="items"></param>
+        public static void AddItems(this IMenu mnu, params IUIItem[] items)
+        {
+            Check.NotNull(mnu, "mnu"); //NOXLATE
+            Check.NotNull(items, "items"); //NOXLATE
+            foreach (var item in items)
+            {
+                mnu.AddItem(item);
+            }
+        }
+    }
+
+    /// <summary>
+    /// The viewer toolbar
+    /// </summary>
+    public interface IToolbar : IMenu, IWebLayoutControl, INotifyPropertyChanged
+    {
+    }
+
+    /// <summary>
+    /// The legend and property pane
+    /// </summary>
+    public interface IInformationPane : IWebLayoutResizableControl, INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether [legend visible].
+        /// </summary>
+        /// <value><c>true</c> if [legend visible]; otherwise, <c>false</c>.</value>
+        bool LegendVisible { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether [properties visible].
+        /// </summary>
+        /// <value><c>true</c> if [properties visible]; otherwise, <c>false</c>.</value>
+        bool PropertiesVisible { get; set; }
+    }
+
+    /// <summary>
+    /// The viewer context menu
+    /// </summary>
+    public interface IContextMenu : IMenu, IWebLayoutControl, INotifyPropertyChanged
+    {
+    }
+
+    /// <summary>
+    /// The task pane
+    /// </summary>
+    public interface ITaskPane : IWebLayoutResizableControl, INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets whether this control is visible
+        /// </summary>
+        bool Visible { get; set; }
+
+        /// <summary>
+        /// Gets or sets the url of the initial task.
+        /// </summary>
+        /// <value>The url of the initial task.</value>
+        string InitialTask { get; set; }
+
+        /// <summary>
+        /// Gets the task bar.
+        /// </summary>
+        /// <value>The task bar.</value>
+        ITaskBar TaskBar { get; }
+    }
+
+    /// <summary>
+    /// The task bar
+    /// </summary>
+    public interface ITaskBar : IWebLayoutControl, IMenu, INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets the home button.
+        /// </summary>
+        /// <value>The home.</value>
+        ITaskButton Home { get; }
+
+        /// <summary>
+        /// Gets the forward button.
+        /// </summary>
+        /// <value>The forward.</value>
+        ITaskButton Forward { get; }
+
+        /// <summary>
+        /// Gets the back button.
+        /// </summary>
+        /// <value>The back.</value>
+        ITaskButton Back { get; }
+
+        /// <summary>
+        /// Gets the tasks button.
+        /// </summary>
+        /// <value>The tasks.</value>
+        ITaskButton Tasks { get; }
+    }
+
+    /// <summary>
+    /// A button on the task pane
+    /// </summary>
+    public interface ITaskButton : ILocalizable
+    {
+    }
+
+    /// <summary>
+    /// The status bar
+    /// </summary>
+    public interface IStatusBar : IWebLayoutControl, INotifyPropertyChanged
+    {
+    }
+
+    /// <summary>
+    /// The zoom slider
+    /// </summary>
+    public interface IZoomControl : IWebLayoutControl, INotifyPropertyChanged
+    {
+    }
+
+    /// <summary>
+    ///
+    /// </summary>
+    public delegate void CommandEventHandler(ICommand cmd);
+
+    /// <summary>
+    /// The master list of viewer commands
+    /// </summary>
+    public interface ICommandSet
+    {
+        /// <summary>
+        /// Gets the command count.
+        /// </summary>
+        /// <value>The command count.</value>
+        int CommandCount { get; }
+
+        /// <summary>
+        /// Clears this instance.
+        /// </summary>
+        void Clear();
+
+        /// <summary>
+        /// Gets the commands.
+        /// </summary>
+        /// <value>The commands.</value>
+        IEnumerable<ICommand> Commands { get; }
+
+        /// <summary>
+        /// Adds the command.
+        /// </summary>
+        /// <param name="cmd">The CMD.</param>
+        void AddCommand(ICommand cmd);
+
+        /// <summary>
+        /// Removes the command.
+        /// </summary>
+        /// <param name="cmd">The CMD.</param>
+        void RemoveCommand(ICommand cmd);
+
+        /// <summary>
+        /// Occurs when [custom command added].
+        /// </summary>
+        event CommandEventHandler CustomCommandAdded;
+
+        /// <summary>
+        /// Occurs when [custom command removed].
+        /// </summary>
+        event CommandEventHandler CustomCommandRemoved;
+    }
+
+    /// <summary>
+    /// Base viewer command
+    /// </summary>
+    public interface ICommand : ILocalizable, INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the label.
+        /// </summary>
+        /// <value>The label.</value>
+        string Label { get; set; }
+
+        /// <summary>
+        /// Gets or sets the target viewer.
+        /// </summary>
+        /// <value>The target viewer.</value>
+        TargetViewerType TargetViewer { get; set; }
+    }
+
+    /// <summary>
+    /// A built-in basic command
+    /// </summary>
+    public interface IBasicCommand : ICommand
+    {
+        /// <summary>
+        /// Gets or sets the action.
+        /// </summary>
+        /// <value>The action.</value>
+        BasicCommandActionType Action { get; set; }
+    }
+
+    /// <summary>
+    /// A custom command
+    /// </summary>
+    public interface ICustomCommand : ICommand
+    {
+    }
+
+    /// <summary>
+    /// A command that operates in a certain viewer frame
+    /// </summary>
+    public interface ITargetedCommand : ICustomCommand
+    {
+        /// <summary>
+        /// Gets or sets the target.
+        /// </summary>
+        /// <value>The target.</value>
+        TargetType Target { get; set; }
+
+        /// <summary>
+        /// Gets or sets the target frame.
+        /// </summary>
+        /// <value>The target frame.</value>
+        string TargetFrame { get; set; }
+    }
+
+    /// <summary>
+    /// Search command
+    /// </summary>
+    public interface ISearchCommand : ITargetedCommand
+    {
+        /// <summary>
+        /// Gets or sets the layer.
+        /// </summary>
+        /// <value>The layer.</value>
+        string Layer { get; set; }
+
+        /// <summary>
+        /// Gets or sets the prompt.
+        /// </summary>
+        /// <value>The prompt.</value>
+        string Prompt { get; set; }
+
+        /// <summary>
+        /// Gets the result columns.
+        /// </summary>
+        /// <value>The result columns.</value>
+        IResultColumnSet ResultColumns { get; }
+
+        /// <summary>
+        /// Gets or sets the filter.
+        /// </summary>
+        /// <value>The filter.</value>
+        string Filter { get; set; }
+
+        /// <summary>
+        /// Gets or sets the match limit.
+        /// </summary>
+        /// <value>The match limit.</value>
+        int MatchLimit { get; set; }
+    }
+
+    /// <summary>
+    /// A search command result specification
+    /// </summary>
+    public interface IResultColumnSet
+    {
+        /// <summary>
+        /// Clears this instance.
+        /// </summary>
+        void Clear();
+
+        /// <summary>
+        /// Gets the columns.
+        /// </summary>
+        /// <value>The columns.</value>
+        IEnumerable<IResultColumn> Column { get; }
+
+        /// <summary>
+        /// Creates the column.
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <param name="property">The property.</param>
+        /// <returns></returns>
+        IResultColumn CreateColumn(string name, string property);
+
+        /// <summary>
+        /// Adds the result column.
+        /// </summary>
+        /// <param name="col">The col.</param>
+        void AddResultColumn(IResultColumn col);
+
+        /// <summary>
+        /// Removes the result column.
+        /// </summary>
+        /// <param name="col">The col.</param>
+        void RemoveResultColumn(IResultColumn col);
+    }
+
+    /// <summary>
+    /// A search command result column
+    /// </summary>
+    public interface IResultColumn
+    {
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the property.
+        /// </summary>
+        /// <value>The property.</value>
+        string Property { get; set; }
+    }
+
+    /// <summary>
+    /// Invoke URL command
+    /// </summary>
+    public interface IInvokeUrlCommand : ITargetedCommand
+    {
+        /// <summary>
+        /// Gets or sets the URL.
+        /// </summary>
+        /// <value>The URL.</value>
+        string URL { get; set; }
+
+        /// <summary>
+        /// Gets the layer set that this layer applies to
+        /// </summary>
+        /// <value>The layer set.</value>
+        ILayerSet LayerSet { get; }
+
+        /// <summary>
+        /// Gets the additional parameters.
+        /// </summary>
+        /// <value>The additional parameters.</value>
+        IEnumerable<IParameterPair> AdditionalParameter { get; }
+
+        /// <summary>
+        /// Creates the parameter.
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <param name="value">The value.</param>
+        /// <returns></returns>
+        IParameterPair CreateParameter(string name, string value);
+
+        /// <summary>
+        /// Adds the parameter.
+        /// </summary>
+        /// <param name="param">The param.</param>
+        void AddParameter(IParameterPair param);
+
+        /// <summary>
+        /// Removes the parameter.
+        /// </summary>
+        /// <param name="param">The param.</param>
+        void RemoveParameter(IParameterPair param);
+
+        /// <summary>
+        /// Gets or sets a value indicating whether [disable if selection empty].
+        /// </summary>
+        /// <value>
+        /// 	<c>true</c> if [disable if selection empty]; otherwise, <c>false</c>.
+        /// </value>
+        bool DisableIfSelectionEmpty { get; set; }
+    }
+
+    /// <summary>
+    /// A set of layers
+    /// </summary>
+    public interface ILayerSet
+    {
+        /// <summary>
+        /// Gets the layers.
+        /// </summary>
+        /// <value>The layers.</value>
+        BindingList<string> Layer { get; }
+    }
+
+    /// <summary>
+    /// A key value pair
+    /// </summary>
+    public interface IParameterPair
+    {
+        /// <summary>
+        /// Gets or sets the key.
+        /// </summary>
+        /// <value>The key.</value>
+        string Key { get; set; }
+
+        /// <summary>
+        /// Gets or sets the value.
+        /// </summary>
+        /// <value>The value.</value>
+        string Value { get; set; }
+    }
+
+    /// <summary>
+    /// Buffer command
+    /// </summary>
+    public interface IBufferCommand : ITargetedCommand { }
+
+    /// <summary>
+    /// Select within command
+    /// </summary>
+    public interface ISelectWithinCommand : ITargetedCommand { }
+
+    /// <summary>
+    /// A resource reference
+    /// </summary>
+    public interface IResourceReference : INotifyPropertyChanged
+    {
+        /// <summary>
+        /// Gets or sets the resource id.
+        /// </summary>
+        /// <value>The resource id.</value>
+        string ResourceId { get; set; }
+    }
+
+    /// <summary>
+    /// Print command
+    /// </summary>
+    public interface IPrintCommand : ICustomCommand
+    {
+        /// <summary>
+        /// Clears this instance.
+        /// </summary>
+        void Clear();
+
+        /// <summary>
+        /// Gets the print layouts.
+        /// </summary>
+        /// <value>The print layouts.</value>
+        IEnumerable<IResourceReference> PrintLayout { get; }
+
+        /// <summary>
+        /// Creates the print layout.
+        /// </summary>
+        /// <param name="resourceId">The resource id.</param>
+        /// <returns></returns>
+        IResourceReference CreatePrintLayout(string resourceId);
+
+        /// <summary>
+        /// Adds the print layout.
+        /// </summary>
+        /// <param name="reference">The reference.</param>
+        void AddPrintLayout(IResourceReference reference);
+
+        /// <summary>
+        /// Removes the print layout.
+        /// </summary>
+        /// <param name="reference">The reference.</param>
+        void RemovePrintLayout(IResourceReference reference);
+    }
+
+    /// <summary>
+    /// Get printable page command
+    /// </summary>
+    public interface IGetPrintablePageCommand : ITargetedCommand { }
+
+    /// <summary>
+    /// Measure command
+    /// </summary>
+    public interface IMeasureCommand : ITargetedCommand { }
+
+    /// <summary>
+    /// View options command
+    /// </summary>
+    public interface IViewOptionsCommand : ITargetedCommand { }
+
+    /// <summary>
+    /// A help command
+    /// </summary>
+    public interface IHelpCommand : ITargetedCommand
+    {
+        /// <summary>
+        /// Gets or sets the URL.
+        /// </summary>
+        /// <value>The URL.</value>
+        string URL { get; set; }
+    }
+
+    /// <summary>
+    /// An invoke script command
+    /// </summary>
+    public interface IInvokeScriptCommand : ICustomCommand
+    {
+        /// <summary>
+        /// Gets or sets the script.
+        /// </summary>
+        /// <value>The script.</value>
+        string Script { get; set; }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WebLayout/v1_0_0/WebLayoutImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WebLayout/v1_0_0/WebLayoutImpl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WebLayout/v1_0_0/WebLayoutImpl.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,1707 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+#pragma warning disable 1591, 0114, 0108
+
+#if WL260
+namespace OSGeo.MapGuide.ObjectModels.WebLayout.v2_6_0
+#elif WL240
+namespace OSGeo.MapGuide.ObjectModels.WebLayout.v2_4_0
+#elif WL110
+namespace OSGeo.MapGuide.ObjectModels.WebLayout.v1_1_0
+#else
+
+namespace OSGeo.MapGuide.ObjectModels.WebLayout.v1_0_0
+#endif
+{
+    public static class WebLayoutEntryPoint
+    {
+        public static IWebLayout CreateDefault(string mapDefinitionId)
+        {
+            IWebLayout wl = WebLayoutType.CreateDefault(mapDefinitionId);
+#if WL240 || WL260
+            //NOTE: This separator is needed because the AJAX viewer currently assumes the maptip
+            //command to be at a certain position (!!!). The seperator ensures the command is at
+            //the right position
+            wl.ToolBar.AddItem(wl.CreateSeparator());
+            wl.CommandSet.AddCommand(wl.CreateBasicCommand("Maptip", Strings.WL_Desc_MapTip, Strings.WL_Desc_MapTip, "icon_maptip", TargetViewerType.All, BasicCommandActionType.MapTip)); //NOXLATE
+            wl.ToolBar.AddItem(wl.CreateCommandItem(BasicCommandActionType.MapTip.ToString()));
+            IWebLayout2 wl2 = (IWebLayout2)wl;
+            wl2.EnablePingServer = true;
+#endif
+
+#if WL260
+            IWebLayout3 wl3 = (IWebLayout3)wl;
+            wl3.SelectionColor = "0000FFFF";
+            wl3.PointSelectionBuffer = 2;
+            wl3.MapImageFormat = "PNG";
+            wl3.SelectionImageFormat = "PNG";
+#endif
+            return wl;
+        }
+
+        public static IResource Deserialize(string xml)
+        {
+            return WebLayoutType.Deserialize(xml);
+        }
+
+        public static Stream Serialize(IResource res)
+        {
+            return res.SerializeToStream();
+        }
+    }
+
+    [Serializable]
+    public class WebLayoutCustomCommandList
+    {
+        [XmlArrayItem("CustomCommands")] //NOXLATE
+        public CommandType[] Commands { get; set; }
+    }
+
+    partial class WebLayoutType : IWebLayout, ICommandSet
+    {
+        internal WebLayoutType()
+        {
+        }
+
+#if WL260
+        private static readonly Version RES_VERSION = new Version(2, 6, 0);
+#elif WL240
+        private static readonly Version RES_VERSION = new Version(2, 4, 0);
+#elif WL110
+        private static readonly Version RES_VERSION = new Version(1, 1, 0);
+#else
+        private static readonly Version RES_VERSION = new Version(1, 0, 0);
+#endif
+
+        private string _resId;
+
+        [XmlIgnore]
+        public string ResourceID
+        {
+            get
+            {
+                return _resId;
+            }
+            set
+            {
+                if (!ResourceIdentifier.Validate(value))
+                    throw new InvalidOperationException(Strings.ErrorInvalidResourceIdentifier);
+
+                var res = new ResourceIdentifier(value);
+                if (res.Extension != ResourceTypes.WebLayout.ToString())
+                    throw new InvalidOperationException(string.Format(Strings.ErrorUnexpectedResourceType, res.ToString(), ResourceTypes.WebLayout));
+
+                _resId = value;
+                this.OnPropertyChanged("ResourceID"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public string ResourceType
+        {
+            get
+            {
+                return ResourceTypes.WebLayout.ToString();
+            }
+        }
+
+        [XmlIgnore]
+        public Version ResourceVersion
+        {
+            get
+            {
+                return RES_VERSION;
+            }
+        }
+
+        object ICloneable.Clone()
+        {
+            return this.Clone();
+        }
+
+        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] //NOXLATE
+        public string ValidatingSchema
+        {
+#if WL260
+            get { return "WebLayout-2.6.0.xsd"; } //NOXLATE
+#elif WL240
+            get { return "WebLayout-2.4.0.xsd"; } //NOXLATE
+#elif WL110
+            get { return "WebLayout-1.1.0.xsd"; } //NOXLATE
+#else
+            get { return "WebLayout-1.0.0.xsd"; } //NOXLATE
+#endif
+            set { }
+        }
+
+        [XmlIgnore]
+        public bool IsStronglyTyped
+        {
+            get { return true; }
+        }
+
+        public static IWebLayout CreateDefault(string mapDefinitionId)
+        {
+            //TODO: Localize these strings. Once localized we can have *translatable*
+            //web layouts!
+
+            IWebLayout wl = new WebLayoutType()
+            {
+                CommandSet = new System.ComponentModel.BindingList<CommandType>(),
+                ContextMenu = new ContextMenuType()
+                {
+                    Visible = true,
+                    MenuItem = new System.ComponentModel.BindingList<UIItemType>()
+                },
+                InformationPane = new InformationPaneType()
+                {
+                    LegendVisible = true,
+                    PropertiesVisible = true,
+                    Visible = true,
+                    Width = 200
+                },
+                Map = new MapType()
+                {
+                    HyperlinkTarget = TargetType.TaskPane,
+                    ResourceId = mapDefinitionId,
+                    //null InitialView = Use map's initial view
+                },
+                StatusBar = new StatusBarType()
+                {
+                    Visible = true
+                },
+                TaskPane = new TaskPaneType()
+                {
+                    TaskBar = new TaskBarType()
+                    {
+                        Back = new TaskButtonType()
+                        {
+                            Name = "Back",
+                            Tooltip = Strings.WL_Desc_TaskBack,
+                            Description = Strings.WL_Desc_TaskBack,
+                            ImageURL = "../stdicons/icon_back.gif",
+                            DisabledImageURL = "../stdicons/icon_back_disabled.gif"
+                        },
+                        Forward = new TaskButtonType()
+                        {
+                            Name = "Forward",
+                            Tooltip = Strings.WL_Desc_TaskForward,
+                            Description = Strings.WL_Desc_TaskForward,
+                            ImageURL = "../stdicons/icon_forward.gif",
+                            DisabledImageURL = "../stdicons/icon_forward_disabled.gif"
+                        },
+                        Home = new TaskButtonType()
+                        {
+                            Name = "Home",
+                            Tooltip = Strings.WL_Desc_TaskHome,
+                            Description = Strings.WL_Desc_TaskHome,
+                            ImageURL = "../stdicons/icon_home.gif",
+                            DisabledImageURL = "../stdicons/icon_home_disabled.gif"
+                        },
+                        //Task Pane menu buttons
+                        MenuButton = new System.ComponentModel.BindingList<UIItemType>(),
+                        Tasks = new TaskButtonType()
+                        {
+                            Name = "Tasks",
+                            Tooltip = Strings.WL_Label_TaskList,
+                            Description = Strings.WL_Desc_TaskList,
+                            ImageURL = "../stdicons/icon_tasks.gif",
+                            DisabledImageURL = "../stdicons/icon_tasks_disabled.gif"
+                        },
+                        Visible = true,
+                    },
+                    Visible = true,
+                    Width = 250,
+                },
+                Title = string.Empty,
+                ToolBar = new ToolBarType()
+                {
+                    Visible = true,
+                    Button = new System.ComponentModel.BindingList<UIItemType>()
+                },
+                ZoomControl = new ZoomControlType()
+                {
+                    Visible = true
+                },
+            };
+
+            CreateDefaultCommandSet(wl);
+            CreateDefaultContextMenu(wl);
+            CreateDefaultToolbar(wl);
+
+            return wl;
+        }
+
+        private static void CreateDefaultToolbar(IWebLayout wl)
+        {
+            wl.ToolBar.AddItems(
+            wl.CreateCommandItem(BuiltInCommandType.Print.ToString()),
+            wl.CreateCommandItem(BuiltInCommandType.GetPrintablePage.ToString()),
+            wl.CreateSeparator(),
+            wl.CreateCommandItem(BuiltInCommandType.Measure.ToString()),
+            wl.CreateCommandItem(BuiltInCommandType.Buffer.ToString()),
+            wl.CreateSeparator(),
+            wl.CreateFlyout(Strings.WL_Label_Zoom, null, null, null, null,
+                wl.CreateCommandItem(BuiltInCommandType.PreviousView.ToString()),
+                wl.CreateCommandItem(BuiltInCommandType.NextView.ToString()),
+                wl.CreateCommandItem(BuiltInCommandType.RestoreView.ToString())
+            ),
+            wl.CreateSeparator(),
+            wl.CreateCommandItem(BuiltInCommandType.ZoomRectangle.ToString()),
+            wl.CreateCommandItem(BuiltInCommandType.ZoomIn.ToString()),
+            wl.CreateCommandItem(BuiltInCommandType.ZoomOut.ToString()),
+            wl.CreateCommandItem(BuiltInCommandType.Zoom.ToString()),
+            wl.CreateSeparator(),
+            wl.CreateCommandItem(BuiltInCommandType.Select.ToString()),
+            wl.CreateCommandItem(BuiltInCommandType.Pan.ToString())
+            );
+        }
+
+        private static void CreateDefaultContextMenu(IWebLayout wl)
+        {
+            wl.ContextMenu.AddItems(
+                            wl.CreateCommandItem(BuiltInCommandType.Select.ToString()),
+                                wl.CreateCommandItem(BuiltInCommandType.ClearSelection.ToString()),
+                                wl.CreateFlyout(Strings.WL_Label_SelectMore, null, null, null, null,
+                                    wl.CreateCommandItem(BuiltInCommandType.SelectRadius.ToString()),
+                                    wl.CreateCommandItem(BuiltInCommandType.SelectPolygon.ToString()),
+                                    wl.CreateCommandItem(BuiltInCommandType.SelectWithin.ToString())
+                                ),
+                                wl.CreateCommandItem(BuiltInCommandType.Pan.ToString()),
+                                wl.CreateSeparator(),
+                                wl.CreateCommandItem(BuiltInCommandType.ZoomRectangle.ToString()),
+                                wl.CreateCommandItem(BuiltInCommandType.ZoomIn.ToString()),
+                                wl.CreateCommandItem(BuiltInCommandType.ZoomOut.ToString()),
+                                wl.CreateCommandItem(BuiltInCommandType.Zoom.ToString()),
+                                wl.CreateFlyout(Strings.WL_Label_Zoom, null, null, null, null,
+                                    wl.CreateCommandItem(BuiltInCommandType.PreviousView.ToString()),
+                                    wl.CreateCommandItem(BuiltInCommandType.NextView.ToString()),
+                                    wl.CreateCommandItem(BuiltInCommandType.FitToWindow.ToString()),
+                                    wl.CreateCommandItem(BuiltInCommandType.RestoreView.ToString()),
+                                    wl.CreateCommandItem(BuiltInCommandType.ZoomToSelection.ToString())
+                                ),
+                                wl.CreateSeparator(),
+                                wl.CreateCommandItem(BuiltInCommandType.Measure.ToString()),
+                                wl.CreateCommandItem(BuiltInCommandType.Buffer.ToString()),
+                                wl.CreateSeparator(),
+                                wl.CreateCommandItem(BuiltInCommandType.Refresh.ToString()),
+                                wl.CreateCommandItem(BuiltInCommandType.CopyMap.ToString()),
+                                wl.CreateSeparator(),
+                                wl.CreateCommandItem(BuiltInCommandType.Print.ToString()),
+                                wl.CreateCommandItem(BuiltInCommandType.GetPrintablePage.ToString()),
+                                wl.CreateCommandItem(BuiltInCommandType.ViewOptions.ToString()),
+                                wl.CreateSeparator(),
+                                wl.CreateCommandItem(BuiltInCommandType.Help.ToString()),
+                                wl.CreateCommandItem(BuiltInCommandType.About.ToString())
+                                );
+        }
+
+        private static void CreateDefaultCommandSet(IWebLayout wl)
+        {
+            wl.CommandSet.AddCommand(
+                            wl.CreateBasicCommand(Strings.WL_Label_Pan,
+                                               Strings.WL_Label_Pan,
+                                               Strings.WL_Desc_Pan,
+                                               "icon_pan",
+                                               TargetViewerType.All,
+                                               BasicCommandActionType.Pan));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_PanUp,
+                               Strings.WL_Label_PanUp,
+                               Strings.WL_Desc_PanUp,
+                               "icon_panup",
+                               TargetViewerType.All,
+                               BasicCommandActionType.PanUp));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_PanDown,
+                               Strings.WL_Label_PanDown,
+                               Strings.WL_Desc_PanDown,
+                               "icon_pandown",
+                               TargetViewerType.All,
+                               BasicCommandActionType.PanDown));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_PanRight,
+                               Strings.WL_Label_PanRight,
+                               Strings.WL_Desc_PanRight,
+                               "icon_panright",
+                               TargetViewerType.All,
+                               BasicCommandActionType.PanRight));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_PanLeft,
+                               Strings.WL_Label_PanLeft,
+                               Strings.WL_Desc_PanLeft,
+                               "icon_panleft",
+                               TargetViewerType.All,
+                               BasicCommandActionType.PanLeft));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_Zoom,
+                               Strings.WL_Label_ZoomDynamic,
+                               Strings.WL_Desc_ZoomDynamic,
+                               "icon_zoom",
+                               TargetViewerType.Dwf,
+                               BasicCommandActionType.Zoom));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_ZoomIn,
+                               Strings.WL_Label_ZoomIn,
+                               Strings.WL_Desc_ZoomIn,
+                               "icon_zoomin",
+                               TargetViewerType.All,
+                               BasicCommandActionType.ZoomIn));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_ZoomOut,
+                               Strings.WL_Label_ZoomOut,
+                               Strings.WL_Desc_ZoomOut,
+                               "icon_zoomout",
+                               TargetViewerType.All,
+                               BasicCommandActionType.ZoomOut));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_ZoomRect,
+                               Strings.WL_Label_ZoomRect,
+                               Strings.WL_Desc_ZoomRect,
+                               "icon_zoomrect",
+                               TargetViewerType.All,
+                               BasicCommandActionType.ZoomRectangle));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_ZoomSelection,
+                               Strings.WL_Label_ZoomSelection,
+                               Strings.WL_Desc_ZoomSelection,
+                               "icon_zoomselect",
+                               TargetViewerType.All,
+                               BasicCommandActionType.ZoomToSelection));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_InitialMapView,
+                               Strings.WL_Label_InitialMapView,
+                               Strings.WL_Desc_InitialMapView,
+                               "icon_fitwindow",
+                               TargetViewerType.All,
+                               BasicCommandActionType.FitToWindow));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_PrevView,
+                               Strings.WL_Label_PrevView,
+                               Strings.WL_Desc_PrevView,
+                               "icon_zoomprev",
+                               TargetViewerType.All,
+                               BasicCommandActionType.PreviousView));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_NextView,
+                               Strings.WL_Label_NextView,
+                               Strings.WL_Desc_NextView,
+                               "icon_zoomnext",
+                               TargetViewerType.All,
+                               BasicCommandActionType.NextView));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_InitialCenterScale,
+                               Strings.WL_Label_InitialCenterScale,
+                               Strings.WL_Desc_InitialCenterScale,
+                               "icon_restorecenter",
+                               TargetViewerType.All,
+                               BasicCommandActionType.RestoreView));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_Select,
+                               Strings.WL_Label_Select,
+                               Strings.WL_Desc_Select,
+                               "icon_select",
+                               TargetViewerType.All,
+                               BasicCommandActionType.Select));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_SelectRadius,
+                               Strings.WL_Label_SelectRadius,
+                               Strings.WL_Desc_SelectRadius,
+                               "icon_selectradius",
+                               TargetViewerType.All,
+                               BasicCommandActionType.SelectRadius));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_SelectPolygon,
+                               Strings.WL_Label_SelectPolygon,
+                               Strings.WL_Desc_SelectPolygon,
+                               "icon_selectpolygon",
+                               TargetViewerType.All,
+                               BasicCommandActionType.SelectPolygon));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Desc_ClearSelection,
+                               Strings.WL_Label_ClearSelection,
+                               Strings.WL_Desc_ClearSelection,
+                               "icon_clearselect",
+                               TargetViewerType.All,
+                               BasicCommandActionType.ClearSelection));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_RefreshMap,
+                               Strings.WL_Label_RefreshMap,
+                               Strings.WL_Desc_RefreshMap,
+                               "icon_refreshmap",
+                               TargetViewerType.All,
+                               BasicCommandActionType.Refresh));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_Copy,
+                               Strings.WL_Label_Copy,
+                               Strings.WL_Desc_Copy,
+                               "icon_copy",
+                               TargetViewerType.Dwf,
+                               BasicCommandActionType.CopyMap));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand(Strings.WL_Label_About,
+                               Strings.WL_Label_About,
+                               Strings.WL_Desc_About,
+                               null,
+                               TargetViewerType.All,
+                               BasicCommandActionType.About));
+            wl.CommandSet.AddCommand(
+            wl.CreateTargetedCommand<BufferCommandType>(BuiltInCommandType.Buffer.ToString(),
+                                                     Strings.WL_Label_Buffer,
+                                                     Strings.WL_Label_Buffer,
+                                                     Strings.WL_Desc_Buffer,
+                                                     "icon_buffer",
+                                                     TargetViewerType.All,
+                                                     TargetType.TaskPane,
+                                                     null));
+            wl.CommandSet.AddCommand(
+            wl.CreateTargetedCommand<SelectWithinCommandType>(BuiltInCommandType.SelectWithin.ToString(),
+                                                     Strings.WL_Label_SelectWithin,
+                                                     Strings.WL_Label_SelectWithin,
+                                                     Strings.WL_Desc_SelectWithin,
+                                                     "icon_selectwithin",
+                                                     TargetViewerType.All,
+                                                     TargetType.TaskPane,
+                                                     null));
+            wl.CommandSet.AddCommand(
+            wl.CreateTargetedCommand<MeasureCommandType>(BuiltInCommandType.Measure.ToString(),
+                                                      Strings.WL_Label_Measure,
+                                                      Strings.WL_Label_Measure,
+                                                      Strings.WL_Desc_Measure,
+                                                      "icon_measure",
+                                                      TargetViewerType.All,
+                                                      TargetType.TaskPane,
+                                                      null));
+            wl.CommandSet.AddCommand(
+            new PrintCommandType()
+            {
+                Name = "Print",
+                Label = Strings.WL_Label_Print,
+                Tooltip = Strings.WL_Label_Print,
+                Description = Strings.WL_Desc_Print,
+                ImageURL = "../stdicons/icon_print.gif",
+                DisabledImageURL = "../stdicons/icon_print_disabled.gif",
+                TargetViewer = TargetViewerType.Dwf
+            });
+            wl.CommandSet.AddCommand(
+            wl.CreateTargetedCommand<ViewOptionsCommandType>(BuiltInCommandType.ViewOptions.ToString(),
+                                                          Strings.WL_Label_ViewOptions,
+                                                          Strings.WL_Label_ViewOptions,
+                                                          Strings.WL_Desc_ViewOptions,
+                                                          "icon_viewoptions",
+                                                          TargetViewerType.All,
+                                                          TargetType.TaskPane,
+                                                          null));
+            wl.CommandSet.AddCommand(
+            wl.CreateTargetedCommand<GetPrintablePageCommandType>(BuiltInCommandType.GetPrintablePage.ToString(),
+                                                          Strings.WL_Label_GetPrintablePage,
+                                                          Strings.WL_Label_GetPrintablePage,
+                                                          Strings.WL_Desc_GetPrintablePage,
+                                                          "icon_printablepage",
+                                                          TargetViewerType.Ajax,
+                                                          TargetType.NewWindow,
+                                                          null));
+            wl.CommandSet.AddCommand(
+            new HelpCommandType()
+            {
+                Name = BuiltInCommandType.Help.ToString(),
+                Label = Strings.WL_Label_Help,
+                Tooltip = Strings.WL_Label_Help,
+                Description = Strings.WL_Desc_Help,
+                ImageURL = "../stdicons/icon_help.gif",
+                DisabledImageURL = "../stdicons/icon_help_disabled.gif",
+                TargetViewer = TargetViewerType.All,
+                Target = TargetType.TaskPane
+            });
+        }
+
+        public IMapView CreateDefaultView()
+        {
+            return new MapViewType();
+        }
+
+        /// <summary>
+        /// Indicates whether a given command is referenced in the user interface
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="region"></param>
+        /// <returns></returns>
+        public bool IsCommandReferenced(string name, out WebLayoutRegion[] region)
+        {
+            region = new WebLayoutRegion[0];
+            List<WebLayoutRegion> regions = new List<WebLayoutRegion>();
+            if (FindCommand(name, this.ContextMenu))
+            {
+                regions.Add(WebLayoutRegion.ContextMenu);
+            }
+
+            if (FindCommand(name, this.ToolBar))
+            {
+                regions.Add(WebLayoutRegion.Toolbar);
+            }
+
+            if (FindCommand(name, this.TaskPane.TaskBar))
+            {
+                regions.Add(WebLayoutRegion.TaskBar);
+            }
+
+            region = regions.ToArray();
+            return region.Length > 0;
+        }
+
+        /// <summary>
+        /// Removes all references of a given command
+        /// </summary>
+        /// <param name="cmdName"></param>
+        /// <returns>The number of references removed</returns>
+        public int RemoveAllReferences(string cmdName)
+        {
+            int removed = 0;
+            removed += RemoveInternal(cmdName, contextMenuField.MenuItem);
+            removed += RemoveInternal(cmdName, toolBarField.Button);
+            removed += RemoveInternal(cmdName, taskPaneField.TaskBar.MenuButton);
+            return removed;
+        }
+
+        private int RemoveInternal(string cmdName, IList<UIItemType> items)
+        {
+            int foundCount = 0;
+            List<IList<UIItemType>> subItemCheck = new List<IList<UIItemType>>();
+            List<UIItemType> found = new List<UIItemType>();
+            foreach (var item in items)
+            {
+                if (item.Function == UIItemFunctionType.Command)
+                {
+                    if (((CommandItemType)item).Command == cmdName)
+                        found.Add(item);
+                }
+                else if (item.Function == UIItemFunctionType.Flyout)
+                {
+                    subItemCheck.Add(((FlyoutItemType)item).SubItem);
+                }
+            }
+            foundCount += found.Count;
+            //Purge any found
+            foreach (var item in found)
+            {
+                items.Remove(item);
+            }
+            //Check these sub lists
+            foreach (var list in subItemCheck)
+            {
+                foundCount += RemoveInternal(cmdName, list);
+            }
+
+            return foundCount;
+        }
+
+        public ICommand GetCommandByName(string cmdName)
+        {
+            foreach (var cmd in this.CommandSet)
+            {
+                if (cmd.Name == cmdName)
+                    return cmd;
+            }
+
+            return null;
+        }
+
+        public IEnumerable<ICommand> GetCustomCommands()
+        {
+            foreach (var cmd in this.CommandSet)
+            {
+                var type = cmd.GetType();
+                if (typeof(InvokeURLCommandType).IsAssignableFrom(type) ||
+                    typeof(InvokeScriptCommandType).IsAssignableFrom(type) ||
+                    typeof(SearchCommandType).IsAssignableFrom(type))
+                {
+                    yield return cmd;
+                }
+            }
+        }
+
+        public bool FindCommand(string name, IMenu menu)
+        {
+            foreach (var item in menu.Items)
+            {
+                if (item.Function == UIItemFunctionType.Command)
+                {
+                    if (((CommandItemType)item).Command == name)
+                        return true;
+                }
+                else if (item.Function == UIItemFunctionType.Flyout)
+                {
+                    return FindCommand(name, ((IFlyoutItem)item));
+                }
+            }
+            return false;
+        }
+
+        public IBasicCommand CreateBasicCommand(string label, string tooltip, string description, string iconName, TargetViewerType targets, BasicCommandActionType action)
+        {
+            var cmd = new BasicCommandType()
+            {
+                Name = action.ToString(),
+                Label = label,
+                Tooltip = tooltip,
+                Description = description,
+
+                TargetViewer = targets,
+                Action = action
+            };
+
+            if (!string.IsNullOrEmpty(iconName))
+            {
+                cmd.ImageURL = "../stdicons/" + iconName + ".gif"; //NOXLATE
+                cmd.DisabledImageURL = "../stdicons/" + iconName + "_disabled.gif"; //NOXLATE
+            }
+
+            return cmd;
+        }
+
+        private string GenerateUniqueName(string prefix)
+        {
+            int counter = 0;
+            string name = prefix + counter;
+
+            Dictionary<string, string> ids = new Dictionary<string, string>();
+            foreach (var cmd in this.CommandSet)
+            {
+                ids.Add(cmd.Name, cmd.Name);
+            }
+
+            while (ids.ContainsKey(name))
+            {
+                counter++;
+                name = prefix + counter;
+            }
+
+            return name;
+        }
+
+        public IInvokeUrlCommand CreateInvokeUrlCommand()
+        {
+            return new InvokeURLCommandType()
+            {
+                Name = GenerateUniqueName("InvokeUrlCommand"), //NOXLATE
+                Target = TargetType.TaskPane,
+                DisableIfSelectionEmpty = false,
+                ImageURL = "../stdicons/icon_invokeurl.gif", //NOXLATE
+                DisabledImageURL = "../stdicons/icon_invokeurl_disabled.gif", //NOXLATE
+                TargetViewer = TargetViewerType.All,
+                AdditionalParameter = new BindingList<ParameterPairType>(),
+                URL = "",
+                LayerSet = new BindingList<string>()
+            };
+        }
+
+        public ISearchCommand CreateSearchCommand()
+        {
+            return new SearchCommandType()
+            {
+                Name = GenerateUniqueName("SearchCommand"), //NOXLATE
+                ResultColumns = new System.ComponentModel.BindingList<ResultColumnType>(),
+                Target = TargetType.TaskPane,
+                TargetViewer = TargetViewerType.All, //NOXLATE
+                DisabledImageURL = "../stdicons/icon_search_disabled.gif", //NOXLATE
+                ImageURL = "../stdicons/icon_search.gif", //NOXLATE
+                Layer = string.Empty,
+                Filter = string.Empty,
+                MatchLimit = "100",
+                Prompt = string.Empty
+            };
+        }
+
+        public IInvokeScriptCommand CreateInvokeScriptCommand()
+        {
+            return new InvokeScriptCommandType()
+            {
+                Name = GenerateUniqueName("InvokeScriptCommand"), //NOXLATE
+                DisabledImageURL = "../stdicons/icon_invokescript_disabled.gif", //NOXLATE
+                ImageURL = "../stdicons/icon_invokescript.gif", //NOXLATE
+                TargetViewer = TargetViewerType.All,
+                Script = "//Enter your script code here. You can use AJAX viewer API calls here. This code is called from the viewer's main frame" //NOXLATE
+            };
+        }
+
+        public T CreateTargetedCommand<T>(string name, string label, string tooltip, string description, string iconName, TargetViewerType targets, TargetType target, string targetFrame) where T : ITargetedCommand, new()
+        {
+            var cmd = new T()
+            {
+                Name = name,
+                Label = label,
+                Tooltip = tooltip,
+                Description = description,
+                TargetViewer = targets,
+                Target = target,
+            };
+
+            if (!string.IsNullOrEmpty(targetFrame) && target == TargetType.SpecifiedFrame)
+            {
+                cmd.TargetFrame = targetFrame;
+            }
+
+            if (!string.IsNullOrEmpty(iconName))
+            {
+                cmd.ImageURL = "../stdicons/" + iconName + ".gif";
+                cmd.DisabledImageURL = "../stdicons/" + iconName + "_disabled.gif";
+            }
+
+            return cmd;
+        }
+
+        public IFlyoutItem CreateFlyout(
+            string label,
+            string tooltip,
+            string description,
+            string imageUrl,
+            string disabledImageUrl,
+            params IUIItem[] subItems)
+        {
+            IFlyoutItem flyout = new FlyoutItemType()
+            {
+                Function = UIItemFunctionType.Flyout,
+                Description = description,
+                DisabledImageURL = disabledImageUrl,
+                ImageURL = imageUrl,
+                Label = label,
+                SubItem = new System.ComponentModel.BindingList<UIItemType>(),
+                Tooltip = tooltip
+            };
+            flyout.AddItems(subItems);
+            return flyout;
+        }
+
+        public ICommandItem CreateCommandItem(string cmdName)
+        {
+            return new CommandItemType() { Function = UIItemFunctionType.Command, Command = cmdName };
+        }
+
+        public ISeparatorItem CreateSeparator()
+        {
+            return new SeparatorItemType() { Function = UIItemFunctionType.Separator };
+        }
+
+        public void ExportCustomCommands(string file, string[] cmdNames)
+        {
+            WebLayoutCustomCommandList list = new WebLayoutCustomCommandList();
+
+            List<CommandType> commands = new List<CommandType>();
+
+            foreach (var name in cmdNames)
+            {
+                var cmd = (CommandType)GetCommandByName(name);
+                if (cmd != null)
+                    commands.Add(cmd);
+            }
+
+            list.Commands = commands.ToArray();
+
+            using (var fs = File.OpenWrite(file))
+            {
+                new XmlSerializer(typeof(WebLayoutCustomCommandList)).Serialize(fs, list);
+            }
+        }
+
+        public ImportedCommandResult[] ImportCustomCommands(string file)
+        {
+            List<ImportedCommandResult> clashes = new List<ImportedCommandResult>();
+
+            using (var fs = File.OpenRead(file))
+            {
+                var list = (WebLayoutCustomCommandList)(new XmlSerializer(typeof(WebLayoutCustomCommandList)).Deserialize(fs));
+                foreach (var importCmd in list.Commands)
+                {
+                    int counter = 0;
+                    string oldName = importCmd.Name;
+                    string newName = oldName;
+
+                    ICommand cmd = this.GetCommandByName(newName);
+                    while (cmd != null)
+                    {
+                        counter++;
+                        newName = oldName + counter;
+                        cmd = this.GetCommandByName(newName);
+                    }
+
+                    this.commandSetField.Add(importCmd);
+
+                    clashes.Add(new ImportedCommandResult() { OriginalName = oldName, ImportedName = newName });
+                }
+            }
+
+            return clashes.ToArray();
+        }
+
+        [XmlIgnore]
+        ICommandSet IWebLayout.CommandSet
+        {
+            get { return this; }
+        }
+
+        void ICommandSet.Clear()
+        {
+            this.CommandSet.Clear();
+        }
+
+        [XmlIgnore]
+        int ICommandSet.CommandCount
+        {
+            get { return this.CommandSet.Count; }
+        }
+
+        [XmlIgnore]
+        IEnumerable<ICommand> ICommandSet.Commands
+        {
+            get
+            {
+                foreach (var cmd in this.CommandSet)
+                {
+                    yield return cmd;
+                }
+            }
+        }
+
+        public event CommandEventHandler CustomCommandAdded;
+
+        public event CommandEventHandler CustomCommandRemoved;
+
+        void ICommandSet.AddCommand(ICommand cmd)
+        {
+            var c = cmd as CommandType;
+            if (c != null)
+            {
+                this.CommandSet.Add(c);
+                OnPropertyChanged("CommandSet"); //NOXLATE
+                if (cmd is IInvokeUrlCommand || cmd is IInvokeScriptCommand || cmd is ISearchCommand)
+                {
+                    var handler = this.CustomCommandAdded;
+                    if (handler != null)
+                        handler(cmd);
+                }
+            }
+        }
+
+        void ICommandSet.RemoveCommand(ICommand cmd)
+        {
+            var c = cmd as CommandType;
+            if (c != null)
+            {
+                this.CommandSet.Remove(c);
+                OnPropertyChanged("CommandSet"); //NOXLATE
+                if (cmd is IInvokeUrlCommand || cmd is IInvokeScriptCommand || cmd is ISearchCommand)
+                {
+                    var handler = this.CustomCommandRemoved;
+                    if (handler != null)
+                        handler(cmd);
+                }
+            }
+        }
+
+        [XmlIgnore]
+        string IWebLayout.Title
+        {
+            get
+            {
+                return this.Title;
+            }
+            set
+            {
+                this.Title = value;
+            }
+        }
+
+        [XmlIgnore]
+        IMap IWebLayout.Map
+        {
+            get { return this.Map; }
+        }
+
+        [XmlIgnore]
+        ITaskPane IWebLayout.TaskPane
+        {
+            get { return this.TaskPane; }
+        }
+
+        [XmlIgnore]
+        IToolbar IWebLayout.ToolBar
+        {
+            get { return this.ToolBar; }
+        }
+
+        [XmlIgnore]
+        IInformationPane IWebLayout.InformationPane
+        {
+            get { return this.InformationPane; }
+        }
+
+        [XmlIgnore]
+        IContextMenu IWebLayout.ContextMenu
+        {
+            get { return this.ContextMenu; }
+        }
+
+        [XmlIgnore]
+        IStatusBar IWebLayout.StatusBar
+        {
+            get { return this.StatusBar; }
+        }
+
+        [XmlIgnore]
+        IZoomControl IWebLayout.ZoomControl
+        {
+            get { return this.ZoomControl; }
+        }
+    }
+
+    partial class TaskPaneType : ITaskPane
+    {
+        [XmlIgnore]
+        ITaskBar ITaskPane.TaskBar
+        {
+            get
+            {
+                return this.TaskBar;
+            }
+        }
+    }
+
+    partial class MapType : IMap
+    {
+        [XmlIgnore]
+        IMapView IMap.InitialView
+        {
+            get
+            {
+                return this.InitialView;
+            }
+            set
+            {
+                this.InitialView = (MapViewType)value;
+            }
+        }
+    }
+
+    partial class MapViewType : IMapView
+    {
+    }
+
+    partial class ToolBarType : IToolbar
+    {
+        [XmlIgnore]
+        public int ItemCount
+        {
+            get { return this.Button.Count; }
+        }
+
+        [XmlIgnore]
+        public IEnumerable<IUIItem> Items
+        {
+            get
+            {
+                foreach (var item in this.Button)
+                {
+                    yield return item;
+                }
+            }
+        }
+
+        public void AddItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.Button.Add(it);
+                it.Parent = this;
+                OnPropertyChanged("Button"); //NOXLATE
+            }
+        }
+
+        public void RemoveItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.Button.Remove(it);
+                it.Parent = null;
+                OnPropertyChanged("Button"); //NOXLATE
+            }
+        }
+
+        public bool MoveUp(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                var isrc = this.Button.IndexOf(it);
+                if (isrc > 0)
+                {
+                    var idst = isrc - 1;
+                    var src = this.Button[isrc];
+                    var dst = this.Button[idst];
+
+                    this.Button[isrc] = dst;
+                    this.Button[idst] = src;
+
+                    OnPropertyChanged("Button"); //NOXLATE
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
+        public bool MoveDown(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                var isrc = this.Button.IndexOf(it);
+                if (isrc < this.Button.Count - 1)
+                {
+                    var idst = isrc + 1;
+                    var src = this.Button[isrc];
+                    var dst = this.Button[idst];
+
+                    this.Button[isrc] = dst;
+                    this.Button[idst] = src;
+
+                    OnPropertyChanged("Button"); //NOXLATE
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public int GetIndex(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                return this.Button.IndexOf(it);
+            }
+            return -1;
+        }
+
+        public void Insert(IUIItem item, int index)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                it.Parent = this;
+                this.Button.Insert(index, it);
+            }
+        }
+    }
+
+    partial class InformationPaneType : IInformationPane
+    {
+    }
+
+    partial class ContextMenuType : IContextMenu
+    {
+        [XmlIgnore]
+        public int ItemCount
+        {
+            get { return this.MenuItem.Count; }
+        }
+
+        [XmlIgnore]
+        public IEnumerable<IUIItem> Items
+        {
+            get
+            {
+                foreach (var item in this.MenuItem)
+                {
+                    yield return item;
+                }
+            }
+        }
+
+        public void AddItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.MenuItem.Add(it);
+                it.Parent = this;
+                OnPropertyChanged("MenuItem"); //NOXLATE
+            }
+        }
+
+        public void RemoveItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.MenuItem.Remove(it);
+                it.Parent = null;
+                OnPropertyChanged("MenuItem"); //NOXLATE
+            }
+        }
+
+        public bool MoveUp(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                var isrc = this.MenuItem.IndexOf(it);
+                if (isrc > 0)
+                {
+                    var idst = isrc - 1;
+                    var src = this.MenuItem[isrc];
+                    var dst = this.MenuItem[idst];
+
+                    this.MenuItem[isrc] = dst;
+                    this.MenuItem[idst] = src;
+
+                    OnPropertyChanged("Button"); //NOXLATE
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public bool MoveDown(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                var isrc = this.MenuItem.IndexOf(it);
+                if (isrc < this.MenuItem.Count - 1)
+                {
+                    var idst = isrc + 1;
+                    var src = this.MenuItem[isrc];
+                    var dst = this.MenuItem[idst];
+
+                    this.MenuItem[isrc] = dst;
+                    this.MenuItem[idst] = src;
+
+                    OnPropertyChanged("Button"); //NOXLATE
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public int GetIndex(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                return this.MenuItem.IndexOf(it);
+            }
+            return -1;
+        }
+
+        public void Insert(IUIItem item, int index)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                it.Parent = this;
+                this.MenuItem.Insert(index, it);
+            }
+        }
+    }
+
+    partial class TaskBarType : ITaskBar
+    {
+        [XmlIgnore]
+        public int ItemCount
+        {
+            get { return this.MenuButton.Count; }
+        }
+
+        [XmlIgnore]
+        public IEnumerable<IUIItem> Items
+        {
+            get
+            {
+                foreach (var item in this.MenuButton)
+                {
+                    yield return item;
+                }
+            }
+        }
+
+        public void AddItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.MenuButton.Add(it);
+                it.Parent = this;
+                OnPropertyChanged("MenuButton"); //NOXLATE
+            }
+        }
+
+        public void RemoveItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.MenuButton.Remove(it);
+                it.Parent = null;
+                OnPropertyChanged("MenuButton"); //NOXLATE
+            }
+        }
+
+        public bool MoveUp(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                var isrc = this.MenuButton.IndexOf(it);
+                if (isrc > 0)
+                {
+                    var idst = isrc - 1;
+                    var src = this.MenuButton[isrc];
+                    var dst = this.MenuButton[idst];
+
+                    this.MenuButton[isrc] = dst;
+                    this.MenuButton[idst] = src;
+
+                    OnPropertyChanged("Button"); //NOXLATE
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public bool MoveDown(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                var isrc = this.MenuButton.IndexOf(it);
+                if (isrc < this.MenuButton.Count - 1)
+                {
+                    var idst = isrc + 1;
+                    var src = this.MenuButton[isrc];
+                    var dst = this.MenuButton[idst];
+
+                    this.MenuButton[isrc] = dst;
+                    this.MenuButton[idst] = src;
+
+                    OnPropertyChanged("Button"); //NOXLATE
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public int GetIndex(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                return this.MenuButton.IndexOf(it);
+            }
+            return -1;
+        }
+
+        public void Insert(IUIItem item, int index)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                it.Parent = this;
+                this.MenuButton.Insert(index, it);
+            }
+        }
+
+        [XmlIgnore]
+        ITaskButton ITaskBar.Home
+        {
+            get { return this.Home; }
+        }
+
+        [XmlIgnore]
+        ITaskButton ITaskBar.Forward
+        {
+            get { return this.Forward; }
+        }
+
+        [XmlIgnore]
+        ITaskButton ITaskBar.Back
+        {
+            get { return this.Back; }
+        }
+
+        [XmlIgnore]
+        ITaskButton ITaskBar.Tasks
+        {
+            get { return this.Tasks; }
+        }
+    }
+
+    partial class TaskButtonType : ITaskButton
+    {
+    }
+
+    partial class StatusBarType : IStatusBar
+    {
+    }
+
+    partial class ZoomControlType : IZoomControl
+    {
+    }
+
+    partial class CommandType : ICommand
+    {
+    }
+
+    partial class ResourceReferenceType : IResourceReference
+    {
+    }
+
+    partial class PrintCommandType : IPrintCommand
+    {
+        public void Clear()
+        {
+            this.PrintLayout.Clear();
+        }
+
+        [XmlIgnore]
+        IEnumerable<IResourceReference> IPrintCommand.PrintLayout
+        {
+            get
+            {
+                foreach (var refer in this.PrintLayout)
+                {
+                    yield return refer;
+                }
+            }
+        }
+
+        public IResourceReference CreatePrintLayout(string resourceId)
+        {
+            return new ResourceReferenceType() { ResourceId = resourceId };
+        }
+
+        public void AddPrintLayout(IResourceReference reference)
+        {
+            var r = reference as ResourceReferenceType;
+            if (r != null)
+            {
+                this.PrintLayout.Add(r);
+                OnPropertyChanged("PrintLayout"); //NOXLATE
+            }
+        }
+
+        public void RemovePrintLayout(IResourceReference reference)
+        {
+            var r = reference as ResourceReferenceType;
+            if (r != null)
+            {
+                this.PrintLayout.Remove(r);
+                OnPropertyChanged("PrintLayout"); //NOXLATE
+            }
+        }
+    }
+
+    partial class SeparatorItemType : ISeparatorItem
+    {
+    }
+
+    partial class BasicCommandType : IBasicCommand
+    {
+    }
+
+    partial class TargetedCommandType : ITargetedCommand
+    {
+    }
+
+    partial class FlyoutItemType : IFlyoutItem
+    {
+        [XmlIgnore]
+        public int ItemCount
+        {
+            get { return this.SubItem.Count; }
+        }
+
+        [XmlIgnore]
+        public IEnumerable<IUIItem> Items
+        {
+            get
+            {
+                foreach (var item in this.SubItem)
+                {
+                    yield return item;
+                }
+            }
+        }
+
+        public void AddItem(IUIItem item)
+        {
+            var i = item as UIItemType;
+            if (i != null)
+            {
+                this.SubItem.Add(i);
+                i.Parent = this;
+                OnPropertyChanged("SubItem"); //NOXLATE
+            }
+        }
+
+        public void RemoveItem(IUIItem item)
+        {
+            var i = item as UIItemType;
+            if (i != null)
+            {
+                this.SubItem.Remove(i);
+                i.Parent = null;
+                OnPropertyChanged("SubItem"); //NOXLATE
+            };
+        }
+
+        public bool MoveUp(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                var isrc = this.SubItem.IndexOf(it);
+                if (isrc > 0)
+                {
+                    var idst = isrc - 1;
+                    var src = this.SubItem[isrc];
+                    var dst = this.SubItem[idst];
+
+                    this.SubItem[isrc] = dst;
+                    this.SubItem[idst] = src;
+
+                    OnPropertyChanged("Button"); //NOXLATE
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public bool MoveDown(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                var isrc = this.SubItem.IndexOf(it);
+                if (isrc < this.SubItem.Count - 1)
+                {
+                    var idst = isrc + 1;
+                    var src = this.SubItem[isrc];
+                    var dst = this.SubItem[idst];
+
+                    this.SubItem[isrc] = dst;
+                    this.SubItem[idst] = src;
+
+                    OnPropertyChanged("Button"); //NOXLATE
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public int GetIndex(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                return this.SubItem.IndexOf(it);
+            }
+            return -1;
+        }
+
+        public void Insert(IUIItem item, int index)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                it.Parent = this;
+                this.SubItem.Insert(index, it);
+            }
+        }
+    }
+
+    partial class UIItemType : IUIItem
+    {
+        [XmlIgnore]
+        public IMenu Parent
+        {
+            get;
+            set;
+        }
+    }
+
+    partial class CommandItemType : ICommandItem
+    {
+    }
+
+    partial class InvokeURLCommandType : IInvokeUrlCommand, ILayerSet
+    {
+        [XmlIgnore]
+        ILayerSet IInvokeUrlCommand.LayerSet
+        {
+            get
+            {
+                return this;
+            }
+        }
+
+        [XmlIgnore]
+        IEnumerable<IParameterPair> IInvokeUrlCommand.AdditionalParameter
+        {
+            get
+            {
+                foreach (var pair in this.AdditionalParameter)
+                {
+                    yield return pair;
+                }
+            }
+        }
+
+        public IParameterPair CreateParameter(string name, string value)
+        {
+            return new ParameterPairType() { Key = name, Value = value };
+        }
+
+        public void AddParameter(IParameterPair param)
+        {
+            var p = param as ParameterPairType;
+            if (p != null)
+            {
+                this.AdditionalParameter.Add(p);
+                OnPropertyChanged("AdditionalParameter"); //NOXLATE
+            }
+        }
+
+        public void RemoveParameter(IParameterPair param)
+        {
+            var p = param as ParameterPairType;
+            if (p != null)
+            {
+                this.AdditionalParameter.Remove(p);
+                OnPropertyChanged("AdditionalParameter"); //NOXLATE
+            }
+        }
+
+        [XmlIgnore]
+        public BindingList<string> Layer
+        {
+            get
+            {
+                return this.LayerSet;
+            }
+        }
+    }
+
+    partial class ParameterPairType : IParameterPair
+    {
+    }
+
+    partial class SearchCommandType : ISearchCommand, IResultColumnSet
+    {
+        IResultColumn IResultColumnSet.CreateColumn(string name, string property)
+        {
+            return new ResultColumnType() { Name = name, Property = property };
+        }
+
+        [XmlIgnore]
+        IResultColumnSet ISearchCommand.ResultColumns
+        {
+            get
+            {
+                return this;
+            }
+        }
+
+        [XmlIgnore]
+        int ISearchCommand.MatchLimit
+        {
+            get
+            {
+                int i;
+                if (!int.TryParse(this.MatchLimit, out i))
+                {
+                    i = 100;
+                    this.MatchLimit = i.ToString();
+                }
+                return i;
+            }
+            set
+            {
+                this.MatchLimit = value.ToString();
+            }
+        }
+
+        public void Clear()
+        {
+            this.ResultColumns.Clear();
+        }
+
+        [XmlIgnore]
+        public IEnumerable<IResultColumn> Column
+        {
+            get
+            {
+                foreach (var col in this.ResultColumns)
+                {
+                    yield return col;
+                }
+            }
+        }
+
+        public void AddResultColumn(IResultColumn col)
+        {
+            var c = col as ResultColumnType;
+            if (c != null)
+            {
+                this.ResultColumns.Add(c);
+                OnPropertyChanged("ResultColumns"); //NOXLATE
+            }
+        }
+
+        public void RemoveResultColumn(IResultColumn col)
+        {
+            var c = col as ResultColumnType;
+            if (c != null)
+            {
+                this.ResultColumns.Remove(c);
+                OnPropertyChanged("ResultColumns"); //NOXLATE
+            }
+        }
+    }
+
+    partial class ResultColumnType : IResultColumn
+    {
+    }
+
+    partial class InvokeScriptCommandType : IInvokeScriptCommand
+    {
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/XmlNamespaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/XmlNamespaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/XmlNamespaces.cs	2014-12-25 13:55:42 UTC (rev 8462)
@@ -0,0 +1,65 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels
+{
+    /// <summary>
+    /// A set of XML namespaces commonly used in FDO XML documents
+    /// </summary>
+    public static class XmlNamespaces
+    {
+        /// <summary>
+        /// XML Schema namespace
+        /// </summary>
+        public const string XS = "http://www.w3.org/2001/XMLSchema"; //NOXLATE
+
+        /// <summary>
+        /// XML Schema Instance namespace
+        /// </summary>
+        public const string XSI = "http://www.w3.org/2001/XMLSchema-instance"; //NOXLATE
+
+        /// <summary>
+        /// XLink namespace
+        /// </summary>
+        public const string XLINK = "http://www.w3.org/1999/xlink"; //NOXLATE
+
+        /// <summary>
+        /// GML (Geography Markup Language) namespace
+        /// </summary>
+        public const string GML = "http://www.opengis.net/gml"; //NOXLATE
+
+        /// <summary>
+        /// FDO (Feature Data Objects) namespace
+        /// </summary>
+        public const string FDO = "http://fdo.osgeo.org/schemas"; //NOXLATE
+
+        /// <summary>
+        /// FDS namespace
+        /// </summary>
+        public const string FDS = "http://fdo.osgeo.org/schemas/fds"; //NOXLATE
+    }
+}
\ No newline at end of file



More information about the mapguide-commits mailing list