Skip to content

Commit

Permalink
Modified filters to include the ogc:Filter tag in the output
Browse files Browse the repository at this point in the history
  • Loading branch information
Damon Oehlman committed Jul 2, 2012
1 parent d4fb866 commit 30211ac
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 24 deletions.
2 changes: 1 addition & 1 deletion pkg/amd/ogc.js
Expand Up @@ -63,7 +63,7 @@ define('ogc', ['./geofilter', 'formatter', 'underscore'], function(geofilter, fo
output = '<ogc:And>' + output + '</ogc:And>';
}

return output;
return '<ogc:Filter>' + output + '</ogc:Filter>';
});

// initialise the templates
Expand Down
2 changes: 1 addition & 1 deletion pkg/cjs/ogc.js
Expand Up @@ -66,7 +66,7 @@ geofilter.registerConverter('ogc', function(rules, opts) {
output = '<ogc:And>' + output + '</ogc:And>';
}

return output;
return '<ogc:Filter>' + output + '</ogc:Filter>';
});

// initialise the templates
Expand Down
2 changes: 1 addition & 1 deletion pkg/iife/ogc.js
Expand Up @@ -65,7 +65,7 @@
output = '<ogc:And>' + output + '</ogc:And>';
}

return output;
return '<ogc:Filter>' + output + '</ogc:Filter>';
});

// initialise the templates
Expand Down
2 changes: 1 addition & 1 deletion pkg/oldschool/ogc.js
Expand Up @@ -65,7 +65,7 @@
output = '<ogc:And>' + output + '</ogc:And>';
}

return output;
return '<ogc:Filter>' + output + '</ogc:Filter>';
});

// initialise the templates
Expand Down
2 changes: 1 addition & 1 deletion pkg/raw/ogc.js
Expand Up @@ -63,7 +63,7 @@ geofilter.registerConverter('ogc', function(rules, opts) {
output = '<ogc:And>' + output + '</ogc:And>';
}

return output;
return '<ogc:Filter>' + output + '</ogc:Filter>';
});

// initialise the templates
Expand Down
2 changes: 1 addition & 1 deletion src/converters/ogc.js
Expand Up @@ -59,7 +59,7 @@ geofilter.registerConverter('ogc', function(rules, opts) {
output = '<ogc:And>' + output + '</ogc:And>';
}

return output;
return '<ogc:Filter>' + output + '</ogc:Filter>';
});

// initialise the templates
Expand Down
10 changes: 6 additions & 4 deletions test/comparisons/ogc/heavierThan20.xml
@@ -1,4 +1,6 @@
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>WEIGHT</ogc:PropertyName>
<ogc:Literal>20</ogc:Literal>
</ogc:PropertyIsGreaterThan>
<ogc:Filter>
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>WEIGHT</ogc:PropertyName>
<ogc:Literal>20</ogc:Literal>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>
10 changes: 6 additions & 4 deletions test/comparisons/ogc/likeSand.xml
@@ -1,4 +1,6 @@
<ogc:PropertyIsLike wildCard="*" singleChar="?" escapeChar="\\" matchCase="false">
<ogc:PropertyName>SEDCLASS</ogc:PropertyName>
<ogc:Literal>sand*</ogc:Literal>
</ogc:PropertyIsLike>
<ogc:Filter>
<ogc:PropertyIsLike wildCard="*" singleChar="?" escapeChar="\\" matchCase="false">
<ogc:PropertyName>SEDCLASS</ogc:PropertyName>
<ogc:Literal>sand*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
22 changes: 12 additions & 10 deletions test/comparisons/ogc/sandyAndHeavy.xml
@@ -1,10 +1,12 @@
<ogc:And>
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>WEIGHT</ogc:PropertyName>
<ogc:Literal>20</ogc:Literal>
</ogc:PropertyIsGreaterThan>
<ogc:PropertyIsLike wildCard="*" singleChar="?" escapeChar="\\" matchCase="false">
<ogc:PropertyName>SEDCLASS</ogc:PropertyName>
<ogc:Literal>sand*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:And>
<ogc:Filter>
<ogc:And>
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>WEIGHT</ogc:PropertyName>
<ogc:Literal>20</ogc:Literal>
</ogc:PropertyIsGreaterThan>
<ogc:PropertyIsLike wildCard="*" singleChar="?" escapeChar="\\" matchCase="false">
<ogc:PropertyName>SEDCLASS</ogc:PropertyName>
<ogc:Literal>sand*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:And>
</ogc:Filter>

0 comments on commit 30211ac

Please sign in to comment.