Package amplee :: Package atompub :: Package member :: Module media :: Class HachoirMember
[hide private]
[frames] | no frames]

Class HachoirMember

source code

 object --+        
          |        
EntryMember --+    
              |    
    MediaMember --+
                  |
                 HachoirMember

Instance Methods [hide private]
  __init__(self, collection, source, slug=None, title=None, description=None, media_type=None, ext=None, entry_id_creator=None, name_creator=None, **kwargs)
Creates a member based Hachoir capabilities.
  __clean_value(self, metadata, name)
  __get_meta_data(self, source)

Inherited from EntryMember (private): _delentry, _getentry, _setentry

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Properties [hide private]

Inherited from MediaMember: content

Inherited from EntryMember: atom

Inherited from object: __class__


Method Details [hide private]

__init__(self, collection, source, slug=None, title=None, description=None, media_type=None, ext=None, entry_id_creator=None, name_creator=None, **kwargs)
(Constructor)

source code 

Creates a member based Hachoir capabilities.

Keyword arguments
collection -- parent collection
source -- fileobj of data to handle
title -- title to use for the Atom entry. If not provided it will be extracted
from the resource metadat if any. 
description -- summary to use for the Atom entry. If not provided it will
extracted from the metadata if any.
name_creator -- callable to generate the last segment of URIs used for
this resource
ext -- extension to use for the media resource
media_type -- mime type of the media resource
entry_id_creator -- callable which will return the id
to use in the atom:id element (as an unicode object)

The name_creator and the entry_id_creator function must takes the following parameters:
collection, abs_path, metadata (a hachoir_metadata.metadata instance), slug, ext

Overrides: MediaMember.__init__

__clean_value(self, metadata, name)

source code 
None

__get_meta_data(self, source)

source code 
None