Interface IFeatureService
Provides services for accessing, querying and inspecting feature sources
Namespace: OSGeo.MapGuide.MaestroAPI.Services
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public interface IFeatureService : IService
Remarks
Note that IServerConnection provides built-in access to resource and feature services. Using the OSGeo.MapGuide.MaestroAPI.IServerConnection.GetService method is not necessary
Properties
| Improve this Doc View SourceFeatureProviders
Gets an array of all registered providers
Declaration
FeatureProviderRegistryFeatureProvider[] FeatureProviders { get; }
Property Value
| Type | Description |
|---|---|
| FeatureProviderRegistryFeatureProvider[] |
Methods
| Improve this Doc View SourceAggregateQueryFeatureSource(String, String, String)
Executes an aggregate query on the specified feature source
Declaration
IReader AggregateQueryFeatureSource(string resourceID, string className, string filter)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name |
| System.String | filter | The FDO filter string that determines what features will be returned |
Returns
| Type | Description |
|---|---|
| IReader | A IReader containing the results of the query |
AggregateQueryFeatureSource(String, String, String, NameValueCollection)
Executes an aggregate query on the specified feature source
Declaration
IReader AggregateQueryFeatureSource(string resourceID, string className, string filter, NameValueCollection aggregateFunctions)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name |
| System.String | filter | The FDO filter string that determines what features will be returned |
| System.Collections.Specialized.NameValueCollection | aggregateFunctions | A list of name/value pairs that contain the alias (name) for an FDO aggregate expression (value) |
Returns
| Type | Description |
|---|---|
| IReader | A IReader containing the results of the query |
AggregateQueryFeatureSource(String, String, String, String[])
Executes an aggregate query on the specified feature source
Declaration
IReader AggregateQueryFeatureSource(string resourceID, string className, string filter, string[] propertyNames)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name |
| System.String | filter | The FDO filter string that determines what features will be returned |
| System.String[] | propertyNames | An array of property names to include in the result |
Returns
| Type | Description |
|---|---|
| IReader | A IReader containing the results of the query |
DescribeFeatureSource(String)
Describes the specified feature source
Declaration
FeatureSourceDescription DescribeFeatureSource(string resourceID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
Returns
| Type | Description |
|---|---|
| FeatureSourceDescription |
Remarks
If you only need to list schemas and class names, use the respective OSGeo.MapGuide.MaestroAPI.Services.IFeatureService.GetSchemas and OSGeo.MapGuide.MaestroAPI.Services.IFeatureService.GetClassNames methods. Using this API will have a noticeable performance impact on really large datastores (whose size is in the 100s of classes).
DescribeFeatureSource(String, String)
Describes the specified feature source
Declaration
FeatureSchema DescribeFeatureSource(string resourceID, string schema)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | schema | The name of the schema to describe |
Returns
| Type | Description |
|---|---|
| FeatureSchema |
Remarks
If you only need to list schemas and class names, use the respective OSGeo.MapGuide.MaestroAPI.Services.IFeatureService.GetSchemas and OSGeo.MapGuide.MaestroAPI.Services.IFeatureService.GetClassNames methods. Using this API will have a noticeable performance impact on really large datastores (whose size is in the 100s of classes).
DescribeFeatureSourcePartial(String, String, String[])
Describes the specified feature source restricted to only the specified schema and the specified class names
Declaration
FeatureSchema DescribeFeatureSourcePartial(string resourceID, string schema, string[] classNames)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The feature source id |
| System.String | schema | The schema name |
| System.String[] | classNames | The array of class names to include in the resulting schema |
Returns
| Type | Description |
|---|---|
| FeatureSchema |
Remarks
If you only need to list schemas and class names, use the respective OSGeo.MapGuide.MaestroAPI.Services.IFeatureService.GetSchemas and OSGeo.MapGuide.MaestroAPI.Services.IFeatureService.GetClassNames methods. Using this API will have a noticeable performance impact on really large datastores (whose size is in the 100s of classes).
EnumerateDataStores(String, String)
Enumerates all the data stores and if they are FDO enabled for the specified provider and partial connection string
Declaration
DataStoreList EnumerateDataStores(string providerName, string partialConnString)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | providerName | The FDO provider name |
| System.String | partialConnString | The partial connection string. Certain providers require a partial conection string in order to be able to enumerate data stores |
Returns
| Type | Description |
|---|---|
| DataStoreList |
ExecuteSqlQuery(String, String)
Executes a SQL query
Declaration
IReader ExecuteSqlQuery(string featureSourceID, string sql)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | featureSourceID | The Feature Source ID |
| System.String | sql | The SQL query string |
Returns
| Type | Description |
|---|---|
| IReader | A IReader containing the results of the query |
Remarks
No validation is done on the SQL query string. The calling application should validate the SQL string to ensure that it does not contain any malicious operations.
GetClassDefinition(String, String)
Gets the specified class definition
Declaration
ClassDefinition GetClassDefinition(string resourceID, string className)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name. You can pass a qualified class name to be explicit about which class definition you are after |
Returns
| Type | Description |
|---|---|
| ClassDefinition |
GetClassNames(String, String)
Gets an array of qualified feature class names from the specified feature source
Declaration
string[] GetClassNames(string resourceID, string schemaName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The feature source id |
| System.String | schemaName | 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 |
Returns
| Type | Description |
|---|---|
| System.String[] |
GetConnectionPropertyValues(String, String, String)
Gets the possible values for a given connection property
Declaration
string[] GetConnectionPropertyValues(string providerName, string propertyName, string partialConnectionString)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | providerName | The FDO provider name |
| System.String | propertyName | The property name |
| System.String | partialConnectionString | A partial connection string if certain providers require such information |
Returns
| Type | Description |
|---|---|
| System.String[] | A list of possible values for the given property |
GetFeatureProvider(String)
Returns an installed provider, given the name of the provider
Declaration
FeatureProviderRegistryFeatureProvider GetFeatureProvider(string providername)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | providername | The name of the provider |
Returns
| Type | Description |
|---|---|
| FeatureProviderRegistryFeatureProvider | The first matching provider or null |
GetIdentityProperties(String, String)
Gets the names of the identity properties from a feature
Declaration
string[] GetIdentityProperties(string resourceID, string classname)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | classname | The classname of the feature, including schema |
Returns
| Type | Description |
|---|---|
| System.String[] | A string array with the found identities |
GetLongTransactions(String, Boolean)
Gets the long transactions for the specified feature source
Declaration
ILongTransactionList GetLongTransactions(string resourceID, bool activeOnly)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.Boolean | activeOnly | If true, will only return active long transactions |
Returns
| Type | Description |
|---|---|
| ILongTransactionList |
GetProviderCapabilities(String)
Gets the capabilities of the specified provider
Declaration
IFdoProviderCapabilities GetProviderCapabilities(string provider)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | provider |
Returns
| Type | Description |
|---|---|
| IFdoProviderCapabilities |
GetSchemaMapping(String, String)
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
Declaration
ConfigurationDocument GetSchemaMapping(string provider, string partialConnString)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | provider | The FDO provider |
| System.String | partialConnString | The connection string |
Returns
| Type | Description |
|---|---|
| ConfigurationDocument |
GetSchemas(String)
Gets an array of schema names from the specified feature source
Declaration
string[] GetSchemas(string resourceID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
Returns
| Type | Description |
|---|---|
| System.String[] |
GetSpatialContextInfo(String, Boolean)
Get the spatial context information for the specified feature source
Declaration
FdoSpatialContextList GetSpatialContextInfo(string resourceID, bool activeOnly)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.Boolean | activeOnly | If true, will only return the active spatial context |
Returns
| Type | Description |
|---|---|
| FdoSpatialContextList |
GetSpatialExtent(String, String, String)
Gets the geometric extent of the specified feature source
Declaration
IEnvelope GetSpatialExtent(string resourceID, string className, string geometryPropertyName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name |
| System.String | geometryPropertyName | The geometry property to get the geometric extent of |
Returns
| Type | Description |
|---|---|
| IEnvelope |
GetSpatialExtent(String, String, String, Boolean)
Gets the geometric extent of the specified feature source
Declaration
IEnvelope GetSpatialExtent(string resourceID, string className, string geometryPropertyName, bool allowFallbackToContextInformation)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name |
| System.String | geometryPropertyName | The geometry property to get the geometric extent of |
| System.Boolean | allowFallbackToContextInformation | If true, the geometric extent of the feature class's spatial context will be used in the event that computing the extents fails |
Returns
| Type | Description |
|---|---|
| IEnvelope |
Exceptions
| Type | Condition |
|---|---|
| NullExtentException | Thrown if the geometric extent is null |
GetSpatialExtent(String, String, String, String)
Gets the geometric extent of the specified feature source
Declaration
IEnvelope GetSpatialExtent(string resourceID, string className, string geometryPropertyName, string filter)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name |
| System.String | geometryPropertyName | The geometry property to get the geometric extent of |
| System.String | filter | The FDO filter string that determines what features will be returned |
Returns
| Type | Description |
|---|---|
| IEnvelope |
QueryFeatureSource(String, String)
Executes a feature query on the specified feature source
Declaration
IFeatureReader QueryFeatureSource(string resourceID, string className)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name |
Returns
| Type | Description |
|---|---|
| IFeatureReader | A IFeatureReader containing the results of the query |
QueryFeatureSource(String, String, String)
Executes a feature query on the specified feature source
Declaration
IFeatureReader QueryFeatureSource(string resourceID, string className, string filter)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name |
| System.String | filter | The FDO filter string that determines what features will be returned |
Returns
| Type | Description |
|---|---|
| IFeatureReader | A IFeatureReader containing the results of the query |
QueryFeatureSource(String, String, String, String[])
Executes a feature query on the specified feature source
Declaration
IFeatureReader QueryFeatureSource(string resourceID, string className, string filter, string[] propertyNames)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name |
| System.String | filter | The FDO filter string that determines what features will be returned |
| System.String[] | propertyNames | A list of properties that are to be returned in the query result |
Returns
| Type | Description |
|---|---|
| IFeatureReader | A IFeatureReader containing the results of the query |
QueryFeatureSource(String, String, String, String[], NameValueCollection)
Executes a feature query on the specified feature source
Declaration
IFeatureReader QueryFeatureSource(string resourceID, string className, string filter, string[] propertyNames, NameValueCollection computedProperties)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name |
| System.String | filter | The FDO filter string that determines what features will be returned |
| System.String[] | propertyNames | A list of properties that are to be returned in the query result |
| System.Collections.Specialized.NameValueCollection | computedProperties | A list of name/value pairs that contain the alias (name) for an FDO expression (value) |
Returns
| Type | Description |
|---|---|
| IFeatureReader | A IFeatureReader containing the results of the query |
QueryFeatureSource(String, String, String, String[], NameValueCollection, Int32)
Executes a feature query on the specified feature source
Declaration
IFeatureReader QueryFeatureSource(string resourceID, string className, string filter, string[] propertyNames, NameValueCollection computedProperties, int limit)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceID | The Feature Source ID |
| System.String | className | The feature class name |
| System.String | filter | The FDO filter string that determines what features will be returned |
| System.String[] | propertyNames | A list of properties that are to be returned in the query result |
| System.Collections.Specialized.NameValueCollection | computedProperties | A list of name/value pairs that contain the alias (name) for an FDO expression (value) |
| System.Int32 | limit | Limits the number of features returned in the reader. -1 for all features |
Returns
| Type | Description |
|---|---|
| IFeatureReader | A IFeatureReader containing the results of the query |
RemoveVersionFromProviderName(String)
Removes the version numbers from a providername
Declaration
string RemoveVersionFromProviderName(string providername)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | providername | The name of the provider, with or without version numbers |
Returns
| Type | Description |
|---|---|
| System.String | The provider name without version numbers |
TestConnection(String)
Tests the connection settings of the specified feature source
Declaration
string TestConnection(string featureSourceId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | featureSourceId |
Returns
| Type | Description |
|---|---|
| System.String |
TestConnection(String, NameValueCollection)
Tests the specified connection settings
Declaration
string TestConnection(string providername, NameValueCollection parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | providername | |
| System.Collections.Specialized.NameValueCollection | parameters |
Returns
| Type | Description |
|---|---|
| System.String |