From: Santi B. <san...@us...> - 2008-06-20 11:04:55
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28239/modules/core/src/com/babeldoc/core/pipeline Modified Files: PipelineStage.java Log Message: Decompressor handle multiple entries in a zip file. For each entry createn a new document and enqueue for the next stage. Index: PipelineStage.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/PipelineStage.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** PipelineStage.java 4 Aug 2007 11:37:26 -0000 1.26 --- PipelineStage.java 20 Jun 2008 11:04:53 -0000 1.27 *************** *** 694,697 **** --- 694,732 ---- ticket)}; } + /** + * Help convert a simple document into an array of pipelinestage results. + * + * @param pdoc the document to process + * @param attrlist ArrayList with attributes + * @return The set of results from this processing + * @throws PipelineException pipeline exception + * @throws JournalException + */ + protected PipelineStageResult[] processHelper(PipelineDocument pdoc, ArrayList alAttr ) + throws PipelineException, JournalException { + + IJournal journal = JournalFactory.getJournal(); + PipelineStageResult[] psresults = new PipelineStageResult[1]; + String name = this.getNextPipelineStageName(); + + IJournalTicket newTicket = journal.forkTicket(ticket); + + //Copy old atributes + splitAttributes(pdoc); + + LogService.getInstance().logDebug("PipelineStage.processHelper.debug add old atributes"); + + //Add new atributes + for (int i=0; i< alAttr.size(); i++){ + Pair atr = (Pair) alAttr.get(i); + pdoc.put(atr.getFirst().toString(), atr.getSecond()); + LogService.getInstance().logDebug("PipelineStage.processHelper.debug add new atributes, name:" + atr.getFirst().toString() + " value: " + atr.getSecond() ); + } + + psresults[0] = new PipelineStageResult(name, pdoc, newTicket); + + return psresults; + + } /** |