| Home | Trees | Index | Help |
|
|---|
| Package amplee :: Package atompub :: Package member :: Class MemberResource |
|
object --+
|
MemberResource
| Method Summary | |
|---|---|
Keyword Arguments: collection -- AtomPubCollection instance holding this member id -- identifier for this member atom -- bridge.Element instance | |
By default members are compared following their app:edited element | |
__getstate__(self)
| |
__setstate__(self,
state)
| |
Called to generate the member entry from the atom entry provided in the source parameter. | |
Allows the filling of the current instance from an Atom entry. | |
Called to generate a valid atom identifier (a valid URI) which will be used within the Atom entry itself. | |
Called to generate a token that will be used as the internal identifier for this member within its collection. | |
Returns the URI of the media link entry (MLE) | |
Returns the URI of the member resource | |
Returns a URI suitable for public feed and independant from the collection URI. | |
Returns a URI suitable for public feed and independant from the collection URI | |
Passes the member to the collection indexers | |
Returns True is the entry has a app:control element with an app:draft element which has a text value set to 'yes'. | |
load_document(self,
source)
| |
merge_dates(self,
new_member)
| |
prepare_for_public(self,
content,
external_content,
rel,
media_type,
xslt_path)
| |
Sets the XSLT to associate to the Atom entry. | |
Called to generate the new member entry from the atom entry provided in the source parameter as well as from the existing member in the store. | |
update_dates(self)
| |
Returns the serialization as a string of the atom entry. | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
| Property Summary | |
|---|---|
atom | |
content | |
media_uri: Returns the URI of the media link entry (MLE) | |
member_uri: Returns the URI of the member resource | |
public_uri: Returns a URI suitable for public feed and independant from the
collection URI | |
public_uri_stripped: Returns a URI suitable for public feed and independant from the
collection URI | |
| Method Details |
|---|
__init__(self,
collection,
id=None,
atom=None)
Keyword Arguments: collection -- AtomPubCollection instance holding
this member id -- identifier for this member atom -- bridge.Element
instance
|
__cmp__(self,
other)
By default members are compared following their app:edited
element
|
create(self, source, slug=None)Called to generate the member entry from the atom entry provided in the source parameter. This must return the source again after being processed if need be within the method call. The content can be returned either as a byte string, unicode or a file object. Keyword arguments: source -- resource string to handle slug -- hint on how to generate the name of the resource and used as the last part of the edit and edit-media IRIs (default:None) |
from_entry(self, entry)Allows the filling of the current instance from an Atom entry. This will lookup for two links: * rel='edit' * rel='edit-media' |
generate_atom_id(self, entry=None, slug=None)Called to generate a valid atom identifier (a valid URI) which will be used within the Atom entry itself. By default this returns a random urn:uuid value. |
generate_resource_id(self, entry, slug=None)Called to generate a token that will be used as the internal identifier for this member within its collection. Also used as the identifier within the storage it will be added to which means the returned value should be valid for the chosen storage. By default this returns the atom:id value of the member entry. |
get_edit_media_uri(self)Returns the URI of the media link entry (MLE) |
get_edit_uri(self)Returns the URI of the member resource |
get_public_stripped_uri(self)Returns a URI suitable for public feed and independant from the collection URI. It removes any trailing extension there may be. |
get_public_uri(self)Returns a URI suitable for public feed and independant from the collection URI |
index(self)Passes the member to the collection indexers |
is_draft(self)Returns True is the entry has a app:control element with an app:draft element which has a text value set to 'yes'. Returns False otherwise. |
set_xslt(self, info)Sets the XSLT to associate to the Atom entry. A processing instruction will be inserted when tge self.xml() method is called. The ``path`` is a URI to the the XSLT resource. |
update(self, source, exisiting_member)Called to generate the new member entry from the atom entry provided in the source parameter as well as from the existing member in the store. This must return the source again after being processed if need be within the method call. The content can be returned either as a byte string, unicode or a file object. Keyword arguments: source -- resource string to handle exisiting_member -- member instance of an existing member resource |
xml(self)Returns the serialization as a string of the atom entry. |
| Property Details |
|---|
media_uriReturns the URI of the media link entry (MLE)
|
member_uriReturns the URI of the member resource
|
public_uriReturns a URI suitable for public feed and independant from the collection URI
|
public_uri_strippedReturns a URI suitable for public feed and independant from the collection URI
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Jul 19 15:32:17 2007 | http://epydoc.sf.net |