Package amplee :: Package indexer :: Class AuthorIndex
[hide private]
[frames] | no frames]

Class AuthorIndex

source code

object --+    
         |    
 BaseIndex --+
             |
            AuthorIndex

Instance Methods [hide private]
 
__init__(self, name, container=None, index_name=True, index_uri=False, index_email=False)
Simple Atom author indexing.
source code
 
update(self, member)
Updates the index based on the author elements of the provided member.
source code
 
prune(self, member)
Removes a member from the index.
source code
set
lookup(self, name=None, uri=None, email=None)
Returns the join of the query for each provided parameter, ie if distinct from None.
source code

Inherited from BaseIndex: clear, iiterindex, iload, iterindex, keys, load, store

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, container=None, index_name=True, index_uri=False, index_email=False)
(Constructor)

source code 

Simple Atom author indexing. The member may be indexed up to three times if you enabled each of the element. Note that empty elements are treated as disabling the element.

Parameters:
  • name (string) - an internal identifier used to reference the indexer.
  • container (object) - instance of a class implementing the dictionnary interface.
  • index_name (bool) - when True this means that the name of the author will be indexed
  • index_uri (bool) - when True this means that the URI of the author will be indexed
  • index_email (bool) - when True this means that the email of the author will be indexed
Overrides: object.__init__

update(self, member)

source code 

Updates the index based on the author elements of the provided member.

Parameters:
Overrides: BaseIndex.update

prune(self, member)

source code 

Removes a member from the index.

Parameters:
Overrides: BaseIndex.prune

lookup(self, name=None, uri=None, email=None)

source code 

Returns the join of the query for each provided parameter, ie if distinct from None. Note that the lookup is pretty sad since it does a exact string match of any of the provided elements, therefore looking for a name means you actually know that name and just want to retrieve in which members it appears as-is.

Parameters:
  • name (string) - value to exactly match one of the indexed authors
  • uri (string) - value to exactly match one of the indexed authors
  • email (string) - value to exactly match one of the indexed authors
Returns: set
result set of the query