<?xml version="1.0" encoding="windows-1252"?>
<node id="996338" title="Re^4: Altering the inheritance path of an object" created="2012-09-29 01:38:42" updated="2012-09-29 01:38:42">
<type id="11">
note</type>
<author id="879250">
remiah</author>
<data>
<field name="doctext">
&lt;p&gt;
&lt;b&gt;update:&lt;/b&gt; my ascii drawing corrupt with threaded view. please have a look from single article view.&lt;br&gt;&lt;br&gt;

Thanks for reply. This is too interesting for me.&lt;br&gt;&lt;br&gt;

I used extends here, not with, like you always do. Roles, mixins are new to me. &lt;br&gt;

I guess this picture vaguely like this.
&lt;pre&gt;

                 request from client
             +-------------------------&amp;gt;            pipeline
                        +------------------------------------------------------------------+
                        |                                                                  |
                        |                                                                  |
                        |                            r                                     |
                        |                    +-------------+                               |
                        |        +-----------+-+           v            +----+             |
                        |        |  master db  |        +--+--+              |             |
                        |        +-------------++--+    | csv |+--+          v             |
                        |                     r|  r|    +-----+   |       r r  r           |
                        |        +-------------|---|---------+    |r      r r  r r         |
                        |        |  tempral db |   |         |    |          +             |
    client              |        |             v   v         &amp;lt;----+          v             |
                        |        |         person    company |             generic object  |
                        |        +-------------+----+--+---+-+             with            |
                        |     r  +-------------|----|--|---|--+            various         |
                        |    +-----+ csv  &amp;lt;----+r   |  |   |  |            combination     |
                        |    |r  |                  |r |r  |r |            of roles        |
                        |    +-----&amp;gt; tab delimited &amp;lt;+  |   |  |              +             |
                        |    |r  |                     |   |  |              |             |
                        |    +-----&amp;gt; html     &amp;lt;--------+   |  |              |             |
                        |    |r  |                         |  |              |             |
                        |    +-----&amp;gt; excel    &amp;lt;------------+  |          &amp;lt;---+             |
                        |        +----------------------------+                            |
              &amp;lt;-------+ |                                                                  |
                        |                                                                  |
&lt;/pre&gt;
So, your generic object should know the dependencies of roles to use, plugging them , create the output. Dependencies varies from case by case, you have to use roles dynamically, with apply_all_roles. &lt;br&gt;&lt;br&gt;

From client, it will just look like google api, tell the pipe line parameters needed with HTML header, or sending  XML.&lt;br&gt;&lt;br&gt;

&lt;/p&gt;</field>
<field name="root_node">
996022</field>
<field name="parent_node">
996219</field>
</data>
</node>
