MapGuide API Reference
 All Classes Functions Variables Enumerations Enumerator Friends
MgFeatureService Class Reference

Provides an abstraction layer for the storage and retrieval of feature data in a technology-independent way. The API lets you determine what storage technologies are available and what capabilities they have. Access to the storage technology is modeled as a connection. For example, you can connect to a file and do simple insertions or connect to a relational database and do transaction-based operations. More...

+ Inheritance diagram for MgFeatureService:

List of all members.

Public Member Functions

virtual void ApplySchema (MgResourceIdentifier *resource, MgFeatureSchema *schema)=0
 Creates or updates a feature schema within the specified feature source. For this method to actually delete any schema elements, the matching elements in the input schema must be marked for deletion using the MgFeatureSchema::Delete(), MgClassDefinition::Delete() and MgPropertyDefinition::Delete() methods.
virtual MgTransactionBeginTransaction (MgResourceIdentifier *resource)=0
 Starts a transaction on the specified feature source.
virtual void CreateFeatureSource (MgResourceIdentifier *resource, MgFeatureSourceParams *sourceParams)=0
 Creates a feature source in the repository identified by the specified resource identifier, using the given feature source parameters.
virtual INT32 DeleteFeatures (MgResourceIdentifier *resource, CREFSTRING className, CREFSTRING filter)=0
 Deletes all features that match the given filter.
virtual INT32 DeleteFeatures (MgResourceIdentifier *resource, CREFSTRING className, CREFSTRING filter, MgTransaction *trans)=0
 Deletes all features that match the given filter.
virtual MgFeatureSchemaCollectionDescribeSchema (MgResourceIdentifier *resource, CREFSTRING schemaName, MgStringCollection *classNames)=0
 Gets the definitions of one or more schemas contained in the feature source for particular classes. If the specified schema name or a class name does not exist, this method will throw an exception. See Feature Schema .
virtual MgFeatureSchemaCollectionDescribeSchema (MgResourceIdentifier *resource, CREFSTRING schemaName)=0
 Gets the definitions of one or more schema contained in the feature source. See Feature Schema .
virtual STRING DescribeSchemaAsXml (MgResourceIdentifier *resource, CREFSTRING schemaName, MgStringCollection *classNames)=0
 Gets the definitions in XML format of one or more schemas contained in the feature source for particular classes. If the specified schema name or a class name does not exist, this method will throw an exception. See Feature Schema .
virtual STRING DescribeSchemaAsXml (MgResourceIdentifier *resource, CREFSTRING schemaName)=0
 Gets the definition in XML format of a schema contained in the feature source. See Feature Schema .
virtual MgByteReaderDescribeWfsFeatureType (MgResourceIdentifier *featureSourceId, MgStringCollection *featureClasses)=0
 Retrieves schema information about a set of feature classes for a given feature source.
virtual MgByteReaderDescribeWfsFeatureType (MgResourceIdentifier *featureSourceId, MgStringCollection *featureClasses, CREFSTRING namespacePrefix, CREFSTRING namespaceUrl)=0
 Retrieves schema informationabout a set of feature classes for a given feature source with specified namespace prefix and url.
virtual MgByteReaderEnumerateDataStores (CREFSTRING providerName, CREFSTRING partialConnString)=0
 This method enumerates all the providers and if they are FDO enabled for the specified provider and partial connection string.
virtual INT32 ExecuteSqlNonQuery (MgResourceIdentifier *resource, CREFSTRING sqlNonSelectStatement)=0
 Executes SQL statements NOT including SELECT statements.
virtual INT32 ExecuteSqlNonQuery (MgResourceIdentifier *resource, CREFSTRING sqlNonSelectStatement, MgParameterCollection *parameters, MgTransaction *transaction)=0
 Executes SQL statements NOT including SELECT statements within the given transaction.
virtual MgSqlDataReaderExecuteSqlQuery (MgResourceIdentifier *resource, CREFSTRING sqlStatement)=0
 Executes the SQL SELECT statement on the specified feature source.
