Changes between Initial Version and Version 1 of MapGuideRfc12


Ignore:
Timestamp:
Feb 26, 2007, 12:21:39 AM (17 years ago)
Author:
jbirch
Comment:

Ported from OSGeo wiki

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc12

    v1 v1  
     1= !MapGuide RFC 12 - Unmanaged Data API Changes =
     2
     3This page contains an change request (RFC) for the !MapGuide Open Source project. 
     4More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page.
     5
     6
     7== Status ==
     8 
     9||RFC Template Version||1.0||
     10||Submission Date||15 January 2007||
     11||Last Modified||jasonbirch [[Timestamp]]||
     12||Author||Tony Fang||
     13||RFC Status||adopted||
     14||Implementation Status||completed||
     15||Proposed Milestone||1.2||
     16||Assigned PSC guide(s)||Tom Fukushima||
     17||'''Voting History'''||Jan 24, 2007||
     18||+1||Tom, Bruce, Jason, Paul, Haris, Andy, Bob||
     19||+0||||
     20||-0||||
     21||-1||||
     22 
     23== Overview ==
     24
     25Changes to the Unmanaged Data API specified in http://wiki.osgeo.org/index.php/MapGuide_RFC_2_-_Unmanaged_Data_APIs.
     26
     27Also changes to the Server Admin PHP pages allowing editing of the serverconfig.ini are specified in more detail.
     28
     29== Motivation ==
     30
     31These changes will:
     32 * allow scaling to sites containing many unmanaged data resource files.
     33 * disambiguate the response.
     34 * treat the alias component as a folder grammatically.
     35 * simplify the API implementation.
     36 * eliminate the need for the redundant EnumerateUnmanagedDataMappings API method.
     37 * give the client better control of desired query results.
     38
     39== Proposed Solution ==
     40
     41These are the proposed changes to the Unmanaged Data APIs.
     42 * Remove EnumerateUnmanagedDataMappings method.
     43 * Modify EnumerateUnmanagedData API method as specified in the Technical section.
     44   * modify arguments to ''path'', ''recursive'', ''select'', and ''filter''
     45   * ''path''="", ''recursive''=false, ''select''="FOLDERS" yields the same result as EnumerateUnmanagedDataMappings
     46   * All file types are returnable with a client-customizable filter
     47   * Return an UnmanagedDataList (see UnmanagedDataList-1.0.0.xsd below) instead of a StringCollection.
     48 * Windows hidden folders and files are returned (already works this way after RFC2 implementation).
     49 * All other aspects of this API method remain the same as before.
     50   * Unicode mappings and filenames are supported.
     51   * Square brackets are not allowed for mapping names.
     52   * Spaces are allowed in mapping names.
     53   * Mappings can be physical drives or network paths.
     54
     55These additions to the Server Admin PHP pages will allow editing of the UnmanagedDataMappings section in the serverconfig.ini.
     56
     57 * Below "Configure WFS", add an entry called "Configure Unmanaged Data".
     58 * "Configure Unmanaged Data" will display a table with 3 columns:
     59   * radio button denoting current selection
     60   * Mapping Name
     61   * Location
     62 * The table will also have 3 buttons:
     63   * "Add Mapping" will display a page which allows you to add a new mapping.
     64   * "Edit Mapping" will display a page which allows you to edit the currently selected mapping location.
     65   * "Delete Mapping" will delete the currently selected mapping.
     66 * This is similar to the "Manage Users" table, except with only 3 columns.
     67 * The server must be re-started before any Unmanaged Data serverconfig.ini changes will take effect.
     68
     69=== Technical ===
     70
     71virtual MgByteReader  * MgResourceService::EnumerateUnmanagedData(CREFSTRING ''path'', bool ''recursive'', CREFSTRING ''select'', CREFSTRING ''filter'');
     72
     73Enumerates the available unmanaged data from the server.
     74
     75'''Parameters:'''
     76
     77''path'' Specifies an unmanaged data mapping with optional subfolder path. It must begin with a legitimate mapping. e.g. "[alias1]" or "[alias1]subfolder1/subfolder2". It cannot begin with a drive or folder path. Default value is "", which corresponds to the "Unmanaged Data Root". At the top level of the "Unmanaged Data Root", you can only see the unmanaged data mappings. No data files can be seen in the top level of the "Unmanaged Data Root".
     78
     79''recursive'' If it is true, it will recurse into all subfolders looking for files and/or subfolders. If it is false, it will only seek files and/or subfolders at the current level. Default value is false.
     80
     81''select'' Specifies the type of data to return. The choices are "FILES", "FOLDERS", or "BOTH". Default value is "FOLDERS".
     82
     83''filter'' Specifies an optional file extension filter on files returned. Use a ";" to delimit multiple file extension filters. e.g. "shp", "shp;shx;prj", or "jpg;jpeg;jpe;bmp;png". The file filter is case-insensitive.
     84If ''select''="FOLDERS", then ''filter'' is ignored. Default value is "", which returns all files.
     85
     86
     87'''Returns:'''
     88
     89Returns an MgByteReader object containing the list of all unmanaged data files and/or folders. The list is in XML format using the UnmanagedDataList  schema.
     90
     91The new schema will be named ''UnmanagedDataList-1.0.0.xsd''. This is closely analogous to ''ResourceList-1.0.0.xsd'' which specifies the response of EnumerateResources.
     92
     93{{{
     94  <xs:element name="UnmanagedDataList">
     95    <xs:annotation>
     96      <xs:documentation>Unmanaged data list</xs:documentation>
     97    </xs:annotation>
     98    <xs:complexType>
     99      <xs:choice minOccurs="0" maxOccurs="unbounded">
     100        <xs:element name="UnmanagedDataFolder">
     101          <xs:complexType>
     102            <xs:sequence>
     103              <xs:element name="UnmanagedDataId" type="xs:string"/>
     104              <xs:element name="CreatedDate" type="xs:dateTime"/> (MAYBE)
     105              <xs:element name="ModifiedDate" type="xs:dateTime"/> (MAYBE)
     106              <xs:element name="NumberOfFolders" type="xs:integer"/>
     107              <xs:element name="NumberOfFiles" type="xs:integer"/>
     108            </xs:sequence>
     109          </xs:complexType>
     110        </xs:element>
     111        <xs:element name="UnmanagedDataFile">
     112          <xs:complexType>
     113            <xs:sequence>
     114              <xs:element name="UnmanagedDataId" type="xs:string"/>
     115              <xs:element name="CreatedDate" type="xs:dateTime"/> (MAYBE)
     116              <xs:element name="ModifiedDate" type="xs:dateTime"/> (MAYBE)
     117              <xs:element name="Size" type="xs:integer"/> (MAYBE)
     118            </xs:sequence>
     119          </xs:complexType>
     120        </xs:element>
     121      </xs:choice>
     122    </xs:complexType>
     123  </xs:element>
     124}}}
     125
     126=== API Examples ===
     127
     128==== Windows Server ====
     129
     130serverconfig.ini contains:
     131
     132{{{
     133[UnmanagedDataMappings]
     134alias1 = c:\mydata\sdf
     135alias2 = \\other_machine\public_data
     136}}}
     137
     138The server machine contains the following files:
     139
     140 * c:\mydata\sdf\sewers.sdf
     141 * c:\mydata\sdf\buildings.sdf
     142 * c:\mydata\sdf\canada\bc.sdf
     143 * c:\mydata\sdf\canada\ab.sdf
     144 * c:\mydata\sdf\canada\sk.sdf
     145 * \\other_machine\public_data\readme.txt
     146 * \\other_machine\public_data\raster\world.bmp
     147 * \\other_machine\public_data\raster\africa.tiff
     148 * \\other_machine\public_data\raster\usa\usa.jpeg
     149 * \\other_machine\public_data\shp\squares.shp
     150 * \\other_machine\public_data\shp\circles.shp
     151
     152
     153'''EnumerateUnmanagedData API Examples on Windows server'''
     154
     155||''path''||''recursive''||''select''||''filter''||FOLDERS RESULT||FILES RESULT||Notes||
     156|| ""|| false|| "FOLDERS"|| ""|| [alias1][[BR]][alias2]|||| Equivalent to removed EnumerateUnmanagedDataMappings. This is the "Unmanaged Data Root." ||
     157|| ""|| true|| "FOLDERS"|| ""|| [alias1][[BR]][alias1]canada/[[BR]][alias2][[BR]][alias2]raster/[[BR]][alias2]raster/usa/|||| Note the forward slash. ||
     158|| ""|| false|| "FILES"|| ""|||||| No files returned. ||
     159|| ""|| true|| "FILES"|| ""|||| [alias1]sewers.sdf[[BR]][alias1]buildings.sdf[[BR]][alias1]canada/bc.sdf[[BR]][alias1]canada/ab.sdf[[BR]][alias1]canada/sk.sdf[[BR]][alias2]readme.txt[[BR]][alias2]raster/world.bmp[[BR]][alias2]raster/africa.tiff[[BR]][alias2]raster/usa/usa.jpeg[[BR]][alias2]shp/squares.shp[[BR]][alias2]shp/circles.shp|| All files returned. ||
     160|| ""|| true|| "BOTH"|| ""|| [alias1][[BR]][alias1]canada/[[BR]][alias2][[BR]][alias2]raster/[[BR]][alias2]raster/usa/|| [alias1]sewers.sdf[[BR]][alias1]buildings.sdf[[BR]][alias1]canada/bc.sdf[[BR]][alias1]canada/ab.sdf[[BR]][alias1]canada/sk.sdf[[BR]][alias2]readme.txt[[BR]][alias2]raster/world.bmp[[BR]][alias2]raster/africa.tiff[[BR]][alias2]raster/usa/usa.jpeg[[BR]][alias2]shp/squares.shp[[BR]][alias2]shp/circles.shp|| All folders and files returned. ||
     161|| "[alias1]"|| false|| "FILES"|| ""|||| [alias1]sewers.sdf[[BR]][alias1]buildings.sdf[[BR]]||||
     162|| "[alias2]raster/usa"|| true or false|| "FILES"|| ""|||| [alias2]raster/usa/usa.jpeg[[BR]]|| The result is the same whether recursive is true or false. ||
     163|| "[alias2]" or ""|| true|| "FILES"|| "bmp;tiff"|||| [alias2]raster/world.bmp[[BR]][alias2]raster/africa.tiff[[BR]]|| The result is the same whether path is "[alias2]" or "". ||
     164
     165==== Linux Server ====
     166
     167serverconfig.ini contains:
     168
     169{{{
     170[UnmanagedDataMappings]
     171alias1 = /user/Thelonious/sdf
     172alias2 = /mnt/other_machine/public_data
     173}}}
     174
     175The server machine contains the following files:
     176
     177 * /user/Thelonious/sdf/'''sewers.sdf'''
     178 * /user/Thelonious/sdf/'''Sewers.SDF'''
     179 * /user/Thelonious/sdf/readme.txt
     180 * /user/Thelonious/sdf/sewers.sdf.bak
     181 * /mnt/other_machine/public_data/readme.txt
     182 * /mnt/other_machine/public_data/raster/world.bmp
     183 * /mnt/other_machine/public_data/raster/africa.tiff
     184 * /mnt/other_machine/public_data/raster/usa/usa.jpeg
     185 * /mnt/other_machine/public_data/shp/squares.shp
     186 * /mnt/other_machine/public_data/shp/circles.shp
     187
     188'''EnumerateUnmanagedData API Examples on Linux server'''
     189
     190||''path''||''recursive''||''select''||''filter''||FOLDERS RESULT||FILES RESULT||Notes
     191|| "" || false || "FOLDERS" || "" || [alias1][[BR]][alias2] || || Equivalent to removed EnumerateUnmanagedDataMappings. This is the "Unmanaged Data Root." ||
     192|| "" || true || "FOLDERS" || "" || [alias1][[BR]][alias2][[BR]][alias2]raster/[[BR]][alias2]raster/usa/ || || Note the forward slash. ||
     193|| "" || false || "FILES" || "" || || || No files returned. ||
     194|| "" || true || "FILES" || "" || || [alias1]sewers.sdf[[BR]] [alias1]Sewers.SDF[[BR]][alias1]readme.txt[[BR]][alias1]sewers.sdf.bak[[BR]][alias2]readme.txt[[BR]][alias2]raster/world.bmp[[BR]][alias2]raster/africa.tiff[[BR]][alias2]raster/usa/usa.jpeg[[BR]][alias2]shp/squares.shp[[BR]][alias2]shp/circles.shp || All files returned. Notice sewers.sdf and Sewers.SDF are both returned. ||
     195|| "" || true || "BOTH" || "" || [alias1][[BR]][alias2][[BR]][alias2]raster/[[BR]][alias2]raster/usa/[[BR]]|| [alias1]sewers.sdf[[BR]][alias1]Sewers.SDF[[BR]][alias1]readme.txt[[BR]][alias1]sewers.sdf.bak[[BR]][alias2]readme.txt[[BR]][alias2]raster/world.bmp[[BR]][alias2]raster/africa.tiff[[BR]][alias2]raster/usa/usa.jpeg[[BR]][alias2]shp/squares.shp[[BR]][alias2]shp/circles.shp || All folders and files returned. Notice sewers.sdf and Sewers.SDF are both returned. ||
     196|| "[alias1]" || false || "FILES" || "sdf" || || [alias1]sewers.sdf[[BR]][alias1]Sewers.SDF || Note the mixed case of the sdf extension. Notice sewers.sdf and Sewers.SDF are both returned. ||
     197|| "[alias2]raster/usa" || true or false || "FILES" || "" || || [alias2]raster/usa/usa.jpeg[[BR]] || The result is the same whether recursive is true or false. ||
     198|| "[alias2]" or "" || true || "FILES" || "bmp;tiff" || || [alias2]raster/world.bmp[[BR]][alias2]raster/africa.tiff[[BR]] || The result is the same whether path is "[alias2]" or "". ||
     199
     200
     201== Implications ==
     202
     203API documentation will need to be updated.
     204
     205== Test Plan ==
     206
     207 * Update webtier test pages to use the updated API methods.
     208 * Remove test for eliminated EnumerateUnmanagedDataMappings.
     209
     210== Funding/Resources ==
     211
     212Autodesk to supply the resources to make the required changes.
     213