docs: function(filter, params) {
              params = params || {};
              var className = filter.CLASS_NAME;
              var filterType = className.substring(className.lastIndexOf(".") + 1);
              switch (filterType) {
                  case "Spatial":
                      switch (filter.type) {
                          case OpenLayers.Filter.Spatial.BBOX:
                              params.bbox = filter.value.toArray();
                              if (this.srsInBBOX && filter.projection) {
                                  params.bbox.push(filter.projection.getCode());
                              }
                              break;
                          case OpenLayers.Filter.Spatial.DWITHIN:
                              params.tolerance = filter.distance;
                              // no break here
                          case OpenLayers.Filter.Spatial.WITHIN:
                              params.lon = filter.value.x;
                              params.lat = filter.value.y;
                              break;
                          default:
                              OpenLayers.Console.warn(
                                  "Unknown spatial filter type " + filter.type);
                      }
                      break;
                  case "Comparison":
                      var op = cmpToStr[filter.type];
                      if (op !== undefined) {
                          var value = filter.value;
                          if (filter.type == OpenLayers.Filter.Comparison.LIKE) {
                              value = regex2value(value);
                              if (this.wildcarded) {
                                  value = "%" + value + "%";
                              }
                          }
                          params[filter.property + "__" + op] = value;
                          params.queryable = params.queryable || [];
                          params.queryable.push(filter.property);
                      } else {
                          OpenLayers.Console.warn(
                              "Unknown comparison filter type " + filter.type);
                      }
                      break;
                  case "Logical":
                      if (filter.type === OpenLayers.Filter.Logical.AND) {
                          for (var i=0,len=filter.filters.length; i<len; i++) {
                              params = this.write(filter.filters[i], params);
                          }
                      } else {
                          OpenLayers.Console.warn(
                              "Unsupported logical filter type " + filter.type);
                      }
                      break;
                  default:
                      OpenLayers.Console.warn("Unknown filter type " + filterType);
              }
              return params;
          }