virtual MgSqlDataReaderExecuteSqlQuery (MgResourceIdentifier *resource, CREFSTRING sqlStatement, MgParameterCollection *parameters, MgTransaction *transaction)=0
 Executes the SQL SELECT statement on the specified feature source within the given transaction.
virtual MgByteReaderGetCapabilities (CREFSTRING providerName)=0
 Gets the capabilities of an FDO Provider expressed in XML according to the FdoProviderCapabilities schema.
virtual MgByteReaderGetCapabilities (CREFSTRING providerName, CREFSTRING connectionString)=0
 Gets the capabilities of an FDO Provider expressed in XML according to the FdoProviderCapabilities schema.
virtual MgClassDefinitionGetClassDefinition (MgResourceIdentifier *resource, CREFSTRING schemaName, CREFSTRING className)=0
 Gets the class definition for the specified class. See Feature Schema .
virtual MgStringCollectionGetClasses (MgResourceIdentifier *resource, CREFSTRING schemaName)=0
 Gets a list of the names of all classes available within a specified schema . See Feature Schema .
virtual MgStringCollectionGetConnectionPropertyValues (CREFSTRING providerName, CREFSTRING propertyName, CREFSTRING partialConnString)=0
 Gets a set of connection values that are used to make connections to an FDO provider that permits multiple connections.
virtual MgByteReaderGetFeatureProviders ()=0
 Gets a list of the available FDO providers together with other information such as the names of the connection properties for each provider. This information is in XML format according to the FeatureProviderRegistry schema.
virtual MgFeatureReaderGetLockedFeatures (MgResourceIdentifier *resource, CREFSTRING className, MgFeatureQueryOptions *options)=0
 Gets the locked features.
virtual MgLongTransactionReaderGetLongTransactions (MgResourceIdentifier *resource, bool bActiveOnly)=0
 Gets all available long transactions for the provider.
virtual MgByteReaderGetSchemaMapping (CREFSTRING providerName, CREFSTRING partialConnString)=0
 This method returns all of the logical to physical schema mappings for the specified provider and partial connection string.
virtual MgStringCollectionGetSchemas (MgResourceIdentifier *resource)=0
 Gets a list of the names of all of the schemas available in the feature source. See Feature Schema .
virtual MgSpatialContextReaderGetSpatialContexts (MgResourceIdentifier *resource, bool bActiveOnly)=0
 Gets all of the spatial contexts available in the feature source or just the active one.
virtual MgByteReaderGetWfsFeature (MgResourceIdentifier *featureSourceId, CREFSTRING featureClass, MgStringCollection *requiredProperties, CREFSTRING srs, CREFSTRING filter, INT32 maxFeatures)=0
 Retrieves feature information based on the supplied criteria.
virtual MgByteReaderGetWfsFeature (MgResourceIdentifier *featureSourceId, CREFSTRING featureClass, MgStringCollection *requiredProperties, CREFSTRING srs, CREFSTRING filter, INT32 maxFeatures, CREFSTRING wfsVersion, CREFSTRING outputFormat, CREFSTRING sortCriteria, CREFSTRING namespacePrefix, CREFSTRING namespaceUrl)=0
 Retrieves feature information based on the supplied criteria with specified format.
virtual MgFeatureReaderInsertFeatures (MgResourceIdentifier *resource, CREFSTRING className, MgPropertyCollection *propertyValues)=0
 Inserts a new feature into the specified feature class of the specified Feature Source.
virtual MgFeatureReaderInsertFeatures (MgResourceIdentifier *resource, CREFSTRING className, MgPropertyCollection *propertyValues, MgTransaction *trans)=0
 Inserts a new feature into the specified feature class of the specified Feature Source.
virtual MgFeatureReaderInsertFeatures (MgResourceIdentifier *resource, CREFSTRING className, MgBatchPropertyCollection *batchPropertyValues)=0
 Inserts a set of new features into the specified feature class of the specified Feature Source.
