[mapguide-commits] r8060 - in trunk/Tools/Maestro: MaestroAPITests OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroAPI/Feature OSGeo.MapGuide.MaestroAPI/Services OSGeo.MapGuide.MaestroAPI.Http OSGeo.MapGuide.MaestroAPI.Local OSGeo.MapGuide.MaestroAPI.Native

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Apr 17 21:28:46 PDT 2014


Author: jng
Date: 2014-04-17 21:28:45 -0700 (Thu, 17 Apr 2014)
New Revision: 8060

Added:
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Feature/LimitingFeatureReader.cs
Modified:
   trunk/Tools/Maestro/MaestroAPITests/ConnectionTestBase.cs
   trunk/Tools/Maestro/MaestroAPITests/HttpConnectionTests.cs
   trunk/Tools/Maestro/MaestroAPITests/HttpSiteTests.cs
   trunk/Tools/Maestro/MaestroAPITests/LocalConnectionTests.cs
   trunk/Tools/Maestro/MaestroAPITests/LocalNativeFeatureTests.cs
   trunk/Tools/Maestro/MaestroAPITests/ValidationTests.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeConnection.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Services/IFeatureService.cs
Log:
This submission contains the following changes:
 - #2435: Add new QueryFeatureSource variant with support for limiting features.
 - Fix http connection test fixture not executing. Move #2432 test case into this test fixture

Modified: trunk/Tools/Maestro/MaestroAPITests/ConnectionTestBase.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/ConnectionTestBase.cs	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/MaestroAPITests/ConnectionTestBase.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -423,7 +423,25 @@
             }
         }
 
-        //[Test]
+        public virtual void TestQueryLimits()
+        {
+            var conn = CreateTestConnection();
+            for (int i = 0; i < 10; i++)
+            {
+                int limit = (i + 1) * 2;
+                using (var reader = conn.FeatureService.QueryFeatureSource("Library://UnitTests/Data/Parcels.FeatureSource", "SHP_Schema:Parcels", null, null, null, limit))
+                {
+                    var count = 0;
+                    while (reader.ReadNext())
+                    {
+                        count++;
+                    }
+                    reader.Close();
+                    Assert.AreEqual(count, limit, "Expected to have read " + limit + " features. Read " + count + " features instead");
+                }
+            }
+        }
+
         public virtual void TestEncryptedFeatureSourceCredentials()
         {
             //Sensitive data redacted, nevertheless you can test and verify this by filling in the

Modified: trunk/Tools/Maestro/MaestroAPITests/HttpConnectionTests.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/HttpConnectionTests.cs	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/MaestroAPITests/HttpConnectionTests.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -28,6 +28,7 @@
 using OSGeo.MapGuide.ObjectModels.Common;
 using OSGeo.MapGuide.ObjectModels;
 using OSGeo.MapGuide.MaestroAPI.SchemaOverrides;
+using System.Threading;
 
 namespace MaestroAPITests
 {
@@ -40,7 +41,7 @@
             if (TestControl.IgnoreHttpConnectionTests)
                 reason = "Skipping HttpConnectionTests because TestControl.IgnoreHttpConnectionTests = true";
 
-            return TestControl.IgnoreLocalNativeFeatureTests;
+            return TestControl.IgnoreHttpConnectionTests;
         }
 
         protected override string GetTestPrefix()
@@ -55,7 +56,7 @@
         }
 
         [Test]
-        public void TestResourceExists()
+        public override void TestResourceExists()
         {
             base.TestResourceExists();
         }
@@ -108,6 +109,60 @@
             base.TestCreateRuntimeMapWithInvalidLayersErrorsEnabled();
         }
 
