[mapguide-commits] r8030 - trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Apr 10 05:06:56 PDT 2014


Author: jng
Date: 2014-04-10 05:06:55 -0700 (Thu, 10 Apr 2014)
New Revision: 8030

Modified:
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/FeatureSourceValidator.cs
Log:
#2424: Remove identity property check in Feature Source validation. This check only needs to be done when validating a Map Definition to test for selectability (implemented in r8029). When validating a Feature Source itself, we don't really care and given the informational level of the validation result it's not worth the potentially poor performance for some FDO providers on large schemas that don't support the GetClassNames/GetSchemaNames/DescribeSchema-with-class-hint triplet.

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/FeatureSourceValidator.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/FeatureSourceValidator.cs	2014-04-10 11:46:06 UTC (rev 8029)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/FeatureSourceValidator.cs	2014-04-10 12:06:55 UTC (rev 8030)
@@ -208,25 +208,6 @@
                 }
             }
 
-            var classNames = featSvc.GetClassNames(feature.ResourceID, null);
-            foreach (var className in classNames)
-            {
-                try 
-                {
-                    string[] idProps = featSvc.GetIdentityProperties(feature.ResourceID, className);
-                    if (idProps.Length == 0)
-                        issues.Add(new ValidationIssue(feature, ValidationStatus.Information, ValidationStatusCode.Info_FeatureSource_NoPrimaryKey, string.Format(Strings.FS_PrimaryKeyMissingInformation, className)));
-                }
-                catch (Exception ex)
-                {
-                    string msg = NestedExceptionMessageProcessor.GetFullMessage(ex);
-                    //#1403 workaround
-                    if (msg.Contains("MgClassNotFound")) //NOXLATE
-                        issues.Add(new ValidationIssue(feature, ValidationStatus.Information, ValidationStatusCode.Info_FeatureSource_NoPrimaryKey, string.Format(Strings.FS_PrimaryKeyMissingInformation, className)));
-                    else
-                        issues.Add(new ValidationIssue(feature, ValidationStatus.Error, ValidationStatusCode.Error_FeatureSource_SchemaReadError, string.Format(Strings.FS_SchemaReadError, msg)));
-                }
-            }
             context.MarkValidated(resource.ResourceID);
 
             return issues.ToArray();



More information about the mapguide-commits mailing list