Package occi :: Package protocol :: Module rendering :: Class Rendering
[hide private]
[frames] | no frames]

Class Rendering

source code

object --+
         |
        Rendering
Known Subclasses:

All renderings should derive from this class.

Instance Methods [hide private]
 
__init__(self, registry)
Constructor.
source code
 
from_categories(self, categories)
Given an set of categories it will return a HTTP body an header.
source code
 
from_entities(self, entities, key)
Given an set of entities it will return a HTTP body an header.
source code
 
from_entity(self, entity)
Given an entity it will return a HTTP body an header.
source code
 
get_filters(self, headers, body, extras)
Given the HTTP headers and the body this method will convert the HTTP data into a list of categories and attributes.
source code
 
to_action(self, headers, body, extras)
Given the HTTP headers and the body this method will convert the HTTP data into an Action.
source code
 
to_entities(self, headers, body, extras)
Given the HTTP headers and the body this method will convert the HTTP data into a set of entity representations.
source code
 
to_entity(self, headers, body, def_kind, extras)
Given the HTTP headers and the body this method will convert the HTTP data into an entity representation.
source code
 
to_mixins(self, headers, body, extras)
Given the HTTP headers and the body this method will convert the HTTP data into a Mixins.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, registry)
(Constructor)

source code 

Constructor.

registry -- The registry used for this process.

Overrides: object.__init__

from_categories(self, categories)

source code 

Given an set of categories it will return a HTTP body an header.

categories -- The list of categories which is to be rendered.

from_entities(self, entities, key)

source code 

Given an set of entities it will return a HTTP body an header.

entities -- The entities which will be rendered. key -- Needed for uri-list (see RFC) and html rendering.

from_entity(self, entity)

source code 

Given an entity it will return a HTTP body an header.

If it's a link make sure source, target attributes are set. If it's a Resource make sure Links are presented properly.

entity -- The entity which is to rendered.

get_filters(self, headers, body, extras)

source code 

Given the HTTP headers and the body this method will convert the HTTP data into a list of categories and attributes.

headers -- The HTTP headers. body -- The HTTP body. extras -- Passed on extra object.

to_action(self, headers, body, extras)

source code 

Given the HTTP headers and the body this method will convert the HTTP data into an Action.

headers -- The HTTP headers. body -- The HTTP body. extras -- Passed on extra object.

to_entities(self, headers, body, extras)

source code 

Given the HTTP headers and the body this method will convert the HTTP data into a set of entity representations. Must return a set of Resource or Link instances.

headers -- The HTTP headers. body -- The HTTP body. extras -- Passed on extra object.

to_entity(self, headers, body, def_kind, extras)

source code 

Given the HTTP headers and the body this method will convert the HTTP data into an entity representation. Must return Resource or Link instances.

headers -- The HTTP headers. body -- The HTTP body. def_kind -- If provided this kind is taken (Needed for update). extras -- Passed on extra object.

to_mixins(self, headers, body, extras)

source code 

Given the HTTP headers and the body this method will convert the HTTP data into a Mixins. Must return a list with Mixin instances.

headers -- The HTTP headers. body -- The HTTP body. extras -- Passed on extra object.