Package occi :: Package protocol :: Module occi_rendering :: Class TextOcciRendering
[hide private]
[frames] | no frames]

Class TextOcciRendering

source code

         object --+    
                  |    
rendering.Rendering --+
                      |
                     TextOcciRendering
Known Subclasses:

This is a rendering which will use the HTTP header to place the information in an syntax and semantics as defined in the OCCI specification.

Instance Methods [hide private]
 
get_data(self, headers, body)
Mainly here so TextPlainRendering can reuse.
source code
 
set_data(self, data)
Mainly here so TextPlainRendering can reuse.
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
 
from_entity(self, entity)
Given an entity it will return a HTTP body an header.
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
 
from_entities(self, entities, key)
Given an set of entities it will return a HTTP body an header.
source code
 
from_categories(self, categories)
Given an set of categories it will return a HTTP body an header.
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_mixins(self, headers, body, extras)
Given the HTTP headers and the body this method will convert the HTTP data into a Mixins.
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

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

    Inherited from rendering.Rendering
 
__init__(self, registry)
Constructor.
source code
Class Variables [hide private]
  mime_type = 'text/occi'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get_data(self, headers, body)

source code 

Mainly here so TextPlainRendering can reuse.

headers -- The headers of the request. body -- The body of the request.

set_data(self, data)

source code 

Mainly here so TextPlainRendering can reuse.

data -- An HTTPData 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.

Overrides: rendering.Rendering.to_entity
(inherited documentation)

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.

Overrides: rendering.Rendering.from_entity
(inherited documentation)

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.

Overrides: rendering.Rendering.to_entities
(inherited documentation)

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.

Overrides: rendering.Rendering.from_entities
(inherited documentation)

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.

Overrides: rendering.Rendering.from_categories
(inherited documentation)

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.

Overrides: rendering.Rendering.to_action
(inherited documentation)

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.

Overrides: rendering.Rendering.to_mixins
(inherited documentation)

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.

Overrides: rendering.Rendering.get_filters
(inherited documentation)