[mapguide-commits] r5960 - in trunk/Tools/Maestro: . ExtendedModels/WatermarkDefinition-2.3.0 Generated Maestro Maestro.AddIn.ExtendedObjectModels Maestro.AddIn.ExtendedObjectModels/Commands Maestro.AddIn.ExtendedObjectModels/Properties Maestro.AddIn.ExtendedObjectModels/Resources Maestro.AddIn.ExtendedObjectModels/Templates Maestro.Base/Properties OSGeo.MapGuide.ExtendedObjectModels OSGeo.MapGuide.ExtendedObjectModels/Properties OSGeo.MapGuide.MaestroAPI/ObjectModels OSGeo.MapGuide.MaestroAPI/Properties SDK

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Jun 30 10:26:06 EDT 2011


Author: jng
Date: 2011-06-30 07:26:06 -0700 (Thu, 30 Jun 2011)
New Revision: 5960

Added:
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Resources/edit.png
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/MapDefinition230ItemTemplate.cs
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer230ItemTemplate.cs
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/WatermarkDefinition230ItemTemplate.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/
   trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/ModelSetup.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/OSGeo.MapGuide.ExtendedObjectModels.csproj
   trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/Properties/
   trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/Properties/AssemblyInfo.cs
Modified:
   trunk/Tools/Maestro/ExtendedModels/WatermarkDefinition-2.3.0/WatermarkImpl.cs
   trunk/Tools/Maestro/Generated/MapDefinition-2.3.0.designer.cs
   trunk/Tools/Maestro/Generated/WatermarkDefinition-2.3.0.designer.cs
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Commands/StartupCommand.cs
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Manifest.addin
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx
   trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx
   trunk/Tools/Maestro/Maestro/Maestro.csproj
   trunk/Tools/Maestro/Maestro/Maestro_All.sln
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinition.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/ObjectFactory.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefinition.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx
   trunk/Tools/Maestro/SDK/SDK.sln
Log:
#1734: Add a ExtendedObjectModels library which provides a convenience method (ModelSetup.Initialize()) to register > 1.0.0 resource types
#1707: Lay the groundwork for Watermark support. Add new item templates for Layer/Map/Watermark Definition v2.3.0

Modified: trunk/Tools/Maestro/ExtendedModels/WatermarkDefinition-2.3.0/WatermarkImpl.cs
===================================================================
--- trunk/Tools/Maestro/ExtendedModels/WatermarkDefinition-2.3.0/WatermarkImpl.cs	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/ExtendedModels/WatermarkDefinition-2.3.0/WatermarkImpl.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -25,9 +25,44 @@
 using OSGeo.MapGuide.MaestroAPI;
 using OSGeo.MapGuide.MaestroAPI.Resource;
 using OSGeo.MapGuide.ObjectModels.SymbolDefinition;
+using System.IO;
 
 namespace OSGeo.MapGuide.ObjectModels.WatermarkDefinition_2_3_0
 {
+    using Sdf110 = SymbolDefinition_1_1_0;
+
+    public static class WdfEntryPoint
+    {
+        public static WatermarkDefinition CreateDefault(SymbolDefinitionType type)
+        {
+            var wdf = new WatermarkDefinition()
+            {
+                Appearance = new WatermarkAppearanceType(),
+                Content = new WatermarkDefinitionTypeContent()
+                {
+                    Item = (type == SymbolDefinitionType.Simple) ? (Sdf110.SymbolDefinitionBase)Sdf110.SymbolDefEntryPoint.CreateDefaultSimple() : (Sdf110.SymbolDefinitionBase)Sdf110.SymbolDefEntryPoint.CreateDefaultCompound()
+                },
+                Position = new WatermarkDefinitionTypePosition()
+                {
+                    Item = new XYPositionType()
+                }
+            };
+            wdf.Content.Item.Name = wdf.Content.Item.Description = "";
+            wdf.Content.Item.RemoveSchemaAttributes();
+            return wdf;
+        }
+
+        public static IResource Deserialize(string xml)
+        {
+            return WatermarkDefinition.Deserialize(xml);
+        }
+
+        public static Stream Serialize(IResource res)
+        {
+            return res.SerializeToStream();
+        }
+    }
+
     partial class WatermarkDefinition : IWatermarkDefinition
     {
         private static readonly Version RES_VERSION = new Version(2, 3, 0);

Modified: trunk/Tools/Maestro/Generated/MapDefinition-2.3.0.designer.cs
===================================================================
--- trunk/Tools/Maestro/Generated/MapDefinition-2.3.0.designer.cs	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/Generated/MapDefinition-2.3.0.designer.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -40,15 +40,34 @@
                 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));
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        private string versionField;
+
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string version
+        {
+            get
+            {
+                return this.versionField;
             }
-        }*/
+            set
+            {
+                if ((this.versionField != null))
+                {
+                    if ((versionField.Equals(value) != true))
+                    {
+                        this.versionField = value;
+                        this.OnPropertyChanged("version");
+                    }
+                }
+                else
+                {
+                    this.versionField = value;
+                    this.OnPropertyChanged("version");
+                }
+            }
+        }
         
         #region Serialize/Deserialize
         /// <summary>

Modified: trunk/Tools/Maestro/Generated/WatermarkDefinition-2.3.0.designer.cs
===================================================================
--- trunk/Tools/Maestro/Generated/WatermarkDefinition-2.3.0.designer.cs	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/Generated/WatermarkDefinition-2.3.0.designer.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -253,10 +253,10 @@
         /// WatermarkDefinitionType class constructor
         /// </summary>
         public WatermarkDefinitionType() {
-            this.extendedData1Field = new ExtendedDataType();
-            this.positionField = new WatermarkDefinitionTypePosition();
-            this.appearanceField = new WatermarkAppearanceType();
-            this.contentField = new WatermarkDefinitionTypeContent();
+            //this.extendedData1Field = new ExtendedDataType();
+            //this.positionField = new WatermarkDefinitionTypePosition();
+            //this.appearanceField = new WatermarkAppearanceType();
+            //this.contentField = new WatermarkDefinitionTypeContent();
         }
         
         [System.Xml.Serialization.XmlElementAttribute(Order=0)]

Modified: trunk/Tools/Maestro/Maestro/Maestro.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro/Maestro.csproj	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/Maestro/Maestro.csproj	2011-06-30 14:26:06 UTC (rev 5960)
@@ -79,34 +79,6 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\SDK\bin\OSGeo.MapGuide.MaestroAPI.Native.dll</HintPath>
     </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0.dll</HintPath>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0.dll</HintPath>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0.dll</HintPath>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0.dll</HintPath>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0.dll</HintPath>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0.dll</HintPath>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Data" />
     <Reference Include="System.Deployment" />
@@ -410,6 +382,10 @@
       <Project>{F1E2F468-5030-4DBA-968C-9620284AFAA1}</Project>
       <Name>Maestro.Base</Name>
     </ProjectReference>
+    <ProjectReference Include="..\OSGeo.MapGuide.ExtendedObjectModels\OSGeo.MapGuide.ExtendedObjectModels.csproj">
+      <Project>{B3A2B816-9F41-4857-A111-09D2DF2550D6}</Project>
+      <Name>OSGeo.MapGuide.ExtendedObjectModels</Name>
+    </ProjectReference>
     <ProjectReference Include="..\Thirdparty\SharpDevelop\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj">
       <Project>{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}</Project>
       <Name>ICSharpCode.Core.WinForms</Name>