+        [Test]
+        public override void TestQueryLimits()
+        {
+            base.TestQueryLimits();
+        }
+
+        [Test]
+        public void TestCase2432()
+        {
+            var conn = CreateTestConnection();
+
+            //Problematic method: Cause of original ticket
+            for (int i = 0; i < 10; i++)
+            {
+                using (var rdr1 = conn.FeatureService.QueryFeatureSource("Library://UnitTests/Data/Parcels.FeatureSource", "SHP_Schema:Parcels", "Autogenerated_SDF_ID < 20"))
+                {
+                    var count = 0;
+                    while (count < 5 && rdr1.ReadNext())
+                    {
+                        count++;
+                    }
+                    rdr1.Close();
+                }
+            }
+
+            //Normal sequential method
+            for (int i = 0; i < 10; i++)
+            {
+                using (var rdr1 = conn.FeatureService.QueryFeatureSource("Library://UnitTests/Data/Parcels.FeatureSource", "SHP_Schema:Parcels", "Autogenerated_SDF_ID < 20"))
+                {
+                    while (rdr1.ReadNext()) { }
+                    rdr1.Close();
+                }
+            }
+
+            //Multi-threaded method
+            var events = new List<ManualResetEvent>();
+            for (int i = 0; i < 10; i++)
+            {
+                var resetEvent = new ManualResetEvent(false);
+                ThreadPool.QueueUserWorkItem((args) =>
+                {
+                    using (var rdr1 = conn.FeatureService.QueryFeatureSource("Library://UnitTests/Data/Parcels.FeatureSource", "SHP_Schema:Parcels", "Autogenerated_SDF_ID < 20"))
+                    {
+                        while (rdr1.ReadNext()) { }
+                        rdr1.Close();
+                        resetEvent.Set();
+                    }
+                });
+                events.Add(resetEvent);
+            }
+            WaitHandle.WaitAll(events.ToArray());
+        }
+
         protected override IServerConnection CreateTestConnection()
         {
             return ConnectionUtil.CreateTestHttpConnection();

Modified: trunk/Tools/Maestro/MaestroAPITests/HttpSiteTests.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/HttpSiteTests.cs	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/MaestroAPITests/HttpSiteTests.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -26,7 +26,6 @@
 using OSGeo.MapGuide.ObjectModels;
 using OSGeo.MapGuide.MaestroAPI.Resource.Validation;
 using System.IO;
-using System.Threading;
 
 namespace MaestroAPITests
 {
@@ -46,54 +45,6 @@
         }
 
         [Test]
-        public void TestCase2432()
-        {
-            var conn = CreateTestConnection();
-
-            //Problematic method: Cause of original ticket
-            for (int i = 0; i < 10; i++)
-            {
-                using (var rdr1 = conn.FeatureService.QueryFeatureSource("Library://UnitTests/Data/Parcels.FeatureSource", "SHP_Schema:Parcels", "Autogenerated_SDF_ID < 20"))
-                {
-                    var count = 0;
-                    while (count < 5 && rdr1.ReadNext())
-                    {
-                        count++;
-                    }
-                    rdr1.Close();
-                }
-            }
-
-            //Normal sequential method
-            for (int i = 0; i < 10; i++)
-            {
-                using (var rdr1 = conn.FeatureService.QueryFeatureSource("Library://UnitTests/Data/Parcels.FeatureSource", "SHP_Schema:Parcels", "Autogenerated_SDF_ID < 20"))
-                {
-                    while (rdr1.ReadNext()) { }
-                    rdr1.Close();
-                }
-            }
-
-            //Multi-threaded method
-            var events = new List<ManualResetEvent>();
-            for (int i = 0; i < 10; i++)
-            {
-                var resetEvent = new ManualResetEvent(false);
-                ThreadPool.QueueUserWorkItem((args) =>
-                {
-                    using (var rdr1 = conn.FeatureService.QueryFeatureSource("Library://UnitTests/Data/Parcels.FeatureSource", "SHP_Schema:Parcels", "Autogenerated_SDF_ID < 20"))
-                    {
-                        while (rdr1.ReadNext()) { }
-                        rdr1.Close();
-                        resetEvent.Set();
-                    }
-                });
-                events.Add(resetEvent);
-            }
-            WaitHandle.WaitAll(events.ToArray());
-        }
-
-        [Test]
         public void TestMapDefinitionValidation()
         {
             var conn = CreateTestConnection();

Modified: trunk/Tools/Maestro/MaestroAPITests/LocalConnectionTests.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/LocalConnectionTests.cs	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/MaestroAPITests/LocalConnectionTests.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -70,7 +70,7 @@
         }
 
         [Test]
-        public void TestResourceExists()
+        public override void TestResourceExists()
         {
             base.TestResourceExists();
         }
@@ -94,6 +94,12 @@
         }
 
         [Test]
