Carsten Ziegeler wrote:

Vadim Gritsenko wrote:



Also, if you have virtual generator "x" defined, what will be the result of serviceManager.lookup(Generator.ROLE).select("x")?


A VPCGenerator object implementing the generator interface? I haven't thought about it very well, but I guess it's possible (if we only allow pipeline components (G,T,S) for virtual components than this is easy anyway; but as we allow more (Actions,Matchers,Selectors) this might be slightly more difficult).



Implementation-wise, it would be way simpler for VPCs to be completely handled by the sitemap engine. In the refactoring I did last week, I introduced a ProcessorComponentInfo class that holds the information formerly held by SitemapComponentSelector and OutputComponentSelector. We can add to this ProcessorComponentInfo class the ability to store the ProcessingNodes corresponding to VPCs defined by a sitemap.


Implementing VPCs then becomes rather trivial, including their inheritance in subsitemaps.

Now, if we want to implement them as regular components, things starts to be a bit more difficult. These components will be wrappers around the VPC's ProcessingNode, creating a subpipeline on setup() and returning the pipeline's key and validity as the component's key and validity. That subpipeline will not be a complete one, depending if the VPC is a G, T or S (will be a full one for a virtual reader).

So the question is: is it necessary to expose VPCs as regular components. Furthermore, although possible, is it "legal" to lookup sitemap components from somewhere else than in the sitemap engine?

Sylvain

PS: I'm currently on vacation, so won't be as responsive as usual on hot topics!

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }




Reply via email to