Modified: trunk/Tools/Maestro/Maestro/Maestro_All.sln
===================================================================
--- trunk/Tools/Maestro/Maestro/Maestro_All.sln	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/Maestro/Maestro_All.sln	2011-06-30 14:26:06 UTC (rev 5960)
@@ -10,6 +10,10 @@
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maestro.Base", "..\Maestro.Base\Maestro.Base.csproj", "{F1E2F468-5030-4DBA-968C-9620284AFAA1}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaestroFsPreview", "..\MaestroFsPreview\MaestroFsPreview.csproj", "{59BE5E18-17B6-431D-836E-C0AABA6D69E8}"
+	ProjectSection(ProjectDependencies) = postProject
+		{07588440-5F9F-4C30-AA06-9CF30BA6DDE6} = {07588440-5F9F-4C30-AA06-9CF30BA6DDE6}
+		{5AD2CDBA-952E-4148-98A1-31D2E0D540D5} = {5AD2CDBA-952E-4148-98A1-31D2E0D540D5}
+	EndProjectSection
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maestro.AddIn.ExtendedObjectModels", "..\Maestro.AddIn.ExtendedObjectModels\Maestro.AddIn.ExtendedObjectModels.csproj", "{32BA7DF6-1AFA-441D-9231-5624C5920706}"
 	ProjectSection(ProjectDependencies) = postProject
@@ -26,6 +30,10 @@
 	EndProjectSection
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MgCooker", "..\MgCooker\MgCooker.csproj", "{C7DCF771-5982-4859-A17F-01126E6F9BA6}"
+	ProjectSection(ProjectDependencies) = postProject
+		{07588440-5F9F-4C30-AA06-9CF30BA6DDE6} = {07588440-5F9F-4C30-AA06-9CF30BA6DDE6}
+		{80FA3158-8B5F-48D1-A393-0378AFE48A7E} = {80FA3158-8B5F-48D1-A393-0378AFE48A7E}
+	EndProjectSection
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MgCooker.Cmd", "..\MgCooker.Cmd\MgCooker.Cmd.csproj", "{0FD82B7B-1264-410F-86D1-47E9CCACD68E}"
 EndProject
@@ -69,6 +77,8 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSGeo.MapGuide.ObjectModels.WatermarkDefinition-2.3.0", "..\ExtendedModels\WatermarkDefinition-2.3.0\OSGeo.MapGuide.ObjectModels.WatermarkDefinition-2.3.0.csproj", "{F84E21EE-360C-46EC-BD01-E66F8D9F5B3E}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSGeo.MapGuide.ExtendedObjectModels", "..\OSGeo.MapGuide.ExtendedObjectModels\OSGeo.MapGuide.ExtendedObjectModels.csproj", "{B3A2B816-9F41-4857-A111-09D2DF2550D6}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -187,6 +197,10 @@
 		{F84E21EE-360C-46EC-BD01-E66F8D9F5B3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{F84E21EE-360C-46EC-BD01-E66F8D9F5B3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{F84E21EE-360C-46EC-BD01-E66F8D9F5B3E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B3A2B816-9F41-4857-A111-09D2DF2550D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B3A2B816-9F41-4857-A111-09D2DF2550D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B3A2B816-9F41-4857-A111-09D2DF2550D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B3A2B816-9F41-4857-A111-09D2DF2550D6}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

Modified: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Commands/StartupCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Commands/StartupCommand.cs	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Commands/StartupCommand.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -22,92 +22,16 @@
 using System.Text;
 using ICSharpCode.Core;
 using Maestro.Base;
-using OSGeo.MapGuide.MaestroAPI.Resource;
-using OSGeo.MapGuide.MaestroAPI;
+using OSGeo.MapGuide.ExtendedObjectModels;
 
-using Ldf110 = OSGeo.MapGuide.ObjectModels.LayerDefinition_1_1_0;
-using Ldf120 = OSGeo.MapGuide.ObjectModels.LayerDefinition_1_2_0;
-using Ldf130 = OSGeo.MapGuide.ObjectModels.LayerDefinition_1_3_0;
 
-using Lp110 = OSGeo.MapGuide.ObjectModels.LoadProcedure_1_1_0;
-using Lp220 = OSGeo.MapGuide.ObjectModels.LoadProcedure_2_2_0;
-using WL110 = OSGeo.MapGuide.ObjectModels.WebLayout_1_1_0;
-
-using Sym110 = OSGeo.MapGuide.ObjectModels.SymbolDefinition_1_1_0;
-
-using OSGeo.MapGuide.ObjectModels.LoadProcedure;
-using OSGeo.MapGuide.MaestroAPI.Resource.Validation;
-using OSGeo.MapGuide.ObjectModels;
-
 namespace Maestro.AddIn.ExtendedObjectModels.Commands
 {
     public class StartupCommand : AbstractCommand
     {
         public override void Run()
         {
-            //By default the ObjectFactory, ResourceTypeRegistry and ResourceValidatorSet only
-            //support v1.0.0 of all resource types. To support additional types we need to inject
-            //this information as part of the consuming application's init/startup process
-            //
-            //This is our application's entry point, so we do this here.
-
-            //Layer Definition 1.1.0
-            ResourceValidatorSet.RegisterValidator(new Ldf110.LayerDefinitionValidator());
-            ResourceTypeRegistry.RegisterResource(
-                new ResourceTypeDescriptor(ResourceTypes.LayerDefinition, "1.1.0"),
-                new ResourceSerializationCallback(Ldf110.LdfEntryPoint.Serialize),
-                new ResourceDeserializationCallback(Ldf110.LdfEntryPoint.Deserialize));
-            ObjectFactory.RegisterLayerFactoryMethod(new Version(1, 1, 0), new LayerCreatorFunc(Ldf110.LdfEntryPoint.CreateDefault));
-
-            //Layer Definition 1.2.0
-            ResourceValidatorSet.RegisterValidator(new Ldf120.LayerDefinitionValidator());
-            ResourceTypeRegistry.RegisterResource(
-                new ResourceTypeDescriptor(ResourceTypes.LayerDefinition, "1.2.0"),
-                new ResourceSerializationCallback(Ldf120.LdfEntryPoint.Serialize),
-                new ResourceDeserializationCallback(Ldf120.LdfEntryPoint.Deserialize));
-            ObjectFactory.RegisterLayerFactoryMethod(new Version(1, 2, 0), new LayerCreatorFunc(Ldf120.LdfEntryPoint.CreateDefault));
-
-            //Layer Definition 1.3.0
-            ResourceValidatorSet.RegisterValidator(new Ldf130.LayerDefinitionValidator());
-            ResourceTypeRegistry.RegisterResource(
-                new ResourceTypeDescriptor(ResourceTypes.LayerDefinition, "1.3.0"),
-                new ResourceSerializationCallback(Ldf130.LdfEntryPoint.Serialize),
-                new ResourceDeserializationCallback(Ldf130.LdfEntryPoint.Deserialize));
-            ObjectFactory.RegisterLayerFactoryMethod(new Version(1, 3, 0), new LayerCreatorFunc(Ldf130.LdfEntryPoint.CreateDefault));
-
-            //Load Procedure 1.1.0
-            ResourceValidatorSet.RegisterValidator(new Lp110.LoadProcedureValidator());
-            ResourceTypeRegistry.RegisterResource(
-                new ResourceTypeDescriptor(ResourceTypes.LoadProcedure, "1.1.0"),
-                new ResourceSerializationCallback(Lp110.LoadProcEntryPoint.Serialize),
-                new ResourceDeserializationCallback(Lp110.LoadProcEntryPoint.Deserialize));
-            
-            //Load Procedure 1.1.0 schema offers nothing new for the ones we want to support, so nothing to register
-            //with the ObjectFactory
-
-            //Load Procedure 2.2.0
-            ResourceValidatorSet.RegisterValidator(new Lp220.LoadProcedureValidator());
-            ResourceTypeRegistry.RegisterResource(
-                new ResourceTypeDescriptor(ResourceTypes.LoadProcedure, "2.2.0"),
-                new ResourceSerializationCallback(Lp220.LoadProcEntryPoint.Serialize),
-                new ResourceDeserializationCallback(Lp220.LoadProcEntryPoint.Deserialize));
-            ObjectFactory.RegisterLoadProcedureFactoryMethod(LoadType.Sqlite, new LoadProcCreatorFunc(Lp220.LoadProcEntryPoint.CreateDefaultSqlite));
-
-            //Web Layout 1.1.0
-            ResourceValidatorSet.RegisterValidator(new WL110.WebLayoutValidator());
-            ResourceTypeRegistry.RegisterResource(
-                new ResourceTypeDescriptor(ResourceTypes.WebLayout, "1.1.0"),
-                new ResourceSerializationCallback(WL110.WebLayoutEntryPoint.Serialize),
-                new ResourceDeserializationCallback(WL110.WebLayoutEntryPoint.Deserialize));
-            ObjectFactory.RegisterWebLayoutFactoryMethod(new Version(1, 1, 0), new WebLayoutCreatorFunc(WL110.WebLayoutEntryPoint.CreateDefault));
-
-            //Symbol Definition 1.1.0
-            ResourceTypeRegistry.RegisterResource(
-                new ResourceTypeDescriptor(ResourceTypes.SymbolDefinition, "1.1.0"),
-                new ResourceSerializationCallback(Sym110.SymbolDefEntryPoint.Serialize),
-                new ResourceDeserializationCallback(Sym110.SymbolDefEntryPoint.Deserialize));
-            ObjectFactory.RegisterCompoundSymbolFactoryMethod(new Version(1, 1, 0), new CompoundSymbolDefCreatorFunc(Sym110.SymbolDefEntryPoint.CreateDefaultCompound));
-            ObjectFactory.RegisterSimpleSymbolFactoryMethod(new Version(1, 1, 0), new SimpleSymbolDefCreatorFunc(Sym110.SymbolDefEntryPoint.CreateDefaultSimple));
+            ModelSetup.Initialize();
         }
     }
 }

Modified: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj	2011-06-30 14:26:06 UTC (rev 5960)
@@ -31,6 +31,8 @@
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <DocumentationFile>
+    </DocumentationFile>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Maestro.Editors, Version=3.0.0.5475, Culture=neutral, processorArchitecture=MSIL">
@@ -48,41 +50,6 @@
       <HintPath>..\SDK\bin\OSGeo.MapGuide.MaestroAPI.dll</HintPath>
       <Private>False</Private>
     </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0, Version=3.0.0.5610, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
-    <Reference Include="OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=f526c48929fda856, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SDK\bin\OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Data" />
     <Reference Include="System.Drawing" />
@@ -101,6 +68,9 @@
       <DesignTime>True</DesignTime>
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
+    <Compile Include="Templates\WatermarkDefinition230ItemTemplate.cs" />
+    <Compile Include="Templates\MapDefinition230ItemTemplate.cs" />
+    <Compile Include="Templates\VectorLayer230ItemTemplate.cs" />
     <Compile Include="Templates\SQLiteLoadProcedureItemTemplate.cs" />
     <Compile Include="Templates\SymbolDefinition110ItemTemplate.cs" />
     <Compile Include="Templates\VectorLayer130ItemTemplate.cs" />
@@ -112,6 +82,7 @@
     <Content Include="Manifest.addin">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <None Include="Resources\edit.png" />
     <None Include="Resources\marker.png" />
     <None Include="Resources\application-browser.png" />
     <None Include="Resources\map.png" />
@@ -126,6 +97,11 @@
       <Name>Maestro.Base</Name>
       <Private>False</Private>
     </ProjectReference>
+    <ProjectReference Include="..\OSGeo.MapGuide.ExtendedObjectModels\OSGeo.MapGuide.ExtendedObjectModels.csproj">
+      <Project>{B3A2B816-9F41-4857-A111-09D2DF2550D6}</Project>
+      <Name>OSGeo.MapGuide.ExtendedObjectModels</Name>
+      <Private>False</Private>
+    </ProjectReference>
     <ProjectReference Include="..\Thirdparty\SharpDevelop\ICSharpCode.Core\ICSharpCode.Core.csproj">
       <Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
       <Name>ICSharpCode.Core</Name>

Modified: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Manifest.addin
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Manifest.addin	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Manifest.addin	2011-06-30 14:26:06 UTC (rev 5960)
@@ -28,6 +28,12 @@
         <Class id="VectorLayerDefinition110" class="Maestro.AddIn.ExtendedObjectModels.Templates.VectorLayer110ItemTemplate" />
         <Class id="VectorLayerDefinition120" class="Maestro.AddIn.ExtendedObjectModels.Templates.VectorLayer120ItemTemplate" />
         <Class id="VectorLayerDefinition130" class="Maestro.AddIn.ExtendedObjectModels.Templates.VectorLayer130ItemTemplate" />
+        <Class id="VectorLayerDefinition230" class="Maestro.AddIn.ExtendedObjectModels.Templates.VectorLayer230ItemTemplate" />
+        <Class id="MapDefinition230" class="Maestro.AddIn.ExtendedObjectModels.Templates.MapDefinition230ItemTemplate" />
+        <Class id="WatermarkDefinitionSimple230" class="Maestro.AddIn.ExtendedObjectModels.Templates.WatermarkDefinitionSimple230ItemTemplate" />
+        <!--
+        <Class id="WatermarkDefinitionCompound230" class="Maestro.AddIn.ExtendedObjectModels.Templates.WatermarkDefinitionCompound230ItemTemplate" />
+        -->
         <Class id="SQLiteLoadProcedure" class="Maestro.AddIn.ExtendedObjectModels.Templates.SQLiteLoadProcedureItemTemplate" />
         <Class id="WebLayout110" class="Maestro.AddIn.ExtendedObjectModels.Templates.WebLayout110ItemTemplate" />
     </Path>

Modified: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -99,6 +99,13 @@
             }
         }
         