+        public override void TestQueryLimits()
+        {
+            base.TestQueryLimits();
+        }
+
+        [Test]
         public override void TestCreateDataStore()
         {
             base.TestCreateDataStore();

Modified: trunk/Tools/Maestro/MaestroAPITests/LocalNativeFeatureTests.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/LocalNativeFeatureTests.cs	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/MaestroAPITests/LocalNativeFeatureTests.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -76,7 +76,7 @@
         }
 
         [Test]
-        public void TestResourceExists()
+        public override void TestResourceExists()
         {
             base.TestResourceExists();
         }
@@ -100,6 +100,12 @@
         }
 
         [Test]
+        public override void TestQueryLimits()
+        {
+            base.TestQueryLimits();
+        }
+
+        [Test]
         public override void TestCreateDataStore()
         {
             base.TestCreateDataStore();

Modified: trunk/Tools/Maestro/MaestroAPITests/ValidationTests.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/ValidationTests.cs	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/MaestroAPITests/ValidationTests.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -424,6 +424,12 @@
             {
                 throw new NotImplementedException();
             }
+
+
+            public OSGeo.MapGuide.MaestroAPI.Feature.IFeatureReader QueryFeatureSource(string resourceID, string className, string filter, string[] propertyNames, System.Collections.Specialized.NameValueCollection computedProperties, int limit)
+            {
+                throw new NotImplementedException();
+            }
         }
         #endregion
 

