[mapguide-commits] r5841 -
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue May 24 07:38:54 EDT 2011
Author: jng
Date: 2011-05-24 04:38:54 -0700 (Tue, 24 May 2011)
New Revision: 5841
Modified:
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/BaseWebLayoutValidator.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/MapDefinitionValidator.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/ValidationStatusCode.cs
Log:
#1319: API documentation for validation status codes
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/BaseWebLayoutValidator.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/BaseWebLayoutValidator.cs 2011-05-24 11:10:02 UTC (rev 5840)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/BaseWebLayoutValidator.cs 2011-05-24 11:38:54 UTC (rev 5841)
@@ -101,7 +101,7 @@
{
ICommandItem cmdRef = (ICommandItem)item;
if (!cmds.ContainsKey(cmdRef.Command))
- issues.Add(new ValidationIssue(layout, ValidationStatus.Error, ValidationStatusCode.Error_WebLayout_NonExistentCommandReference, string.Format(Properties.Resources.WL_NonExistentMenuCommandReference, cmdRef.Command)));
+ issues.Add(new ValidationIssue(layout, ValidationStatus.Error, ValidationStatusCode.Error_WebLayout_NonExistentContextMenuCommandReference, string.Format(Properties.Resources.WL_NonExistentMenuCommandReference, cmdRef.Command)));
}
}
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/MapDefinitionValidator.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/MapDefinitionValidator.cs 2011-05-24 11:10:02 UTC (rev 5840)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/MapDefinitionValidator.cs 2011-05-24 11:38:54 UTC (rev 5841)
@@ -93,7 +93,7 @@
foreach (IBaseMapLayer l in layers)
{
if (nameCounter.ContainsKey(l.Name))
- issues.Add(new ValidationIssue(mdef, ValidationStatus.Warning, ValidationStatusCode.Warning_MapDefinition_DuplicateLayerName, string.Format(Properties.Resources.MDF_LayerNameDuplicateWarning, l.Name, l.ResourceId, nameCounter[l.Name].ResourceId)));
+ issues.Add(new ValidationIssue(mdef, ValidationStatus.Warning, ValidationStatusCode.Error_MapDefinition_DuplicateLayerName, string.Format(Properties.Resources.MDF_LayerNameDuplicateWarning, l.Name, l.ResourceId, nameCounter[l.Name].ResourceId)));
else
nameCounter.Add(l.Name, l);
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/ValidationStatusCode.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/ValidationStatusCode.cs 2011-05-24 11:10:02 UTC (rev 5840)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/Validation/ValidationStatusCode.cs 2011-05-24 11:38:54 UTC (rev 5841)
@@ -23,94 +23,336 @@
namespace OSGeo.MapGuide.MaestroAPI.Resource.Validation
{
+ /// <summary>
+ /// A validation status code that is attached to a specific validation issue, allowing for programmatic handling
+ /// of certain validation issues should they occur
+ /// </summary>
public enum ValidationStatusCode : int
{
+ /// <summary>
+ /// Placeholder
+ /// </summary>
Dummy = 0,
#region information
+ /// <summary>
+ /// No primary key found in feature source. Does affect layer selection if a layer is based on this feature source
+ /// </summary>
Info_FeatureSource_NoPrimaryKey = 1001,
+ /// <summary>
+ /// No coordinate system found in drawing source. Affects re-projection if referencing layer is housed in a Map Definition
+ /// </summary>
Info_DrawingSource_NoCoordinateSpace = 1011,
+ /// <summary>
+ /// A layer group has no label. Results in no text when displayed in the viewer legend
+ /// </summary>
Info_MapDefinition_GroupMissingLabelInformation = 1101,
+
+ /// <summary>
+ /// A layer group has a default label assigned to it.
+ /// </summary>
Info_MapDefinition_GroupHasDefaultLabel,
+
+ /// <summary>
+ ///
+ /// </summary>
Info_MapDefinition_MultipleSpatialContexts,
+ /// <summary>
+ /// One or more scale ranges overlap. Can affect presentation of data.
+ /// </summary>
Info_LayerDefinition_ScaleRangeOverlap = 1201,
#endregion
#region warnings
+ /// <summary>
+ /// Placeholder validation warning
+ /// </summary>
Warning_General_ValidationWarning = 3001,
+
+ /// <summary>
+ /// No validation was found for the specified resource and/or version
+ /// </summary>
Warning_General_NoRegisteredValidatorForResource,
+ /// <summary>
+ /// Feature Source has no spatial context. Affects re-projection if referencing layer is housed in a Map Definition
+ /// </summary>
Warning_FeatureSource_NoSpatialContext = 3101,
+
+ /// <summary>
+ /// Feature Source has an empty spatial context
+ /// </summary>
Warning_FeatureSource_EmptySpatialContext,
+
+ /// <summary>
+ /// Feature Source has a spatial context with what appears to be system-generated bounds. This usually makes extent queries or
+ /// operations that rely on a data store's extents (eg. Layer Previews) unreliable
+ /// </summary>
Warning_FeatureSource_DefaultSpatialContext,
+
+ /// <summary>
+ /// No feature schemas found in feature source. Layers referencing this feature source have nothing to show and style.
+ /// </summary>
Warning_FeatureSource_NoSchemasFound,
+ /// <summary>
+ /// DWG Load Procedures not supported. This is a limitation of Maestro
+ /// </summary>
Warning_LoadProcedure_DwgNotSupported = 3201,
+
+ /// <summary>
+ /// Raster Load Procedures not supported. This is a limitation of Maestro
+ /// </summary>
Warning_LoadProcedure_RasterNotSupported,
+
+ /// <summary>
+ /// SDF2 options not supported for a SDF Load Procedure. This is a limitation of Maestro
+ /// </summary>
Warning_LoadProcedure_Sdf2OptionsNotSupported,
+
+ /// <summary>
+ /// Generalization options not supported for file-based Load Procedures. This is a limitation of Maestro
+ /// </summary>
Warning_LoadProcedure_GeneralizationNotSupported,
+
+ /// <summary>
+ /// Convert to SDF (3.0) option not supported for file-based Load Procedures. This is a limitation of Maestro
+ /// </summary>
Warning_LoadProcedure_ConvertToSdf3NotSupported,
+
+ /// <summary>
+ /// A source file referenced in a Load Procedure could not be found. This can happen if executing this Load Procedure on a different client machine.
+ /// </summary>
Warning_LoadProcedure_SourceFileNotFound,
- Warning_MapDefinition_DuplicateLayerName = 3301,
- Warning_MapDefinition_LayerMissingLegendLabel,
+ /// <summary>
+ /// A layer in a Map Definition has no legend label. Results in not text displayed in the viewer legend.
+ /// </summary>
+ Warning_MapDefinition_LayerMissingLegendLabel = 3301,
+
Warning_MapDefinition_MissingSpatialContext,
+
+ /// <summary>
+ /// One or more layers in a Map Definition have different coordinate system than the one declared in the Map Definition. This will normally incur a
+ /// minor performance penalty when rendering due to on-the-fly reprojection of data. In some cases, this is unavoidable.
+ /// </summary>
Warning_MapDefinition_LayerReprojection,
+
+ /// <summary>
+ /// One or more layers in a Map Definition has data that lies outside of the extents in the Map Definition. This normally means the user would have
+ /// to manually pan outside the extents to see this data.
+ /// </summary>
Warning_MapDefinition_DataOutsideMapBounds,
+ /// <summary>
+ /// The specified initial view parameters lie outside the referenced Map Definition's extents. Usually means you will see nothing when the Fusion viewer loads.
+ /// </summary>
Warning_Fusion_InitialViewOutsideMapExtents = 3401,
+
+ /// <summary>
+ /// The specified map definition's coordinate system is not WGS84.PseudoMercator. This is a requirement for integrating with Google/Yahoo/Bing commerical layers
+ /// </summary>
Warning_Fusion_MapCoordSysIncompatibleWithCommericalLayers,
+ /// <summary>
+ /// Unrecognised layer type
+ /// </summary>
Warning_LayerDefinition_UnsupportedLayerType = 3501,
+
+ /// <summary>
+ /// Multiple raster scale ranges were found
+ /// </summary>
Warning_LayerDefinition_MultipleGridScaleRanges,
+ /// <summary>
+ /// The web layout's initial view lies outside the referenced map definition's extents. Usually means you will see nothing when the AJAX viewer loads.
+ /// </summary>
Warning_WebLayout_InitialViewOutsideMapExtents = 3601,
#endregion
#region errors
+ /// <summary>
+ /// General validation error that couldn't be categorized
+ /// </summary>
Error_General_ValidationError = 5001,
+ /// <summary>
+ /// One or more connection parameters for the feature source are invalid.
+ /// </summary>
Error_FeatureSource_ConnectionTestFailed = 5101,
+
+ /// <summary>
+ /// Unclassified error when reading spatial contexts
+ /// </summary>
Error_FeatureSource_SpatialContextReadError,
+
+ /// <summary>
+ /// Unclassified error when describing a schema
+ /// </summary>
Error_FeatureSource_SchemaReadError,
+ /// <summary>
+ /// No finite display scales defined for a map definition that contains tiled layers.
+ /// </summary>
Error_MapDefinition_NoFiniteDisplayScales = 5201,
+
+ /// <summary>
+ /// A raster layer in a Map Definition has a different coordinate system from the one that is declared in the
+ /// Map Definition and the MapGuide Server we're connecting to does not support the raster re-projection feature (MGOS 2.0 or earlier)
+ /// </summary>
Error_MapDefinition_RasterReprojection,
+
+ /// <summary>
+ /// Unclassified error when reading a resource
+ /// </summary>
Error_MapDefinition_ResourceRead,
+
+ /// <summary>
+ /// Unclassified error when reading a feature source
+ /// </summary>
Error_MapDefinition_FeatureSourceRead,
+
+ /// <summary>
+ /// Unclassified error when reading a layer definition
+ /// </summary>
Error_MapDefinition_LayerRead,
+
+ /// <summary>
+ /// A layer belongs to a layer group that doesn't exist
+ /// </summary>
Error_MapDefinition_LayerWithNonExistentGroup,
+
+ /// <summary>
+ /// A layer group belongs to a layer group that doesn't exist
+ /// </summary>
Error_MapDefinition_GroupWithNonExistentGroup,
+ /// <summary>
+ /// A layer with an already existing name was found. Layer names must be unique
+ /// </summary>
+ Error_MapDefinition_DuplicateLayerName = 3301,
+
+ /// <summary>
+ /// The Fusion Application Definition has no Maps or Map Groups
+ /// </summary>
Error_Fusion_MissingMap = 5301,
+
+ /// <summary>
+ /// The referenced Map definition doesn't exist
+ /// </summary>
Error_Fusion_InvalidMap,
+
+ /// <summary>
+ /// Unclassified error validating the referenced map definition
+ /// </summary>
Error_Fusion_MapValidationError,
+ /// <summary>
+ /// Unclassifed validation error
+ /// </summary>
Error_LayerDefinition_Generic = 5401,
+
+ /// <summary>
+ /// The specified geometry property does not exist in the specified feature class
+ /// </summary>
Error_LayerDefinition_GeometryNotFound,
+
+ /// <summary>
+ /// The specified feature class does not exist in the specified feature source
+ /// </summary>
Error_LayerDefinition_ClassNotFound,
+
+ /// <summary>
+ /// Unclassified error loading the referenced feature source
+ /// </summary>
Error_LayerDefinition_FeatureSourceLoadError,
+
+ /// <summary>
+ /// A specified drawing source sheet layer does not exist in the specified sheet of the specified Drawing Source
+ /// </summary>
Error_LayerDefinition_DrawingSourceSheetLayerNotFound,
+
+ /// <summary>
+ /// The specified sheet does not exist in the specified Drawing Source.
+ /// </summary>
Error_LayerDefinition_DrawingSourceSheetNotFound,
+
+ /// <summary>
+ /// Unclassified error validating or loading the referenced Drawing Source
+ /// </summary>
Error_LayerDefinition_DrawingSourceError,
+
+ /// <summary>
+ /// No Grid scale ranges were found in this Raster Layer
+ /// </summary>
Error_LayerDefinition_NoGridScaleRanges,
+
+ /// <summary>
+ /// The min scale and max scale values are swapped.
+ /// </summary>
Error_LayerDefinition_MinMaxScaleSwapped,
+
+ /// <summary>
+ /// The vector layer has no scale ranges.
+ /// </summary>
Error_LayerDefinition_MissingScaleRanges,
+
+ /// <summary>
+ /// There is no specified geometry property (as opposed to a geometry property specified, but doesn't exist)
+ /// </summary>
Error_LayerDefinition_MissingGeometry,
+
+ /// <summary>
+ /// There is no specified feature source (as opposed to a feature source specified, but doesn't exist)
+ /// </summary>
Error_LayerDefinition_MissingFeatureSource,
+
+ /// <summary>
+ /// Cannot determine the layer sub-type
+ /// </summary>
Error_LayerDefinition_LayerNull,
+ /// <summary>
+ /// Unclassified validation error
+ /// </summary>
Error_WebLayout_Generic = 5501,
+
+ /// <summary>
+ /// A toolbar item references a command that doesn't exist
+ /// </summary>
Error_WebLayout_NonExistentToolbarCommandReference,
+
+ /// <summary>
+ /// A task pane item references a command that doesn't exist
+ /// </summary>
Error_WebLayout_NonExistentTaskPaneCommandReference,
- Error_WebLayout_NonExistentCommandReference,
+
+ /// <summary>
+ /// A context menu item references a command that doesn't exist
+ /// </summary>
+ Error_WebLayout_NonExistentContextMenuCommandReference,
+
+ /// <summary>
+ /// A search result column references the same feature property.
+ /// </summary>
Error_WebLayout_DuplicateSearchCommandResultColumn,
+
+ /// <summary>
+ /// One or more commands have the same name
+ /// </summary>
Error_WebLayout_DuplicateCommandName,
+
+ /// <summary>
+ /// No Map Definition specified.
+ /// </summary>
Error_WebLayout_MissingMap,
+ /// <summary>
+ /// Source DWF file not specified
+ /// </summary>
Error_DrawingSource_NoSourceDwf = 5601,
#endregion
}
More information about the mapguide-commits
mailing list