Index: Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs =================================================================== diff -u -rd72d28f9d51c5bc4c7bb0f49509e3656465cc22c -rc7608335f86c59fff48f77d5bc83b2692ef18fef --- Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs (.../FeatureBasedMapDataConverter.cs) (revision d72d28f9d51c5bc4c7bb0f49509e3656465cc22c) +++ Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs (.../FeatureBasedMapDataConverter.cs) (revision c7608335f86c59fff48f77d5bc83b2692ef18fef) @@ -35,77 +35,77 @@ namespace Core.Components.DotSpatial.Converter { /// - /// Abstract base class for transforming into . + /// Abstract base class for transforming into . /// - /// The type of map data to convert. + /// The type of feature based map data to convert. /// The type of map feature layer to set the converted data to. - public abstract class FeatureBasedMapDataConverter : IFeatureBasedMapDataConverter - where TMapData : MapData + public abstract class FeatureBasedMapDataConverter : IFeatureBasedMapDataConverter + where TFeatureBasedMapData : FeatureBasedMapData where TMapFeatureLayer : IMapFeatureLayer { /// /// Needed because DotSpatial can't handle special characters. /// Therefore we create an id as column name for the data table in the featureSet. - /// We need this lookup to match the selected attribute from the MapData with the created id. + /// We need this lookup to match the selected attribute from the FeatureBasedMapData with the created id. /// private readonly Dictionary columnLookup; /// - /// Creates a new instance of + /// Creates a new instance of /// protected FeatureBasedMapDataConverter() { columnLookup = new Dictionary(); } - public bool CanConvertMapData(MapData data) + public bool CanConvertMapData(FeatureBasedMapData data) { - return data is TMapData; + return data is TFeatureBasedMapData; } - public IMapFeatureLayer Convert(MapData data) + public IMapFeatureLayer Convert(FeatureBasedMapData data) { ValidateParameters(data); - return Convert((TMapData) data); + return Convert((TFeatureBasedMapData) data); } - public void ConvertLayerFeatures(MapData data, IMapFeatureLayer layer) + public void ConvertLayerFeatures(FeatureBasedMapData data, IMapFeatureLayer layer) { ValidateParameters(data); - ConvertLayerFeatures((TMapData) data, (TMapFeatureLayer) layer); + ConvertLayerFeatures((TFeatureBasedMapData) data, (TMapFeatureLayer) layer); } - public void ConvertLayerProperties(MapData data, IMapFeatureLayer layer) + public void ConvertLayerProperties(FeatureBasedMapData data, IMapFeatureLayer layer) { ValidateParameters(data); - ConvertLayerProperties((TMapData) data, (TMapFeatureLayer) layer); + ConvertLayerProperties((TFeatureBasedMapData) data, (TMapFeatureLayer) layer); } /// /// Creates a based on the that was given. /// /// The data to transform into a . /// A new . - protected abstract IMapFeatureLayer Convert(TMapData data); + protected abstract IMapFeatureLayer Convert(TFeatureBasedMapData data); /// /// Converts all feature related data from to . /// Any features already part of are cleared. /// /// The data to convert the feature related data from. /// The layer to convert the feature related data to. - protected abstract void ConvertLayerFeatures(TMapData data, TMapFeatureLayer layer); + protected abstract void ConvertLayerFeatures(TFeatureBasedMapData data, TMapFeatureLayer layer); /// - /// Converts all general properties (like and ) + /// Converts all general properties (like and ) /// from to . /// /// The data to convert the general properties from. /// The layer to convert the general properties to. - protected abstract void ConvertLayerProperties(TMapData data, TMapFeatureLayer layer); + protected abstract void ConvertLayerProperties(TFeatureBasedMapData data, TMapFeatureLayer layer); /// /// Converts an of to an @@ -171,7 +171,7 @@ return labelLayer; } - private void ValidateParameters(MapData data) + private void ValidateParameters(FeatureBasedMapData data) { if (data == null) { Index: Core/Components/src/Core.Components.DotSpatial/Converter/IFeatureBasedMapDataConverter.cs =================================================================== diff -u -rd72d28f9d51c5bc4c7bb0f49509e3656465cc22c -rc7608335f86c59fff48f77d5bc83b2692ef18fef --- Core/Components/src/Core.Components.DotSpatial/Converter/IFeatureBasedMapDataConverter.cs (.../IFeatureBasedMapDataConverter.cs) (revision d72d28f9d51c5bc4c7bb0f49509e3656465cc22c) +++ Core/Components/src/Core.Components.DotSpatial/Converter/IFeatureBasedMapDataConverter.cs (.../IFeatureBasedMapDataConverter.cs) (revision c7608335f86c59fff48f77d5bc83b2692ef18fef) @@ -26,17 +26,17 @@ namespace Core.Components.DotSpatial.Converter { /// - /// The interface for a converter which converts into . + /// The interface for a converter which converts into . /// public interface IFeatureBasedMapDataConverter { /// /// Checks whether the can convert the . /// - /// The to check for. + /// The to check for. /// true if the can be converted by the /// , false otherwise. - bool CanConvertMapData(MapData data); + bool CanConvertMapData(FeatureBasedMapData data); /// /// Creates a based on the that was given. @@ -45,21 +45,21 @@ /// A new . /// Thrown when returns false. /// Thrown when is null. - IMapFeatureLayer Convert(MapData data); + IMapFeatureLayer Convert(FeatureBasedMapData data); /// /// Converts all feature related data from to . /// /// The data to convert the feature related data from. /// The layer to convert the feature related data to. - void ConvertLayerFeatures(MapData data, IMapFeatureLayer layer); + void ConvertLayerFeatures(FeatureBasedMapData data, IMapFeatureLayer layer); /// - /// Converts all general properties (like and ) + /// Converts all general properties (like and ) /// from to . /// /// The data to convert the general properties from. /// The layer to convert the general properties to. - void ConvertLayerProperties(MapData data, IMapFeatureLayer layer); + void ConvertLayerProperties(FeatureBasedMapData data, IMapFeatureLayer layer); } } \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial/Converter/MapFeatureLayerFactory.cs =================================================================== diff -u -rd72d28f9d51c5bc4c7bb0f49509e3656465cc22c -rc7608335f86c59fff48f77d5bc83b2692ef18fef --- Core/Components/src/Core.Components.DotSpatial/Converter/MapFeatureLayerFactory.cs (.../MapFeatureLayerFactory.cs) (revision d72d28f9d51c5bc4c7bb0f49509e3656465cc22c) +++ Core/Components/src/Core.Components.DotSpatial/Converter/MapFeatureLayerFactory.cs (.../MapFeatureLayerFactory.cs) (revision c7608335f86c59fff48f77d5bc83b2692ef18fef) @@ -28,17 +28,17 @@ namespace Core.Components.DotSpatial.Converter { /// - /// A factory to create data from which can be used on the map. + /// A factory to create data from which can be used on the map. /// public static class MapFeatureLayerFactory { /// /// Creates a from the given . /// - /// The to base the creation of upon. + /// The to base the creation of upon. /// A new layer based on . /// Thrown when the given type is not supported. - public static IMapFeatureLayer Create(MapData data) + public static IMapFeatureLayer Create(FeatureBasedMapData data) { var converters = new Collection { @@ -52,7 +52,7 @@ return converter.Convert(data); } - throw new NotSupportedException(string.Format("MapData of type {0} is not supported.", data.GetType().Name)); + throw new NotSupportedException(string.Format("FeatureBasedMapData of type {0} is not supported.", data.GetType().Name)); } /// @@ -61,7 +61,7 @@ /// The data to convert the feature related data from. /// The layer to convert the feature related data to. /// Thrown when the given type is not supported. - public static void ConvertLayerFeatures(MapData data, IMapFeatureLayer layer) + public static void ConvertLayerFeatures(FeatureBasedMapData data, IMapFeatureLayer layer) { var converter = GetFeatureBasedMapDataConverter(data); if (converter != null) @@ -70,17 +70,17 @@ } else { - throw new NotSupportedException(string.Format("MapData of type {0} is not supported.", data.GetType().Name)); + throw new NotSupportedException(string.Format("FeatureBasedMapData of type {0} is not supported.", data.GetType().Name)); } } /// - /// Converts all general properties (like and ) + /// Converts all general properties (like and ) /// from to . /// /// The data to convert the general properties from. /// The layer to convert the general properties to. - public static void ConvertLayerProperties(MapData data, IMapFeatureLayer layer) + public static void ConvertLayerProperties(FeatureBasedMapData data, IMapFeatureLayer layer) { var converter = GetFeatureBasedMapDataConverter(data); if (converter != null) @@ -89,11 +89,11 @@ } else { - throw new NotSupportedException(string.Format("MapData of type {0} is not supported.", data.GetType().Name)); + throw new NotSupportedException(string.Format("FeatureBasedMapData of type {0} is not supported.", data.GetType().Name)); } } - private static IFeatureBasedMapDataConverter GetFeatureBasedMapDataConverter(MapData data) + private static IFeatureBasedMapDataConverter GetFeatureBasedMapDataConverter(FeatureBasedMapData data) { return new Collection { Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs =================================================================== diff -u -rd72d28f9d51c5bc4c7bb0f49509e3656465cc22c -rc7608335f86c59fff48f77d5bc83b2692ef18fef --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs (.../FeatureBasedMapDataConverterTest.cs) (revision d72d28f9d51c5bc4c7bb0f49509e3656465cc22c) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs (.../FeatureBasedMapDataConverterTest.cs) (revision c7608335f86c59fff48f77d5bc83b2692ef18fef) @@ -98,7 +98,7 @@ Assert.IsNotNull(result); } - private class Class : MapData + private class Class : FeatureBasedMapData { public Class(string name) : base(name) {} } @@ -108,20 +108,20 @@ public Child(string name) : base(name) {} } - private class TestFeatureBasedMapDataConverter : FeatureBasedMapDataConverter - where TMapData : MapData + private class TestFeatureBasedMapDataConverter : FeatureBasedMapDataConverter + where TFeatureBasedMapData : FeatureBasedMapData { - protected override void ConvertLayerFeatures(TMapData data, MapPointLayer layer) + protected override void ConvertLayerFeatures(TFeatureBasedMapData data, MapPointLayer layer) { throw new NotImplementedException(); } - protected override void ConvertLayerProperties(TMapData data, MapPointLayer layer) + protected override void ConvertLayerProperties(TFeatureBasedMapData data, MapPointLayer layer) { throw new NotImplementedException(); } - protected override IMapFeatureLayer Convert(TMapData data) + protected override IMapFeatureLayer Convert(TFeatureBasedMapData data) { return new MapPointLayer(); } Index: Core/Components/test/Core.Components.DotSpatial.TestUtil/TestMapData.cs =================================================================== diff -u -r38ee40c1f98ff4b1921d4de64fd032c8fbcadf92 -rc7608335f86c59fff48f77d5bc83b2692ef18fef --- Core/Components/test/Core.Components.DotSpatial.TestUtil/TestMapData.cs (.../TestMapData.cs) (revision 38ee40c1f98ff4b1921d4de64fd032c8fbcadf92) +++ Core/Components/test/Core.Components.DotSpatial.TestUtil/TestMapData.cs (.../TestMapData.cs) (revision c7608335f86c59fff48f77d5bc83b2692ef18fef) @@ -24,9 +24,9 @@ namespace Core.Components.DotSpatial.TestUtil { /// - /// A class representing a implementation which is not in the regular codebase. + /// A class representing a implementation which is not in the regular codebase. /// - public class TestMapData : MapData + public class TestMapData : FeatureBasedMapData { public TestMapData(string name) : base(name) {} }