[mapguide-commits] r5483 - in sandbox/maestro-3.0:
Maestro.Editors/MapDefinition OSGeo.MapGuide.MaestroAPI/Schema
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Dec 22 03:54:59 EST 2010
Author: jng
Date: 2010-12-22 00:54:59 -0800 (Wed, 22 Dec 2010)
New Revision: 5483
Modified:
sandbox/maestro-3.0/Maestro.Editors/MapDefinition/MapSettingsSectionCtrl.cs
sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/ClassDefinition.cs
sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/DataPropertyDefinition.cs
sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/FeatureSchema.cs
sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs
sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/PropertyDefinition.cs
Log:
FDO decode any relevant strings when deserializing ClassDefinition objects from XML
Modified: sandbox/maestro-3.0/Maestro.Editors/MapDefinition/MapSettingsSectionCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/MapDefinition/MapSettingsSectionCtrl.cs 2010-12-22 06:37:17 UTC (rev 5482)
+++ sandbox/maestro-3.0/Maestro.Editors/MapDefinition/MapSettingsSectionCtrl.cs 2010-12-22 08:54:59 UTC (rev 5483)
@@ -185,6 +185,12 @@
txtCoordinateSystem.Text = cs;
if (_map.Extents != null && !string.IsNullOrEmpty(oldCs) && !string.IsNullOrEmpty(cs) && !oldCs.Equals(cs))
{
+ //NOTE: We really should be using CS-Map (MgCoordinateSystem) here as its
+ //transformation capabilities are more comprehensive, but we'd break mono
+ //compatibility by doing so. Unless of course, Linux swig'd assemblies are
+ //identical to the windows one, allowing for a clean swap of the DllImport'ed
+ //native library
+
//Transform current extents
try
{
Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/ClassDefinition.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/ClassDefinition.cs 2010-12-22 06:37:17 UTC (rev 5482)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/ClassDefinition.cs 2010-12-22 08:54:59 UTC (rev 5483)
@@ -353,7 +353,7 @@
//Now write class body
var ctype = doc.CreateElement("xs", "complexType", XmlNamespaces.XS);
- ctype.SetAttribute("name", this.Name + "Type");
+ ctype.SetAttribute("name", this.Name + "Type"); //TODO: This may have been decoded. Should it be re-encoded?
ctype.SetAttribute("abstract", this.IsAbstract.ToString().ToLower());
if (!string.IsNullOrEmpty(this.DefaultGeometryPropertyName))
{
Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/DataPropertyDefinition.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/DataPropertyDefinition.cs 2010-12-22 06:37:17 UTC (rev 5482)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/DataPropertyDefinition.cs 2010-12-22 08:54:59 UTC (rev 5483)
@@ -21,6 +21,7 @@
using System.Collections.Generic;
using System.Text;
using System.Globalization;
+using System.Xml;
namespace OSGeo.MapGuide.MaestroAPI.Schema
{
@@ -130,7 +131,7 @@
public override void WriteXml(System.Xml.XmlDocument doc, System.Xml.XmlNode currentNode)
{
var prop = doc.CreateElement("xs", "element", XmlNamespaces.XS);
- prop.SetAttribute("name", this.Name);
+ prop.SetAttribute("name", this.Name); //TODO: This may have been decoded. Should it be re-encoded?
prop.SetAttribute("minOccurs", this.IsNullable ? "0" : "1");
if (this.IsReadOnly)
prop.SetAttribute("readOnly", XmlNamespaces.FDO, this.IsReadOnly.ToString().ToLower());
Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/FeatureSchema.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/FeatureSchema.cs 2010-12-22 06:37:17 UTC (rev 5482)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/FeatureSchema.cs 2010-12-22 08:54:59 UTC (rev 5483)
@@ -149,7 +149,7 @@
if (nn == null)
throw new Exception("Bad document. Expected attribute: name"); //LOCALIZEME
- string name = nn.Value.Substring(0, nn.Value.Length - "Type".Length);
+ string name = Utility.DecodeFDOName(nn.Value.Substring(0, nn.Value.Length - "Type".Length));
ClassDefinition cls = new ClassDefinition(name, string.Empty); //TODO: Description
cls.ReadXml(clsNode, mgr);
this.AddClass(cls);
Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs 2010-12-22 06:37:17 UTC (rev 5482)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs 2010-12-22 08:54:59 UTC (rev 5483)
@@ -20,6 +20,7 @@
using System;
using System.Collections.Generic;
using System.Text;
+using System.Xml;
namespace OSGeo.MapGuide.MaestroAPI.Schema
{
@@ -78,7 +79,7 @@
public override void WriteXml(System.Xml.XmlDocument doc, System.Xml.XmlNode currentNode)
{
var geom = doc.CreateElement("xs", "element", XmlNamespaces.XS);
- geom.SetAttribute("name", this.Name);
+ geom.SetAttribute("name", this.Name); //TODO: This may have been decoded. Should it be re-encoded?
geom.SetAttribute("type", "gml:AbstractGeometryType");
geom.SetAttribute("hasMeasure", XmlNamespaces.FDO, this.HasMeasure.ToString().ToLower());
geom.SetAttribute("hasElevation", XmlNamespaces.FDO, this.HasElevation.ToString().ToLower());
Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/PropertyDefinition.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/PropertyDefinition.cs 2010-12-22 06:37:17 UTC (rev 5482)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Schema/PropertyDefinition.cs 2010-12-22 08:54:59 UTC (rev 5483)
@@ -20,6 +20,7 @@
using System;
using System.Collections.Generic;
using System.Text;
+using System.Xml;
namespace OSGeo.MapGuide.MaestroAPI.Schema
{
@@ -82,7 +83,7 @@
var nn = node.Attributes["name"];
var nulln = node.Attributes["minOccurs"];
- string name = nn.Value;
+ string name = Utility.DecodeFDOName(nn.Value);
string desc = string.Empty;
if (node.Attributes["type"] != null && node.Attributes["type"].Value == "gml:AbstractGeometryType")
More information about the mapguide-commits
mailing list