Added: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Feature/LimitingFeatureReader.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Feature/LimitingFeatureReader.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Feature/LimitingFeatureReader.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -0,0 +1,257 @@
+#region Disclaimer / License
+// Copyright (C) 2014, 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.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.MaestroAPI.Feature
+{
+    internal class LimitingFeatureReader : IFeatureReader
+    {
+        private IFeatureReader _reader;
+        private int _limit;
+        private int _read;
+
+        public LimitingFeatureReader(IFeatureReader reader, int limit)
+        {
+            _limit = limit;
+            _reader = reader;
+            _read = 0;
+        }
+
+        public bool ReadNext()
+        {
+            if (_read == _limit)
+                return false;
+
+            bool bRet = _reader.ReadNext();
+            _read++;
+            return bRet;
+        }
+
+        public void Close()
+        {
+            if (_reader != null)
+            {
+                _reader.Close();
+            }
+        }
+
+        public void Dispose()
+        {
+            if (_reader != null)
+            {
+                _reader.Dispose();
+                _reader = null;
+            }
+        }
+
+        public int FieldCount
+        {
+            get { return _reader.FieldCount; }
+        }
+
+        public string GetName(int index)
+        {
+            return _reader.GetName(index);
+        }
+
+        public Type GetFieldType(int i)
+        {
+            return _reader.GetFieldType(i);
+        }
+
+        public bool IsNull(string name)
+        {
+            return _reader.IsNull(name);
+        }
+
+        public bool IsNull(int index)
+        {
+            return _reader.IsNull(index);
+        }
+
+        public bool GetBoolean(string name)
+        {
+            return _reader.GetBoolean(name);
+        }
+
+        public byte GetByte(string name)
+        {
+            return _reader.GetByte(name);
+        }
+
+        public byte[] GetBlob(string name)
+        {
+            return _reader.GetBlob(name);
+        }
+
+        public char[] GetClob(string name)
+        {
+            return _reader.GetClob(name);
+        }
+
+        public double GetDouble(string name)
+        {
+            return _reader.GetDouble(name);
+        }
+
+        public DateTime GetDateTime(string name)
+        {
+            return _reader.GetDateTime(name);
+        }
+
+        public short GetInt16(string name)
+        {
+            return _reader.GetInt16(name);
+        }
+
+        public int GetInt32(string name)
+        {
+            return _reader.GetInt32(name);
+        }
+
+        public long GetInt64(string name)
+        {
+            return _reader.GetInt64(name);
+        }
+
+        public float GetSingle(string name)
+        {
+            return _reader.GetSingle(name);
+        }
+
+        public string GetString(string name)
+        {
+            return _reader.GetString(name);
+        }
+
+        public GeoAPI.Geometries.IGeometry GetGeometry(string name)
+        {
+            return _reader.GetGeometry(name);
+        }
+
+        public bool GetBoolean(int index)
+        {
+            return _reader.GetBoolean(index);
+        }
+
+        public byte GetByte(int index)
+        {
+            return _reader.GetByte(index);
+        }
+
+        public byte[] GetBlob(int index)
+        {
+            return _reader.GetBlob(index);
+        }
+
+        public char[] GetClob(int index)
+        {
+            return _reader.GetClob(index);
+        }
+
+        public double GetDouble(int index)
+        {
+            return _reader.GetDouble(index);
+        }
+
+        public DateTime GetDateTime(int index)
+        {
+            return _reader.GetDateTime(index);
+        }
+
+        public short GetInt16(int index)
+        {
+            return _reader.GetInt16(index);
+        }
+
+        public int GetInt32(int index)
+        {
+            return _reader.GetInt32(index);
+        }
+
+        public long GetInt64(int index)
+        {
+            return _reader.GetInt64(index);
+        }
+
+        public float GetSingle(int index)
+        {
+            return _reader.GetSingle(index);
+        }
+
+        public string GetString(int index)
+        {
+            return _reader.GetString(index);
+        }
+
+        public GeoAPI.Geometries.IGeometry GetGeometry(int index)
+        {
+            return _reader.GetGeometry(index);
+        }
+
+        public object this[int index]
+        {
+            get { return _reader[index]; }
+        }
+
+        public object this[string name]
+        {
+            get { return _reader[name]; }
+        }
+
+        public Schema.PropertyValueType GetPropertyType(string name)
+        {
+            return _reader.GetPropertyType(name);
+        }
+
+        public Schema.PropertyValueType GetPropertyType(int index)
+        {
+            return _reader.GetPropertyType(index);
+        }
+
+        public Schema.ClassDefinition ClassDefinition
+        {
+            get { return _reader.ClassDefinition; }
+        }
+
+        public IFeatureReader GetFeatureObject(string name)
+        {
+            return _reader.GetFeatureObject(name);
+        }
+
+        public IFeatureReader GetFeatureObject(int index)
+        {
+            return _reader.GetFeatureObject(index);
+        }
+
+        public IEnumerator<IFeature> GetEnumerator()
+        {
+            return _reader.GetEnumerator();
+        }
+
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+        {
+            return _reader.GetEnumerator();
+        }
+    }
+}

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2014-04-18 04:28:45 UTC (rev 8060)
@@ -244,6 +244,7 @@
     <Compile Include="Feature\FeatureReaderBase.cs" />
     <Compile Include="Feature\IFeatureReader.cs" />
     <Compile Include="Feature\IReader.cs" />
+    <Compile Include="Feature\LimitingFeatureReader.cs" />
     <Compile Include="Feature\MutableFeatureBase.cs" />
     <Compile Include="Feature\MutableRecordBase.cs" />
     <Compile Include="Feature\NsDoc.cs" />

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -1809,6 +1809,72 @@
         /// <returns></returns>
         public abstract ConfigurationDocument GetSchemaMapping(string provider, string partialConnString);
 
