#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; using OSGeo.MapGuide.ObjectModels.FeatureSource; using OSGeo.MapGuide.MaestroAPI.SchemaOverrides; using OSGeo.MapGuide.ObjectModels.Common; 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 /// /// /// /// If you only need to list schemas and class names, use the respective and /// methods. Using this API will have a noticeable performance impact on /// really large datastores (whose size is in the 100s of classes). /// /// FeatureSourceDescription DescribeFeatureSource(string resourceID); /// /// Describes the specified feature source /// /// /// /// /// If you only need to list schemas and class names, use the respective and /// methods. Using this API will have a noticeable performance impact on /// really large datastores (whose size is in the 100s of classes). /// /// 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 qualified feature class names from the specified feature source /// /// The feature source id /// /// The name of the schema whose class names are to be returned. If null, class names from all schemas in the feature source /// are returned /// /// string[] GetClassNames(string resourceId, string schemaName); /// /// Gets the long transactions for the specified feature source /// /// The feature source id /// If true, will only return active long transactions /// ILongTransactionList GetLongTransactions(string resourceId, bool activeOnly); /// /// Gets the schema mappings for the given FDO provider. These mappings form the basis for a custom configuration document /// for a feature source that supports configuration /// /// The FDO provider /// The connection string /// ConfigurationDocument GetSchemaMapping(string provider, string partialConnString); } }