#region Disclaimer / License // Copyright (C) 2010, Jackie Ng // http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie@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.Text; using System.Collections.Specialized; using ObjCommon = OSGeo.MapGuide.ObjectModels.Common; using OSGeo.MapGuide.MaestroAPI.Schema; using OSGeo.MapGuide.MaestroAPI.Feature; namespace OSGeo.MapGuide.MaestroAPI.Services { /// /// Provides services for accessing, querying and inspecting feature sources /// /// /// Note that provides /// built-in access to resource and feature services. Using the /// method is not necessary /// public interface IFeatureService : IService { /// /// Gets the capabilities of the specified provider /// /// /// OSGeo.MapGuide.ObjectModels.Capabilities.FdoProviderCapabilities GetProviderCapabilities(string provider); /// /// Gets an array of all registered providers /// ObjCommon.FeatureProviderRegistryFeatureProvider[] FeatureProviders { get; } /// /// Tests the specified connection settings /// /// /// /// string TestConnection(string providername, NameValueCollection parameters); /// /// Tests the connection settings of the specified feature source /// /// /// string TestConnection(string featureSourceId); /// /// Removes the version numbers from a providername /// /// The name of the provider, with or without version numbers /// The provider name without version numbers string RemoveVersionFromProviderName(string providername); /// /// Gets the possible values for a given connection property /// /// The FDO provider name /// The property name /// A partial connection string if certain providers require such information /// A list of possible values for the given property string[] GetConnectionPropertyValues(string providerName, string propertyName, string partialConnectionString); /// /// Returns an installed provider, given the name of the provider /// /// The name of the provider /// The first matching provider or null ObjCommon.FeatureProviderRegistryFeatureProvider GetFeatureProvider(string providername); /// /// Executes a SQL query /// /// /// /// IReader ExecuteSqlQuery(string featureSourceID, string sql); /// /// Executes a feature query on the specified feature source /// /// /// /// /// IFeatureReader QueryFeatureSource(string resourceID, string schema, string query); /// /// Executes a feature query on the specified feature source /// /// /// /// IFeatureReader QueryFeatureSource(string resourceID, string schema); /// /// Executes a feature query on the specified feature source /// /// /// /// /// /// IFeatureReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns); /// /// Executes a feature query on the specified feature source /// /// /// /// /// /// /// IFeatureReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns, NameValueCollection computedProperties); /// /// Executes an aggregate query on the specified feature source /// /// /// /// /// IReader AggregateQueryFeatureSource(string resourceID, string schema, string filter); /// /// Executes an aggregate query on the specified feature source /// /// /// /// /// /// IReader AggregateQueryFeatureSource(string resourceID, string schema, string filter, string[] columns); /// /// Executes an aggregate query on the specified feature source /// /// /// /// /// /// IReader AggregateQueryFeatureSource(string resourceID, string schema, string filter, NameValueCollection aggregateFunctions); /// /// Gets the geometric extent of the specified feature source /// /// /// /// /// ObjCommon.IEnvelope GetSpatialExtent(string resourceID, string schema, string geometry); /// /// Gets the geometric extent of the specified feature source /// /// /// /// /// /// ObjCommon.IEnvelope GetSpatialExtent(string resourceID, string schema, string geometry, string filter); /// /// Gets the geometric extent of the specified feature source /// /// /// /// /// /// ObjCommon.IEnvelope GetSpatialExtent(string resourceID, string schema, string geometry, bool allowFallbackToContextInformation); /// /// Describes the specified feature source /// /// /// FeatureSourceDescription DescribeFeatureSource(string resourceID); /// /// Describes the specified feature source /// /// /// /// FeatureSchema DescribeFeatureSource(string resourceID, string schema); /// /// Gets the specified class definition /// /// /// /// ClassDefinition GetClassDefinition(string resourceID, string schema); /// /// Get the spatial context information for the specified feature source /// /// /// /// ObjCommon.FdoSpatialContextList GetSpatialContextInfo(string resourceID, bool activeOnly); /// /// Gets the names of the identity properties from a feature /// /// The resourceID for the FeatureSource /// The classname of the feature, including schema /// A string array with the found identities string[] GetIdentityProperties(string resourceID, string classname); /// /// Enumerates all the data stores and if they are FDO enabled for the specified provider and partial connection string /// /// /// /// OSGeo.MapGuide.ObjectModels.Common.DataStoreList EnumerateDataStores(string providerName, string partialConnString); /// /// Gets an array of schema names from the specified feature source /// /// /// string[] GetSchemas(string resourceId); /// /// Gets an array of feature class names from the specified feature source /// /// /// /// string[] GetClassNames(string resourceId, string schemaName); } }