+        /// <summary>
+        /// Executes a feature query on the specified feature source
+        /// </summary>
+        /// <param name="resourceID">The Feature Source ID</param>
+        /// <param name="className">The feature class name</param>
+        /// <param name="filter">The FDO filter string that determines what features will be returned</param>
+        /// <returns>A <see cref="T:OSGeo.MapGuide.MaestroAPI.Feature.IFeatureReader"/> containing the results of the query</returns>
+        public IFeatureReader QueryFeatureSource(string resourceID, string className, string filter)
+        {
+            return QueryFeatureSource(resourceID, className, filter, null);
+        }
+
+        /// <summary>
+        /// Executes a feature query on the specified feature source
+        /// </summary>
+        /// <param name="resourceID">The Feature Source ID</param>
+        /// <param name="className">The feature class name</param>
+        /// <returns>A <see cref="T:OSGeo.MapGuide.MaestroAPI.Feature.IFeatureReader"/> containing the results of the query</returns>
+        public IFeatureReader QueryFeatureSource(string resourceID, string className)
+        {
+            return QueryFeatureSource(resourceID, className, null, null);
+        }
+
+        /// <summary>
+        /// Executes a feature query on the specified feature source
+        /// </summary>
+        /// <param name="resourceID">The Feature Source ID</param>
+        /// <param name="className">The feature class name</param>
+        /// <param name="filter">The FDO filter string that determines what features will be returned</param>
+        /// <param name="propertyNames">A list of properties that are to be returned in the query result</param>
+        /// <returns>A <see cref="T:OSGeo.MapGuide.MaestroAPI.Feature.IFeatureReader"/> containing the results of the query</returns>
+        public IFeatureReader QueryFeatureSource(string resourceID, string className, string filter, string[] propertyNames)
+        {
+            return QueryFeatureSource(resourceID, className, filter, propertyNames, null);
+        }
+
+        /// <summary>
+        /// Executes a feature query on the specified feature source
+        /// </summary>
+        /// <param name="resourceID">The Feature Source ID</param>
+        /// <param name="className">The feature class name</param>
+        /// <param name="filter">The FDO filter string that determines what features will be returned</param>
+        /// <param name="propertyNames">A list of properties that are to be returned in the query result</param>
+        /// <param name="computedProperties">A list of name/value pairs that contain the alias (name) for an FDO expression (value)</param>
+        /// <param name="limit">Limits the number of features returned in the reader. -1 for all features</param>
+        /// <returns>A <see cref="T:OSGeo.MapGuide.MaestroAPI.Feature.IFeatureReader"/> containing the results of the query</returns>
+        public virtual IFeatureReader QueryFeatureSource(string resourceID, string className, string filter, string[] propertyNames, NameValueCollection computedProperties, int limit)
+        {
+            var reader = this.QueryFeatureSource(resourceID, className, filter, propertyNames, computedProperties);
+            if (limit < 0)
+                return reader;
+            else
+                return new LimitingFeatureReader(reader, limit);
+        }
+
+        /// <summary>
+        /// Executes a feature query on the specified feature source
+        /// </summary>
+        /// <param name="resourceID">The Feature Source ID</param>
+        /// <param name="className">The feature class name</param>
+        /// <param name="filter">The FDO filter string that determines what features will be returned</param>
+        /// <param name="propertyNames">A list of properties that are to be returned in the query result</param>
+        /// <param name="computedProperties">A list of name/value pairs that contain the alias (name) for an FDO expression (value)</param>
+        /// <returns>A <see cref="T:OSGeo.MapGuide.MaestroAPI.Feature.IFeatureReader"/> containing the results of the query</returns>
+        public abstract IFeatureReader QueryFeatureSource(string resourceID, string className, string filter, string[] propertyNames, NameValueCollection computedProperties);
+
         #endregion
 
         #region Feature/Capability Discovery

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Services/IFeatureService.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Services/IFeatureService.cs	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Services/IFeatureService.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -141,6 +141,18 @@
         IFeatureReader QueryFeatureSource(string resourceID, string className, string filter, string[] propertyNames, NameValueCollection computedProperties);
 
         /// <summary>
