Exemplo n.º 1
0
 def search(self, conditions, selects):
     """
     Search for contained resources which match the given search condition.
     
     @param conditions: tree of ConditionTerm instances representing a logical search term
     @param selects: list of property names to retrieve for the found resources
     """
     assert isinstance(conditions, ConditionTerm)
     headers = { 'Content-Type' : XML_CONTENT_TYPE, "depth": Constants.HTTP_HEADER_DEPTH_INFINITY}
     body = createSearchBody(selects, self.path, conditions)
     response = self.connection._request('SEARCH', self.path, body, headers)
     return response.msr
Exemplo n.º 2
0
    def search(self, conditions, selects):
        """
        Search for contained resources which match the given search condition.

        @param conditions: tree of ConditionTerm instances representing a logical search term
        @param selects: list of property names to retrieve for the found resources
        """
        assert isinstance(conditions, ConditionTerm)
        headers = { 'Content-Type' : XML_CONTENT_TYPE, "depth": Constants.HTTP_HEADER_DEPTH_INFINITY}
        body = createSearchBody(selects, self.path, conditions)
        response = self.connection._request('SEARCH', self.path, body, headers)
        return response.msr