wiki:MapGuideRfc70

Version 8 (modified by leaf, 15 years ago) ( diff )

--

MapGuide RFC 70 - Apply Schema

This page contains an change request (RFC) for the MapGuide Open Source project. More MapGuide RFCs can be found on the RFCs page.

Status

RFC Template Version(1.0)
Submission DateJune 26, 2009
Last ModifiedLeaf Li Timestamp
AuthorLeaf Li
RFC Statusdraft
Implementation Statusunder development
Proposed Milestone2.2
Assigned PSC guide(s)Tom Fukushima
Voting History(vote date)
+1
+0
-0
-1
no vote

Overview

This proposal is to extend MapGuide Feature Service to support applying schema.

Motivation

Currently MapGuide Web API doesn’t support any functionality to create or modify schema of a feature source. The RFC is used to eliminate this limitation.

Proposed Solution

Changes to MgFeatureSchema, MgClassDefinition and MgPropertyDefinition

ApplySchema need not only support adding, modifying but also support deleting schema elements. So we need a method to mark the schema element for deletion. The method Delete() will be added to classes MgFeatureSchema, MgClassDefinition, MgPropertyDefinition for it.

/// \brief
/// Contains one or more feature class definitions, which specify the structure
/// of feature data in a datastore. 
class MgFeatureSchema: public MgNamedSerializable
{
PUBLISHED_API:
    ......
    /// \brief
    /// Marks the schema for deletion.
    ///
    /// \return
    /// Returns nothing.
    void Delete();
};

/// \brief
/// Defines a feature class belonging to a schema. 
class MgClassDefinition: public MgNamedSerializable
{
PUBLISHED_API:
    ......
    /// \brief
    /// Marks the class for deletion.
    ///
    /// \return
    /// Returns nothing.
    void Delete();
};

/// \brief
/// Defines the base class for the concreate property definition classes which
/// are used to create data, geometric, object, and raster property definitions. 
class MgPropertyDefinition: public MgProperty
{
PUBLISHED_API:
    ......
    /// \brief
    /// Marks the property for deletion.
    ///
    /// \return
    /// Returns nothing.
    void Delete();
};

Changes to Feature Service

Feature Service will be extended to add one method to apply a schema.

class MgFeatureService : public MgService 
{
PUBLISHED_API:
    /// \brief
    /// Creates or updates a feature schema within the DataStore. 
    ///
    /// \param resource (MgResourceIdentifier)
    /// A resource identifier referring to a feature source.
    /// \param schema
    /// Input schema to be created or updated.
    ///
    /// \return
    /// Returns nothing.
    ///
    virtual void ApplySchema(
                         MgResourceIdentifier* resource,
                         MgFeatureSchema* schema) = 0;
};

Implications

This is new API only. There are no effects on existing applications. However, API documentation need to be updated.

Test Plan

Add unit tests for method MgFeatureService::ApplySchema into the existing Feature Service unit tests.

Funding/Resources

Supplied by Autodesk.

Note: See TracWiki for help on using the wiki.