code: function(context) {
          if (context instanceof OpenLayers.Feature.Vector) {
              context = context.attributes;
          }
          var result = false;
          var got = context[this.property];
          var exp;
          switch(this.type) {
              case OpenLayers.Filter.Comparison.EQUAL_TO:
                  exp = this.value;
                  if(!this.matchCase &&
                     typeof got == "string" && typeof exp == "string") {
                      result = (got.toUpperCase() == exp.toUpperCase());
                  } else {
                      result = (got == exp);
                  }
                  break;
              case OpenLayers.Filter.Comparison.NOT_EQUAL_TO:
                  exp = this.value;
                  if(!this.matchCase &&
                     typeof got == "string" && typeof exp == "string") {
                      result = (got.toUpperCase() != exp.toUpperCase());
                  } else {
                      result = (got != exp);
                  }
                  break;
              case OpenLayers.Filter.Comparison.LESS_THAN:
                  result = got < this.value;
                  break;
              case OpenLayers.Filter.Comparison.GREATER_THAN:
                  result = got > this.value;
                  break;
              case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:
                  result = got <= this.value;
                  break;
              case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:
                  result = got >= this.value;
                  break;
              case OpenLayers.Filter.Comparison.BETWEEN:
                  result = (got >= this.lowerBoundary) &&
                      (got <= this.upperBoundary);
                  break;
              case OpenLayers.Filter.Comparison.LIKE:
                  var regexp = new RegExp(this.value, "gi");
                  result = regexp.test(got);
                  break;
              case OpenLayers.Filter.Comparison.IS_NULL:
                  result = (got === null);
                  break;
          }
          return result;
      }
docs: APIMethod: evaluate
  Evaluates this filter in a specific context.
  
  Parameters:
  context - {Object} Context to use in evaluating the filter.  If a vector
  feature is provided, the feature.attributes will be used as context.
  
  Returns:
  {Boolean} The filter applies.