Table of Contents

Class: eXistDAresultsSet trunk/eXistDAresult.py

A results set

Methods   
__add__
__getattr__
__init__
__len__
__nonzero__
__setattr__
__str__
append
count
getDict
getMergedDict
getMergedXML
index
listResultsDocs
remove
reverse
sort
  __add__ 
__add__ ( self,  other )

Adds two resultsSets. The encoding is the left operand's one

Exceptions   
TypeError, 'Right operand must be a eXistDAresultsSet'
  __getattr__ 
__getattr__ ( self,  name )

Attributes recovering

  __init__ 
__init__ ( self,  encoding=utils.DEFAULT_ENCODING )

Creates an instance from the class, with n DAresults passed in the creation

  __len__ 
__len__ ( self )

Number of items in the list

  __nonzero__ 
__nonzero__ ( self )

Test the 0 value of the class

  __setattr__ 
__setattr__ (
        self,
        name,
        value,
        )

Attributes setting

  __str__ 
__str__ ( self )

String representation

  append 
append ( self,  other )

Appends a result to this resultsSet

Exceptions   
TypeError, 'Appended object must be a eXistDAresult'
  count 
count ( self,  x )

Return the number of occurence of x in the resultsSet. x can be an eXistDAresult, an eXistDA object or an XML string

Exceptions   
TypeError, 'Seeked object must be an eXistDAresult instance, an eXistDA instance, or an XML string'
  getDict 
getDict ( self )

Returns a list of dictionaries representing the xml resultsSet

  getMergedDict 
getMergedDict ( self,  xmled=True )

Returns a dictionary of the merged version of the resultsSet

  getMergedXML 
getMergedXML ( self,  xmled=True )

Returns the result as a big simple XML file

  index 
index ( self,  x )

Returns the index of the first occurence of x in the _results list. x can be an eXistDAresult, an eXistDA object, or an XML string

Exceptions   
TypeError, 'Seeked object must be an eXistDAresult instance, an eXistDA instance, or an XML string'
  listResultsDocs 
listResultsDocs ( self )

Returns a list containing the URIs of each doc verifying the query

BROKEN : always returns the name of the server and its port, but not the path to the file

  remove 
remove ( self,  x )

Removes the first occurence of the result containing x in the list. x can be an eXistDAresult, an eXistDA object, or an XML string

Exceptions   
TypeError, 'Removed object must be an eXistDAresult instance, an eXistDA instance, or an XML string'
  reverse 
reverse ( self )

Reverse the order of the results list

  sort 
sort ( self,  fn=None )

Sorts the _results by score. Use reverse to reverse the order


Table of Contents

This document was automatically generated on Wed Apr 4 20:49:08 2007 by HappyDoc version 2.1