Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
MoinMoin.search.results.FoundRemote Class Reference
Inheritance diagram for MoinMoin.search.results.FoundRemote:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.search.results.FoundRemote:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def weight
def get_matches
def add_matches

Public Attributes

 wikiname
 page_name
 rev
 attachment
 page

Private Member Functions

def _unique_matches

Private Attributes

 _matches

Detailed Description

Represents a remote search result 

Definition at line 204 of file results.py.


Constructor & Destructor Documentation

def MoinMoin.search.results.FoundRemote.__init__ (   self,
  wikiname,
  page_name,
  attachment,
  matches = None,
  page = None,
  rev = 0 
)

Definition at line 207 of file results.py.

00207 
00208     def __init__(self, wikiname, page_name, attachment, matches=None, page=None, rev=0):
00209         self.wikiname = wikiname
00210         self.page_name = page_name
00211         self.rev = rev
00212         self.attachment = attachment
00213         self.page = page
00214         if matches is None:
00215             matches = []
00216         self._matches = matches


Member Function Documentation

def MoinMoin.search.results.FoundRemote._unique_matches (   self,
  type = Match 
) [private]
Get a list of unique matches of type

The result is sorted by match.start, because its easy to remove
duplicates like this.

@param type: type of match to return
@rtype: list
@return: list of matches of type, sorted by match.start

Reimplemented from MoinMoin.search.results.FoundPage.

Definition at line 223 of file results.py.

00223 
00224     def _unique_matches(self, type=Match):
00225         return []
00226 

def MoinMoin.search.results.FoundPage.add_matches (   self,
  matches 
) [inherited]
Add found matches 

Definition at line 126 of file results.py.

00126 
00127     def add_matches(self, matches):
00128         """ Add found matches """
00129         self._matches.extend(matches)

def MoinMoin.search.results.FoundRemote.get_matches (   self,
  unique = 1,
  sort = 'start',
  type = Match 
)
Return all matches of type sorted by sort

@param unique: return only unique matches (bool)
@param sort: match attribute to sort by (string)
@param type: type of match to return (Match or sub class)
@rtype: list
@return: list of matches

Reimplemented from MoinMoin.search.results.FoundPage.

Definition at line 220 of file results.py.

00220 
00221     def get_matches(self, unique=1, sort='start', type=Match):
00222         return []

def MoinMoin.search.results.FoundRemote.weight (   self,
  unique = 1 
)
returns how important this page is for the terms searched for

Summarize the weight of all page matches

@param unique: ignore identical matches
@rtype: int
@return: page weight

Reimplemented from MoinMoin.search.results.FoundPage.

Definition at line 217 of file results.py.

00217 
00218     def weight(self, unique=1):
00219         return 1


Member Data Documentation

Reimplemented from MoinMoin.search.results.FoundPage.

Definition at line 215 of file results.py.

Reimplemented from MoinMoin.search.results.FoundPage.

Definition at line 211 of file results.py.

Reimplemented from MoinMoin.search.results.FoundPage.

Definition at line 212 of file results.py.

Reimplemented from MoinMoin.search.results.FoundPage.

Definition at line 209 of file results.py.

Reimplemented from MoinMoin.search.results.FoundPage.

Definition at line 210 of file results.py.

Definition at line 208 of file results.py.


The documentation for this class was generated from the following file: