def setConstraintList(self, constraints, tostring=False):
ors = []<EOL>if len(constraints) == <NUM_LIT:1>:<EOL><INDENT>if isinstance(constraints[<NUM_LIT:0>], OgcExpression):<EOL><INDENT>flt = self.setConstraint(constraints[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>self._root.append(And(operations=constraints[<NUM_LIT:0>]).toXML())<EOL>flt = self._root<EOL><DEDENT>if tostring:<EOL><INDENT>return util.element_to_string(flt, xml_declaration=False)<EOL><DEDENT>else:<EOL><INDENT>return flt<EOL><DEDENT><DEDENT>for c in constraints:<EOL><INDENT>if isinstance(c, OgcExpression):<EOL><INDENT>ors.append(c)<EOL><DEDENT>elif isinstance(c, list) or isinstance(c, tuple):<EOL><INDENT>if len(c) == <NUM_LIT:1>:<EOL><INDENT>ors.append(c[<NUM_LIT:0>])<EOL><DEDENT>elif len(c) >= <NUM_LIT:2>:<EOL><INDENT>ands = []<EOL>for sub in c:<EOL><INDENT>if isinstance(sub, OgcExpression):<EOL><INDENT>ands.append(sub)<EOL><DEDENT><DEDENT>ors.append(And(operations=ands))<EOL><DEDENT><DEDENT><DEDENT>self._root.append(Or(operations=ors).toXML())<EOL>if tostring:<EOL><INDENT>return util.element_to_string(self._root, xml_declaration=False)<EOL><DEDENT>return self._root<EOL>
Construct and process a  GetRecords request

Parameters
----------

- constraints: A list of OgcExpression objects
               The list is interpretted 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
- tostring (optional): return as string