+        /// Executes a feature query on the specified feature source
+        /// </summary>
+        /// <param name="resourceID">The Feature Source ID</param>
+        /// <param name="className">The feature class name</param>
+        /// <param name="filter">The FDO filter string that determines what features will be returned</param>
+        /// <param name="propertyNames">A list of properties that are to be returned in the query result</param>
+        /// <param name="computedProperties">A list of name/value pairs that contain the alias (name) for an FDO expression (value)</param>
+        /// <param name="limit">Limits the number of features returned in the reader. -1 for all features</param>
+        /// <returns>A <see cref="T:OSGeo.MapGuide.MaestroAPI.Feature.IFeatureReader"/> containing the results of the query</returns>
+        IFeatureReader QueryFeatureSource(string resourceID, string className, string filter, string[] propertyNames, NameValueCollection computedProperties, int limit);
+
+        /// <summary>
         /// Executes an aggregate query on the specified feature source
         /// </summary>
         /// <param name="resourceID">The Feature Source ID</param>

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -717,22 +717,7 @@
             throw new NotSupportedException();
         }
 
-		public IFeatureReader QueryFeatureSource(string resourceID, string schema, string query)
-		{
-			return QueryFeatureSource(resourceID, schema, query, null);
-		}
-
-		public IFeatureReader QueryFeatureSource(string resourceID, string schema)
-		{
-			return QueryFeatureSource(resourceID, schema, null, null);
-		}
-
-		public IFeatureReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns)
-		{
-            return QueryFeatureSource(resourceID, schema, query, columns, null);
-		}
-
-        public IFeatureReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns, NameValueCollection computedProperties)
+        public override IFeatureReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns, NameValueCollection computedProperties)
         {
             return (IFeatureReader)QueryFeatureSourceCore(false, resourceID, schema, query, columns, computedProperties);
         }

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -720,23 +720,8 @@
             return new LocalNativeSqlReader(reader);
         }
 
-        public IFeatureReader QueryFeatureSource(string resourceID, string schema, string query)
+        public override IFeatureReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns, NameValueCollection computedProperties)
         {
-            return QueryFeatureSource(resourceID, schema, query, null);
-        }
-
-        public IFeatureReader QueryFeatureSource(string resourceID, string schema)
-        {
-            return QueryFeatureSource(resourceID, schema, null, null);
-        }
-
-        public IFeatureReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns)
-        {
-            return QueryFeatureSource(resourceID, schema, query, columns, null);
-        }
-
-        public IFeatureReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns, NameValueCollection computedProperties)
-        {
             var fes = GetFeatureService();
             MgFeatureQueryOptions mgf = new MgFeatureQueryOptions();
             if (query != null)

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeConnection.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeConnection.cs	2014-04-17 17:04:35 UTC (rev 8059)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeConnection.cs	2014-04-18 04:28:45 UTC (rev 8060)
@@ -286,23 +286,8 @@
             return new LocalNativeSqlReader(reader);
         }
 
-		public IFeatureReader QueryFeatureSource(string resourceID, string schema, string query)
+		public override IFeatureReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns, System.Collections.Specialized.NameValueCollection computedProperties)
 		{
-			return QueryFeatureSource(resourceID, schema, query, null);
-		}
-
-		public IFeatureReader QueryFeatureSource(string resourceID, string schema)
-		{
-			return QueryFeatureSource(resourceID, schema, null, null);
-		}
-
-        public IFeatureReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns)
-        {
-            return QueryFeatureSource(resourceID, schema, query, columns, null);
-        }
-
-		public IFeatureReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns, System.Collections.Specialized.NameValueCollection computedProperties)
-		{
 			MgFeatureService fes = this.Connection.CreateService(MgServiceType.FeatureService) as MgFeatureService;
 			MgFeatureQueryOptions mgf = new MgFeatureQueryOptions();
 			if (query != null)



More information about the mapguide-commits mailing list