Home | Trees | Index | Help |
|
---|
Package Pyblosxom :: Package entries :: Module base :: Class EntryBase |
|
FileEntry
Method Summary | |
---|---|
__init__(self,
request)
| |
varies |
Retrieves an item from this dict based on the key given. |
Returns a friendly debuggable representation of self. | |
Sets the metadata[key] to the given value. | |
Over-writes the cached dict for key id with the data dict. | |
varies |
Retrieves an item from the internal dict based on the key given. |
string |
Returns the data string. |
dict or None |
Retrieves information from the cache that pertains to this specific id. |
string |
This should return an id that's unique enough for caching purposes. |
varies |
Returns a given piece of metadata. |
list of strings |
Returns the list of keys for which we have values in our stored metadata. |
boolean |
Returns whether a given key is in the metadata dict. |
list of varies |
Returns a list of the keys that can be accessed through __getitem__. |
Sets the data content for this entry. | |
Sets a key/value pair in the metadata dict. | |
This takes in a given time tuple and sets all the magic metadata variables we have according to the items in the time tuple. | |
Updates the contents in this entry with the contents in the dict. |
Method Details |
---|
__getitem__(self,
key,
default=None)
|
__repr__(self)
|
__setitem__(self,
key,
value)
|
addToCache(self, id, data)Over-writes the cached dict for key id with the data dict. This is a helper method--call this to add data to the cache. Do not override it.
|
get(self, key, default=None)Retrieves an item from the internal dict based on the key given. All this does is turn aroun and call __getitem__. There's no reason to override this--override getData and getMetadata instead.
|
getData(self)Returns the data string. This method should be overridden to provide from pulling the data from other places. Override this.
|
getFromCache(self, id)Retrieves information from the cache that pertains to this specific id. This is a helper method--call this to get data from the cache. Do not override it.
|
getId(self)This should return an id that's unique enough for caching purposes. Override this.
|
getMetadata(self, key, default=None)Returns a given piece of metadata. Override this.
|
getMetadataKeys(self)Returns the list of keys for which we have values in our stored metadata. Note: This list gets modified later downstream. If you cache your list of metadata keys, then this method should return a copy of that list and not the list itself lest it get adjusted. Override this.
|
has_key(self, key)Returns whether a given key is in the metadata dict. If the key is the CONTENT_KEY, then we automatically return true.
|
keys(self)Returns a list of the keys that can be accessed through __getitem__.
|
setData(self, data)Sets the data content for this entry. If you are not creating the entry, then you have no right to set the data of the entry. Doing so could be hazardous depending on what EntryBase subclass you're dealing with. Override this.
|
setMetadata(self, key, value)Sets a key/value pair in the metadata dict. Override this.
|
setTime(self, timeTuple)This takes in a given time tuple and sets all the magic metadata variables we have according to the items in the time tuple.
|
update(self, newdict)Updates the contents in this entry with the contents in the dict. It does so by calling setData and setMetadata.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Tue Feb 7 21:43:57 2006 | http://epydoc.sf.net |