geopython/OWSLib — pull request #60 by kwilcox (2013-06-05 17:11:57+00:00)
Title: FES and CSW improvements.  Testing cleanup.

## Filters
fes.py now implements most of the OGC 1.1.0 Filter spec. There are now class based filters such that someone can do:

```python
import owslib.fes
less_filter = fes.PropertyIsLessThan("property", "value")
like_filter = fes.PropertyIsLike("property,"*value*",wildCard="*")
and_filter = fes.And(operations=[less_filter, like_filter])
or_filter = fes.Or(operations=[less_filter, like_filter])
```
The improvements to fes.py are demonstrated in the new test file: fes_ogc_filters.py

## CSW
To go along with the filter improvements, a user can now query a CSW server using any combinations of filters (OgcExpressions) using the new `get_filtered_records` parameter.

```python
import owslib.fes
uuid = fes.PropertyIsEqualTo(propertyname='sys.siteuuid', literal='78C0463E-2FCE-4AB2-A9C9-6A34BF261F52')
timeRange = fes.PropertyIsBetween(propertyname='apiso:modified', lower='2009-02-01', upper='2012-02-01')

from owslib.csw import CatalogueServiceWeb as cs
c = cs('http://www.ngdc.noaa.gov/geoportal/csw', timeout=30)
c.get_filtered_records([[uuid,timeRange]])
```
The list parameter into `get_filtered_records` is interpreted like so:
```
[a,b,c]
a || b || c

[[a,b,c]]
a && b && c

[[a,b],[c],[d],[e]] or [[a,b],c,d,e]
(a && b) || c || d || e
```

A user can also pass in a single OgcExpression to `get_filtered_records` if they want to create the And / Or / Not expressions themselves:
```python
and_filter = fes.And(operations=[uuid,timeRange])
c.get_filtered_records(and_filter)
```