Changes between Version 3 and Version 4 of FDORfc6


Ignore:
Timestamp:
Jul 22, 2007, 7:40:15 PM (17 years ago)
Author:
yangm
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc6

    v3 v4  
    2222== Overview ==
    2323
    24 This section briefly describes the problem set, and the proposed solution in general terms.  It should be deliberately short, a couple of sentences or so.
     24In the current design of the OSGeo OGC FDO WMS Provider(s), no mechanism exists to allow a client to retrieve all supported CS’s for a specific WMS layer, neither for image format and style information.
     25In order to resolve this issue, the WMS providers should be enhanced to add 3 new commands for retrieving all supported image format, style and CS information from WMS server.
    2526
    2627== Motivation ==
     
    3031== Proposed Solution ==
    3132
    32 This is a more detailed description of the actual changes desired.  The contents of this section will vary based on the target of the RFC, be it a technical change, website change, or process change.  For example, for a technical change, items such as files, XML schema changes, and API chances would be identified.  For a process change, the new process would be laid out in detail.  For a website change, the files affected would be listed.
     33In order not to impact the standard FDO command interface, we plan just adding those commands interface for WMS only. Thus, we also declare a new enum type: WmsCommandType for WMS provider.
     34The following shows the new enumeration.
     35// This number is defined so our custom command would not clash with other
     36// custom provider commands.
     37#define WMS_FIRST_PROVIDER_COMMAND 1800
     38
     39/// \brief
     40/// The WmsCommandType enumeration defines the list of WMS+ commands.
     41enum WmsCommandType{
     42
     43    /// Represents the GetImageFormats command.
     44    WmsCommandType_GetImageFormats =  FdoCommandType_FirstProviderCommand + WMS_FIRST_PROVIDER_COMMAND,
     45    WmsCommandType_GetLayerStyles,
     46    WmsCommandType_GetLayerCRSNames
     47};
     48
     49
     503 new commands will be added to the FDO WMS Providers, individually for getting image formats, style and CS. The usage and the new classes and interfaces are listed as follows.
     51
     52The following is an example of how WMS GetImageFormats command would be used to get the entire supported image formats list form WMS server after connection.
     53FdoPtr<FdoIGetImageFormats > cmd = static_cast<FdoIGetImageFormats *> (conn->CreateCommand (WmsCommandType_GetImageFormats));
     54FdoPtr<FdoStringCollection> result = cmd->Execute ();
     55
     56class FdoIGetImageFormats: public FdoICommand
     57{
     58    friend class FdoIConnection;
     59
     60public:
     61    /// \brief
     62    /// Executes the GetImageFormats command and returns a
     63    /// FdoStringCollection, which contains all image formats supported by WMS server.
     64    ///
     65    /// \return
     66    /// Returns the image format collection supported by WMS server
     67     ///
     68    FDO_API virtual FdoStringCollection * Execute() = 0;
     69};
     70
     71class FdoWmsGetImageFormatsCommand : public FdoWmsCommand<FdoIGetImageFormats>
     72{
     73    friend class FdoWmsConnection;
     74
     75protected:
     76    //
     77    // Prevent the use of the copy constructor by definning it and not implemeting it.
     78    // DO NOT IMPLEMENT
     79    FdoWmsGetImageFormatsCommand (const FdoWmsGetImageFormatsCommand &right);
     80
     81    /// <summary>Constructs an instance of a command for the given connection. </summary>
     82    /// <returns>Returns nothing</returns>
     83    FdoWmsGetImageFormatsCommand (FdoIConnection* connection);
     84
     85    /// <summary>Virtual Destructor.</summary>
     86    /// <returns>Returns nothing</returns>
     87    virtual ~ FdoWmsGetImageFormatsCommand (void);
     88
     89    /// <summary>Dispose this object.</summary>
     90    /// <returns>Returns nothing</returns>
     91    virtual void Dispose ();
     92
     93public:
     94    //
     95    // Prevent the use of the Assignment Operation by definning it and not implemeting it.
     96    // DO NOT IMPLEMENT
     97    FdoWmsGetImageFormatsCommand & operator= (const FdoWmsGetImageFormatsCommand &right);
     98
     99    /// <summary>
     100    /// Executes the GetFormats command and returns a
     101    /// FdoStringCollection, which contains all image formats supported by WMS server.
     102    /// <returns>
     103    /// Returns the image format collection supported by WMS server.
     104    /// </returns>
     105    virtual FdoStringCollection* Execute ();
     106
     107};
     108
     109
     110The following is an example of how WMS GetLayerStyles command would be used to get the entire supported image formats list form WMS server after connection.
     111FdoPtr< FDOIGetLayerStyles > cmd = static_cast< FDOIGetLayerStyles *> (conn->CreateCommand (WmsCommandType_GetLayerStyles));
     112cmd->SetLayerName(L”ABC”);
     113FdoPtr<FdoStringCollection> result = cmd->Execute ();
     114
     115class FdoIGetLayerStyles : public FdoICommand
     116{
     117    friend class FdoIConnection;
     118
     119public:
     120    /// \brief
     121    /// Gets the name of the layer to get all supported styles.
     122    ///
     123    /// \return
     124    /// Returns the layer name
     125    ///
     126    FDO_API virtual FdoString* GetLayerName() = 0;
     127
     128    /// \brief
     129    /// Sets the name of the layer to get all supported styles.
     130    /// This function is mandatory; if not specified,
     131    /// execution of the command will throw exception.
     132    ///
     133    /// \param value
     134    /// Input the layer name
     135    ///
     136    /// \return
     137    /// Returns nothing
     138    ///
     139    FDO_API virtual void SetLayerName(FdoString* value) = 0;
     140
     141    /// \brief
     142    /// Executes the GetLayerStyles command and returns a
     143    /// FdoStringCollection, which contains all styles supported by specific layer.
     144    ///
     145    /// \return
     146    /// Returns the styles collection supported by server
     147    ///
     148    FDO_API virtual FdoStringCollection * Execute() = 0;
     149};
     150
     151class FdoWmsGetLayerStylesCommand : public FdoWmsCommand< FDOIGetLayerStyles >
     152{
     153    friend class FdoWmsConnection;
     154
     155protected:
     156    //
     157    // Prevent the use of the copy constructor by definning it and not implemeting it.
     158    // DO NOT IMPLEMENT
     159    FdoWmsGetLayerStylesCommand  (const FdoWmsGetLayerStylesCommand  &right);
     160
     161    // <summary>Constructs an instance of a command for the given connection. </summary>
     162    // <returns>Returns nothing</returns>
     163    FdoWmsGetLayerStylesCommand  (FdoIConnection* connection);
     164
     165    // <summary>Virtual Destructor.</summary>
     166    // <returns>Returns nothing</returns>
     167    virtual ~ FdoWmsGetLayerStylesCommand  (void);
     168
     169    // <summary>Dispose this object.</summary>
     170    // <returns>Returns nothing</returns>
     171    virtual void Dispose ();
     172
     173public:
     174    //
     175    // Prevent the use of the Assignment Operation by definning it and not implemeting it.
     176    // DO NOT IMPLEMENT
     177    FdoWmsGetLayerStylesCommand  & operator= (const FdoWmsGetLayerStylesCommand  &right);
     178
     179    /// <summary> Gets the name of the layer to get all supported styles. </summary>
     180    /// <returns>Returns the layer name</returns>
     181    virtual FdoString* GetLayerName ();
     182
     183    /// <summary> Sets the name of the layer to get all supported styles
     184    /// This function is mandatory; if not specified,
     185    /// execution of the command will throw exception.
     186    /// </summary>
     187    /// <param name="value">Input the layer name</param>
     188    /// <returns>Returns nothing</returns>
     189    virtual void SetLayerName (FdoString* value);
     190
     191    /// <summary>
     192    /// Executes the GetLayerStyles command and returns a
     193    /// FdoStringCollection, which contains entire styles supported by layer.
     194    /// <returns> Returns the style collection supported by layer.
     195    ///</returns>
     196    virtual FdoStringCollection* Execute ();
     197
     198private:
     199    FdoStringP mLayerName;
     200};
     201
     202
     203The following is an example of how WMS GetLayerCRSNames command would be used to get the entire supported image formats list form WMS server after connection.
     204FdoPtr<FdoIGetLayerCRSNames> cmd = static_cast<FdoIGetLayerCRSNames*> (conn->CreateCommand (FdoCommandType_GetLayerSupportedCRSNames));
     205cmd->SetLayerName(L“ABC”);
     206FdoPtr<FdoStringCollection> result = cmd->Execute ();
     207
     208class FdoIGetLayerCRSNames: public FdoICommand
     209{
     210    friend class FdoIConnection;
     211
     212public:
     213    /// \brief
     214    /// Gets the name of the layer to get all supported styles.
     215    ///
     216    /// \return
     217    /// Returns the layer name
     218    ///
     219    FDO_API virtual FdoString* GetLayerName() = 0;
     220
     221    /// \brief
     222    /// Sets the name of the layer to get all supported styles.
     223    /// This function is mandatory; if not specified,
     224    /// execution of the command will throw exception.
     225    ///
     226    /// \param value
     227    /// Input the layer name
     228    ///
     229    /// \return
     230    /// Returns nothing
     231    ///
     232    FDO_API virtual void SetLayerName(FdoString* value) = 0;
     233
     234    /// \brief
     235    /// Executes the GetCRSNames command and returns a
     236    /// FdoStringCollection, which contains entire CRS names supported by server.
     237    ///
     238    /// \return
     239    /// Returns the CRS name collection supported by server
     240    ///
     241    FDO_API virtual FdoStringCollection * Execute() = 0;
     242};
     243
     244class FdoWmsGetLayerCRSNamesCommand: public FdoWmsCommand< FdoIGetLayerCRSNames >
     245{
     246    friend class FdoWmsConnection;
     247
     248protected:
     249    //
     250    // Prevent the use of the copy constructor by definning it and not implemeting it.
     251    // DO NOT IMPLEMENT
     252    FdoWmsGetLayerCRSNamesCommand (const FdoWmsGetLayerCRSNamesCommand &right);
     253
     254    // <summary>Constructs an instance of a command for the given connection. </summary>
     255    // <returns>Returns nothing</returns>
     256    FdoWmsGetLayerCRSNamesCommand (FdoIConnection* connection);
     257
     258    // <summary>Virtual Destructor.</summary>
     259    // <returns>Returns nothing</returns>
     260    virtual ~ FdoWmsGetLayerCRSNamesCommand (void);
     261
     262    // <summary>Dispose this object.</summary>
     263    // <returns>Returns nothing</returns>
     264    virtual void Dispose ();
     265
     266public:
     267    //
     268    // Prevent the use of the Assignment Operation by defining it and not implementing it.
     269    // DO NOT IMPLEMENT
     270    FdoWmsGetLayerCRSNamesCommand & operator= (const FdoWmsGetLayerCRSNamesCommand &right);
     271
     272    /// <summary> Gets the name of the layer to get all supported CRS names. </summary>
     273    /// <returns>Returns the layer name</returns>
     274    virtual FdoString* GetLayerName ();
     275
     276    /// <summary> Sets the name of the layer to get all supported CRS names.
     277    /// This function is mandatory; if not specified,
     278    /// execution of the command will throw exception.
     279    /// </summary>
     280    /// <param name="value">Input the layer name</param>
     281    /// <returns>Returns nothing</returns>
     282    virtual void SetLayerName (FdoString* value);
     283
     284    /// <summary>
     285    /// Executes the GetLayerCRSNames command and returns a
     286    /// FdoStringCollection, which contains entire CRS names supported by layer.
     287    /// <returns> Returns the CRS names collection supported by layer.
     288    ///</returns>
     289    virtual FdoStringCollection* Execute ();
     290
     291private:
     292    FdoStringP mLayerName;
     293};
    33294
    34295== Implications ==
    35296
    36 This section allows discussion of the repercussions of the change, such as whether there will be any breakage in backwards compatibility, if documentation will need to be updated, etc.
     297This change will not cause any side-effects, nor any compatibility problems.
    37298
    38299== Test Plan ==
    39300
    40 How the proposed change will be tested, if applicable.  New unit tests should be detailed here???
     301Existing unit tests will be expanded to test those changes.
    41302
    42303== Funding/Resources ==
    43304
    44 This section will confirm that the proposed feature has enough support to proceed.  This would typically mean that the entity making the changes would put forward the RFC, but a non-developer could act as an RFC author if they are sure they have the funding to cover the change.
     305Autodesk to provide resources / funding to update the WMS provider.