virtual MgFeatureReaderInsertFeatures (MgResourceIdentifier *resource, CREFSTRING className, MgBatchPropertyCollection *batchPropertyValues, MgTransaction *trans)=0
 Inserts a set of new features into the specified feature class of the specified Feature Source.
virtual STRING SchemaToXml (MgFeatureSchemaCollection *schema)=0
 Translates the FDO schema information in the provided MgFeatureSchemaCollection object into a string containing an XML representation of the schema definitions in the feature source. See Feature Schema .
virtual MgDataReaderSelectAggregate (MgResourceIdentifier *resource, CREFSTRING className, MgFeatureAggregateOptions *options)=0
 Selects groups of features from a feature source and applies filters to each of the groups according to the criteria set in the MgFeatureAggregateOptions argument. If you want to apply the criteria to all features without grouping them, use the MgFeatureService::SelectFeatures Method . See Filters and expressions .
virtual MgFeatureReaderSelectFeatures (MgResourceIdentifier *resource, CREFSTRING className, MgFeatureQueryOptions *options)=0
 Selects features from a feature source according to the criteria set in the MgFeatureQueryOptions argument The criteria are applied to all of the features in the feature source. If you want to apply the criteria to a subset of the features, use MgFeatureService::SelectAggregate. See Filters and expressions .
virtual MgFeatureReaderSelectFeatures (MgResourceIdentifier *resource, CREFSTRING className, MgFeatureQueryOptions *options, CREFSTRING coordinateSystem)=0
 Selects features from a feature source according to the criteria set in the MgFeatureQueryOptions argument The criteria are applied to all of the features in the feature source. Use the coordinateSystem argument to set the target coordinate system if you want to transform. If you want to apply the criteria to a subset of the features, use MgFeatureService::SelectAggregate. See Filters and expressions .
virtual bool SetLongTransaction (MgResourceIdentifier *featureSourceId, CREFSTRING longTransactionName)=0
 Set the active long transaction name for a feature source.
virtual bool TestConnection (CREFSTRING providerName, CREFSTRING connectionString)=0
 Connects to the Feature Provider specified in the connection string. See Connection To Feature Source .
virtual bool TestConnection (MgResourceIdentifier *resource)=0
 Connects to the feature source specified by the resource identifier and verifies that the feature source has been correctly configured and installed in the resource repository. See Connection To Feature Source .
virtual MgPropertyCollectionUpdateFeatures (MgResourceIdentifier *resource, MgFeatureCommandCollection *commands, bool useTransaction)=0
 Executes the MgDeleteFeatures, MgInsertFeatures, MgUpdateFeatures, MgLockFeatures or MgUnlockFeatures commands contained in the given MgFeatureCommandCollection object.
virtual MgPropertyCollectionUpdateFeatures (MgResourceIdentifier *resource, MgFeatureCommandCollection *commands, MgTransaction *transaction)=0
 Executes the MgDeleteFeatures, MgInsertFeatures, MgUpdateFeatures, MgLockFeatures or MgUnlockFeatures commands contained in the given MgFeatureCommandCollection object within the given transaction.
virtual INT32 UpdateMatchingFeatures (MgResourceIdentifier *resource, CREFSTRING className, MgPropertyCollection *properties, CREFSTRING filter)=0
 Updates all features that match the given filter with the specified property values.
virtual INT32 UpdateMatchingFeatures (MgResourceIdentifier *resource, CREFSTRING className, MgPropertyCollection *properties, CREFSTRING filter, MgTransaction *trans)=0
 Updates all features that match the given filter with the specified property values.
virtual MgFeatureSchemaCollectionXmlToSchema (CREFSTRING xml)=0
 Creates an MgFeatureSchemaCollection object using the XML schema provided.

Detailed Description

Provides an abstraction layer for the storage and retrieval of feature data in a technology-independent way. The API lets you determine what storage technologies are available and what capabilities they have. Access to the storage technology is modeled as a connection. For example, you can connect to a file and do simple insertions or connect to a relational database and do transaction-based operations.

Remarks:
The following use cases are supported: