Changes between Version 1 and Version 2 of MapGuideRfc119


Ignore:
Timestamp:
Jul 19, 2011, 1:38:48 AM (13 years ago)
Author:
samwang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc119

    v1 v2  
    1 = !MapGuide RFC 119 - Enhance URL for features in layer definition =
     1= !MapGuide RFC 119 - Enhance URL for features in vector layer definition =
    22
    33This page contains a change request (RFC) for the !MapGuide Open Source project.
     
    2424== Overview ==
    2525
    26 
     26This RFC proposes a solution to enhance customization of URL information for features in vector layer definition.
    2727
    2828== Motivation ==
    2929
     30Current layer definition schema already defines an element "URL" in "VectorLayerDefinition" complex type to store URL definition. However, we may need further details of the URL, such as description of URL which can be displayed to user. Also, we may assign an FDO expression to URL element which designates a layer level URL setting for features, but at the the same time, we may as well would like to override it for a specific feature. For example: the URL xml element has been assigned Fdo value
     31{{{
     32Concat('http://www.map.com/fid=', FeatId)
     33}}}
     34where 'FeatId' property is the property to identify a unique feature of the feature class. The the URL of features should be something like "http://www.map.com/fid=123" for feature with FeatID=123. At the same time, a user may want to change the URL this feature, e.g a hard coded string "www.google.com". We have to specify where to store this value.
     35 
     36== Proposed Solution ==
     37We need to change the layer definition a little bit. First we add a XML complex type named "URLDataType".
    3038
    31 == Proposed Solution ==
     39{{{
     40 <xs:complexType name="URLDataType">
     41    <xs:annotation>
     42      <xs:documentation>URL information for features.</xs:documentation>
     43    </xs:annotation>
     44    <xs:sequence>
     45      <xs:element name="Content" type="xs:string" minOccurs="0">
     46        <xs:annotation>
     47          <xs:documentation>The real address of the URL. This can be an string FDO expression.</xs:documentation>
     48        </xs:annotation>
     49      </xs:element>
     50      <xs:element name="Description" type="xs:string" minOccurs="0">
     51        <xs:annotation>
     52          <xs:documentation>The description of the URL. This can be an string FDO expression.</xs:documentation>
     53        </xs:annotation>
     54      </xs:element>
     55      <xs:element name="ContentOverride" type="xs:string" minOccurs="0">
     56        <xs:annotation>
     57          <xs:documentation>Specify the property name of the feature class where the override of URL content for a specific feature can be stored.</xs:documentation>
     58        </xs:annotation>
     59      </xs:element>
     60      <xs:element name="DescriptionOverride" type="xs:string" minOccurs="0">
     61        <xs:annotation>
     62          <xs:documentation>Specify the property name of the feature class where the override of URL description for a specific feature can be stored.</xs:documentation>
     63        </xs:annotation>
     64      </xs:element>
     65      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
     66    </xs:sequence>
     67  </xs:complexType>
     68}}}
     69The child elements this complex type is well explained in its annotation.
     70
     71Then change the original "URL" element in "VectorLayerDefinition" from simple type "xs:string" to complex type "URLDataType".
     72{{{
     73 <xs:element name="Url" type="URLDataType" minOccurs="0">
     74   <xs:annotation>
     75     <xs:documentation>The optional URL information associated with each feature.</xs:documentation>
     76   </xs:annotation>
     77 </xs:element>
     78}}}
    3279
    3380
     
    3885== Test Plan ==
    3986
    40 The existing unit tests (!MdfModel unit test) will be updated adding test of the 2 new field and the new version handling. The !MdfModel unit test verifies that the versioning / roundtripping behavior is working correctly.
     87The existing unit tests (!MdfModel unit test) will be updated adding test of the new field added and the new version handling. The !MdfModel unit test verifies that the versioning / roundtripping behavior is working correctly.
    4188
    4289== Funding / Resources ==