+        internal static System.Drawing.Bitmap edit {
+            get {
+                object obj = ResourceManager.GetObject("edit", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to SQLite Files|*.sqlite;*.db;*.slt;*.sdx.
         /// </summary>
@@ -173,6 +180,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to MapGuide Open Source 2.3 / Autodesk Infrastructure Map Server 2012.
+        /// </summary>
+        internal static string TPL_CATEGORY_MGOS23 {
+            get {
+                return ResourceManager.GetString("TPL_CATEGORY_MGOS23", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Create a new Compund Symbol Definition using the v1.1.0 schema.
         /// </summary>
         internal static string TPL_CSD_DESC {
@@ -209,6 +225,24 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to Create a new Map Definition using the v2.3.0 schema.
+        /// </summary>
+        internal static string TPL_MDF_230_DESC {
+            get {
+                return ResourceManager.GetString("TPL_MDF_230_DESC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Map Definition (v2.3.0).
+        /// </summary>
+        internal static string TPL_MDF_230_NAME {
+            get {
+                return ResourceManager.GetString("TPL_MDF_230_NAME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Create a new Simple Symbol Definition using the v1.1.0 schema.
         /// </summary>
         internal static string TPL_SSD_DESC {
@@ -281,6 +315,60 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to Create a new Vector Layer Definition using the v2.3.0 schema.
+        /// </summary>
+        internal static string TPL_VLDF_230_DESC {
+            get {
+                return ResourceManager.GetString("TPL_VLDF_230_DESC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Vector Layer Definition (v2.3.0).
+        /// </summary>
+        internal static string TPL_VLDF_230_NAME {
+            get {
+                return ResourceManager.GetString("TPL_VLDF_230_NAME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Create a new Watermark Definition using the v2.3.0 schema based on a Compound Symbol Definition.
+        /// </summary>
+        internal static string TPL_WDFC_230_DESC {
+            get {
+                return ResourceManager.GetString("TPL_WDFC_230_DESC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Watermark Definition - Compound (v2.3.0).
+        /// </summary>
+        internal static string TPL_WDFC_230_NAME {
+            get {
+                return ResourceManager.GetString("TPL_WDFC_230_NAME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Create a new Watermark Definition using the v2.3.0 schema based on a Simple Symbol Definition.
+        /// </summary>
+        internal static string TPL_WDFS_230_DESC {
+            get {
+                return ResourceManager.GetString("TPL_WDFS_230_DESC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Watermark Definition - Simple (v2.3.0).
+        /// </summary>
+        internal static string TPL_WDFS_230_NAME {
+            get {
+                return ResourceManager.GetString("TPL_WDFS_230_NAME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Create a new Web Layout using the v1.1.0 schema.
         /// </summary>
         internal static string TPL_WL_110_DESC {

Modified: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx	2011-06-30 14:26:06 UTC (rev 5960)
@@ -202,4 +202,34 @@
   <data name="marker" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\marker.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="TPL_CATEGORY_MGOS23" xml:space="preserve">
+    <value>MapGuide Open Source 2.3 / Autodesk Infrastructure Map Server 2012</value>
+  </data>
+  <data name="TPL_MDF_230_DESC" xml:space="preserve">
+    <value>Create a new Map Definition using the v2.3.0 schema</value>
+  </data>
+  <data name="TPL_MDF_230_NAME" xml:space="preserve">
+    <value>Map Definition (v2.3.0)</value>
+  </data>
+  <data name="TPL_VLDF_230_DESC" xml:space="preserve">
+    <value>Create a new Vector Layer Definition using the v2.3.0 schema</value>
+  </data>
+  <data name="TPL_VLDF_230_NAME" xml:space="preserve">
+    <value>Vector Layer Definition (v2.3.0)</value>
+  </data>
+  <data name="TPL_WDFC_230_DESC" xml:space="preserve">
+    <value>Create a new Watermark Definition using the v2.3.0 schema based on a Compound Symbol Definition</value>
+  </data>
+  <data name="TPL_WDFC_230_NAME" xml:space="preserve">
+    <value>Watermark Definition - Compound (v2.3.0)</value>
+  </data>
+  <data name="edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\edit.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="TPL_WDFS_230_DESC" xml:space="preserve">
+    <value>Create a new Watermark Definition using the v2.3.0 schema based on a Simple Symbol Definition</value>
+  </data>
+  <data name="TPL_WDFS_230_NAME" xml:space="preserve">
+    <value>Watermark Definition - Simple (v2.3.0)</value>
+  </data>
 </root>
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Resources/edit.png
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Resources/edit.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Copied: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/MapDefinition230ItemTemplate.cs (from rev 5837, trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer130ItemTemplate.cs)
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/MapDefinition230ItemTemplate.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/MapDefinition230ItemTemplate.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -0,0 +1,56 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Maestro.Base.Templates;
+using Res = Maestro.AddIn.ExtendedObjectModels.Properties.Resources;
+using OSGeo.MapGuide.MaestroAPI;
+using Maestro.Editors.Generic;
+using OSGeo.MapGuide.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+
+namespace Maestro.AddIn.ExtendedObjectModels.Templates
+{
+    internal class MapDefinition230ItemTemplate : ItemTemplate
+    {
+        public MapDefinition230ItemTemplate()
+        {
+            Category = Res.TPL_CATEGORY_MGOS23;
+            Icon = Res.map;
+            Description = Res.TPL_MDF_230_DESC;
+            Name = Res.TPL_MDF_230_NAME;
+            ResourceType = ResourceTypes.LayerDefinition.ToString();
+        }
+
+        public override Version MinimumSiteVersion
+        {
+            get
+            {
+                return new Version(2, 3);
+            }
+        }
+
+        public override OSGeo.MapGuide.MaestroAPI.Resource.IResource CreateItem(string startPoint, OSGeo.MapGuide.MaestroAPI.IServerConnection conn)
+        {
+            return ObjectFactory.CreateMapDefinition(conn, new Version(2, 3, 0), "");
+        }
+    }
+}

Copied: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer230ItemTemplate.cs (from rev 5837, trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer130ItemTemplate.cs)
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer230ItemTemplate.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer230ItemTemplate.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -0,0 +1,74 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Maestro.Base.Templates;
+using Res = Maestro.AddIn.ExtendedObjectModels.Properties.Resources;
+using OSGeo.MapGuide.MaestroAPI;
+using Maestro.Editors.Generic;
+using OSGeo.MapGuide.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+
+namespace Maestro.AddIn.ExtendedObjectModels.Templates
+{
+    internal class VectorLayer230ItemTemplate : ItemTemplate
+    {
+        public VectorLayer230ItemTemplate()
+        {
+            Category = Res.TPL_CATEGORY_MGOS23;
+            Icon = Res.layer;
+            Description = Res.TPL_VLDF_230_DESC;
+            Name = Res.TPL_VLDF_230_NAME;
+            ResourceType = ResourceTypes.LayerDefinition.ToString();
+        }
+
+        public override Version MinimumSiteVersion
+        {
+            get
+            {
+                return new Version(2, 3);
+            }
+        }
+
+        public override OSGeo.MapGuide.MaestroAPI.Resource.IResource CreateItem(string startPoint, OSGeo.MapGuide.MaestroAPI.IServerConnection conn)
+        {
+            using (var picker = new ResourcePicker(conn.ResourceService, ResourceTypes.FeatureSource, ResourcePickerMode.OpenResource))
+            {
+                picker.SetStartingPoint(startPoint);
+                if (picker.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+                {
+                    var lyr = ObjectFactory.CreateDefaultLayer(conn, OSGeo.MapGuide.ObjectModels.LayerDefinition.LayerType.Vector, new Version(2, 3, 0));
+                    var vl = (IVectorLayerDefinition)lyr.SubLayer;
+                    vl.ResourceId = picker.ResourceID;
+                    //Stub these for now, validation will ensure this never makes it
+                    //into the session repository until all validation errors pass
+                    vl.FeatureName = string.Empty;
+                    vl.Geometry = string.Empty;
+                    return lyr;
+                }
+                else
+                {
+                    return null;
+                }
+            }
+        }
+    }
+}

Copied: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/WatermarkDefinition230ItemTemplate.cs (from rev 5837, trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer130ItemTemplate.cs)
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/WatermarkDefinition230ItemTemplate.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/WatermarkDefinition230ItemTemplate.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -0,0 +1,83 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Maestro.Base.Templates;
+using Res = Maestro.AddIn.ExtendedObjectModels.Properties.Resources;
+using OSGeo.MapGuide.MaestroAPI;
+using Maestro.Editors.Generic;
+using OSGeo.MapGuide.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+using OSGeo.MapGuide.ObjectModels.WatermarkDefinition;
+using OSGeo.MapGuide.ObjectModels.SymbolDefinition;
+
+namespace Maestro.AddIn.ExtendedObjectModels.Templates
+{
+    internal class WatermarkDefinitionSimple230ItemTemplate : ItemTemplate
+    {
+        public WatermarkDefinitionSimple230ItemTemplate()
+        {
+            Category = Res.TPL_CATEGORY_MGOS23;
+            Icon = Res.edit;
+            Description = Res.TPL_WDFS_230_DESC;
+            Name = Res.TPL_WDFS_230_NAME;
+            ResourceType = ResourceTypes.LayerDefinition.ToString();
+        }
+
+        public override Version MinimumSiteVersion
+        {
+            get
+            {
+                return new Version(2, 3);
+            }
+        }
+
+        public override OSGeo.MapGuide.MaestroAPI.Resource.IResource CreateItem(string startPoint, OSGeo.MapGuide.MaestroAPI.IServerConnection conn)
+        {
+            return ObjectFactory.CreateWatermark(conn, SymbolDefinitionType.Simple, new Version(2, 3, 0));
+        }
+    }
+
+    internal class WatermarkDefinitionCompound230ItemTemplate : ItemTemplate
+    {
+        public WatermarkDefinitionCompound230ItemTemplate()
+        {
+            Category = Res.TPL_CATEGORY_MGOS23;
+            Icon = Res.edit;
+            Description = Res.TPL_WDFC_230_DESC;
+            Name = Res.TPL_WDFC_230_NAME;
+            ResourceType = ResourceTypes.LayerDefinition.ToString();
+        }
+
+        public override Version MinimumSiteVersion
+        {
+            get
+            {
+                return new Version(2, 3);
+            }
+        }
+
+        public override OSGeo.MapGuide.MaestroAPI.Resource.IResource CreateItem(string startPoint, OSGeo.MapGuide.MaestroAPI.IServerConnection conn)
+        {
+            return ObjectFactory.CreateWatermark(conn, SymbolDefinitionType.Compound, new Version(2, 3, 0));
+        }
+    }
+}

Modified: trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -2293,7 +2293,7 @@
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Create a new Map Definition.
+        ///   Looks up a localized string similar to Create a new Map Definition using the v1.0.0 schema.
         /// </summary>
         internal static string TPL_MDF_DESC {
             get {
@@ -2302,7 +2302,7 @@
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Map Definition.
+        ///   Looks up a localized string similar to Map Definition (v1.0.0).
         /// </summary>
         internal static string TPL_MDF_NAME {
             get {

Modified: trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx	2011-06-30 14:26:06 UTC (rev 5960)
@@ -437,10 +437,10 @@
     <value>SHP Load Procedure</value>
   </data>
   <data name="TPL_MDF_DESC" xml:space="preserve">
-    <value>Create a new Map Definition</value>
+    <value>Create a new Map Definition using the v1.0.0 schema</value>
   </data>
   <data name="TPL_MDF_NAME" xml:space="preserve">
-    <value>Map Definition</value>
+    <value>Map Definition (v1.0.0)</value>
   </data>
   <data name="TPL_PL_DESC" xml:space="preserve">
     <value>Create a new Print Layout</value>


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


Added: trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/ModelSetup.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/ModelSetup.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/ModelSetup.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -0,0 +1,153 @@
+#region Disclaimer / License
+// Copyright (C) 2011, 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
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Runtime.CompilerServices;
+
+using OSGeo.MapGuide.MaestroAPI.Resource;
+using OSGeo.MapGuide.MaestroAPI;
+
+using Ldf110 = OSGeo.MapGuide.ObjectModels.LayerDefinition_1_1_0;
+using Ldf120 = OSGeo.MapGuide.ObjectModels.LayerDefinition_1_2_0;
+using Ldf130 = OSGeo.MapGuide.ObjectModels.LayerDefinition_1_3_0;
+using Ldf230 = OSGeo.MapGuide.ObjectModels.LayerDefinition_2_3_0;
+
+using Lp110 = OSGeo.MapGuide.ObjectModels.LoadProcedure_1_1_0;
+using Lp220 = OSGeo.MapGuide.ObjectModels.LoadProcedure_2_2_0;
+using WL110 = OSGeo.MapGuide.ObjectModels.WebLayout_1_1_0;
+
+using Sym110 = OSGeo.MapGuide.ObjectModels.SymbolDefinition_1_1_0;
+
+using Mdf230 = OSGeo.MapGuide.ObjectModels.MapDefinition_2_3_0;
+
+using Wdf230 = OSGeo.MapGuide.ObjectModels.WatermarkDefinition_2_3_0;
+
+using OSGeo.MapGuide.ObjectModels.LoadProcedure;
+using OSGeo.MapGuide.MaestroAPI.Resource.Validation;
+using OSGeo.MapGuide.ObjectModels;
+
+namespace OSGeo.MapGuide.ExtendedObjectModels
+{
+    /// <summary>
+    /// <c>OSGeo.MapGuide.ExtendedObjectModels</c> provides the <see cref="ModelSetup"/> utility class, which
+    /// provides a convenient method of registering all known resources with schema versions greater than v1.0.0 
+    /// 
+    /// </summary>
+    [CompilerGenerated]
+    public class NsDoc { }
+
+    public static class ModelSetup
+    {
+        /// <summary>
+        /// Registers validators, serializers and instance factories of all known extended resource data types.
+        /// 
+        /// Invoke this method as part of your application's startup process before using any other part of the Maestro API
+        /// </summary>
+        public static void Initialize()
+        {
+            //By default the ObjectFactory, ResourceTypeRegistry and ResourceValidatorSet only
+            //support v1.0.0 of all resource types. To support additional types we need to inject
+            //this information as part of the consuming application's init/startup process
+            //
+            //This is our application's entry point, so we do this here.
+
+            //Layer Definition 1.1.0
+            ResourceValidatorSet.RegisterValidator(new Ldf110.LayerDefinitionValidator());
+            ResourceTypeRegistry.RegisterResource(
+                new ResourceTypeDescriptor(ResourceTypes.LayerDefinition, "1.1.0"),
+                new ResourceSerializationCallback(Ldf110.LdfEntryPoint.Serialize),
+                new ResourceDeserializationCallback(Ldf110.LdfEntryPoint.Deserialize));
+            ObjectFactory.RegisterLayerFactoryMethod(new Version(1, 1, 0), new LayerCreatorFunc(Ldf110.LdfEntryPoint.CreateDefault));
+
+            //Layer Definition 1.2.0
+            ResourceValidatorSet.RegisterValidator(new Ldf120.LayerDefinitionValidator());
+            ResourceTypeRegistry.RegisterResource(
+                new ResourceTypeDescriptor(ResourceTypes.LayerDefinition, "1.2.0"),
+                new ResourceSerializationCallback(Ldf120.LdfEntryPoint.Serialize),
+                new ResourceDeserializationCallback(Ldf120.LdfEntryPoint.Deserialize));
+            ObjectFactory.RegisterLayerFactoryMethod(new Version(1, 2, 0), new LayerCreatorFunc(Ldf120.LdfEntryPoint.CreateDefault));
+
+            //Layer Definition 1.3.0
+            ResourceValidatorSet.RegisterValidator(new Ldf130.LayerDefinitionValidator());
+            ResourceTypeRegistry.RegisterResource(
+                new ResourceTypeDescriptor(ResourceTypes.LayerDefinition, "1.3.0"),
+                new ResourceSerializationCallback(Ldf130.LdfEntryPoint.Serialize),
+                new ResourceDeserializationCallback(Ldf130.LdfEntryPoint.Deserialize));
+            ObjectFactory.RegisterLayerFactoryMethod(new Version(1, 3, 0), new LayerCreatorFunc(Ldf130.LdfEntryPoint.CreateDefault));
+
+            //Layer Definition 1.3.0
+            ResourceValidatorSet.RegisterValidator(new Ldf130.LayerDefinitionValidator());
+            ResourceTypeRegistry.RegisterResource(
+                new ResourceTypeDescriptor(ResourceTypes.LayerDefinition, "2.3.0"),
+                new ResourceSerializationCallback(Ldf230.LdfEntryPoint.Serialize),
+                new ResourceDeserializationCallback(Ldf230.LdfEntryPoint.Deserialize));
+            ObjectFactory.RegisterLayerFactoryMethod(new Version(2, 3, 0), new LayerCreatorFunc(Ldf230.LdfEntryPoint.CreateDefault));
+
+            //Load Procedure 1.1.0
+            ResourceValidatorSet.RegisterValidator(new Lp110.LoadProcedureValidator());
+            ResourceTypeRegistry.RegisterResource(
+                new ResourceTypeDescriptor(ResourceTypes.LoadProcedure, "1.1.0"),
+                new ResourceSerializationCallback(Lp110.LoadProcEntryPoint.Serialize),
+                new ResourceDeserializationCallback(Lp110.LoadProcEntryPoint.Deserialize));
+
+            //Load Procedure 1.1.0 schema offers nothing new for the ones we want to support, so nothing to register
+            //with the ObjectFactory
+
+            //Load Procedure 2.2.0
+            ResourceValidatorSet.RegisterValidator(new Lp220.LoadProcedureValidator());
+            ResourceTypeRegistry.RegisterResource(
+                new ResourceTypeDescriptor(ResourceTypes.LoadProcedure, "2.2.0"),
+                new ResourceSerializationCallback(Lp220.LoadProcEntryPoint.Serialize),
+                new ResourceDeserializationCallback(Lp220.LoadProcEntryPoint.Deserialize));
+            ObjectFactory.RegisterLoadProcedureFactoryMethod(LoadType.Sqlite, new LoadProcCreatorFunc(Lp220.LoadProcEntryPoint.CreateDefaultSqlite));
+
+            //Web Layout 1.1.0
+            ResourceValidatorSet.RegisterValidator(new WL110.WebLayoutValidator());
+            ResourceTypeRegistry.RegisterResource(
+                new ResourceTypeDescriptor(ResourceTypes.WebLayout, "1.1.0"),
+                new ResourceSerializationCallback(WL110.WebLayoutEntryPoint.Serialize),
+                new ResourceDeserializationCallback(WL110.WebLayoutEntryPoint.Deserialize));
+            ObjectFactory.RegisterWebLayoutFactoryMethod(new Version(1, 1, 0), new WebLayoutCreatorFunc(WL110.WebLayoutEntryPoint.CreateDefault));
+
+            //Symbol Definition 1.1.0
+            ResourceTypeRegistry.RegisterResource(
+                new ResourceTypeDescriptor(ResourceTypes.SymbolDefinition, "1.1.0"),
+                new ResourceSerializationCallback(Sym110.SymbolDefEntryPoint.Serialize),
+                new ResourceDeserializationCallback(Sym110.SymbolDefEntryPoint.Deserialize));
+            ObjectFactory.RegisterCompoundSymbolFactoryMethod(new Version(1, 1, 0), new CompoundSymbolDefCreatorFunc(Sym110.SymbolDefEntryPoint.CreateDefaultCompound));
+            ObjectFactory.RegisterSimpleSymbolFactoryMethod(new Version(1, 1, 0), new SimpleSymbolDefCreatorFunc(Sym110.SymbolDefEntryPoint.CreateDefaultSimple));
+
+            //Map Definition 2.3.0
+            ResourceTypeRegistry.RegisterResource(
+                new ResourceTypeDescriptor(ResourceTypes.MapDefinition, "2.3.0"),
+                new ResourceSerializationCallback(Mdf230.MdfEntryPoint.Serialize),
+                new ResourceDeserializationCallback(Mdf230.MdfEntryPoint.Deserialize));
+            ObjectFactory.RegisterMapDefinitionFactoryMethod(new Version(2, 3, 0), new MapDefinitionCreatorFunc(Mdf230.MdfEntryPoint.CreateDefault));
+
+            //Watermark Definition 2.3.0
+            ResourceTypeRegistry.RegisterResource(
+                new ResourceTypeDescriptor(ResourceTypes.WatermarkDefinition, "2.3.0"),
+                new ResourceSerializationCallback(Wdf230.WdfEntryPoint.Serialize),
+                new ResourceDeserializationCallback(Wdf230.WdfEntryPoint.Deserialize));
+            ObjectFactory.RegisterWatermarkDefinitionFactoryMethod(new Version(2, 3, 0), new WatermarkCreatorFunc(Wdf230.WdfEntryPoint.CreateDefault));
+        }
+    }
+}

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/OSGeo.MapGuide.ExtendedObjectModels.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/OSGeo.MapGuide.ExtendedObjectModels.csproj	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/OSGeo.MapGuide.ExtendedObjectModels.csproj	2011-06-30 14:26:06 UTC (rev 5960)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{B3A2B816-9F41-4857-A111-09D2DF2550D6}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>OSGeo.MapGuide.ExtendedObjectModels</RootNamespace>
+    <AssemblyName>OSGeo.MapGuide.ExtendedObjectModels</AssemblyName>
+    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</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>
+    <DocumentationFile>bin\Release\OSGeo.MapGuide.ExtendedObjectModels.XML</DocumentationFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ModelSetup.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\ExtendedModels\LayerDefinition-1.1.0\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0.csproj">
+      <Project>{B5EA049C-6AB7-4686-A2F4-4BA2EAC0E585}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\LayerDefinition-1.2.0\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0.csproj">
+      <Project>{EDDB0F74-6FE7-4969-80B0-817A629722CD}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\LayerDefinition-1.3.0\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0.csproj">
+      <Project>{AC5068F6-CFBE-4BCD-B68B-062725E424D4}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\LayerDefinition-2.3.0\OSGeo.MapGuide.ObjectModels.LayerDefinition-2.3.0.csproj">
+      <Project>{F976A709-D9DB-407E-A4CD-2CEA31C6B1D9}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.LayerDefinition-2.3.0</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\LoadProcedure-1.1.0\OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0.csproj">
+      <Project>{B2A1F69E-52AA-42A2-8DED-89ADB9B14A38}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\LoadProcedure-2.2.0\OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0.csproj">
+      <Project>{D525B343-66D6-4D6B-9A55-78A173D94A51}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\MapDefinition-2.3.0\OSGeo.MapGuide.ObjectModels.MapDefinition-2.3.0.csproj">
+      <Project>{C8DB3E77-3AF4-471D-A214-69DBEB32750E}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.MapDefinition-2.3.0</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\SymbolDefinition-1.1.0\OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0.csproj">
+      <Project>{BF6E996E-27AF-44CD-B3CF-A40874E15B2E}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\WatermarkDefinition-2.3.0\OSGeo.MapGuide.ObjectModels.WatermarkDefinition-2.3.0.csproj">
+      <Project>{F84E21EE-360C-46EC-BD01-E66F8D9F5B3E}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.WatermarkDefinition-2.3.0</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\WebLayout-1.1.0\OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0.csproj">
+      <Project>{0A93ACA8-5B21-44E6-B0B7-5D1E72D3A6A2}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\OSGeo.MapGuide.MaestroAPI\OSGeo.MapGuide.MaestroAPI.csproj">
+      <Project>{80FA3158-8B5F-48D1-A393-0378AFE48A7E}</Project>
+      <Name>OSGeo.MapGuide.MaestroAPI</Name>
+    </ProjectReference>
+  </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.ExtendedObjectModels/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/Properties/AssemblyInfo.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ExtendedObjectModels/Properties/AssemblyInfo.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -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.ExtendedObjectModels")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("OSGeo.MapGuide.ExtendedObjectModels")]
+[assembly: AssemblyCopyright("Copyright ©  2011")]
+[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("59a0a5e6-9ed7-4600-82e6-f48a993354bf")]
+
+// 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("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinition.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinition.cs	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinition.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -29,6 +29,7 @@
 using OSGeo.MapGuide.ObjectModels.MapDefinition;
 using System.ComponentModel;
 using OSGeo.MapGuide.ObjectModels.WatermarkDefinition;
+using System.IO;
 
 #pragma warning disable 1591, 0114, 0108
 
@@ -70,14 +71,49 @@
         }
     }
 
+    public static class MdfEntryPoint
+    {
+        public static MapDefinition CreateDefault()
+        {
+            return new MapDefinition()
+            {
+                Name = "",
+                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>(),
+            };
+        }
+
+        public static IResource Deserialize(string xml)
+        {
+            return MapDefinition.Deserialize(xml);
+        }
+
+        public static Stream Serialize(IResource res)
+        {
+            return res.SerializeToStream();
+        }
+    }
+
     partial class MapDefinition : IMapDefinition
 #if MDF_230
         , IMapDefinition2
 #endif
     {
-        internal MapDefinition() { }
+        internal MapDefinition() 
+        { 
+#if MDF_230
+            this.versionField = "2.3.0";
+#endif
+        }
 
+#if 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 OSGeo.MapGuide.MaestroAPI.IServerConnection CurrentConnection
@@ -139,7 +175,11 @@
         [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")]
         public string ValidatingSchema 
         { 
+#if MDF_230
+            get { return "MapDefinition-2.3.0.xsd"; }
+#else
             get { return "MapDefinition-1.0.0.xsd"; }
+#endif
             set { }
         }
 

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/ObjectFactory.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/ObjectFactory.cs	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/ObjectFactory.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -38,6 +38,7 @@
 using OSGeo.MapGuide.ObjectModels.WebLayout;
 using OSGeo.MapGuide.ObjectModels.ApplicationDefinition_1_0_0;
 using System.Collections.Specialized;
+using OSGeo.MapGuide.ObjectModels.WatermarkDefinition;
 
 namespace OSGeo.MapGuide.ObjectModels
 {
@@ -58,9 +59,19 @@
     /// </summary>
     public delegate ICompoundSymbolDefinition CompoundSymbolDefCreatorFunc();
     /// <summary>
-    /// Factory methods signature for creating simple symbol definitions
+    /// Factory method signature for creating simple symbol definitions
     /// </summary>
     public delegate ISimpleSymbolDefinition SimpleSymbolDefCreatorFunc();
+    /// <summary>
+    /// Factory method signature for creating watermarks
+    /// </summary>
+    /// <returns></returns>
+    public delegate IWatermarkDefinition WatermarkCreatorFunc(SymbolDefinitionType type);
+    /// <summary>
+    /// Factory method signature for creating map definitions
+    /// </summary>
+    /// <returns></returns>
+    public delegate IMapDefinition MapDefinitionCreatorFunc();
 
     /// <summary>
     /// Factory class to create MapGuide resource objects with either pre-defined or
@@ -84,6 +95,8 @@
         private static Dictionary<Version, WebLayoutCreatorFunc> _wlFactories;
         private static Dictionary<Version, SimpleSymbolDefCreatorFunc> _simpleSymbolFactories;
         private static Dictionary<Version, CompoundSymbolDefCreatorFunc> _compoundSymbolFactories;
+        private static Dictionary<Version, MapDefinitionCreatorFunc> _mapDefinitionFactories;
+        private static Dictionary<Version, WatermarkCreatorFunc> _watermarkFactories;
         
         static ObjectFactory()
         {
@@ -92,6 +105,8 @@
             _loadProcFactories = new Dictionary<LoadType, LoadProcCreatorFunc>();
             _simpleSymbolFactories = new Dictionary<Version, SimpleSymbolDefCreatorFunc>();
             _compoundSymbolFactories = new Dictionary<Version, CompoundSymbolDefCreatorFunc>();
+            _mapDefinitionFactories = new Dictionary<Version, MapDefinitionCreatorFunc>();
+            _watermarkFactories = new Dictionary<Version, WatermarkCreatorFunc>();
 
             _layerFactories.Add(
                 new Version(1, 0, 0),
@@ -118,6 +133,10 @@
             _simpleSymbolFactories.Add(
                 new Version(1, 0, 0),
                 new SimpleSymbolDefCreatorFunc(OSGeo.MapGuide.ObjectModels.SymbolDefinition_1_0_0.SimpleSymbolDefinition.CreateDefault));
+
+            _mapDefinitionFactories.Add(
+                new Version(1, 0, 0),
+                new MapDefinitionCreatorFunc(OSGeo.MapGuide.ObjectModels.MapDefinition_1_0_0.MdfEntryPoint.CreateDefault));
         }
 
         /// <summary>
@@ -186,6 +205,32 @@
         }
 
         /// <summary>
+        /// Register the map definition factory method
+        /// </summary>
+        /// <param name="version"></param>
+        /// <param name="method"></param>
+        public static void RegisterMapDefinitionFactoryMethod(Version version, MapDefinitionCreatorFunc method)
+        {
+            if (_mapDefinitionFactories.ContainsKey(version))
+                throw new ArgumentException(OSGeo.MapGuide.MaestroAPI.Properties.Resources.FactoryMethodAlreadyRegistered + version);
+
+            _mapDefinitionFactories[version] = method;
+        }
+
+        /// <summary>
+        /// Registers the Watermark Definition factory method
+        /// </summary>
+        /// <param name="version"></param>
+        /// <param name="method"></param>
+        public static void RegisterWatermarkDefinitionFactoryMethod(Version version, WatermarkCreatorFunc method)
+        {
+            if (_watermarkFactories.ContainsKey(version))
+                throw new ArgumentException(OSGeo.MapGuide.MaestroAPI.Properties.Resources.FactoryMethodAlreadyRegistered + version);
+
+            _watermarkFactories[version] = method;
+        }
+
+        /// <summary>
         /// Creates the web layout.
         /// </summary>
         /// <param name="owner">The owner.</param>
@@ -301,36 +346,62 @@
         }
 
         /// <summary>
+        /// Create a Watermark Definition
+        /// </summary>
+        /// <param name="owner"></param>
+        /// <param name="type"></param>
+        /// <returns></returns>
+        public static IWatermarkDefinition CreateWatermark(IServerConnection owner, SymbolDefinitionType type)
+        {
+            Check.NotNull(owner, "owner");
+            return CreateWatermark(owner, type, owner.Capabilities.GetMaxSupportedResourceVersion(ResourceTypes.WatermarkDefinition));
+        }
+
+        /// <summary>
+        /// Creates a Watermark Definition
+        /// </summary>
+        /// <param name="owner"></param>
+        /// <param name="type"></param>
+        /// <param name="version"></param>
+        /// <returns></returns>
+        public static IWatermarkDefinition CreateWatermark(IServerConnection owner, SymbolDefinitionType type, Version version)
+        {
+            Check.NotNull(owner, "owner");
+
+            if (!_watermarkFactories.ContainsKey(version))
+                throw new ArgumentException(OSGeo.MapGuide.MaestroAPI.Properties.Resources.UnknownWatermarkDefinitionVersion + version.ToString());
+
+            return _watermarkFactories[version](type);
+        }
+
+        /// <summary>
         /// Creates the map definition.
         /// </summary>
-        /// <param name="owner">The owner.</param>
-        /// <param name="name">The name.</param>
+        /// <param name="owner"></param>
+        /// <param name="version"></param>
+        /// <param name="name"></param>
         /// <returns></returns>
-        public static IMapDefinition CreateMapDefinition(IServerConnection owner, string name)
+        public static IMapDefinition CreateMapDefinition(IServerConnection owner, Version version, string name)
         {
             Check.NotNull(owner, "owner");
 
-            return new OSGeo.MapGuide.ObjectModels.MapDefinition_1_0_0.MapDefinition() { 
-                CurrentConnection = owner,
-                CoordinateSystem = string.Empty,
-                Extents = new OSGeo.MapGuide.ObjectModels.MapDefinition_1_0_0.Box2DType() { MaxX = 0.0, MaxY = 0.0, MinX = 0.0, MinY = 0.0 },
-                Name = name,
-                BackgroundColor = Color.White,
-                MapLayer = new System.ComponentModel.BindingList<OSGeo.MapGuide.ObjectModels.MapDefinition_1_0_0.MapLayerType>(),
-                MapLayerGroup = new System.ComponentModel.BindingList<OSGeo.MapGuide.ObjectModels.MapDefinition_1_0_0.MapLayerGroupType>(),
-            };
+            if (!_mapDefinitionFactories.ContainsKey(version))
+                throw new ArgumentException(OSGeo.MapGuide.MaestroAPI.Properties.Resources.UnknownMapDefinitionVersion + version.ToString());
+
+            return _mapDefinitionFactories[version]();
         }
 
         /// <summary>
         /// Creates the map definition.
         /// </summary>
-        /// <param name="owner">The owner.</param>
-        /// <param name="name">The name.</param>
-        /// <param name="coordinateSystemWkt">The coordinate system WKT.</param>
+        /// <param name="owner"></param>
+        /// <param name="ver"></param>
+        /// <param name="name"></param>
+        /// <param name="coordinateSystemWkt"></param>
         /// <returns></returns>
-        public static IMapDefinition CreateMapDefinition(IServerConnection owner, string name, string coordinateSystemWkt)
+        public static IMapDefinition CreateMapDefinition(IServerConnection owner, Version ver, string name, string coordinateSystemWkt)
         {
-            var map = CreateMapDefinition(owner, name);
+            var map = CreateMapDefinition(owner, ver, name);
             map.CoordinateSystem = coordinateSystemWkt;
 
             return map;
@@ -339,22 +410,65 @@
         /// <summary>
         /// Creates the map definition.
         /// </summary>
-        /// <param name="owner">The owner.</param>
-        /// <param name="name">The name.</param>
-        /// <param name="coordinateSystemWkt">The coordinate system WKT.</param>
-        /// <param name="env">The env.</param>
+        /// <param name="owner"></param>
+        /// <param name="ver"></param>
+        /// <param name="name"></param>
+        /// <param name="coordinateSystemWkt"></param>
+        /// <param name="env"></param>
         /// <returns></returns>
-        public static IMapDefinition CreateMapDefinition(IServerConnection owner, string name, string coordinateSystemWkt, IEnvelope env)
+        public static IMapDefinition CreateMapDefinition(IServerConnection owner, Version ver, string name, string coordinateSystemWkt, IEnvelope env)
         {
-            var map = CreateMapDefinition(owner, name, coordinateSystemWkt);
+            var map = CreateMapDefinition(owner, ver, name, coordinateSystemWkt);
             map.Extents = env;
 
             return map;
         }
 
         /// <summary>
-        /// Creates the simple symbol.
+        /// Creates the map definition.
         /// </summary>
+        /// <param name="owner"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static IMapDefinition CreateMapDefinition(IServerConnection owner, string name)
+        {
+            Check.NotNull(owner, "owner");
+
+            return CreateMapDefinition(owner, owner.Capabilities.GetMaxSupportedResourceVersion(ResourceTypes.MapDefinition), name);
+        }
+
+        /// <summary>
+        /// Creates the map definition.
+        /// </summary>
+        /// <param name="owner"></param>
+        /// <param name="name"></param>
+        /// <param name="coordinateSystemWkt"></param>
+        /// <returns></returns>
+        public static IMapDefinition CreateMapDefinition(IServerConnection owner, string name, string coordinateSystemWkt)
+        {
+            Check.NotNull(owner, "owner");
+
+            return CreateMapDefinition(owner, owner.Capabilities.GetMaxSupportedResourceVersion(ResourceTypes.MapDefinition), name, coordinateSystemWkt);
+        }
+
+        /// <summary>
+        /// Creates the map definition.
+        /// </summary>
+        /// <param name="owner"></param>
+        /// <param name="name"></param>
+        /// <param name="coordinateSystemWkt"></param>
+        /// <param name="env"></param>
+        /// <returns></returns>
+        public static IMapDefinition CreateMapDefinition(IServerConnection owner, string name, string coordinateSystemWkt, IEnvelope env)
+        {
+            Check.NotNull(owner, "owner");
+
+            return CreateMapDefinition(owner, owner.Capabilities.GetMaxSupportedResourceVersion(ResourceTypes.MapDefinition), name, coordinateSystemWkt, env);
+        }
+
+        /// <summary>
+        /// Creates a simple symbol definition.
+        /// </summary>
         /// <param name="owner">The owner.</param>
         /// <returns></returns>
         public static ISimpleSymbolDefinition CreateSimpleSymbol(IServerConnection owner, Version version, string name, string description)
@@ -372,7 +486,7 @@
         }
 
         /// <summary>
-        /// Creates the simple symbol. The schema version used is the highest supported one by the connection 
+        /// Creates a simple symbol definition. The schema version used is the highest supported one by the connection 
         /// </summary>
         /// <param name="owner"></param>
         /// <param name="name"></param>

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefinition.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefinition.cs	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefinition.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -40,6 +40,8 @@
 {
     abstract partial class SymbolDefinitionBase : ISymbolDefinitionBase
     {
+        public abstract void RemoveSchemaAttributes();
+
 #if SYM_DEF_110
         private static readonly Version RES_VERSION = new Version(1, 1, 0);
 #else
@@ -124,7 +126,7 @@
 
     partial class SimpleSymbolDefinition : ISimpleSymbolDefinition
     {
-        internal void RemoveSchemaAttributes()
+        public override void RemoveSchemaAttributes()
         {
             _vschema = null;
             versionField = null;
@@ -650,6 +652,12 @@
 
     partial class CompoundSymbolDefinition : ICompoundSymbolDefinition
     {
+        public override void RemoveSchemaAttributes()
+        {
+            _vschema = null;
+            versionField = null;
+        }
+
         public static CompoundSymbolDefinition CreateDefault()
         {
             var sym = new CompoundSymbolDefinition()

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs	2011-06-30 14:26:06 UTC (rev 5960)
@@ -980,6 +980,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to Unknown Map Definition version: .
+        /// </summary>
+        internal static string UnknownMapDefinitionVersion {
+            get {
+                return ResourceManager.GetString("UnknownMapDefinitionVersion", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Unknown Symbol Definition version: .
         /// </summary>
         internal static string UnknownSymbolDefVersion {
@@ -989,8 +998,17 @@
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Unknown web layout version: .
+        ///   Looks up a localized string similar to Unknown Watermark Definition version: .
         /// </summary>
+        internal static string UnknownWatermarkDefinitionVersion {
+            get {
+                return ResourceManager.GetString("UnknownWatermarkDefinitionVersion", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Unknown Web Layout version: .
+        /// </summary>
         internal static string UnknownWebLayoutVersion {
             get {
                 return ResourceManager.GetString("UnknownWebLayoutVersion", resourceCulture);

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx	2011-06-30 14:26:06 UTC (rev 5960)
@@ -401,7 +401,7 @@
     <value>Unknown layer version: </value>
   </data>
   <data name="UnknownWebLayoutVersion" xml:space="preserve">
-    <value>Unknown web layout version: </value>
+    <value>Unknown Web Layout version: </value>
   </data>
   <data name="UnsupportedLoadProcedureType" xml:space="preserve">
     <value>Unsupported Load Procedure Type</value>
@@ -509,4 +509,10 @@
   <data name="ERR_NOT_RESOURCE_CONTENT_XML" xml:space="preserve">
     <value>XML content does not match any known resource</value>
   </data>
+  <data name="UnknownMapDefinitionVersion" xml:space="preserve">
+    <value>Unknown Map Definition version: </value>
+  </data>
+  <data name="UnknownWatermarkDefinitionVersion" xml:space="preserve">
+    <value>Unknown Watermark Definition version: </value>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/SDK/SDK.sln
===================================================================
--- trunk/Tools/Maestro/SDK/SDK.sln	2011-06-29 12:28:54 UTC (rev 5959)
+++ trunk/Tools/Maestro/SDK/SDK.sln	2011-06-30 14:26:06 UTC (rev 5960)
@@ -41,6 +41,8 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSGeo.MapGuide.ObjectModels.WatermarkDefinition-2.3.0", "..\ExtendedModels\WatermarkDefinition-2.3.0\OSGeo.MapGuide.ObjectModels.WatermarkDefinition-2.3.0.csproj", "{F84E21EE-360C-46EC-BD01-E66F8D9F5B3E}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSGeo.MapGuide.ExtendedObjectModels", "..\OSGeo.MapGuide.ExtendedObjectModels\OSGeo.MapGuide.ExtendedObjectModels.csproj", "{B3A2B816-9F41-4857-A111-09D2DF2550D6}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -127,6 +129,10 @@
 		{F84E21EE-360C-46EC-BD01-E66F8D9F5B3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{F84E21EE-360C-46EC-BD01-E66F8D9F5B3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{F84E21EE-360C-46EC-BD01-E66F8D9F5B3E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B3A2B816-9F41-4857-A111-09D2DF2550D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B3A2B816-9F41-4857-A111-09D2DF2550D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B3A2B816-9F41-4857-A111-09D2DF2550D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B3A2B816-9F41-4857-A111-09D2DF2550D6}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE



More information about the mapguide-commits mailing list