This page last changed on Oct 04, 2007 by jdeolive.

Setting up an equivalent of "svn log", given our current infrastructure, could be done by simply exposing the ChangeSet table as a read only feature type, since it has a bbox attribute which is a geometry.
There are a few drawbacks thought:

  • it's not possible to get a log for a specific feature type (since feature types modified in a tranaction are stored in an associated transaction)
  • the output format is not designed for readability
  • it's not possible to use all the formats for the version (time based, for example)

So, a new call is required, that mimics GetFeature, but allows to specify in the Query a starting and ending feature version. This can be done by extending Query into a DifferenceQuery that supports a fromFeatureVersion attribute, and creating the log operation accordingly (by copy and paste from GetFeature, since complex type restrictions are not widely supported by parsers).

   <xsd:complexType name="GetLogType">
      <xsd:complexContent>
         <xsd:extension base="wfs:BaseRequestType">
            <xsd:sequence>
               <xsd:element ref="wfsv:DifferenceQuery" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute name="resultType"
                           type="wfs:ResultTypeType" use="optional"
                           default="results">
            </xsd:attribute>
            <xsd:attribute name="outputFormat"
                           type="xsd:string" use="optional"
                           default="text/xml; subtype=gml/3.1.1">
            <xsd:attribute name="maxFeatures"
                           type="xsd:positiveInteger" use="optional">
         </xsd:extension>
      </xsd:complexContent>
   </xsd:complexType>
   <xsd:complexType name="DifferenceQueryType">
      <xsd:sequence>
        <xsd:element ref="ogc:Filter" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
      <xsd:attribute name="typeName" type="xsd:QName" use="required"/>
      <xsd:attribute name="fromFeatureVersion" type="xsd:string" default="FIRST"/>
      <xsd:attribute name="toFeatureVersion" type="xsd:string" use="optional" default="LAST"/>
   </xsd:complexType>

GetLog has basically the same schema as GetFeatures. Having an output format choice is important to have a variety of clients and display use it (see next paragraph). Having a "maxFeatures" attributes allows to limit the number of log entries returned, and closely mimics svn log --limit xxx. resultType allows to cheaply count how many log entries are there (not sure this is necessary, may well be removed).

Query has been replaced by DifferenceQuery, a versioned companion with two differences compared to the standard Query:

  • Does not have a property list, since it's meant for extracting diffs and logs from a feature type, not extracting actual features.
  • Has starting and ending version.

The default GetFeature output format is GML, which is good for WFS clients to map, but hard for a human being to read. I guess a client may want to show the output in html or pure text, because in this respect the call would be more similar to a WMS GetFeatureInfo call. So, GetLog will provide multiple representations just like GetFeature, and support both GML and a human readable format.

Doubts

DifferenceQueryType refers to the feature types we want the log for, not the

changesets
feature type, so it does not make sense to include the properties.
Yet the changeset has properties, and we may want to allow user to see only some (think html tabular output, is the geometry to be included in it?). As a result, we may want to add a list of propertyName elements that allow selection of the
changesets
properties.

Document generated by Confluence on May 14, 2014 23:00