Package swaml :: Package classes :: Module cache :: Class Cache
[show private | hide private]
[frames | no frames]

Class Cache


Method Summary
  __init__(self, uri, pb)
Cache constructor
  dump(self, path)
Dump graph on disk
  filterPosts(self, posts, min, max, text)
Filter post from some conditions
  getPost(self, uri)
Get fields of a post
  getPostAuthor(self, post)
Get author of a post
  getValueForPredicate(self, subject, predicate)
Get value of a predicate
  hasValueForPredicate(self, subject, predicate)
Get if a predicate exists
  loadAdditionalData(self)
Load additional data of a mailing list
  loadMailingList(self, uri)
Load a mailing list into a graph memory
  orderByDate(self, posts)
Order by date a list of posts
  query(self)
Make a SPARQL query
  __like(self, text, query)
Search words into a text
  __listPosts(self)
List post at cache
  __loadData(self, uri)
Load data

Method Details

__init__(self, uri, pb=None)
(Constructor)

Cache constructor
Parameters:
uri - uri to load
pb - progress bar

dump(self, path='cache.rdf')

Dump graph on disk
Parameters:
path - path to dump

filterPosts(self, posts, min=None, max=None, text=None)

Filter post from some conditions
Parameters:
posts - list of posts
min - min date
max - max date
text - text to search

getPost(self, uri)

Get fields of a post
Parameters:
uri - post uri
Returns:
post fields

getPostAuthor(self, post)

Get author of a post
Parameters:
post - post uri

getValueForPredicate(self, subject, predicate)

Get value of a predicate
Parameters:
subject - subject
predicate - predicate

hasValueForPredicate(self, subject, predicate)

Get if a predicate exists
Parameters:
subject - subject
predicate - predicate

loadAdditionalData(self)

Load additional data of a mailing list

loadMailingList(self, uri)

Load a mailing list into a graph memory
Parameters:
uri - mailing list's uri

orderByDate(self, posts)

Order by date a list of posts
Parameters:
posts - posts to order
Returns:
posts ordered

query(self)

Make a SPARQL query
Returns:
posts result

__like(self, text, query)

Search words into a text
Parameters:
text - text where we'll search
query - words to search

__listPosts(self)

List post at cache

__loadData(self, uri)

Load data
Parameters:
uri - uri to load

Generated by Epydoc 2.1 on Thu Dec 28 16:31:10 2006 http://epydoc.sf.net