Package amplee :: Package atompub :: Module service :: Class AtomPubService
[show private | hide private]
[frames | no frames]

Type AtomPubService

object --+
         |
        AtomPubService


Method Summary
  __init__(self, store, xml_attrs)
Atom Publisging Protocol service entity.
  get_collection(self, name_or_id)
Returns a collection identified by ``name_or_id``
  get_collections(self)
Returns all the collections belonging to workspaces of this service.
  get_workspace(self, name_or_id)
Returns a workspace per its identifier.
  make_feed(self, items, entry_processor, id, title, xslt_path, member_comparer)
Generates a new atom feed from the passed items dictionnary.
  set_xslt(self, path)
  to_service(self, prefix, namespace)
Generates and returns a ``bridge.Document`` instance of the service document and its workspaces.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Property Summary
  service: Generates and returns a ``bridge.Document`` instance of the service document and its workspaces.

Method Details

__init__(self, store, xml_attrs=None)
(Constructor)

Atom Publisging Protocol service entity.

A ``store`` is a ``amplee.atompub.AtomPubStore`` instance The ``xml_attrs`` parameter allows for extra XML attributes to be provided.
Overrides:
__builtin__.object.__init__

get_collection(self, name_or_id)

Returns a collection identified by ``name_or_id``

get_collections(self)

Returns all the collections belonging to workspaces of this service.

get_workspace(self, name_or_id)

Returns a workspace per its identifier.

The ``name_or_id`` matches the Workspace attribute of the same name.

make_feed(self, items, entry_processor=None, id=None, title=None, xslt_path=None, member_comparer=<function app_edited_comparer at 0x850564c>)

Generates a new atom feed from the passed items dictionnary.

That dictionnary is of the form: {collection_name: [member_ids,]}

If ``entry_processor`` is passed it must be a calable that takes a member instance as parameter and returns a bridge.Element representing the entry after being processed. Useful for instance to transform the entry into a more public face.

If ``id`` is not provided a temporary urn:uuid will be generated.

If ``xslt_path`` is provided it will be inserted as a processing instruction.

The ``member_comparer`` must be a callable that is used to compare two entries when they are sorted within. By default they are sorted by app:edited element.

Returns a bridge.Document instance of the feed.

to_service(self, prefix=u'app', namespace=u'http://www.w3.org/2007/app')

Generates and returns a ``bridge.Document`` instance of the service document and its workspaces.

The ``prefix`` is the XML prefix to use The ``namespace`` is the amespace associated with the service document

Property Details

service

Generates and returns a ``bridge.Document`` instance of the service document and its workspaces.

The ``prefix`` is the XML prefix to use The ``namespace`` is the amespace associated with the service document
Get Method:
to_service(self, prefix, namespace)

Generated by Epydoc 2.1 on Thu Jul 19 15:32:16 2007 http://epydoc.sf.net