Changes between Version 1 and Version 2 of MapGuideRfc77


Ignore:
Timestamp:
07/08/09 22:58:41 (15 years ago)
Author:
leaf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc77

    v1 v2  
    1414||Implementation Status||under development||
    1515||Proposed Milestone||2.2||
    16 ||Assigned PSC guide(s)||Bruce ||
     16||Assigned PSC guide(s)||Bruce Dechant||
    1717||'''Voting History'''||(vote date)||
    1818||+1||||
     
    2424== Overview ==
    2525
    26 This proposal is to extend MapGuide Feature Service to support applying schema.
     26This proposal is to extend MapGuide Feature Service to support creating more types of feature source.
    2727
    2828== Motivation ==
    2929
    30 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.
     30Currently method MgFeatureService::CreateFeatureSource() supports creating a SDF feature source only. It is really a limitation of Feature Service. This RFC will extend this method to support all file based feature sources.
    3131
    3232== Proposed Solution ==
    3333
    34 ==== Changes to !MgFeatureSchema, !MgClassDefinition and !MgPropertyDefinition ====
    35 
    36 !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.
     34==== MgFileFeatureSourceParams ====
     35
     36A new class MgFileFeatureSourceParams is added to represent parameters which are used to create a file-based feature source. The existing class MgCreateSdfParams inherits from it. Previously MgCreateSdfParams inherits from virtual base class MgFeatureSourceParams directly as shown in the following picture.
     37
     38The class definition of MgFileFeatureSourceParams is as follows.
    3739
    3840{{{
    3941/// \brief
    40 /// Contains one or more feature class definitions, which specify the structure
    41 /// of feature data in a datastore.
    42 class MgFeatureSchema: public MgNamedSerializable
     42/// Contains the parameters used to create an file-based feature source.
     43///
     44class MgFileFeatureSourceParams : public MgFeatureSourceParams
    4345{
    4446PUBLISHED_API:
    45     ......
    46     /// \brief
    47     /// Marks the schema for deletion.
    48     ///
    49     /// \return
    50     /// Returns nothing.
    51     void Delete();
    52 };
    53 
    54 /// \brief
    55 /// Defines a feature class belonging to a schema.
    56 class MgClassDefinition: public MgNamedSerializable
    57 {
    58 PUBLISHED_API:
    59     ......
    60     /// \brief
    61     /// Marks the class for deletion.
    62     ///
    63     /// \return
    64     /// Returns nothing.
    65     void Delete();
    66 };
    67 
    68 /// \brief
    69 /// Defines the base class for the concreate property definition classes which
    70 /// are used to create data, geometric, object, and raster property definitions.
    71 class MgPropertyDefinition: public MgProperty
    72 {
    73 PUBLISHED_API:
    74     ......
    75     /// \brief
    76     /// Marks the property for deletion.
    77     ///
    78     /// \return
    79     /// Returns nothing.
    80     void Delete();
     47    ///////////////////////////////////////////////
     48    /// \brief
     49    /// Constructs an empty MgFileFeatureSourceParams object.
     50///
     51/// The FDO provider name of the feature source.
     52    /// \param spatialContextName (String/string)
     53    MgFileFeatureSourceParams (CREFSTRING providerName);
     54   
     55    ///////////////////////////////////////////////
     56///brief
     57    /// Constructs an MgFileFeatureSourceParams object with the supplied
     58/// parameters.
     59    /// \param providerName (String/string)
     60/// FDO provider name of the feature source to be created.
     61    /// \param spatialContextName (String/string)
     62/// The name of the spatial context. This is a user defined spatial
     63/// context for the file feature source.
     64    /// \param srsWkt (String/string)
     65/// An OGC WKT string representing the coordinate system for the file
     66/// feature source.
     67    /// \param featureSchema (MgFeatureSchema)
     68    /// The schema definition for the file feature source.
     69    ///
     70    /// \return
     71    /// Returns nothing.
     72    ///
     73MgFileFeatureSourceParams (
     74CREFSTRING providerName,
     75CREFSTRING spatialContextName,
     76CREFSTRING srsWkt,
     77MgFeatureSchema* featureSchema);
     78
     79    ///////////////////////////////////////////////
     80    /// \brief
     81    /// Gets the FDO provider name of the feature source.
     82    ///
     83   /// \return
     84    /// Returns the FDO provider name of the feature source.
     85    ///
     86    virtual STRING GetProviderName();  /// __get
     87    ///////////////////////////////////////////////
     88    /// \brief
     89/// Gets the file name to be created or the folder name where files are created.
     90    ///
     91   /// \return
     92    /// Returns the file name to be created or the folder name where files are created.
     93    ///
     94    STRING GetFileOrFoldName();  /// __get, __set
     95
     96    ////////////////////////////////////////////////////////////////////////////
     97    /// \brief
     98    /// Sets the file name to be created or the folder name where files are created.
     99    ///
     100    /// \param name (String/string)
     101    /// The file name to be created or the folder name where files are created.
     102    ///
     103    /// \return
     104    /// Returns nothing.
     105    ///
     106    void Set GetFileOrFoldName (CREFSTRING name);
     107
     108    ///////////////////////////////////////////////
     109    /// \brief
     110    /// Gets the user-defined spatial context name.
     111    ///
     112   /// \return
     113    /// Returns the name of the spatial context.
     114    ///
     115    STRING GetSpatialContextName();  /// __get, __set
     116
     117    ////////////////////////////////////////////////////////////////////////////
     118    /// \brief
     119    /// Sets the user-defined spatial context name.
     120    ///
     121    /// \param name (String/string)
     122    /// The name of the spatial context
     123    ///
     124    /// \return
     125    /// Returns nothing.
     126    ///
     127    void SetSpatialContextName(CREFSTRING name);
     128
     129    /////////////////////////////////////////////
     130    /// \brief
     131    /// Gets the spatial context description.
     132    ///
     133    /// \return
     134    /// Returns the spatial context description.
     135    ///
     136    STRING GetSpatialContextDescription();  /// __get, __set
     137
     138    //////////////////////////////////////////////////////////////////////////
     139    /// \brief
     140    /// Sets the spatial context description.
     141    /// \param description (String/string)
     142    /// The description of the spatial context.
     143    ///
     144    /// \return
     145    /// Returns nothing.
     146    ///
     147    void SetSpatialContextDescription(CREFSTRING description);
     148
     149    ///////////////////////////////////////////////////////////////
     150    /// \brief
     151    /// Gets the well-known text description of the coordinate system.
     152    ///
     153    /// \return
     154    /// Returns the OGC WKT description of the coordinate system.
     155    ///
     156    STRING GetCoordinateSystemWkt();  /// __get, __set
     157
     158    //////////////////////////////////////////////////////////////////////////
     159    /// \brief
     160    /// Sets the well-know text string representing the coordinate system.
     161    ///
     162    /// \param srsWkt (String/string)
     163    /// The OGC WKT string representing the coordinate system.
     164    ///
     165    /// \return
     166    /// Returns nothing.
     167    ///
     168    void SetCoordinateSystemWkt(CREFSTRING srsWkt);
     169
     170    //////////////////////////////////////////////////////////
     171    /// \brief
     172    /// Gets the tolerance tolerance used for the X and Y
     173    /// ordinates.
     174    ///
     175    /// \return
     176    /// Returns the tolerance used for the X and Y ordinates.
     177    ///
     178    double GetXYTolerance();  /// __get, __set
     179
     180    ////////////////////////////////////////////////////////////////
     181    /// \brief
     182    /// Sets the tolerance tolerance for the X and Y ordinates.
     183    ///
     184    /// \param tolerance (double)
     185    /// The tolerance for the X and Y ordinates.
     186    ///
     187    /// \return
     188    /// Returns nothing.
     189    ///
     190    void SetXYTolerance(double tolerance);
     191
     192    ////////////////////////////////////////////////////////
     193    /// \brief
     194    /// Gets the tolerance tolerance for the Z ordinate.
     195    ///
     196    /// \return
     197    /// Returns the tolerance for the Z ordinate.
     198    ///
     199    double GetZTolerance();  /// __get, __set
     200
     201    ////////////////////////////////////////////////////////////////////////////
     202    /// \brief
     203    /// Sets the tolerance for the Z ordinate.
     204    ///
     205    /// \param tolerance (double)
     206    /// The tolerance for the Z ordinate.
     207    ///
     208    /// \return
     209    /// Returns nothing.
     210    ///
     211    void SetZTolerance(double tolerance);
     212
     213    ////////////////////////////////////////////////
     214    /// \brief
     215    /// Gets the feature schema definition.
     216    ///
     217    /// \return
     218    /// Returns a feature schema definition object.
     219    ///
     220    MgFeatureSchema* GetFeatureSchema();  /// __get, __set
     221
     222    ///////////////////////////////////////////////////////////////////
     223    /// \brief
     224    /// Sets the feature schema definition.
     225    ///
     226    /// \param featureSchema (MgFeatureSchema)
     227    /// The feature schema definition.
     228    ///
     229    /// \return
     230    /// Returns nothing.
     231    ///
     232    void SetFeatureSchema(MgFeatureSchema* featureSchema);
    81233};
    82234}}}