You can subscribe to this list here.
2003 |
Jan
|
Feb
(14) |
Mar
(107) |
Apr
(211) |
May
(93) |
Jun
(158) |
Jul
(159) |
Aug
(368) |
Sep
(188) |
Oct
(151) |
Nov
(115) |
Dec
(98) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(25) |
Feb
|
Mar
(33) |
Apr
(28) |
May
(116) |
Jun
(2) |
Jul
(117) |
Aug
(19) |
Sep
(9) |
Oct
(2) |
Nov
|
Dec
(4) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(9) |
Dec
|
2006 |
Jan
|
Feb
|
Mar
(22) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(267) |
Sep
|
Oct
|
Nov
(6) |
Dec
(512) |
2008 |
Jan
(187) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: SourceForge.net <no...@so...> - 2012-04-23 13:44:56
|
The following forum message was posted by mikeytmikeyt at http://sourceforge.net/projects/babeldoc/forums/forum/190909/topic/5217065: I'm looking o integrate 7-zip into Babeldoc. I understand there is a a pipeline stage where you can call an external application, but I'm unsure of the best way of doing this. If anybody has any ideas, I would appreciate your advice. Many thanks, Mike |
From: Dejan K. <dej...@ya...> - 2011-10-14 12:31:01
|
..Hello! How are you my friend? I want you to visit my site right now! http://lajoiedeparler.net/com.friend.php?zefriend=99f9 |
From: Dejan K. <dej...@ya...> - 2011-10-10 18:14:38
|
.Follow this link and enjoy a new world of satisfaction! http://www.night-life-team.de/com.friend.php?utid_hotmail=05v7 |
From: David G. Q. <dga...@us...> - 2008-07-24 09:05:56
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13794/modules/core/src/com/babeldoc/core/pipeline Modified Files: PipelineDocument.java Log Message: SMTP authentification USER and PASSWORD Fixes at Decompress pipeline Index: PipelineDocument.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/PipelineDocument.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** PipelineDocument.java 24 Jul 2008 07:55:51 -0000 1.26 --- PipelineDocument.java 24 Jul 2008 09:06:04 -0000 1.27 *************** *** 493,496 **** --- 493,505 ---- /** + * Copy content of the object. + * + * @return content + */ + public Object copy() { + return new PipelineDocument(this, getBytes()); + } + + /** * Get attribute as int. * @param attributeName name of attribute |
From: David G. Q. <dga...@us...> - 2008-07-24 09:05:55
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13794/modules/core/src/com/babeldoc/core/pipeline/stage Modified Files: CallStagePipelineStage.java Log Message: SMTP authentification USER and PASSWORD Fixes at Decompress pipeline Index: CallStagePipelineStage.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/CallStagePipelineStage.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CallStagePipelineStage.java 21 Dec 2007 12:06:54 -0000 1.10 --- CallStagePipelineStage.java 24 Jul 2008 09:06:04 -0000 1.11 *************** *** 128,132 **** if(!this.hasOption(DISCARD_RESULTS) || this.getOptions(DISCARD_RESULTS).equals(BooleanConfigOptionType.TRUE)) { ! PipelineDocument pdoc = (PipelineDocument)this.getDocument().clone(); PipelineFactoryFactory.process(callStage, this.getDocument(), this.getTicket(), null); --- 128,137 ---- if(!this.hasOption(DISCARD_RESULTS) || this.getOptions(DISCARD_RESULTS).equals(BooleanConfigOptionType.TRUE)) { ! PipelineDocument pdoc = null; ! try{ ! pdoc = (PipelineDocument)this.getDocument().clone(); ! }catch(CloneNotSupportedException cnse){ ! pdoc = (PipelineDocument)this.getDocument().copy(); ! } PipelineFactoryFactory.process(callStage, this.getDocument(), this.getTicket(), null); |
From: David G. Q. <dga...@us...> - 2008-07-24 07:55:45
|
Update of /cvsroot/babeldoc/babeldoc/modules/sql/lib In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18385/modules/sql/lib Added Files: mysql-connector-java-5.0.4-bin.jar Log Message: SMTP authentification USER and PASSWORD Fixes at Decompress pipeline --- NEW FILE: mysql-connector-java-5.0.4-bin.jar --- (This appears to be a binary file; contents omitted.) |
From: David G. Q. <dga...@us...> - 2008-07-24 07:55:45
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/config/i18n In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18385/modules/core/config/i18n Modified Files: messages.properties Log Message: SMTP authentification USER and PASSWORD Fixes at Decompress pipeline Index: messages.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/config/i18n/messages.properties,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** messages.properties 11 Jan 2008 12:03:47 -0000 1.33 --- messages.properties 24 Jul 2008 07:55:51 -0000 1.34 *************** *** 407,411 **** core.pipeline.stage.vfsreader.opt.password=Password that is used for connecting ! core.pipeline.stageinfo.stageType=Type of pipeline stage --- 407,412 ---- core.pipeline.stage.vfsreader.opt.password=Password that is used for connecting ! core.pipeline.stage.smtp.user=User for the SMTP authentification ! core.pipeline.stage.smtp.password=Password for the SMTP authentification core.pipeline.stageinfo.stageType=Type of pipeline stage |
From: David G. Q. <dga...@us...> - 2008-07-24 07:55:44
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18385/modules/core/src/com/babeldoc/core/pipeline/stage Modified Files: SmtpWriterPipelineStage.java DecompressionPipelineStage.java Log Message: SMTP authentification USER and PASSWORD Fixes at Decompress pipeline Index: SmtpWriterPipelineStage.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/SmtpWriterPipelineStage.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** SmtpWriterPipelineStage.java 4 Aug 2007 11:37:14 -0000 1.15 --- SmtpWriterPipelineStage.java 24 Jul 2008 07:55:51 -0000 1.16 *************** *** 92,95 **** --- 92,97 ---- import javax.mail.internet.MimeMultipart; + import org.apache.commons.vfs.auth.StaticUserAuthenticator; + /** *************** *** 126,129 **** --- 128,135 ---- /** Constants. */ public static final String PLAIN_FORMAT = "plain"; + /** Constants. */ + public static final String USER = "user"; + /** Constants. */ + public static final String PASSWORD = "password"; /** Constructor with this stages info. */ *************** *** 162,165 **** --- 168,176 ---- false, I18n.get("100151"))); + // Adding USER and PASSWORD for SMTP authentification + options.add(new ConfigOption(USER, IConfigOptionType.STRING, null, false, I18n.get("core.pipeline.stage.smtp.user"))); + options.add(new ConfigOption(PASSWORD, IConfigOptionType.STRING, null, false, I18n.get("core.pipeline.stage.smtp.password"))); + + return options; } *************** *** 228,231 **** --- 239,307 ---- /** + * Send the smtp message. + * + * @param smtpHost SMTP host + * @param smtpFrom email from + * @param smtpTo email to + * @param smtpSubject subject line + * @param smtpMsg email message + * @param files files! + * @param docToAttach attache document + * @param documentFileName attachment name + * @param contentType type of attachment. + * @throws PipelineException + */ + public void sendSmtpMessageWithAuthentification(String smtpHost, String smtpFrom, + String smtpTo, String smtpSubject, String smtpMsg, Collection files, + PipelineDocument docToAttach, String documentFileName, String contentType, String user, String password) + throws PipelineException { + //Set the host smtp address + SmtpAuthenticator auth = new SmtpAuthenticator(user, password); + //SmtpAuthenticator auth = new SmtpAuthenticator (); + + Properties props = new Properties(); + props.put("mail.smtp.host", smtpHost); + props.put("mail.smtp.auth", "true"); + + // create some properties and getChild the default Session + //Session session = Session.getInstance(props, null); + Session session = Session.getInstance(props, auth); + + // create a message + Message msg = new MimeMessage(session); + + try { + // set the from and to address + InternetAddress addressFrom = new InternetAddress(smtpFrom); + msg.setFrom(addressFrom); + + StringTokenizer st = new StringTokenizer(smtpTo, " ,"); + InternetAddress[] addressTo = new InternetAddress[st.countTokens()]; + + for (int i = 0; i < addressTo.length; i++) { + addressTo[i] = new InternetAddress(st.nextToken()); + } + + msg.setRecipients(Message.RecipientType.TO, addressTo); + + // Optional : You can also set your custom headers in the Email if you Want + // msg.addHeader("MyHeaderName", "myHeaderValue"); + // Setting the Subject and Content Type + msg.setSubject(smtpSubject); + + if (((files != null) && !files.isEmpty()) || (docToAttach != null)) { + msg.setContent(createMultipart(smtpMsg, contentType, files, + docToAttach, documentFileName)); + } else { + msg.setContent(smtpMsg, contentType); + } + + Transport.send(msg); + } catch (MessagingException messagex) { + throw new PipelineException("[SmtpWriterPipelineStage.process]", messagex); + } + } + + /** * pipeline stage - send an email message. * *************** *** 260,263 **** --- 336,342 ---- String documentFileName = getOptions(DOC_FILE_NAME); String format = getOptions(MAIL_FORMAT); + String user = getOptions(USER); + String password = getOptions(PASSWORD); + if ((format == null) || format.equals("")) { *************** *** 282,288 **** //send the actual message ! sendSmtpMessage(smtpHost, smtpFrom, smtpTo, smtpSubject, smtpMsg, ! filesToAttach, (attachDoc == true) ? this.getDocument() : null, ! documentFileName, contentType); return super.processHelper(); --- 361,375 ---- //send the actual message ! if (user == null || user == "") { ! sendSmtpMessage(smtpHost, smtpFrom, smtpTo, smtpSubject, smtpMsg, ! filesToAttach, (attachDoc == true) ? this.getDocument() : null, ! documentFileName, contentType); ! ! } else { ! sendSmtpMessageWithAuthentification(smtpHost, smtpFrom, smtpTo, smtpSubject, smtpMsg, ! filesToAttach, (attachDoc == true) ? this.getDocument() : null, ! documentFileName, contentType, user, password); ! ! } return super.processHelper(); *************** *** 383,385 **** --- 470,499 ---- return multipart; } + + private class SmtpAuthenticator extends javax.mail.Authenticator { + + String pass = ""; + String login = ""; + + public SmtpAuthenticator() { + super(); + } + + public SmtpAuthenticator(String login, String pass) { + super(); + + this.login = login; + this.pass = pass; + } + + public PasswordAuthentication getPasswordAuthentication() { + if (pass.equals("")) + return null; + else + return new PasswordAuthentication (login, pass); + } + + } } + + Index: DecompressionPipelineStage.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/DecompressionPipelineStage.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DecompressionPipelineStage.java 20 Jun 2008 11:04:53 -0000 1.8 --- DecompressionPipelineStage.java 24 Jul 2008 07:55:51 -0000 1.9 *************** *** 68,71 **** --- 68,72 ---- import com.babeldoc.core.I18n; import com.babeldoc.core.LogService; + import com.babeldoc.core.Pair; import com.babeldoc.core.option.ConfigOption; import com.babeldoc.core.option.IConfigInfo; *************** *** 208,214 **** for (int i = 0; i < results.size() && i < entryNames.size(); i++) { ! ArrayList newAtribute = new ArrayList(); ! psr[i] = processHelper((PipelineDocument)results.get(i))[0]; ! psr[i].getDocument().put("entryName", entryNames.get(i)); } --- 209,218 ---- for (int i = 0; i < results.size() && i < entryNames.size(); i++) { ! ArrayList newAtributeList = new ArrayList(); ! Pair newAtribute = new Pair("entryName", entryNames.get(i)); ! newAtributeList.add(newAtribute); ! psr[i] = processHelper((PipelineDocument)results.get(i),newAtributeList)[0]; ! ! //psr[i].getDocument().put("entryName", entryNames.get(i)); } |
From: David G. Q. <dga...@us...> - 2008-07-24 07:55:44
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18385/modules/core/src/com/babeldoc/core/pipeline Modified Files: PipelineDocument.java Log Message: SMTP authentification USER and PASSWORD Fixes at Decompress pipeline Index: PipelineDocument.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/PipelineDocument.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** PipelineDocument.java 18 Dec 2007 10:36:16 -0000 1.25 --- PipelineDocument.java 24 Jul 2008 07:55:51 -0000 1.26 *************** *** 486,491 **** * @return cloned object */ ! public Object clone() { ! return new PipelineDocument(this, getBytes()); } --- 486,493 ---- * @return cloned object */ ! //@Override ! public Object clone() throws CloneNotSupportedException { ! return super.clone(); ! //return new PipelineDocument(this, getBytes()); } |
From: Santi B. <san...@us...> - 2008-06-20 11:04:59
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28239/modules/core/src/com/babeldoc/core/pipeline/stage Modified Files: DecompressionPipelineStage.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: DecompressionPipelineStage.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/DecompressionPipelineStage.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DecompressionPipelineStage.java 4 Aug 2007 11:37:14 -0000 1.7 --- DecompressionPipelineStage.java 20 Jun 2008 11:04:53 -0000 1.8 *************** *** 67,70 **** --- 67,71 ---- import com.babeldoc.core.I18n; + import com.babeldoc.core.LogService; import com.babeldoc.core.option.ConfigOption; import com.babeldoc.core.option.IConfigInfo; *************** *** 83,214 **** import java.util.zip.ZipInputStream; - /** * This stage decompresses the data in the pipeline using a specified * compressor. ! * ! * @author bmcdonald ! * @version 1.0 */ public class DecompressionPipelineStage extends PipelineStage { ! /** Constants. */ ! public static final String COMPRESS_TYPE = "compressType"; ! /** ! * Construct with this stages config info. ! */ ! public DecompressionPipelineStage() { ! super(new PipelineStageInfo() { ! public String getName() { ! return "Decompression"; ! } ! public String getDescription() { ! return I18n.get("100270"); ! } ! public Collection getTypeSpecificOptions() { ! ArrayList options = new ArrayList(); ! //add specific options ! options.add(new ConfigOption(COMPRESS_TYPE, ! new ValueListConfigOptionType(new String[] { "gzip", "zip" }), ! null, false, I18n.get("100261"))); ! return options; ! } ! }); ! } ! /** ! * Decompress the input stream to the output stream. The type of compression ! * is configurable to either zip or gzip. ! * ! * @param out the output stream (compressed) ! * @param in the input stream (uncompressed) ! * @param compressType compression type ! * @return Arraylist with filenames ! * @throws IOException ! * @throws PipelineException ! */ ! public static ArrayList decompressData(OutputStream out, InputStream in, ! String compressType) throws IOException, PipelineException { ! //Create a buffer for reading raw bytes from the file. ! byte[] buf = new byte[1024]; ! int len; ! //Read from the file and write to the gzip archive. ! InputStream cis = null; ! ArrayList entryNames = new ArrayList(); ! if ("gzip".equalsIgnoreCase(compressType)) { ! cis = new GZIPInputStream(in); ! while ((len = cis.read(buf)) > -1) { ! out.write(buf, 0, len); ! } ! } else if ("zip".equalsIgnoreCase(compressType)) { ! cis = new ZipInputStream(in); ! ZipEntry entry = null; ! while ((entry = ((ZipInputStream) cis).getNextEntry()) != null) { ! //System.out.println(entry.getName()+":"+entry.getSize()); ! entryNames.add(entry.getName()); ! while ((len = cis.read(buf)) > -1) { ! out.write(buf, 0, len); ! } ! ((ZipInputStream) cis).closeEntry(); ! } ! cis.close(); ! } else { ! throw new PipelineException(I18n.get("100263") + ": " + compressType); ! } ! return entryNames; ! } ! /** ! * pipeline stage processing method. ! * ! * @return array of results ! * @throws PipelineException ! */ ! public PipelineStageResult[] process() throws PipelineException { ! InputStream in = getDocument().getInputStream(); ! ByteArrayOutputStream baos = new ByteArrayOutputStream(getDocument() ! .getBytes().length * 2); ! ArrayList entryNames = new ArrayList(); ! try { ! entryNames = decompressData(baos, in, this.getOptions(COMPRESS_TYPE)); ! } catch (IOException e) { ! throw new PipelineException(I18n.get("100271"), e); ! } ! byte[] data = baos.toByteArray(); ! PipelineDocument newDocument = new PipelineDocument(this.getDocument(), data); ! newDocument.setBinary(true); ! newDocument.setName(formatEntryName(entryNames)); ! return super.processHelper(newDocument); ! } ! ! /** ! * ! * Create a name of descompress file ! * ! * @param entryNames Arraylist that it contains the filenames ! * @return string with the filenames ! */ ! private String formatEntryName(ArrayList entryNames){ ! String entryName = ""; ! for (int i=0; i< entryNames.size(); i++){ ! if(i==0) entryName = entryNames.get(i).toString(); else entryName = entryName + "_" + entryNames.get(i).toString(); ! } ! return entryName; ! } } --- 84,298 ---- import java.util.zip.ZipInputStream; /** * This stage decompresses the data in the pipeline using a specified * compressor. ! * If the data is in zip compress type and contains multiple entries, each entry is ! * feeded to a new document. ! * ! * @author bmcdonald, santibegue ! * @version 1.1 */ public class DecompressionPipelineStage extends PipelineStage { ! /** Constants. */ ! public static final String COMPRESS_TYPE = "compressType"; ! /** ! * Construct with this stages config info. ! */ ! public DecompressionPipelineStage() { ! super(new PipelineStageInfo() { ! public String getName() { ! return "Decompression"; ! } ! public String getDescription() { ! return I18n.get("100270"); ! } ! public Collection getTypeSpecificOptions() { ! ArrayList options = new ArrayList(); ! // add specific options ! options.add(new ConfigOption(COMPRESS_TYPE, ! new ValueListConfigOptionType(new String[] { "gzip", ! "zip" }), null, false, I18n.get("100261"))); ! return options; ! } ! }); ! } ! /** ! * Decompress the input stream to the output stream. The type of compression ! * is configurable to either zip or gzip. ! * ! * @param out ! * the output stream (compressed) ! * @param in ! * the input stream (uncompressed) ! * @param compressType ! * compression type ! * @return Arraylist with filenames ! * @throws IOException ! * @throws PipelineException ! */ ! public static ArrayList decompressData(OutputStream out, InputStream in, ! String compressType) throws IOException, PipelineException { ! // Create a buffer for reading raw bytes from the file. ! byte[] buf = new byte[1024]; ! int len; ! // Read from the file and write to the gzip archive. ! InputStream cis = null; ! ArrayList entryNames = new ArrayList(); ! if ("gzip".equalsIgnoreCase(compressType)) { ! //TODO: test this type of compressor. ! cis = new GZIPInputStream(in); ! while ((len = cis.read(buf)) > -1) { ! out.write(buf, 0, len); ! } ! } else if ("zip".equalsIgnoreCase(compressType)) { ! cis = new ZipInputStream(in); ! ZipEntry entry = null; ! while ((entry = ((ZipInputStream) cis).getNextEntry()) != null) { ! // System.out.println(entry.getName()+":"+entry.getSize()); ! entryNames.add(entry.getName()); ! while ((len = cis.read(buf)) > -1) { ! out.write(buf, 0, len); ! } ! ((ZipInputStream) cis).closeEntry(); ! } ! cis.close(); ! } else { ! throw new PipelineException(I18n.get("100263") + ": " ! + compressType); ! } ! return entryNames; ! } ! /** ! * pipeline stage processing method. ! * ! * @return array of results ! * @throws PipelineException ! */ ! public PipelineStageResult[] process() throws PipelineException { ! InputStream in = getDocument().getInputStream(); ! ByteArrayOutputStream baos = new ByteArrayOutputStream(getDocument() ! .getBytes().length * 2); ! ArrayList entryNames = new ArrayList(); ! // Array per desar els resultats ! ArrayList results = null; ! PipelineStageResult[] psr = null; ! try { ! // entryNames = decompressData(baos, in, ! // this.getOptions(COMPRESS_TYPE)); ! results = serializeDecompressData(baos, in, this.getOptions(COMPRESS_TYPE), entryNames); ! ! LogService.getInstance().logDebug("ZIP contains " + results.size() + " documents."); ! ! if (results.size() != entryNames.size()) { ! LogService.getInstance().logWarn("Number of documents(" + results.size()+ ") in zip differs from number of names(" + entryNames.size() + ")"); ! } ! if ( results.isEmpty()) { ! return super.processHelper(); ! } else { ! psr = new PipelineStageResult[results.size()]; ! for (int i = 0; i < results.size() && i < entryNames.size(); i++) { ! ArrayList newAtribute = new ArrayList(); ! psr[i] = processHelper((PipelineDocument)results.get(i))[0]; ! psr[i].getDocument().put("entryName", entryNames.get(i)); ! } ! ! return psr; ! } ! } catch (Exception e) { ! throw new PipelineException(I18n.get("100271"), e); ! } ! ! // byte[] data = baos.toByteArray(); ! // PipelineDocument newDocument = new ! // PipelineDocument(this.getDocument(), data); ! // newDocument.setBinary(true); ! // newDocument.setName(formatEntryName(entryNames)); ! // ! // return super.processHelper(newDocument); ! } ! ! private ArrayList serializeDecompressData(ByteArrayOutputStream baos, ! InputStream in, String options, ArrayList entryNames) ! throws Exception { ! // Create a buffer for reading raw bytes from the file. ! byte[] buf = new byte[1024]; ! int len; ! ! // Read from the file and write to the gzip archive. ! InputStream cis = null; ! ! //Store results in an ArrayList, each result is an entry. ! ArrayList results = new ArrayList(); ! ! ! if ("gzip".equalsIgnoreCase(options)) { ! cis = new GZIPInputStream(in); ! ! while ((len = cis.read(buf)) > -1) { ! baos.reset(); ! baos.write(buf, 0, len); ! } ! PipelineDocument newDoc = new PipelineDocument(baos.toByteArray()); ! results.add(newDoc); ! ! } else if ("zip".equalsIgnoreCase(options)) { ! cis = new ZipInputStream(in); ! ! ZipEntry entry = null; ! ! while ((entry = ((ZipInputStream) cis).getNextEntry()) != null) { ! // System.out.println(entry.getName()+":"+entry.getSize()); ! baos.reset(); ! entryNames.add(entry.getName()); ! while ((len = cis.read(buf)) > -1) { ! baos.write(buf, 0, len); ! } ! ! ((ZipInputStream) cis).closeEntry(); ! PipelineDocument newDoc = new PipelineDocument(baos.toByteArray()); ! results.add(newDoc); ! ! } ! ! cis.close(); ! } else { ! throw new PipelineException(I18n.get("100263") + ": " + options); ! } ! return results; ! } ! ! /** ! * ! * Create a name of descompress file ! * ! * @param entryNames ! * Arraylist that it contains the filenames ! * @return string with the filenames ! */ ! private String formatEntryName(ArrayList entryNames) { ! String entryName = ""; ! for (int i = 0; i < entryNames.size(); i++) { ! if (i == 0) entryName = entryNames.get(i).toString(); else entryName = entryName + "_" + entryNames.get(i).toString(); ! } ! return entryName; ! } } |
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; + + } /** |
From: paspes <pa...@us...> - 2008-06-19 07:38:50
|
Update of /cvsroot/babeldoc/babeldoc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19197 Added Files: babeldoc_debug.launch Log Message: Buil launcher --- NEW FILE: babeldoc_debug.launch --- <?xml version="1.0" encoding="UTF-8"?> <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> <listEntry value="/babeldoc/modules/init/src/com/babeldoc/init/Main.java"/> </listAttribute> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> <listEntry value="1"/> </listAttribute> <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> <stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/> <stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/ant/lib/ant.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/ant/lib/junit.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/ant/lib/optional.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/ant/lib/xercesImpl.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/jalopy/lib/aelfred-1.2.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/jalopy/lib/jalopy-1.0b10.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/jalopy/lib/jalopy-ant-0.6.1.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/jalopy/lib/jaxp-1.2.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/jalopy/lib/jdom-1.0b8.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/jalopy/lib/log4j-1.2.6.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/jalopy/lib/oro-2.0.6.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/support/jalopy/lib/sax-2.0.1.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/activation.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/avalon-framework.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/bsf.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-beanutils.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-cli.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-codec-1.3.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-collections.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-dbcp.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-digester.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-discovery.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-httpclient.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-lang.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-logging.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-net.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-pool.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/commons-vfs-1.1-SNAPSHOT.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/concurrent.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/csv19.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/docbook-xalan.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/dom4j-full.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/js.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/JTidy.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/log4j.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/mail.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/oro.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/ostermiller-utils.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/velocity.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/xalan.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/xerces.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/xml-apis.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/core/lib/xmlsec.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/j2ee/lib/j2ee.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/j2ee/support/xdoclet-1.2b4.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/j2ee/support/xdoclet-ejb-module-1.2b4.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/j2ee/support/xdoclet-jboss-module-1.2b4.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/j2ee/support/xdoclet-jmx-module-1.2b4.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/j2ee/support/xdoclet-web-module-1.2b4.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/j2ee/support/xjavadoc-1.0.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/jabber/lib/smack.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/jabber/lib/smackx.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/soap/lib/jaxm-api.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/soap/lib/jaxm-runtime.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/soap/lib/saaj-api.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/soap/lib/saaj-ri.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/sql/lib/classes12.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/sql/lib/jtds-0.8.1.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/sql/lib/mm.mysql-2.0.14-bin.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/syndication/lib/jdom.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/syndication/lib/rome-0.9.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/web/lib/servlet.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/xslfo/lib/batik.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/xslfo/lib/fop.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/babeldoc/modules/conversion/lib/poi.jar&quot;/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.archive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;babeldoc&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> </sourceContainers> </sourceLookupDirector> "/> <listAttribute key="org.eclipse.jdt.launching.CLASSPATH"> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="babeldoc" path="1" type="4"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/activation.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/avalon-framework.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_babelfish.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_conversion.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_core.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_crypto.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_gui.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_init.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_j2ee.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_jabber.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_soap.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_sql.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_syndication.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_web.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc_xslfo.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/babeldoc-scanner.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/batik.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/bsf.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/classes12.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-beanutils.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-cli.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-codec-1.3.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-collections.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-dbcp.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-digester.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-discovery.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-httpclient.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-lang.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-logging.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-net.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-pool.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/commons-vfs-1.1-SNAPSHOT.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/concurrent.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/csv19.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/docbook-xalan.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/dom4j-full.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/fop.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/j2ee.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/jaxm-api.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/jaxm-runtime.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/jdom.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/js.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/jtds-0.8.1.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/JTidy.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/log4j.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/mail.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/mm.mysql-2.0.14-bin.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/oro.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/ostermiller-utils.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/poi.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/rome-0.9.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/saaj-api.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/saaj-ri.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/servlet.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/smack.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/smackx.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/velocity.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/xalan.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/xerces.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/xml-apis.jar" path="3" type="2"/> "/> <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry externalArchive="/babeldoc/build/lib/xmlsec.jar" path="3" type="2"/> "/> </listAttribute> <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/> <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.babeldoc.init.Main"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="${string_prompt}"/> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="babeldoc"/> <booleanAttribute key="org.eclipse.jdt.launching.STOP_IN_MAIN" value="true"/> <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dbabeldoc.home=${workspace_loc:/babeldoc/build} -Dbabeldoc.user=M:\albalaTST"/> <stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:babeldoc/build}"/> </launchConfiguration> |
From: paspes <pa...@us...> - 2008-01-30 15:14:55
|
Update of /cvsroot/babeldoc/babeldoc/readme/sql/oracle In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7966/readme/sql/oracle Modified Files: journal-tables.sql Log Message: modificació script creacio bd oracle Index: journal-tables.sql =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/sql/oracle/journal-tables.sql,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** journal-tables.sql 24 Feb 2003 22:50:25 -0000 1.1.1.1 --- journal-tables.sql 30 Jan 2008 15:13:59 -0000 1.2 *************** *** 1,58 **** ! DROP TABLE JOURNAL CASCADE CONSTRAINTS ; ! CREATE TABLE JOURNAL ( ! jrn_log_id NUMBER NOT NULL, ! jrn_log_step NUMBER NOT NULL, ! jrn_data BLOB, CONSTRAINT pk_journal ! PRIMARY KEY ( jrn_log_id, jrn_log_step ) ) ; ! DROP TABLE JOURNAL_DATA CASCADE CONSTRAINTS ; ! CREATE TABLE JOURNAL_DATA ( ! jda_log_id NUMBER NOT NULL, ! jda_log_step NUMBER NOT NULL, ! jda_name VARCHAR2 (255) NOT NULL, ! jda_value VARCHAR2 (255), CONSTRAINT pk_journal_data ! PRIMARY KEY ( jda_log_id, jda_log_step, jda_name ) ) ; - DROP TABLE LOG CASCADE CONSTRAINTS ; ! CREATE TABLE LOG ( ! log_id NUMBER NOT NULL, ! log_step NUMBER NOT NULL, ! log_operation VARCHAR2 (30) NOT NULL, ! log_datetime NUMBER NOT NULL, ! log_other_data VARCHAR2 (30), ! log_pipeline VARCHAR2 (30), log_additional VARCHAR2 (2000), CONSTRAINT pk_log ! PRIMARY KEY ( log_id, log_step ) ) ; ! ! DROP TABLE TABLE_KEY CASCADE CONSTRAINTS ; ! CREATE TABLE TABLE_KEY ( ! key_table_name VARCHAR2 (30) NOT NULL, ! key_val NUMBER NOT NULL, ! UNIQUE (key_table_name), CONSTRAINT pk_table_key ! PRIMARY KEY ( key_table_name ) ) ; ! DROP TABLE CONFIG CASCADE CONSTRAINTS ; CREATE TABLE CONFIG ( cfg_name VARCHAR (30) NOT NULL, cfg_value VARCHAR (255) NOT NULL, - UNIQUE (cfg_name), CONSTRAINT pk_config PRIMARY KEY ( cfg_name ) ); ! DROP TABLE BABEL_USER CASCADE CONSTRAINTS; ! CREATE TABLE BABEL_USER ( user_name VARCHAR (30) NOT NULL, user_passwd VARCHAR (30) NOT NULL, - UNIQUE (user_name), CONSTRAINT pk_user PRIMARY KEY ( user_name ) ); - --- 1,59 ---- ! DROP TABLE JOURNAL CASCADE CONSTRAINTS ; ! CREATE TABLE JOURNAL ( ! jrn_log_id NUMBER NOT NULL, ! jrn_log_step NUMBER NOT NULL, ! jrn_data BLOB, CONSTRAINT pk_journal ! PRIMARY KEY ( jrn_log_id, jrn_log_step ) ) ; ! DROP TABLE JOURNAL_DATA CASCADE CONSTRAINTS ; ! ! CREATE TABLE JOURNAL_DATA ( ! jda_log_id NUMBER NOT NULL, ! jda_log_step NUMBER NOT NULL, ! jda_name VARCHAR2 (255) NOT NULL, ! jda_value VARCHAR2 (255), CONSTRAINT pk_journal_data ! PRIMARY KEY ( jda_log_id, jda_log_step, jda_name ) ) ; ! DROP TABLE LOG CASCADE CONSTRAINTS ; ! ! ! CREATE TABLE LOG ( ! log_id NUMBER NOT NULL, ! log_step NUMBER NOT NULL, ! log_operation VARCHAR2 (30) NOT NULL, ! log_datetime NUMBER NOT NULL, ! log_other_data VARCHAR2 (30), ! log_pipeline VARCHAR2 (100), log_additional VARCHAR2 (2000), CONSTRAINT pk_log ! PRIMARY KEY ( log_id, log_step ) ) ; ! DROP TABLE TABLE_KEY CASCADE CONSTRAINTS ; ! ! CREATE TABLE TABLE_KEY ( ! key_table_name VARCHAR2 (30) NOT NULL, ! key_val NUMBER NOT NULL, CONSTRAINT pk_table_key ! PRIMARY KEY ( key_table_name ) ) ; ! DROP TABLE CONFIG CASCADE CONSTRAINTS ; + + CREATE TABLE CONFIG ( cfg_name VARCHAR (30) NOT NULL, cfg_value VARCHAR (255) NOT NULL, CONSTRAINT pk_config PRIMARY KEY ( cfg_name ) ); ! DROP TABLE BABEL_USER CASCADE CONSTRAINTS; ! CREATE TABLE BABEL_USER ( user_name VARCHAR (30) NOT NULL, user_passwd VARCHAR (30) NOT NULL, CONSTRAINT pk_user PRIMARY KEY ( user_name ) ); |
From: paspes <pa...@us...> - 2008-01-15 12:43:55
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2198/modules/scanner/src/com/babeldoc/scanner/worker Modified Files: SqlScanner.java Log Message: SQLScanner multidocument Index: SqlScanner.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker/SqlScanner.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** SqlScanner.java 14 Jan 2008 23:40:34 -0000 1.20 --- SqlScanner.java 15 Jan 2008 12:43:58 -0000 1.21 *************** *** 152,176 **** if (columnCount > 0) { ! while (rs.next()) { ! for (int i = 1; i <= columnCount; i++) { ! sb.append(rs.getObject(i).toString()); ! ! if (i != columnCount) { ! sb.append(fieldSeparator); ! } else { ! sb.append(rowSeparator); } - } - if (multiDocument) { this.enqueue(sb.toString().getBytes(), ! new NameValuePair[] { new NameValuePair( ! SCAN_MIMETYPE_KEY, "text/plain") }); } } ! if (!multiDocument) { this.enqueue(sb.toString().getBytes(), ! new NameValuePair[] { new NameValuePair( ! SCAN_MIMETYPE_KEY, "text/plain") }); } } --- 152,184 ---- if (columnCount > 0) { ! if (multiDocument) { ! while (rs.next()) { ! for (int i = 1; i <= columnCount; i++) { ! sb.append(rs.getObject(i).toString()); ! ! if (i != columnCount) { ! sb.append(fieldSeparator); ! } } this.enqueue(sb.toString().getBytes(), ! new NameValuePair[] { new NameValuePair( ! SCAN_MIMETYPE_KEY, "text/plain") }); } } + else{ //Only one document + while (rs.next()) { + for (int i = 1; i <= columnCount; i++) { + sb.append(rs.getObject(i).toString()); ! if (i != columnCount) { ! sb.append(fieldSeparator); ! } else { ! sb.append(rowSeparator); ! } ! } ! } this.enqueue(sb.toString().getBytes(), ! new NameValuePair[] { new NameValuePair( ! SCAN_MIMETYPE_KEY, "text/plain") }); } } *************** *** 187,192 **** int columnCount = rs.getMetaData().getColumnCount(); ! StringBuffer sb = new StringBuffer( ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); int rowCount = 0; --- 195,199 ---- int columnCount = rs.getMetaData().getColumnCount(); ! StringBuffer sb = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); int rowCount = 0; *************** *** 212,226 **** sb.append("\t</" + rowTag + ">\n"); if (multiDocument) { enqueue(sb.toString().getBytes("UTF-8"), new NameValuePair[] { new NameValuePair( SCAN_MIMETYPE_KEY, "text/xml") }); } rowCount++; } - sb.append("</" + headingTag + ">\n"); - // only submit the document if we have any rows in the result set if (rowCount > 0 && !multiDocument) { enqueue(sb.toString().getBytes("UTF-8"), new NameValuePair[] { new NameValuePair( --- 219,236 ---- sb.append("\t</" + rowTag + ">\n"); if (multiDocument) { + sb.append("</" + headingTag + ">\n"); enqueue(sb.toString().getBytes("UTF-8"), new NameValuePair[] { new NameValuePair( SCAN_MIMETYPE_KEY, "text/xml") }); + //New document + sb = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); + sb.append("<" + headingTag + ">\n"); } rowCount++; } // only submit the document if we have any rows in the result set if (rowCount > 0 && !multiDocument) { + sb.append("</" + headingTag + ">\n"); enqueue(sb.toString().getBytes("UTF-8"), new NameValuePair[] { new NameValuePair( |
From: Santi B. <san...@us...> - 2008-01-15 00:09:41
|
Update of /cvsroot/babeldoc/babeldoc/modules/jabber/src/com/babeldoc/jabber/pipeline/stage In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19468/modules/jabber/src/com/babeldoc/jabber/pipeline/stage Modified Files: XmppWriterPipelineStage.java Log Message: Processing messages for multiple receivers when 'waitdelivery' activated. Index: XmppWriterPipelineStage.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/jabber/src/com/babeldoc/jabber/pipeline/stage/XmppWriterPipelineStage.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XmppWriterPipelineStage.java 14 Jan 2008 15:37:11 -0000 1.2 --- XmppWriterPipelineStage.java 15 Jan 2008 00:09:44 -0000 1.3 *************** *** 123,127 **** public String getDescription() { ! return "Pipeline stage that use XMPP (Jabber) protocol for sending messages"; } --- 123,127 ---- public String getDescription() { ! return "Pipeline stage that use XMPP (Jabber) protocol for sending messages"; } *************** *** 129,155 **** ArrayList options = new ArrayList(); ! options ! .add(new ConfigOption( ! HOST, ! IConfigOptionType.STRING, ! "jabber.org", false, "Jabber server name")); //$NON-NLS-1$ options.add(new ConfigOption(PORT, IConfigOptionType.INTEGER, "5222", false, //$NON-NLS-1$ ! "Port using for connecting. Defaults to 5222")); options.add(new ConfigOption(USERNAME, ! IConfigOptionType.STRING, null, true, "Jabber account name")); options.add(new ConfigOption(PASSWORD, ! IConfigOptionType.STRING, null, true, "Jabber account password")); ! options.add(new ConfigOption(RECIPIENTS, ! IConfigOptionType.STRING, null, false, "Comma separated list of recipients that should receive IM")); options.add(new ConfigOption(CHATROOM, ! IConfigOptionType.STRING, null, false, "Name of chatroom that should receive IM")); options.add(new ConfigOption(NICKNAME, ! IConfigOptionType.STRING, null, false, "Nickname used for chatrooms")); ! options ! .add(new ConfigOption( ! SSL, ! IConfigOptionType.BOOLEAN, ! "false", false, "Use ssl connections")); //$NON-NLS-1$ options .add(new ConfigOption( --- 129,155 ---- ArrayList options = new ArrayList(); ! options.add(new ConfigOption(HOST, IConfigOptionType.STRING, ! "jabber.org", false, "Jabber server name")); //$NON-NLS-1$ options.add(new ConfigOption(PORT, IConfigOptionType.INTEGER, "5222", false, //$NON-NLS-1$ ! "Port using for connecting. Defaults to 5222")); options.add(new ConfigOption(USERNAME, ! IConfigOptionType.STRING, null, true, ! "Jabber account name")); options.add(new ConfigOption(PASSWORD, ! IConfigOptionType.STRING, null, true, ! "Jabber account password")); ! options ! .add(new ConfigOption(RECIPIENTS, ! IConfigOptionType.STRING, null, false, ! "Comma separated list of recipients that should receive IM")); options.add(new ConfigOption(CHATROOM, ! IConfigOptionType.STRING, null, false, ! "Name of chatroom that should receive IM")); options.add(new ConfigOption(NICKNAME, ! IConfigOptionType.STRING, null, false, ! "Nickname used for chatrooms")); ! options.add(new ConfigOption(SSL, IConfigOptionType.BOOLEAN, ! "false", false, "Use ssl connections")); //$NON-NLS-1$ options .add(new ConfigOption( *************** *** 158,164 **** "false", false, "Wait until delivery event notification")); //$NON-NLS-1$ options.add(new ConfigOption(MESSAGE, IConfigOptionType.STRING, ! null, false, "Notification message to send")); options.add(new ConfigOption(ANSWER, IConfigOptionType.STRING, ! null, false, "Expected answer for send document")); return options; --- 158,164 ---- "false", false, "Wait until delivery event notification")); //$NON-NLS-1$ options.add(new ConfigOption(MESSAGE, IConfigOptionType.STRING, ! null, false, "Notification message to send")); options.add(new ConfigOption(ANSWER, IConfigOptionType.STRING, ! null, false, "Expected answer for send document")); return options; *************** *** 177,182 **** final String username = this.getInfo().getStrValue(USERNAME); final String password = this.getInfo().getStrValue(PASSWORD); ! final String[] recipients = StringUtils.split(this.getInfo().getStrValue( ! RECIPIENTS), ","); //$NON-NLS-1$ final String chatroom = this.getInfo().getStrValue(CHATROOM); final String nickname = this.getInfo().getStrValue(NICKNAME); --- 177,182 ---- final String username = this.getInfo().getStrValue(USERNAME); final String password = this.getInfo().getStrValue(PASSWORD); ! final String[] recipients = StringUtils.split(this.getInfo() ! .getStrValue(RECIPIENTS), ","); //$NON-NLS-1$ final String chatroom = this.getInfo().getStrValue(CHATROOM); final String nickname = this.getInfo().getStrValue(NICKNAME); *************** *** 191,200 **** XMPPConnection conn = null; MultiUserChat groupChat = null; ! Message message = null; try { if (useSSL) { // conn = new SSLXMPPConnection(host); ! throw new PipelineException("SSL Protocol not supported"); } else { connConfig = new ConnectionConfiguration(host, port); --- 191,201 ---- XMPPConnection conn = null; MultiUserChat groupChat = null; ! Message[] message = null; ! Message messageGroup = null; try { if (useSSL) { // conn = new SSLXMPPConnection(host); ! throw new PipelineException("SSL Protocol not supported"); } else { connConfig = new ConnectionConfiguration(host, port); *************** *** 213,224 **** Chat chat = conn.getChatManager().createChat(recipients[i], new XmppPipelineMessageListener()); ! message = new Message(); ! message.setBody(notificationMessage); ! message.setType(Message.Type.chat); ! MessageEventManager.addNotificationsRequests(message, true, true, true, true); ! deliveryStatus.setDeliveryStatus(message.getPacketID(), MessageDeliveryStatus.SENDING); ! chat.sendMessage(message); } --- 214,225 ---- Chat chat = conn.getChatManager().createChat(recipients[i], new XmppPipelineMessageListener()); ! message[i] = new Message(); ! message[i].setBody(notificationMessage); ! message[i].setType(Message.Type.chat); ! MessageEventManager.addNotificationsRequests(message[i], true, true, true, true); ! deliveryStatus.setDeliveryStatus(message[i].getPacketID(), MessageDeliveryStatus.SENDING); ! chat.sendMessage(message[i]); } *************** *** 230,263 **** waitDelivery = false; groupChat.join(nickname, password); ! message = groupChat.createMessage(); ! message.setSubject(notificationMessage); ! message.setBody(notificationMessage); ! message.setType(Message.Type.groupchat); ! // MessageEventManager.addNotificationsRequests(message, true, true, true, true); ! groupChat.sendMessage(message); } if (waitDelivery) { try { ! while (deliveryStatus.getDeliveryStatus(message ! .getPacketID()) == MessageDeliveryStatus.SENDING) { ! Thread.sleep(15); ! } ! if(deliveryStatus.getDeliveryStatus(message.getPacketID()) == MessageDeliveryStatus.ERROR || ! deliveryStatus.getDeliveryStatus(message.getPacketID()) == MessageDeliveryStatus.NOT_INITIATED){ ! throw new PipelineException("Can't determine de delivery status."); } - if(deliveryStatus.getDeliveryStatus(message.getPacketID()) == MessageDeliveryStatus.OFFLINE) - throw new PipelineException("Can't send the message, the user is offline."); - } catch (InterruptedException e) { throw new PipelineException( "Pipeline aborted while waiting for delivery."); ! } } conn.disconnect(); } catch (XMPPException xme) { ! throw new PipelineException("Error sending message", xme); // xme.printStackTrace(); } --- 231,272 ---- waitDelivery = false; groupChat.join(nickname, password); ! messageGroup = groupChat.createMessage(); ! messageGroup.setSubject(notificationMessage); ! messageGroup.setBody(notificationMessage); ! messageGroup.setType(Message.Type.groupchat); ! // MessageEventManager.addNotificationsRequests(message, true, ! // true, true, true); ! groupChat.sendMessage(messageGroup); } if (waitDelivery) { try { ! // Processing every message in the array while not completed ! for (int i = 0; i < message.length; i++) { ! while (deliveryStatus.getDeliveryStatus(message[i] ! .getPacketID()) == MessageDeliveryStatus.SENDING) { ! Thread.sleep(15); ! } ! if (deliveryStatus.getDeliveryStatus(message[i] ! .getPacketID()) == MessageDeliveryStatus.ERROR ! || deliveryStatus.getDeliveryStatus(message[i] ! .getPacketID()) == MessageDeliveryStatus.NOT_INITIATED) { ! throw new PipelineException( ! "Can't determine de delivery status."); ! } ! if (deliveryStatus.getDeliveryStatus(message[i] ! .getPacketID()) == MessageDeliveryStatus.OFFLINE) ! throw new PipelineException( ! "Can't send the message, the user is offline."); } } catch (InterruptedException e) { throw new PipelineException( "Pipeline aborted while waiting for delivery."); ! } } conn.disconnect(); } catch (XMPPException xme) { ! throw new PipelineException("Error sending message", xme); // xme.printStackTrace(); } |
From: Santi B. <san...@us...> - 2008-01-14 23:40:34
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8326/modules/scanner/src/com/babeldoc/scanner/worker Modified Files: SqlScanner.java Log Message: Revision on SqlScanner for multi-document processing, each row in a separate document. Added internationalization for catalan(ca). Index: SqlScanner.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker/SqlScanner.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** SqlScanner.java 21 Dec 2004 17:03:06 -0000 1.19 --- SqlScanner.java 14 Jan 2008 23:40:34 -0000 1.20 *************** *** 87,101 **** import com.babeldoc.scanner.ScannerWorkerInfo; - /** ! * Scanner that scans SQL databases. The document can be constructed from the ! * select results in a number of ways: * <ul> ! * <li>One document as csv document made of all results returned</li> ! * <li>One document as xml document made of all results returned</li> ! * <li>One document for every returned row (only first column will be included)</li> * </ul> ! * After selecting results an update statement can be executed (if provided) so ! * rows can be marked as processed (thanks Klaas Eikelboom!) * * @author dejank --- 87,101 ---- import com.babeldoc.scanner.ScannerWorkerInfo; /** ! * Scanner that scans SQL databases. The document can be constructed from the ! * select results in a number of ways: * <ul> ! * <li>One document as csv document made of all results returned</li> ! * <li>One document as xml document made of all results returned</li> ! * <li>One document for every returned row (only first column will be included)</li> ! * <li>Multiple documents, one for each result, in CSV or XML types</li> * </ul> ! * After selecting results an update statement can be executed (if provided) so ! * rows can be marked as processed (thanks Klaas Eikelboom!) * * @author dejank *************** *** 103,136 **** */ public class SqlScanner extends ScannerWorker { ! //Constants ! public static final String RESOURCE_NAME = "resourceName"; ! public static final String SQL_STATEMENT = "sqlStatement"; ! public static final String UPDATE_STATEMENT = "updateStatement"; ! public static final String DOCUMENT_TYPE = "documentType"; ! public static final String FIELD_SEPARATOR = "cvsFieldSeparator"; ! public static final String ROW_SEPARATOR = "csvRowSeparator"; ! public static final String XML_HEADING_TAG = "xmlHeadingTag"; ! public static final String XML_ROW_TAG = "xmlRowTag"; ! ! //legal values for document type ! public static final String DOC_TYPE_SIMPLE = "simple"; ! public static final String DOC_TYPE_XML = "xml"; ! public static final String DOC_TYPE_CSV = "csv"; ! //csv separators. This could be config option too ! public static final String DEFAULT_CSV_FIELD_SEP = ","; ! public static final String DEFAULT_CSV_ROW_SEP = "\n"; ! public static final String DEFAULT_XML_HEADING_TAG = "document"; ! public static final String DEFAULT_XML_ROW_TAG = "row"; ! private IResource resource; ! private String documentType = null; ! private String fieldSeparator = DEFAULT_CSV_FIELD_SEP; ! private String headingTag = DEFAULT_XML_HEADING_TAG; ! private String resourceName = null; ! private String rowSeparator = DEFAULT_CSV_ROW_SEP; ! private String rowTag = DEFAULT_XML_ROW_TAG; ! private String sqlStatement = null; ! private String updateStatement = null; public SqlScanner() { --- 103,138 ---- */ public class SqlScanner extends ScannerWorker { ! // Constants ! public static final String RESOURCE_NAME = "resourceName"; ! public static final String SQL_STATEMENT = "sqlStatement"; ! public static final String UPDATE_STATEMENT = "updateStatement"; ! public static final String DOCUMENT_TYPE = "documentType"; ! // TODO: DOCUMENT-ME! multidocument option ! public static final String MULTIDOCUMENT = "multiDocument"; ! public static final String FIELD_SEPARATOR = "cvsFieldSeparator"; ! public static final String ROW_SEPARATOR = "csvRowSeparator"; ! public static final String XML_HEADING_TAG = "xmlHeadingTag"; ! public static final String XML_ROW_TAG = "xmlRowTag"; ! // legal values for document type ! public static final String DOC_TYPE_SIMPLE = "simple"; ! public static final String DOC_TYPE_XML = "xml"; ! public static final String DOC_TYPE_CSV = "csv"; + // csv separators. This could be config option too + public static final String DEFAULT_CSV_FIELD_SEP = ","; + public static final String DEFAULT_CSV_ROW_SEP = "\n"; + public static final String DEFAULT_XML_HEADING_TAG = "document"; + public static final String DEFAULT_XML_ROW_TAG = "row"; + private IResource resource; + private String documentType = null; + private String fieldSeparator = DEFAULT_CSV_FIELD_SEP; + private String headingTag = DEFAULT_XML_HEADING_TAG; + private String resourceName = null; + private String rowSeparator = DEFAULT_CSV_ROW_SEP; + private String rowTag = DEFAULT_XML_ROW_TAG; + private String sqlStatement = null; + private String updateStatement = null; + private boolean multiDocument = false; public SqlScanner() { *************** *** 138,305 **** } ! /** ! * Make one csv document from all rows ! * ! * @param rs ! * ! * @throws Exception ! */ ! public void handleCsvDocument(ResultSet rs) throws Exception { ! int columnCount = rs.getMetaData().getColumnCount(); ! StringBuffer sb = new StringBuffer(); ! ! if (columnCount > 0) { ! while (rs.next()) { ! for (int i = 1; i <= columnCount; i++) { ! sb.append(rs.getObject(i).toString()); ! if (i != columnCount) { ! sb.append(fieldSeparator); ! } else { ! sb.append(rowSeparator); ! } ! } ! } ! this.enqueue(sb.toString().getBytes(), ! new NameValuePair[] {new NameValuePair(SCAN_MIMETYPE_KEY, "text/plain")}); ! } ! } ! /** ! * Get ! * ! * @param rs ! * ! * @throws Exception ! */ ! public void handleXmlDocuments(ResultSet rs) throws Exception { ! int columnCount = rs.getMetaData().getColumnCount(); ! StringBuffer sb = new StringBuffer( ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); ! int rowCount = 0; ! if (columnCount > 0) { ! sb.append("<" + headingTag + ">\n"); ! while (rs.next()) { ! sb.append("\t<" + rowTag + ">\n"); ! for (int i = 1; i <= columnCount; i++) { ! sb.append("\t\t<" + rs.getMetaData().getColumnLabel(i) + ">"); ! String data = ""; ! if (rs.getObject(i)!=null) { ! data = rs.getObject(i).toString(); ! } ! sb.append("<![CDATA[" + data + "]]>"); ! sb.append("</" + rs.getMetaData().getColumnLabel(i) + ">\n"); ! } ! sb.append("\t</" + rowTag + ">\n"); ! rowCount++; ! } ! sb.append("</" + headingTag + ">\n"); ! // only submit the document if we have any rows in the result set ! if (rowCount > 0) { ! enqueue(sb.toString().getBytes("UTF-8"), ! new NameValuePair[] {new NameValuePair(SCAN_MIMETYPE_KEY, "text/xml")}); ! } ! } ! } ! /** ! * Get the documents from the sql ! * ! * @throws ScannerException DOCUMENT ME! ! */ ! public void doScan() throws ScannerException { ! getDocumentsFromSql(); ! } ! /** ! * Set-up the sql scanner code. ! * ! * @throws ScannerConfigurationException ! */ ! public void initialize() throws ScannerConfigurationException { ! resourceName = this.getInfo().getStrValue(RESOURCE_NAME); ! if (resourceName.equals("")) { ! throw new ScannerConfigurationException(I18n.get("scanner.056"), null); ! } ! sqlStatement = this.getInfo().getStrValue(SQL_STATEMENT); updateStatement = this.getInfo().getStrValue(UPDATE_STATEMENT); ! if (sqlStatement.equals("")) { ! throw new ScannerConfigurationException(I18n.get("scanner.057"), null); ! } ! documentType = this.getInfo().getStrValue(DOCUMENT_TYPE); ! if (DOC_TYPE_CSV.equalsIgnoreCase(documentType)) { ! //getChild cvs options ! fieldSeparator = this.getInfo().getStrValue(FIELD_SEPARATOR); ! rowSeparator = this.getInfo().getStrValue(ROW_SEPARATOR); ! } else if (DOC_TYPE_XML.equalsIgnoreCase(documentType)) { ! //getChild xml options ! headingTag = this.getInfo().getStrValue(XML_HEADING_TAG); ! rowTag = this.getInfo().getStrValue(XML_ROW_TAG); ! } ! } ! /** ! * release the held resource. Do nothing - no held resources. ! */ ! public void relinquishResources() { ! LogService.getInstance().logInfo("relinquishResources"); ! } ! /** ! * Get a connection using the resource name ! * ! * @return ! * ! * @throws ScannerException ! */ ! private Connection getConnection() throws ScannerException { ! try { ! if (resource == null) { ! resource = ResourceFactory.getResource(resourceName); ! } ! return ((Connection) resource.checkOut()); ! } catch (ResourceException re) { ! throw new ScannerException(I18n.get("scanner.055"), re); ! } ! } ! /** ! * This is main method which generates documents from underlying database. ! * ! * @throws ScannerException DOCUMENT ME! ! */ ! private void getDocumentsFromSql() throws ScannerException { ! Connection conn = null; ! Statement stmt = null; ! Statement updstmt = null; ! ResultSet rs = null; ! try { ! conn = getConnection(); ! stmt = conn.createStatement(); ! rs = stmt.executeQuery(sqlStatement); ! ! if (DOC_TYPE_CSV.equalsIgnoreCase(documentType)) { ! handleCsvDocument(rs); ! } else if (DOC_TYPE_XML.equalsIgnoreCase(documentType)) { ! handleXmlDocuments(rs); ! } else { ! handleSimpleDocuments(rs); ! } ! if(updateStatement != null) { updstmt = conn.createStatement(); updstmt.execute(updateStatement); --- 140,330 ---- } ! /** ! * Make one csv document from all rows ! * ! * @param rs ! * ! * @throws Exception ! */ ! public void handleCsvDocument(ResultSet rs) throws Exception { ! int columnCount = rs.getMetaData().getColumnCount(); ! StringBuffer sb = new StringBuffer(); ! if (columnCount > 0) { ! while (rs.next()) { ! for (int i = 1; i <= columnCount; i++) { ! sb.append(rs.getObject(i).toString()); ! if (i != columnCount) { ! sb.append(fieldSeparator); ! } else { ! sb.append(rowSeparator); ! } ! } ! if (multiDocument) { ! this.enqueue(sb.toString().getBytes(), ! new NameValuePair[] { new NameValuePair( ! SCAN_MIMETYPE_KEY, "text/plain") }); ! } ! } + if (!multiDocument) { + this.enqueue(sb.toString().getBytes(), + new NameValuePair[] { new NameValuePair( + SCAN_MIMETYPE_KEY, "text/plain") }); + } + } + } ! /** ! * Make one xml document from all rows ! * ! * @param rs ! * ! * @throws Exception ! */ ! public void handleXmlDocuments(ResultSet rs) throws Exception { ! int columnCount = rs.getMetaData().getColumnCount(); ! StringBuffer sb = new StringBuffer( ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); ! int rowCount = 0; ! if (columnCount > 0) { ! sb.append("<" + headingTag + ">\n"); ! while (rs.next()) { ! sb.append("\t<" + rowTag + ">\n"); ! for (int i = 1; i <= columnCount; i++) { ! sb.append("\t\t<" + rs.getMetaData().getColumnLabel(i) ! + ">"); ! String data = ""; ! if (rs.getObject(i) != null) { ! data = rs.getObject(i).toString(); ! } ! sb.append("<![CDATA[" + data + "]]>"); ! sb ! .append("</" + rs.getMetaData().getColumnLabel(i) ! + ">\n"); ! } ! sb.append("\t</" + rowTag + ">\n"); ! if (multiDocument) { ! enqueue(sb.toString().getBytes("UTF-8"), ! new NameValuePair[] { new NameValuePair( ! SCAN_MIMETYPE_KEY, "text/xml") }); ! } ! rowCount++; ! } ! sb.append("</" + headingTag + ">\n"); ! // only submit the document if we have any rows in the result set ! if (rowCount > 0 && !multiDocument) { ! enqueue(sb.toString().getBytes("UTF-8"), ! new NameValuePair[] { new NameValuePair( ! SCAN_MIMETYPE_KEY, "text/xml") }); ! } ! } ! } ! /** ! * Get the documents from the sql ! * ! * @throws ScannerException ! * DOCUMENT ME! ! */ ! public void doScan() throws ScannerException { ! getDocumentsFromSql(); ! } ! /** ! * Set-up the sql scanner code. ! * ! * @throws ScannerConfigurationException ! */ ! public void initialize() throws ScannerConfigurationException { ! resourceName = this.getInfo().getStrValue(RESOURCE_NAME); ! if (resourceName.equals("")) { ! throw new ScannerConfigurationException(I18n.get("scanner.056"), ! null); ! } ! sqlStatement = this.getInfo().getStrValue(SQL_STATEMENT); updateStatement = this.getInfo().getStrValue(UPDATE_STATEMENT); ! if (sqlStatement.equals("")) { ! throw new ScannerConfigurationException(I18n.get("scanner.057"), ! null); ! } ! documentType = this.getInfo().getStrValue(DOCUMENT_TYPE); ! multiDocument = this.getInfo().getBooleanValue(MULTIDOCUMENT); ! if (DOC_TYPE_CSV.equalsIgnoreCase(documentType)) { ! // getChild cvs options ! fieldSeparator = this.getInfo().getStrValue(FIELD_SEPARATOR); ! rowSeparator = this.getInfo().getStrValue(ROW_SEPARATOR); ! } else if (DOC_TYPE_XML.equalsIgnoreCase(documentType)) { ! // getChild xml options ! headingTag = this.getInfo().getStrValue(XML_HEADING_TAG); ! rowTag = this.getInfo().getStrValue(XML_ROW_TAG); ! } ! } ! /** ! * release the held resource. Do nothing - no held resources. ! */ ! public void relinquishResources() { ! LogService.getInstance().logInfo("relinquishResources"); ! } ! /** ! * Get a connection using the resource name ! * ! * @return ! * ! * @throws ScannerException ! */ ! private Connection getConnection() throws ScannerException { ! try { ! if (resource == null) { ! resource = ResourceFactory.getResource(resourceName); ! } ! return ((Connection) resource.checkOut()); ! } catch (ResourceException re) { ! throw new ScannerException(I18n.get("scanner.055"), re); ! } ! } ! /** ! * This is main method which generates documents from underlying database. ! * ! * @throws ScannerException ! * DOCUMENT ME! ! */ ! private void getDocumentsFromSql() throws ScannerException { ! Connection conn = null; ! Statement stmt = null; ! Statement updstmt = null; ! ResultSet rs = null; ! ! try { ! conn = getConnection(); ! stmt = conn.createStatement(); ! rs = stmt.executeQuery(sqlStatement); ! ! if (DOC_TYPE_CSV.equalsIgnoreCase(documentType)) { ! handleCsvDocument(rs); ! } else if (DOC_TYPE_XML.equalsIgnoreCase(documentType)) { ! handleXmlDocuments(rs); ! } else { ! handleSimpleDocuments(rs); ! } ! ! if (updateStatement != null) { updstmt = conn.createStatement(); updstmt.execute(updateStatement); *************** *** 307,422 **** } ! } catch (Exception e) { ! throw new ScannerException(I18n.get("scanner.059"), e); ! } finally { ! try { ! if (rs != null) { ! rs.close(); ! } ! } catch (Exception ignoreThis) { ! } ! try { ! if (stmt != null) { ! stmt.close(); ! } ! } catch (Exception ignoreThis) { ! } ! ! try { if (updstmt != null) { updstmt.close(); } ! } catch (Exception ignoreThis) { ! } ! ! try { ! if (conn != null) { ! resource.checkIn(conn); ! } ! } catch (Exception ignoreThis) { ! } ! } ! } ! /** ! * Get simple documents using resultsets ! * ! * @param rs ! * ! * @throws Exception ! */ ! private void handleSimpleDocuments(ResultSet rs) ! throws Exception { ! while (rs.next()) { ! String contnet = rs.getObject(1).toString(); ! enqueue(contnet.getBytes("UTF8"), new HashMap()); ! } ! } } - /** * Get the sql scanner info ! * * @author $author$ * @version $Revision$ */ class SqlScannerInfo extends ScannerWorkerInfo { ! /** ! * @return get the description ! */ ! public String getDescription() { ! return com.babeldoc.core.I18n.get("scanner.061"); ! } ! /** ! * @return get the name ! */ ! public String getName() { ! return "SqlScanner"; ! } ! /** ! * @return get the type specific options ! */ ! public Collection getTypeSpecificOptions() { ! ArrayList options = new ArrayList(); ! //add specific options ! options.add(new ConfigOption(SqlScanner.RESOURCE_NAME, ! IConfigOptionType.STRING, null, true, I18n.get("scanner.062"))); - options.add(new ConfigOption(SqlScanner.SQL_STATEMENT, - IConfigOptionType.STRING, null, true, I18n.get("scanner.063"))); - options.add(new ConfigOption(SqlScanner.UPDATE_STATEMENT, ! IConfigOptionType.STRING, null, false, ! I18n.get("scanner.SqlScanner.option.updateStatement"))); ! ! String[] docTypes = { SqlScanner.DOC_TYPE_SIMPLE, SqlScanner.DOC_TYPE_CSV, SqlScanner.DOC_TYPE_XML }; ! options.add(new ConfigOption(SqlScanner.DOCUMENT_TYPE, ! new ValueListConfigOptionType(docTypes), SqlScanner.DOC_TYPE_SIMPLE, ! false, I18n.get("scanner.064"))); ! options.add(new ConfigOption(SqlScanner.FIELD_SEPARATOR, ! IConfigOptionType.STRING, SqlScanner.DEFAULT_CSV_FIELD_SEP, false, ! I18n.get("scanner.065"))); ! options.add(new ConfigOption(SqlScanner.ROW_SEPARATOR, ! IConfigOptionType.STRING, SqlScanner.DEFAULT_CSV_ROW_SEP, false, ! I18n.get("scanner.066"))); ! options.add(new ConfigOption(SqlScanner.XML_HEADING_TAG, ! IConfigOptionType.STRING, SqlScanner.DEFAULT_XML_HEADING_TAG, false, ! I18n.get("scanner.067"))); ! options.add(new ConfigOption(SqlScanner.XML_ROW_TAG, ! IConfigOptionType.STRING, SqlScanner.DEFAULT_XML_ROW_TAG, false, ! I18n.get("scanner.068"))); ! return options; ! } } --- 332,447 ---- } ! } catch (Exception e) { ! throw new ScannerException(I18n.get("scanner.059"), e); ! } finally { ! try { ! if (rs != null) { ! rs.close(); ! } ! } catch (Exception ignoreThis) { ! } ! try { ! if (stmt != null) { ! stmt.close(); ! } ! } catch (Exception ignoreThis) { ! } ! ! try { if (updstmt != null) { updstmt.close(); } ! } catch (Exception ignoreThis) { ! } ! try { ! if (conn != null) { ! resource.checkIn(conn); ! } ! } catch (Exception ignoreThis) { ! } ! } ! } ! /** ! * Get simple documents using resultsets ! * ! * @param rs ! * ! * @throws Exception ! */ ! private void handleSimpleDocuments(ResultSet rs) throws Exception { ! while (rs.next()) { ! String contnet = rs.getObject(1).toString(); ! enqueue(contnet.getBytes("UTF8"), new HashMap()); ! } ! } } /** * Get the sql scanner info ! * * @author $author$ * @version $Revision$ */ class SqlScannerInfo extends ScannerWorkerInfo { ! /** ! * @return get the description ! */ ! public String getDescription() { ! return com.babeldoc.core.I18n.get("scanner.061"); ! } ! /** ! * @return get the name ! */ ! public String getName() { ! return "SqlScanner"; ! } ! /** ! * @return get the type specific options ! */ ! public Collection getTypeSpecificOptions() { ! ArrayList options = new ArrayList(); ! // add specific options ! options.add(new ConfigOption(SqlScanner.RESOURCE_NAME, ! IConfigOptionType.STRING, null, true, I18n.get("scanner.062"))); ! ! options.add(new ConfigOption(SqlScanner.SQL_STATEMENT, ! IConfigOptionType.STRING, null, true, I18n.get("scanner.063"))); options.add(new ConfigOption(SqlScanner.UPDATE_STATEMENT, ! IConfigOptionType.STRING, null, false, I18n ! .get("scanner.SqlScanner.option.updateStatement"))); ! String[] docTypes = { SqlScanner.DOC_TYPE_SIMPLE, ! SqlScanner.DOC_TYPE_CSV, SqlScanner.DOC_TYPE_XML }; ! options.add(new ConfigOption(SqlScanner.DOCUMENT_TYPE, ! new ValueListConfigOptionType(docTypes), ! SqlScanner.DOC_TYPE_SIMPLE, false, I18n.get("scanner.064"))); ! options.add(new ConfigOption(SqlScanner.FIELD_SEPARATOR, ! IConfigOptionType.STRING, SqlScanner.DEFAULT_CSV_FIELD_SEP, ! false, I18n.get("scanner.065"))); ! options.add(new ConfigOption(SqlScanner.ROW_SEPARATOR, ! IConfigOptionType.STRING, SqlScanner.DEFAULT_CSV_ROW_SEP, ! false, I18n.get("scanner.066"))); ! options.add(new ConfigOption(SqlScanner.XML_HEADING_TAG, ! IConfigOptionType.STRING, SqlScanner.DEFAULT_XML_HEADING_TAG, ! false, I18n.get("scanner.067"))); ! options.add(new ConfigOption(SqlScanner.XML_ROW_TAG, ! IConfigOptionType.STRING, SqlScanner.DEFAULT_XML_ROW_TAG, ! false, I18n.get("scanner.068"))); ! options.add(new ConfigOption(SqlScanner.MULTIDOCUMENT, ! IConfigOptionType.BOOLEAN, "false", false, ! I18n.get("scanner.SqlScanner.option.multiDocument"))); ! return options; ! } } |
From: Santi B. <san...@us...> - 2008-01-14 23:40:32
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/config/i18n In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8326/modules/scanner/config/i18n Modified Files: messages.properties Added Files: messages_ca.properties Log Message: Revision on SqlScanner for multi-document processing, each row in a separate document. Added internationalization for catalan(ca). Index: messages.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/config/i18n/messages.properties,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** messages.properties 8 Jan 2008 17:01:57 -0000 1.24 --- messages.properties 14 Jan 2008 23:40:34 -0000 1.25 *************** *** 112,116 **** --- 112,118 ---- scanner.nullScanner.desc=Null Scanner feeds null documents everytime the scanner runs. This is useful for scheduling. + #SqlScanner scanner.SqlScanner.option.updateStatement=SQL Statement that is executed after selecting rows and creating documents. It is used for marking rows as processed so they don't need to be processed later. + scanner.SqlScanner.option.multiDocument=Process each row in a separate document. Every document correspond to the selected type in the DOCUMENT_TYPE attribute. #VfsScanner --- NEW FILE: messages_ca.properties --- # com.babeldoc.scanner.Scanner scanner.Scanner.error.starting=Error starting scanner: {0} scanner.Scanner.error.noThreads=No scanner threads provided scanner.Scanner.error.alreadyStopped=Tried to stop an already stopped scanner scanner.Scanner.error.alreadyStarted=Tried to start an already started scanner scanner.Scanner.error.rmi=Error starting RMI server for scanner.REMEMBER THAT "java.net.MalformedURLException" There are spaces in the directory names. Ex Temp. {0} scanner.Scanner.toolDescription=Commandline tool to control remote scanners scanner.Scanner.info.stopping=Stopping thread: {0} scanner.Scanner.info.starting=Starting thread: {0}... scanner.Scanner.info.scanning=Thread {0} scanning scanner.Scanner.info.notScanning=Thread {0} not scanning scanner.Scanner.info.postStart=ScannerThread {0} scanning scanner.Scanner.option.rmi=Start scanner with RMI server for remote control scanner.Scanner.option.port=<port-number> Port number for the RMI server. Default is 1099 scanner.Scanner.option.terminate=Babeldoc stops when all scanners finished scanner.Scanner.option.scanner=Configuration to be used for scanner. Default is scanner/config #ScannerConfig scanner.ScannerConfig.error.threadNotStarted=Thread could not be started. The following error occured: scanner.ScannerConfig.info.sleeping=Scanner thread {0} sleeping {1} miliseconds scanner.ScannerConfig.info.wakingUp=ScannerThread waking up scanner.ScannerConfig.info.messagesFound=Scanner {0} found {1} messages scanner.ScannerConfig.info.messagesProcessing=Processing {0} of total {1} messages scanner.ScannerConfig.info.allocateTicket=Allocate ticket {0} for message {1} scanner.ScannerConfig.info.contentType=Message has {0} content type #ScannerThread scanner.ScannerThread.error.processing=Error processing document scanner.ScannerThread.error.gettingMessage=Error getting scan message scanner.ScannerThread.error.config=ScannerThread initialization error! Stopping scanning. Following exception occured:\n {0} scanner.ScannerThread.error.general=An error occured. Please report this error on Babeldoc site on SourceForge scanner.ScannerThread.error.period=ScannerThread must have either a period or a cronSchedule option set scanner.ScannerThread.info.stopping=Scanning stopped. Trying to free up resources scanner.ScannerThread.info.scanningResumed=Scanning resumed scanner.ScannerThread.info.scanningPaused=Scanning paused scanner.ScannerThread.info.showConfig=ScannerThread initialized using config {0} #ScannerWorker scanner.ScannerWorker.error.message=Error during scaning scanner.ScannerWorker.debug.addingFilter=Adding filter '{1}': '{0}' scanner.ScannerWorker.warn.noFilter=No filter called '{0}' found! scanner.ScannerWorker.debug.match=Matching '{1}': {0} #DirectoryScanner scanner.DirectoryScanner.error.notDir=Configuration {0} has a value {1} which is not an accessible directory! scanner.DirectoryScanner.error.filters=You cannot specify both includeFilter and excludeFilter! scanner.DirectoryScanner.error.finishing=Error finishing message scanner.DirectoryScanner.error.getting=Error getting message scanner.DirectoryScannerInfo.description=The directory scanner is used for scanning directories on local file system. It can be configured to scan subdirectories of given folder recursively and it can use filter for files that be scanned or for files that should not be scanned (ie exclusion and inclusion) parameters. This is very useful for integrating Babeldoc into larger systems. An example would be reading documents placed in a directory by another application running on the computer or another computer to a shared, networked filesystem. scanner.DirectoryScannerInfo.option.inDirectory=Directory to be scanned scanner.DirectoryScannerInfo.option.doneDirectory=Folder that is used for storing scanned files. Note that scanned files will be removed from inDirectory scanner.DirectoryScannerInfo.option.bufferLen=Length of the buffer when performing I/O operations scanner.DirectoryScannerInfo.option.includeSubdirs=Specifies if scanning should be recursive, and include subfolders. If yes, files will be copied to doneDirectory with path relative to inDirectory. scanner.DirectoryScannerInfo.option.excludeFilter=File extension of the files that should be not be included scanner.DirectoryScannerInfo.option.includeFilter=File extension of the files that should be included. Files that do not match, will be excluded scanner.DirectoryScannerInfo.option.filter=Regular expression filter. Only files that do match will be included. If not specified all files will be included scanner.DirectoryScannerInfo.option.minimumFileAge=Minimum age of file in ms (attempts to guard against incomplete reads) #FtpScanner scanner.FtpScanner.error.init=Error during scanner initialization scanner.FtpScanner.error.notReachable=ftpFolder not reachable! scanner.FtpScanner.error.login=Could not login to remote server scanner.FtpScanner.error.host=Error connecting to ftpHost scanner.FtpScanner.error.connection=Connection to remote server refused scanner.FtpScanner.error.scanning=Error scanning FTP folder scanner.FtpScanner.error.general=Error connecting to ftp scanner.FtpScanner.error.notAvaliable=Message not available scanner.FtpScanner.error.filetype=Error changing to file type scanner.FtpScannerInfo.description=Scans given folder on remote FTP server. This allows babeldoc to connect to remote FTP servers and then scan folders for documents to process. scanner.FtpScannerInfo.option.ftpHost=Host name or address of the ftp server scanner.FtpScannerInfo.option.ftpUsername=Username that is used for connecting to host scanner.FtpScannerInfo.option.ftpPassword=Password that is used for connecting to host scanner.FtpScannerInfo.option.ftpFolder=Folder name which is scanned scanner.FtpScannerInfo.option.ftpFileType=The type of the file to transmit - this can be either ascii or binary which really determines how the end-of-line characters are handled. scanner.FtpScannerInfo.option.includeSubfolders=Should subfolders be scanned too scanner.FtpScannerInfo.option.ftpOutFolder=Folder on FTP server where scanned documents should be copied scanner.FtpScannerInfo.option.localBackupFolder=Folder on local file system where scanned documents should be copied scanner.FtpScannerInfo.option.ftpFileType=Folder on local file system where scanned documents should be copied scanner.FtpScannerInfo.option.maxDepth=Max number of subdirectories that can read scanner.MailboxScanner.error.getFrom=Invalid value '{0}' for getFrom property! Only 'attachment' and 'body' values allowed! scanner.MailboxScanner.error.scanning=Error while scanning mailbox scanner.MailboxScanner.debug.deleting=Deleting message scanner.MailboxScanner.error.deleting=Error deleting message scanner.MailboxScanner.error.closingFolder=Error closing folder scanner.MailboxScanner.error.initialize=Error during initalization scanner.MailboxScanner.error.closingStore=Error closing mail store scanner.MailboxScanner.error.creatingMessage=Error constructing MailboxScanMessages scanner.MailboxScanner.error.gettingMessage=Error getting message from mail scanner.MailboxScannerInfo.description=The MailboxScanner is used for scanning mail servers for e-mail messages. Document can be scanned from e-mail body or from attachments. This is very useful for integration with email enabled clients. An example would be purchase orders emailed to a mailbox scanned by Babeldoc. The From, To and Subject filters are regular expression filters. Enter regular expressions which, if matched, cause the matching email to be processed. For example, if you wanted to match a recipient address of fir...@se..., you would enter "first\\.last@server\\.com" in the toFilter. The expressions are effectively OR'd together, because if any one of the filters gets a match, the e-mail message will be processed. The toFilter is tested against all addresses in the TO field. It is <emphasis>NOT</emphasis> tested against the CC or BCC fields. Accessible attributes are subject, from, to and replyTo. scanner.MailboxScannerInfo.option.host=Mail server host name or address scanner.MailboxScannerInfo.option.protocol=Protocol which is used for connecting to mail server (pop3, imap...) scanner.MailboxScannerInfo.option.timeOut=Socket I/O timeout value in milliseconds. Default is infinite timeout. scanner.MailboxScannerInfo.option.folder=Name of folder on mail server. (for example INBOX) scanner.MailboxScannerInfo.option.username=Username for logging to mail server scanner.MailboxScannerInfo.option.password=Password for logging to mail server scanner.MailboxScannerInfo.option.getFrom=Should message be created using mail body or attachment. Default is body scanner.MailboxScannerInfo.option.fromFilter=Regular expression which, if matched by the From field, causes the message to be processed scanner.MailboxScannerInfo.option.toFilter=Regular expression which, if matched by the To field, causes the message to be processed scanner.MailboxScannerInfo.option.subjectFilter=Regular expression which, if matched by the Subject field, causes the message to be processed scanner.MailboxScannerInfo.option.filterResult=Result of regular expresion (true o false) scanner.MailboxScannerInfo.option.deleteInvalid=Delete messages that are not valid (invalid address etc.) and not processed by Babeldoc scanner.ExternalApplicationScanner.description=The ExternalApplicationScanner runs an external application and pipes the standard output from that application into the pipeline. scanner.ExternalApplicationScanner.option.application=The application to run. scanner.ExternalApplicationScanner.error.application=Invalid application: {0} scanner.HttpScanner.description=The HttpScanner allows the scanner to pull down documents from web servers. Any headers recieved by the HttpScanner are placed on the document as attributes. scanner.HttpScanner.error.badurl=The URL: {0} is invalid scanner.HttpScanner.error.recoverable=A recoverable exception: {0} occurred, retrying. scanner.HttpScanner.error.failed=Failed to download from: {0} scanner.HttpScanner.doScan.error=Failed scanning documents: {0} scanner.nullScanner.desc=Null Scanner feeds null documents everytime the scanner runs. This is useful for scheduling. #SqlScanner scanner.SqlScanner.option.updateStatement=SQL Statement that is executed after selecting rows and creating documents. It is used for marking rows as processed so they don't need to be processed later. scanner.SqlScanner.option.multiDocument=Processa cada registre en un document diferent. Cada document correspondrà amb el tipus seleccionat en l'atribut DOCUMENT_TYPE. #VfsScanner scanner.VFSScanner.error.notDir=Configuration {0} has a value {1} which is not exists! scanner.DirectoryScanner.error.filters=You cannot specify both includeFilter and excludeFilter! scanner.DirectoryScanner.error.finishing=Error finishing message scanner.DirectoryScanner.error.getting=Error getting message scanner.VfsScannerInfo.description=The Virtual File System scanner is used for scanning various different file systems. It presents a uniform view of the files from various different sources, such as the files on local disk, on an HTTP server, or inside a Zip archive. It can be configured to scan subdirectories of given folder recursively and it can use filter for files that be scanned or for files that should not be scanned (ie exclusion and inclusion) parameters. This is very useful for integrating Babeldoc into larger systems. An example would be reading documents placed in a directory by another application running on the computer or another computer to a shared, networked filesystem. scanner.VFSScannerInfo.option.inDirectory =Directory to be scanned scanner.VFSScannerInfo.option.doneDirectory=Folder that is used for storing scanned files. Note that scanned files will be removed from inDirectory scanner.VFSScannerInfo.option.includeSubdirs=Specifies if scanning should be recursive, and include subfolders. If yes, files will be copied to doneDirectory with path relative to inDirectory. scanner.VFSScannerInfo.option.filter=Regular expression filter. Only files that do match will be included. If not specified all files will be included scanner.VFSScannerInfo.option.minimumFileAge=Minimum age of file in ms (attempts to guard against incomplete reads) scanner.VFSScannerInfo.option.minimumFileDate=Start date (Format YYYY/MM/DD o YYYY/MM/DD HH:MM) to process files. This option can scanning a directory and it can ignored old files. Default value is scanner creation time. scanner.VFSScannerInfo.option.delete=Delete all process documents from indirectory after procesed scanner.VFSScannerInfo.option.domain=Domain of username that is used for connecting to directory {0} scanner.VFSScannerInfo.option.username=Username that is used for connecting to directory {0} scanner.VFSScannerInfo.option.password=Password that is used for connecting to directory {0} scanner.001=Started scanner.002=Stopped scanner.003=No scannerThread with given name! scanner.004=<rmi-url> Rmi configuration scanner.005=list all the threads scanner.006=start all the threads scanner.007=halt all the threads scanner.008=is the scanner scanning scanner.009=get this configuration details scanner.010=<scanner> get the scanner threads options scanner.011=<scanner> start this thread scanner.012=<scanner> stop this thread scanner.013=<scanner>reinitialize this thread scanner.014=Commandline tool to control remote scanners scanner.018=Message not available scanner.020=Directory to be scanned scanner.021=Folder that is used for storing scanned files. Note that scanned files will be removed from inDirectory scanner.022=Length of the buffer when performing I/O operations scanner.023=Specifies if scanning should be recursive, and include subfolders. If yes, files will be copied to doneDirectory with path relative to inDirectory. scanner.024=File extension of the files that should be included. Files that do not match, will be excluded scanner.025=File extension of the files that should be not be included scanner.026=Error during scanner initialization scanner.028=Could not login to remote server scanner.029=Connection to remote server refused scanner.030=Error connecting to ftpHost scanner.031=Error scanning FTP folder scanner.032=Error connecting to ftp scanner.033=Scans given folder on remote FTP server scanner.034=Host name or address of the ftp server scanner.035=Username that is used for connecting to host scanner.036=Password that is used for connecting to host scanner.037=Folder name which is scanned scanner.038=Should subfolders be scanned too scanner.039=Folder on FTP server where scanned documents should be copied scanner.040=Folder on local file system where scanned documents should be copied #scanner.041=Invalid value for getFrom property! Only 'attachment' and 'body' values allowed! #scanner.042=Error while scanning scanner.043=Closing folder #scanner.044=Error constructing MailboxScanMessages #scanner.045= #scanner.046=Error deleting message #scanner.047=Error closing folder #scanner.048=The MailboxScanner is used for scanning mail servers for e-mail messages. Document can be scanned from e-mail body or from attachments. This is very useful for integration with email enabled clients. An example would be purchase orders email to a mailbox scanned by Babeldoc. #scanner.049=Mail server host name or address #scanner.050=Protocol which is used for connecting to mail server (pop3, imap...) #scanner.051=Name of folder on mail server. (for example INBOX) #scanner.052=Username for logging to mail server #scanner.053=Password for logging to mail server scanner.054=File extension of the files that should be not be included scanner.055=Connection not available scanner.056=resourceName is mandatory parameter scanner.057=sqlStatement is mandatory parameter scanner.058=Error in SqlScanner scanner.059=Error scanning database scanner.060=No more messages! scanner.061=Sql scanner is used for generating documents by executing sql queries. It can produce XML documents, csv documents or simple documents. In case of XML and CSV only one document can be returned and it will contain all returned rows. In case of simle document each document is formed from the first column of each returned row. scanner.062=Name of the connection resource scanner.063=SQL statement that is executed to get documents scanner.064=Type of document that is returned. Choices are simple, xml or csv scanner.065=Character that is used for separating fields in CSV file. Default is comma scanner.066=Character that is used for separating rows in CSV files. Default is \\n scanner.067=Tag that is used in XML document for heading. Default is document scanner.068=Tag that is used in XML document for each row. Default is row. scanner.069=No scanner threads provided scanner.070=Stopping threads: scanner.071=Tried to stop an already stopped scanner scanner.072=Starting threads: scanner.073=Tried to start an already started scanner scanner.074=ScannerThread did not start #scanner.075=ScannerThread waking up scanner.084=sleeping #scanner.085=Scanner {0} found {1} messages #scanner.088=Processing {0} of total {1} messages #scanner.089=of total #scanner.090=Allocate ticket {0} for message {1} |
From: Santi B. <san...@us...> - 2008-01-14 22:01:57
|
Update of /cvsroot/babeldoc/babeldoc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1603 Modified Files: .cvsignore Log Message: File system reorganization and eclipse project basic settings. Index: .cvsignore =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/.cvsignore,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** .cvsignore 9 Jan 2008 09:55:44 -0000 1.7 --- .cvsignore 14 Jan 2008 22:01:59 -0000 1.8 *************** *** 2,4 **** babeldoc-bin-1.3.1.zip babeldoc-src-1.3.1.zip - .cdtproject --- 2,3 ---- |
From: paspes <pa...@us...> - 2008-01-14 15:47:36
|
Update of /cvsroot/babeldoc/babeldoc/modules/jabber/src/com/babeldoc/jabber/pipeline/stage In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11292/modules/jabber/src/com/babeldoc/jabber/pipeline/stage Modified Files: MessageDeliveryStatus.java XmppWriterPipelineStage.java Log Message: Bugs chat Index: XmppWriterPipelineStage.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/jabber/src/com/babeldoc/jabber/pipeline/stage/XmppWriterPipelineStage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XmppWriterPipelineStage.java 8 Jan 2008 23:12:16 -0000 1.1 --- XmppWriterPipelineStage.java 14 Jan 2008 15:37:11 -0000 1.2 *************** *** 202,205 **** --- 202,206 ---- } + conn.connect(); MessageEventManager messageEventManager = new MessageEventManager( Index: MessageDeliveryStatus.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/jabber/src/com/babeldoc/jabber/pipeline/stage/MessageDeliveryStatus.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MessageDeliveryStatus.java 8 Jan 2008 23:12:16 -0000 1.1 --- MessageDeliveryStatus.java 14 Jan 2008 15:37:11 -0000 1.2 *************** *** 19,23 **** private MessageDeliveryStatus() { ! } --- 19,23 ---- private MessageDeliveryStatus() { ! map = new HashMap(); } |
From: Santi B. <san...@us...> - 2008-01-12 00:46:43
|
Update of /cvsroot/babeldoc/babeldoc/readme/userguide In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23392/readme/userguide Modified Files: chapter1.xml chapter2.xml chapter7.xml chapter5.xml chapter3.xml Log Message: Syndication module added. Documentation start updating process. Index: chapter5.xml =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/userguide/chapter5.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** chapter5.xml 30 Mar 2004 19:15:42 -0000 1.3 --- chapter5.xml 12 Jan 2008 00:46:45 -0000 1.4 *************** *** 4,29 **** <section> <title>Introduction</title> ! <para>The scanner is a tool that scans for messages from a variety of sources and when a message is found, it is fed into the pipeline. The scanner is an automation tool, in that a system can be built up using scanners and pipelines. This is an alternative to the <userinput>process</userinput> script which feeds a single document into the pipeline when run. The scanner is currently capable of scanning a directory in a filesystem, a mailbox on a mail-server, an FTP servcer, a web server, a database via a SQL query, external application output and a JMS queue. The period of scan and the pipeline to feed, as well as other specific configuration options are all set in the <userinput>config/scanner/config.properties</userinput>userinput> file. There may be one or many scanning threads active, each configured differently. For example, one scanner thread could be polling a mailbox once every 60 secs while another is scanning a directory every 10 seconds. The scanner is also capable of scanning based on a schedule specified in the same way that CRON is on UNIX systems.</para> ! <para>General attributes available are <userinput>file_name</userinput>, <userinput>scan_path</userinput> and <userinput>scan_date</userinput>.</para> ! </section> ! <section> ! <title>Starting scanner</title> ! <para>The scanner tool is started by running the command <userinput>babeldoc scanner</userinput>. This command will use configuration from <userinput>config/scanner/config.properties</userinput>. If you want to use configuration from a different file you can use <userinput>-s another_configuration</userinput> switch to specify the configuration that should be used instead of default one. ! </para> ! </section> ! <section> ! <title>Configuration</title> ! <para>There are two kinds of configuration options available:</para> ! <orderedlist> ! <listitem> ! <userinput>general</userinput>: these options are global and apply to all types of scanners.</listitem> ! <listitem> ! <userinput>specific</userinput>: Options for a certain kind of scanner. For example the configuration: 'host' is only pertinent to the email scanner.</listitem> ! </orderedlist> ! <para>The options for each scanner type are laid out below.</para> ! </section> ! &scanners; ! ! </chapter> --- 4,78 ---- <section> <title>Introduction</title> ! <para> ! The scanner is a tool that scans for messages from a variety ! of sources and when a message is found, it is fed into the ! pipeline. The scanner is an automation tool, in that a ! system can be built up using scanners and pipelines. This is ! an alternative to the ! <userinput>process</userinput> ! script which feeds a single document into the pipeline when ! run. The scanner is currently capable of scanning a ! directory in a filesystem, a mailbox on a mail-server, an ! FTP servcer, a web server, a database via a SQL query, ! external application output, a JMS queue and an Apache VFS. The period of ! scan and the pipeline to feed, as well as other specific ! configuration options are all set in the ! <userinput>config/scanner/config.properties</userinput> ! userinput> file. There may be one or many scanning threads ! active, each configured differently. For example, one ! scanner thread could be polling a mailbox once every 60 secs ! while another is scanning a directory every 10 seconds. The ! scanner is also capable of scanning based on a schedule ! specified in the same way that CRON is on UNIX systems. ! </para> ! <para> ! General attributes available are ! <userinput>file_name</userinput> ! , ! <userinput>scan_path</userinput> ! and ! <userinput>scan_date</userinput> ! . ! </para> ! </section> ! <section> ! <title>Starting scanner</title> ! <para> ! The scanner tool is started by running the command ! <userinput>babeldoc scanner</userinput> ! . This command will use configuration from ! <userinput>config/scanner/config.properties</userinput> ! . If you want to use configuration from a different file you ! can use ! <userinput>-s another_configuration</userinput> ! switch to specify the configuration that should be used ! instead of default one. ! </para> ! </section> ! <section> ! <title>Configuration</title> ! <para> ! There are two kinds of configuration options available: ! </para> ! <orderedlist> ! <listitem> ! <userinput>general</userinput> ! : these options are global and apply to all types of ! scanners. ! </listitem> ! <listitem> ! <userinput>specific</userinput> ! : Options for a certain kind of scanner. For example the ! configuration: 'host' is only pertinent to the email ! scanner. ! </listitem> ! </orderedlist> ! <para> ! The options for each scanner type are laid out below. ! </para> ! </section> ! &scanners; ! ! </chapter> Index: chapter2.xml =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/userguide/chapter2.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** chapter2.xml 14 Apr 2004 20:13:41 -0000 1.7 --- chapter2.xml 12 Jan 2008 00:46:45 -0000 1.8 *************** *** 5,18 **** <section> <title>Introduction</title> ! <para>A pipeline is a program whose purpose is to transform a document into one or more resultant documents. An example pipeline could transform a received XML purchase order into a set of SQL statements intended to update a database, produce a printable PDF file for record keeping and a confirmation email sent to the originating party.</para> ! <para>All of the pipelines in <productname>Babeldoc</productname> must have a unique name like <userinput>test</userinput> or <userinput>document</userinput>. A pipeline is a set of processing steps arranged in a linear fashion. Each processing step is called a "pipeline stage" and each pipeline stage in a pipeline must have a unique name. Two pipelines may have a pipeline stage of the same name. There is a special pipeline stage in a pipeline, the <firstname>entryStage</firstname> which indicates which pipeline stage should initially receive the document from the feeder mechanisms. It is also possible to introduce a document into the "middle" of a pipeline. In order to designate a particular stage in a pipeline, the name is given as: <userinput>pipeline-name.pipeline stage-name</userinput>.</para> ! <para>The pipelines in the <userinput>babeldoc</userinput> system are managed by the <firstterm>Pipeline factory</firstterm> which determines how and when a pipeline runs. Each pipeline stage in a pipeline has a <firstterm>type</firstterm> and a set of configuration options. An example of the a pipeline stage is the <userinput>test.transform</userinput> pipeline stage whose type is <userinput>XslTranform</userinput>. This type of pipeline stage requires either the configuration option <userinput>tranformationFile</userinput> which supplies the filename (or URL) of the XSLt file to perform the transformation or <userinput>transformationScript</userinput> which is the inline XSL.t document. There is an additional non-mandatory configuration option, <userinput>bufferSize</userinput> which can help with larger transformations.</para> </section> <section> <title>Pipeline Documents</title> ! <para>The pipeline stages operate on documents. A useful metaphor is the pipes that constitute the plumbing in your home. Each of the stages in the plumbing pipeline represents bends, faucets and other functional requirements. A pipeline document is the water in the pluming pipeline. A document is successively transformed by the pipeline until it is finally stored, discarded or otherwise disposed of. The transformations are determined by the pipeline and its stages. A document is primarily a number of bytes (characters) of data. The data is characterized by a MIME type. There are a number of ways a document can get fed into a pipeline, namely:</para> [...1747 lines suppressed...] ! -C pipeline-name.stage-name or --config ! pipeline-name.stage-name ! </userinput> ! : List the configuration for a pipeline stage. ! </listitem> <listitem> ! <userinput> ! -L pipeline-name.stage-name -y or -L ! pipeline-name.stage-name --type ! </userinput> ! : List the type of the pipeline stage. ! </listitem> ! <!-- Can't get this to work <listitem><userinput>LIST CONNECTIVITY</userinput>: List the web or connectivity in a pipeline.</listitem> --> </orderedlist> ! <para> ! There are a number of options in this tool. Use the -h ! option to get the complete list. ! </para> </section> </chapter> Index: chapter3.xml =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/userguide/chapter3.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** chapter3.xml 14 Apr 2004 20:13:41 -0000 1.5 --- chapter3.xml 12 Jan 2008 00:46:45 -0000 1.6 *************** *** 4,58 **** <section> <title>Introduction</title> ! <para>Resources in Babeldoc are a generalized way of accessing data sources. Resources are also considered to be scarce in that they have to be protected from leakage. This is particularly important for database and J2EE resources . They are named using a string name and are thus uniquely identified in the system. The resources are defined in the <userinput>config/resource/config.xml </userinput> file. Each resource name maps to a specific class name which governs the policy of the resource and is programmatically specified. The available resources are:</para> <orderedlist> <listitem> ! <userinput>jdbc</userinput> Unpooled Jdbc access to a database connection</listitem> <listitem> ! <userinput>jndi</userinput> Jndi lookup to a database connection</listitem> <listitem> ! <userinput>pooled</userinput> Pooled jdbc access to a database connection</listitem> </orderedlist> ! <para>Each of the named resources are defined in the <userinput>config/resources</userinput> as <userinput>resource-name</userinput>.properties. Each of the properties files has a required name/value pair called <userinput>type</userinput>. This can be one of the types as listed above. The rest of the configuration options are specific to the type of resource. These configuration options are given below:</para> </section> ! <section> <title>jdbc</title> ! <para>Each simple jdbc resource defines a connection to a database using the following configuration options:</para> <orderedlist> <listitem> ! <userinput>dbUser</userinput> name of user to log into the database. ! </listitem> <listitem> ! <userinput>dbPassword</userinput> password of the user. ! </listitem> <listitem> ! <userinput>dbDriver</userinput> the jdbc driver for the database. ! </listitem> <listitem> ! <userinput>dbUrl</userinput> the URL for jdbc to resolve the specific database. ! </listitem> </orderedlist> ! <para>For this to work correctly the jdbc jar file for the specific database you need to access needs to be in the classpath. Currently only the mysql jar is built into <productname>Babeldoc</productname>. Access to other kinds of databases like Oracle, DB2 and Sybase will require that the JDBC driver libraries be placed in the CLASSPATH. The name of the dbDriver parameter and the form of the dbUrl will be highly dependent on the particulars of the vendor database. There are a number of limitations to the simple jdbc resource, the primary limitation being that the resource does not pool connections. Each time a connection is requested, a new connection is created and this can be VERY time consuming.</para> </section> ! <section> <title>jndi</title> ! <para>This resource is useful when running in a J2EE container. This allows for accessing datasources using JNDI. There is a single configuration option:</para> <orderedlist> <listitem> ! <userinput>datasourceName</userinput> the jndi name of the datasource to lookup.</listitem> </orderedlist> </section> ! <section> <title>pooled</title> ! <para>Babeldoc provides a pooled connection using the (<ulink url="http://jakarta.apache.org/commons/dbcp/">Apache Commons DBCP</ulink>) library . The configuration for the resource is provided by the following configuration options</para> <orderedlist> <listitem> ! <userinput>dbUser</userinput> The user name with access the database</listitem> <listitem> ! <userinput>dbPassword</userinput> The user's password</listitem> <listitem> ! <userinput>dbUrl</userinput> Url for access to database</listitem> </orderedlist> </section> --- 4,126 ---- <section> <title>Introduction</title> ! <para> ! Resources in Babeldoc are a generalized way of accessing ! data sources. Resources are also considered to be scarce in ! that they have to be protected from leakage. This is ! particularly important for database and J2EE resources . ! They are named using a string name and are thus uniquely ! identified in the system. The resources are defined in the ! <userinput>config/resource/config.xml</userinput> ! file. Each resource name maps to a specific class name which ! governs the policy of the resource and is programmatically ! specified. The available resources are: ! </para> <orderedlist> <listitem> ! <userinput>jdbc</userinput> ! Unpooled Jdbc access to a database connection ! </listitem> <listitem> ! <userinput>jndi</userinput> ! Jndi lookup to a database connection ! </listitem> <listitem> ! <userinput>pooled</userinput> ! Pooled jdbc access to a database connection ! </listitem> </orderedlist> ! <para> ! Each of the named resources are defined in the ! <userinput>config/resources</userinput> ! as ! <userinput>resource-name</userinput> ! .properties. Each of the properties files has a required ! name/value pair called ! <userinput>type</userinput> ! . This can be one of the types as listed above. The rest of ! the configuration options are specific to the type of ! resource. These configuration options are given below: ! </para> </section> ! <section> <title>jdbc</title> ! <para> ! Each simple jdbc resource defines a connection to a database ! using the following configuration options: ! </para> <orderedlist> <listitem> ! <userinput>dbUser</userinput> ! name of user to log into the database. ! </listitem> <listitem> ! <userinput>dbPassword</userinput> ! password of the user. ! </listitem> <listitem> ! <userinput>dbDriver</userinput> ! the jdbc driver for the database. ! </listitem> <listitem> ! <userinput>dbUrl</userinput> ! the URL for jdbc to resolve the specific database. ! </listitem> </orderedlist> ! <para> ! For this to work correctly the jdbc jar file for the ! specific database you need to access needs to be in the ! classpath. Currently only the mysql jar is built into ! <productname>Babeldoc</productname> ! . Access to other kinds of databases like Oracle, DB2 and ! Sybase will require that the JDBC driver libraries be placed ! in the CLASSPATH. The name of the dbDriver parameter and the ! form of the dbUrl will be highly dependent on the ! particulars of the vendor database. There are a number of ! limitations to the simple jdbc resource, the primary ! limitation being that the resource does not pool ! connections. Each time a connection is requested, a new ! connection is created and this can be VERY time consuming. ! </para> </section> ! <section> <title>jndi</title> ! <para> ! This resource is useful when running in a J2EE container. ! This allows for accessing datasources using JNDI. There is a ! single configuration option: ! </para> <orderedlist> <listitem> ! <userinput>datasourceName</userinput> ! the jndi name of the datasource to lookup. ! </listitem> </orderedlist> </section> ! <section> <title>pooled</title> ! <para> ! Babeldoc provides a pooled connection using the ( ! <ulink url="http://jakarta.apache.org/commons/dbcp/"> ! Apache Commons DBCP ! </ulink> ! ) library . The configuration for the resource is provided ! by the following configuration options ! </para> <orderedlist> <listitem> ! <userinput>dbUser</userinput> ! The user name with access the database ! </listitem> <listitem> ! <userinput>dbPassword</userinput> ! The user's password ! </listitem> <listitem> ! <userinput>dbUrl</userinput> ! Url for access to database ! </listitem> </orderedlist> </section> Index: chapter1.xml =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/userguide/chapter1.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** chapter1.xml 6 Aug 2004 18:45:57 -0000 1.7 --- chapter1.xml 12 Jan 2008 00:46:45 -0000 1.8 *************** *** 5,47 **** <title>Babeldoc</title> <para> ! <productname>Babeldoc</productname> is a document processing system. Babeldoc is especially suited for Business-to-Business (B2B) environments and similar integration projects. <productname>Babeldoc</productname> has a flexible and reconfigurable processing pipeline through which documents flow. These pipelines transform the document. Additionally <productname>Babeldoc</productname> has a sophisticated and extensible journaling system so that documents may be reprocessed and resubmitted as well as tracked through the system. Its runtime environment is flexible so that it can run standalone, in a web container or in a J2EE container (currently tested on Jboss 2.4.x and JBoss 3.0.x). <productname>Babeldoc</productname> has both a Web console, a number of GUI tools and a command-line console to control the document flow.</para> <note> ! <para>The flow based metaphor is an appropriate metaphor that will expanded on in this document. </para> </note> ! <para>Babeldoc can be used to process documents which are flowing in and out of a system. There are three basic ways to develop applications to handle these document flows:</para> <orderedlist> ! <listitem>Hand-coded standalone applications have the benefit of simplicity. These applications can be slow (java start-up times are significant) and also inflexible, hard to maintain, difficult to track errors and can result in fragile systems. Also such systems could be non-portable in that they make assumptions about their environments.</listitem> ! <listitem>Hand-coded RMI (or similar protocol based) server applications are better than (1) in terms of performance but can be hard to administer and control (you have to do this yourself).</listitem> [...1137 lines suppressed...] <simplelist> <member>@echo off</member> *************** *** 298,302 **** <member>set PATH=%PATH%;%BABELDOC_HOME%\bin</member> </simplelist> ! <para>Prior to using <productname>Babeldoc</productname> run this script. Now create the configuration files in this directory.</para> </section> --- 865,874 ---- <member>set PATH=%PATH%;%BABELDOC_HOME%\bin</member> </simplelist> ! <para> ! Prior to using ! <productname>Babeldoc</productname> ! run this script. Now create the configuration files in this ! directory. ! </para> </section> Index: chapter7.xml =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/userguide/chapter7.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** chapter7.xml 6 Aug 2004 18:45:57 -0000 1.2 --- chapter7.xml 12 Jan 2008 00:46:45 -0000 1.3 *************** *** 1,91 **** <?xml version="1.0" encoding="ISO-8859-1"?> <chapter> ! <title>HOW TOs</title> ! <section> ! <title>Introduction</title> ! <para>This chapter is intended to collect together some of the collected knowledge of those using ! <productname>Babeldoc</productname>. The intention is to save you time if you are trying to perform some ! of these tasks or similar. Please contribute your nuggets of information - these can help others. ! </para> ! </section> ! <section> ! <title>HOWTO Set up Eclipse with Babeldoc</title> ! <para>Pre-requisites: Eclipse 3.0 build M4 or later. Anything earlier will not ! work.</para> ! <orderedlist> ! <listitem>Open eclipse</listitem> ! <listitem>Make sure that you can see the CVS Repositories View. If you can't, click Window | Show View | Other ... and select CVS Repositories.</listitem> ! <listitem>The Repositories View will (probably) come up empty. Right click on the white space, and click New | Repository Location ... Enter all the repository details (extssh for anybody with a developer account, otherwise pserver), and click OK.</listitem> ! <listitem>A new entry for the repository will appear. It's the root node in a tree. Open the tree. Below you should see entries HEAD, Branches and Versions. If you want to develop on the HEAD, as most core developers would probably want, open the HEAD node.</listitem> ! <listitem>Right-click on the babeldoc node that appears under the HEAD, and select Check Out As... A dialog will appear. You can use "Check out as a project configured using the New Project Wizard". or try the "Check out as a project in the workspace".</listitem> ! <listitem>Complete the New Project Wizard details. </listitem> ! <listitem>Once the New Project Wizard has finished processing, you should have a project open in the Java perspective. If not, click on the Add Perspective button, and add a Java Perspective.</listitem> ! <listitem>Right-click on the project node, and select Properties. Select the Java Build Path option, and select the Source tab.</listitem> ! <listitem>You should see your project appear with a single (empty) exclusion filter. Edit the filter, and set it to **, i.e.: exclude all files (trust me, I'm a programmer), and click OK.</listitem> ! <listitem>Select Add Folder... and add each of the src/ folders. You can multiselect on the folder selection dialog. For example, you should open the root node, and then open modules/, and then open babelfish/, and then select the src/ directory. Then open the conversion/ directory, and select src/ (with the Ctrl button down, this time), and so on. In the j2ee/ folder, don't forget to add both src/ and gensrc/. All src/ directories inside modules/ should be added.</listitem> ! <listitem>Now in the Properties dialog, still in the Java Build Path option, select the Libraries tab. Click Add JARs... and select all the jar files in build/lib, except for any library beginning with "babeldoc_". Also add support/ant/lib/ant.jar and support/ant/lib/junit.jar.</listitem> ! <listitem>Now click OK in the Properties dialog. Eclipse will probably spend a few seconds rebuilding its project information.</listitem> ! </orderedlist> ! <para> You should now have a happy eclipse system showing all the source modules, and the libraries. Eclipse should not show any errors detected by the background compiler. However, there will be a stack of warnings. They can, for the moment, be ignored.</para> ! <para> Now to get ant working.</para> ! <orderedlist> ! <listitem>In the Java perspective, right-click on build.xml, and select Run Ant...</listitem> ! <listitem>The Ant dialog will now appear. Click on the Main tab, and ensure that the Base Directory is set to the project root. It will probably look something like this: ${workspace_loc:/Babeldoc}</listitem> ! <listitem> Click on the Classpath tab. Uncheck the "Use global classpath as specified in the Ant runtime preferences". Click Add JARs... and add support/ant/lib/babeldoc_bootstrap.jar, support/ant/lib/xercesImpl.jar, and support/jalopy/lib/jalopy-ant-0.6.1.jar, or whatever the current version is.</listitem> ! <listitem>Click on the JRE tab. Click Alternate JRE, and select one of your JREs. You should probably set it to something fairly recent. Now, this is critical. You have to set the Working directory. Uncheck the "Use default working directory", and select "Workspace". Click Browse... and select the root node of the project. Click OK. If you don't have a "Working directory" section on the JRE tab, running ant is not going to work. If you do not have the working directory section, you need to upgrade your eclipse to at least version 3.0 build M4. </listitem> ! <listitem>Click Apply.</listitem> ! <listitem>Click on the Targets tab. Select the "build" target, and click Run.</listitem> ! </orderedlist> ! <para> You should now get a Console View appear, and the ant output will be spooled into the Console View.</para> ! </section> ! <section> ! <title>HOWTO Read an attribute from external XML file</title> ! <para>As there is no equivalent to SQLEnrich for XML it is not obvious how to get an attribute from an external file and then revert to the original document. One way to do this is to store the current document as an attribute, process the second file and then revert the document to value of the attribute</para> ! <para> ! <simplelist> ! <member>doc2attrib.stageType=Scripting</member> ! <member>doc2attrib.nextStage={Stages that load other document etc.}</member> ! <member>doc2attrib.script=document.put("originalContent", document.getBytes());</member> ! <member> </member> ! <member>attrib2doc.stageType=Scripting</member> ! <member>attrib2doc.nextSyage={Continue with processing}</member> ! <member>attrib2doc.script=document.setBytes(document.get("originalContent"));</member> ! </simplelist> ! </para> ! </section> ! <section> ! <title>HOWTO Access the attributes of a pipeline document inside an XSLT</title> ! <para>Essentially you can use document.get("myprop")</para> ! <simplelist> ! <member><xsl:param name="doc" select="$document"/></member> ! <member><xsl:param name="myprop" select="java:get($doc, 'myprop')"/> </member> ! </simplelist> ! <para>For the syntax, see: http://xml.apache.org/xalan-j/extensions.html See the ! java section. </para> ! <para>Additionally you can get the pipeline stage object from the XSL and then you can manipulate the java code directly.</para> ! <para> The snippet below is an example of how to get the current time and format it nicely:</para> ! <simplelist> ! <member> <xsl:variable name="date" select="java:java.util.Date.new()"/></member> ! <member> <xsl:variable name="seconds" select="java:getTime($date)"/></member> ! <member> <xsl:variable name="velocity"</member> ! <member>select="java:com.babeldoc.core.VelocityUtilityContext.new()"/></member> ! <member> <xsl:variable name="datestr" select="java:getFormattedDate($velocity, 'd MMM yyyy</member> ! <member>HH:mm:ss', $seconds)"/></member> ! </simplelist> ! </section> ! <section> ! <title>HOWTO Package up your application into a single jar file for easy distribution</title> ! <para>The idea of this HOWTO is to avoid distributing all the directories that make up your configuration by packaging them all up into a single jar file and using this to run your pipelines.</para> ! <para>Lets assume that your <userinput>BABELDOC_USER</userinput> points to the <userinput>c:\project</userinput> directory. This directory has all the required configuration directories like <userinput>pipeline</userinput>, <userinput>resource</userinput>, etc.</para> ! <itemizedlist> ! <listitem>Jar up your configuration files: <userinput>jar cf myproject.jar pipeline resource journal</userinput> producing a <userinput>myproject.jar</userinput> file.</listitem> ! <listitem>Change your <userinput>BABELDOC_USER</userinput> to: <userinput>set BABELDOC_USER=c:\project\myproject.jar</userinput></listitem> ! <listitem>Verify that your pipelines still work, but change directory away from <userinput>c:\project</userinput> directory to make sure that the configuration files there don't interfere with new BABELDOC_USER variable!</listitem> ! </itemizedlist> ! </section> </chapter> --- 1,279 ---- <?xml version="1.0" encoding="ISO-8859-1"?> <chapter> ! <title>HOW TOs</title> ! <section> ! <title>Introduction</title> ! <para> ! This chapter is intended to collect together some of the ! collected knowledge of those using ! <productname>Babeldoc</productname> ! . The intention is to save you time if you are trying to ! perform some of these tasks or similar. Please contribute ! your nuggets of information - these can help others. ! </para> ! </section> ! <section> ! <title>HOWTO Set up Eclipse with Babeldoc</title> ! <para> ! Pre-requisites: Eclipse 3.0 build M4 or later. Anything ! earlier will not work. ! </para> ! <orderedlist> ! <listitem>Open eclipse</listitem> ! <listitem> ! Make sure that you can see the CVS Repositories View. If ! you can't, click Window | Show View | Other ... and ! select CVS Repositories. ! </listitem> ! <listitem> ! The Repositories View will (probably) come up empty. ! Right click on the white space, and click New | ! Repository Location ... Enter all the repository details ! (extssh for anybody with a developer account, otherwise ! pserver), and click OK. ! </listitem> ! <listitem> ! A new entry for the repository will appear. It's the ! root node in a tree. Open the tree. Below you should see ! entries HEAD, Branches and Versions. If you want to ! develop on the HEAD, as most core developers would ! probably want, open the HEAD node. ! </listitem> ! <listitem> ! Right-click on the babeldoc node that appears under the ! HEAD, and select Check Out As... A dialog will appear. ! You can use "Check out as a project configured using the ! New Project Wizard". or try the "Check out as a project ! in the workspace". ! </listitem> ! <listitem> ! Complete the New Project Wizard details. ! </listitem> ! <listitem> ! Once the New Project Wizard has finished processing, you ! should have a project open in the Java perspective. If ! not, click on the Add Perspective button, and add a Java ! Perspective. ! </listitem> ! <listitem> ! Right-click on the project node, and select Properties. ! Select the Java Build Path option, and select the Source ! tab. ! </listitem> ! <listitem> ! You should see your project appear with a single (empty) ! exclusion filter. Edit the filter, and set it to **, ! i.e.: exclude all files (trust me, I'm a programmer), ! and click OK. ! </listitem> ! <listitem> ! Select Add Folder... and add each of the src/ folders. ! You can multiselect on the folder selection dialog. For ! example, you should open the root node, and then open ! modules/, and then open babelfish/, and then select the ! src/ directory. Then open the conversion/ directory, and ! select src/ (with the Ctrl button down, this time), and ! so on. In the j2ee/ folder, don't forget to add both ! src/ and gensrc/. All src/ directories inside modules/ ! should be added. ! </listitem> ! <listitem> ! Now in the Properties dialog, still in the Java Build ! Path option, select the Libraries tab. Click Add JARs... ! and select all the jar files in build/lib, except for ! any library beginning with "babeldoc_". Also add ! support/ant/lib/ant.jar and support/ant/lib/junit.jar. ! </listitem> ! <listitem> ! Now click OK in the Properties dialog. Eclipse will ! probably spend a few seconds rebuilding its project ! information. ! </listitem> ! </orderedlist> ! <para> ! You should now have a happy eclipse system showing all the ! source modules, and the libraries. Eclipse should not show ! any errors detected by the background compiler. However, ! there will be a stack of warnings. They can, for the moment, ! be ignored. ! </para> ! <para>Now to get ant working.</para> ! <orderedlist> ! <listitem> ! In the Java perspective, right-click on build.xml, and ! select Run Ant... ! </listitem> ! <listitem> ! The Ant dialog will now appear. Click on the Main tab, ! and ensure that the Base Directory is set to the project ! root. It will probably look something like this: ! ${workspace_loc:/Babeldoc} ! </listitem> ! <listitem> ! Click on the Classpath tab. Uncheck the "Use global ! classpath as specified in the Ant runtime preferences". ! Click Add JARs... and add ! support/ant/lib/babeldoc_bootstrap.jar, ! support/ant/lib/xercesImpl.jar, and ! support/jalopy/lib/jalopy-ant-0.6.1.jar, or whatever the ! current version is. ! </listitem> ! <listitem> ! Click on the JRE tab. Click Alternate JRE, and select ! one of your JREs. You should probably set it to ! something fairly recent. Now, this is critical. You have ! to set the Working directory. Uncheck the "Use default ! working directory", and select "Workspace". Click ! Browse... and select the root node of the project. Click ! OK. If you don't have a "Working directory" section on ! the JRE tab, running ant is not going to work. If you do ! not have the working directory section, you need to ! upgrade your eclipse to at least version 3.0 build M4. ! </listitem> ! <listitem>Click Apply.</listitem> ! <listitem> ! Click on the Targets tab. Select the "build" target, and ! click Run. ! </listitem> ! </orderedlist> ! <para> ! You should now get a Console View appear, and the ant output ! will be spooled into the Console View. ! </para> ! </section> ! <section> ! <title>HOWTO Read an attribute from external XML file</title> ! <para> ! As there is no equivalent to SQLEnrich for XML it is not ! obvious how to get an attribute from an external file and ! then revert to the original document. One way to do this is ! to store the current document as an attribute, process the ! second file and then revert the document to value of the ! attribute ! </para> ! <para> ! <simplelist> ! <member>doc2attrib.stageType=Scripting</member> ! <member> ! doc2attrib.nextStage={Stages that load other ! document etc.} ! </member> ! <member> ! doc2attrib.script=document.put("originalContent", ! document.getBytes()); ! </member> ! <member></member> ! <member>attrib2doc.stageType=Scripting</member> ! <member> ! attrib2doc.nextSyage={Continue with processing} ! </member> ! <member> ! attrib2doc.script=document.setBytes(document.get("originalContent")); ! </member> ! </simplelist> ! </para> ! </section> ! <section> ! <title> ! HOWTO Access the attributes of a pipeline document inside an ! XSLT ! </title> ! <para>Essentially you can use document.get("myprop")</para> ! <simplelist> ! <member> ! <xsl:param name="doc" select="$document"/> ! </member> ! <member> ! <xsl:param name="myprop" select="java:get($doc, ! 'myprop')"/> ! </member> ! </simplelist> ! <para> ! For the syntax, see: ! http://xml.apache.org/xalan-j/extensions.html See the java ! section. ! </para> ! <para> ! Additionally you can get the pipeline stage object from the ! XSL and then you can manipulate the java code directly. ! </para> ! <para> ! The snippet below is an example of how to get the current ! time and format it nicely: ! </para> ! <simplelist> ! <member> ! <xsl:variable name="date" ! select="java:java.util.Date.new()"/> ! </member> ! <member> ! <xsl:variable name="seconds" ! select="java:getTime($date)"/> ! </member> ! <member><xsl:variable name="velocity"</member> ! <member> ! select="java:com.babeldoc.core.VelocityUtilityContext.new()"/> ! </member> ! <member> ! <xsl:variable name="datestr" ! select="java:getFormattedDate($velocity, 'd MMM yyyy ! </member> ! <member>HH:mm:ss', $seconds)"/></member> ! </simplelist> ! </section> ! <section> ! <title> ! HOWTO Package up your application into a single jar file for ! easy distribution ! </title> ! <para> ! The idea of this HOWTO is to avoid distributing all the ! directories that make up your configuration by packaging ! them all up into a single jar file and using this to run ! your pipelines. ! </para> ! <para> ! Lets assume that your ! <userinput>BABELDOC_USER</userinput> ! points to the ! <userinput>c:\project</userinput> ! directory. This directory has all the required configuration ! directories like ! <userinput>pipeline</userinput> ! , ! <userinput>resource</userinput> ! , etc. ! </para> ! <itemizedlist> ! <listitem> ! Jar up your configuration files: ! <userinput> ! jar cf myproject.jar pipeline resource journal ! </userinput> ! producing a ! <userinput>myproject.jar</userinput> ! file. ! </listitem> ! <listitem> ! Change your ! <userinput>BABELDOC_USER</userinput> ! to: ! <userinput> ! set BABELDOC_USER=c:\project\myproject.jar ! </userinput> ! </listitem> ! <listitem> ! Verify that your pipelines still work, but change ! directory away from ! <userinput>c:\project</userinput> ! directory to make sure that the configuration files ! there don't interfere with new BABELDOC_USER variable! ! </listitem> ! </itemizedlist> ! </section> </chapter> |
From: Santi B. <san...@us...> - 2008-01-12 00:46:42
|
Update of /cvsroot/babeldoc/babeldoc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23392 Modified Files: .classpath build.properties Log Message: Syndication module added. Documentation start updating process. Index: .classpath =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/.classpath,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** .classpath 9 Jan 2008 10:44:04 -0000 1.11 --- .classpath 12 Jan 2008 00:46:45 -0000 1.12 *************** *** 16,19 **** --- 16,20 ---- <classpathentry kind="src" path="modules/sql/src"/> <classpathentry kind="src" path="modules/jabber/src"/> + <classpathentry kind="src" path="modules/syndication/src"/> <classpathentry kind="lib" path="support/jalopy/lib/aelfred-1.2.jar"/> <classpathentry kind="lib" path="support/jalopy/lib/jalopy-1.0b10.jar"/> *************** *** 24,27 **** --- 25,30 ---- <classpathentry kind="lib" path="support/jalopy/lib/oro-2.0.6.jar"/> <classpathentry kind="lib" path="support/jalopy/lib/sax-2.0.1.jar"/> + <classpathentry kind="lib" path="modules/syndication/lib/rome-0.9.jar"/> + <classpathentry kind="lib" path="modules/syndication/lib/jdom.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="lib" path="modules/conversion/lib/poi.jar"/> *************** *** 75,83 **** <classpathentry kind="lib" path="modules/core/lib/xml-apis.jar"/> <classpathentry kind="lib" path="modules/core/lib/xmlsec.jar"/> - <classpathentry kind="lib" path="support/ant/lib/ant.jar"/> - <classpathentry kind="lib" path="support/ant/lib/junit.jar"/> - <classpathentry kind="lib" path="support/ant/lib/optional.jar"/> - <classpathentry kind="lib" path="support/ant/lib/xml-apis.jar"/> - <classpathentry kind="lib" path="support/ant/lib/xercesImpl.jar"/> <classpathentry kind="output" path="bin"/> </classpath> --- 78,81 ---- Index: build.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/build.properties,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** build.properties 25 Aug 2004 01:40:50 -0000 1.23 --- build.properties 12 Jan 2008 00:46:45 -0000 1.24 *************** *** 48,50 **** #exclude-web=true #exclude-xslfo=true ! --- 48,51 ---- #exclude-web=true #exclude-xslfo=true ! #exclude-jabber=true ! #exclude-syndication=true |
From: Santi B. <san...@us...> - 2008-01-12 00:46:42
|
Update of /cvsroot/babeldoc/babeldoc/modules/syndication/src/com/babeldoc/syndication/pipeline/stage In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23392/modules/syndication/src/com/babeldoc/syndication/pipeline/stage Added Files: SyndicationReaderPipelineStage.java Log Message: Syndication module added. Documentation start updating process. --- NEW FILE: SyndicationReaderPipelineStage.java --- /** * */ package com.babeldoc.syndication.pipeline.stage; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.Collection; import com.babeldoc.core.option.ConfigOption; import com.babeldoc.core.option.IConfigOptionType; import com.babeldoc.core.pipeline.PipelineDocument; import com.babeldoc.core.pipeline.PipelineException; import com.babeldoc.core.pipeline.PipelineStage; import com.babeldoc.core.pipeline.PipelineStageInfo; import com.babeldoc.core.pipeline.PipelineStageResult; import com.sun.syndication.feed.synd.SyndFeed; import com.sun.syndication.io.FeedException; import com.sun.syndication.io.SyndFeedInput; import com.sun.syndication.io.XmlReader; /** * @author santi * */ public class SyndicationReaderPipelineStage extends PipelineStage { /* configuration options */ public static final String URL = "url"; /** * */ public SyndicationReaderPipelineStage() { super(new PipelineStageInfo() { public String getName() { return "SyndicationReader"; } public String getDescription() { return "Syndication feed pipeline reader"; } public Collection getTypeSpecificOptions() { Collection options = new ArrayList(); options.add(new ConfigOption("URL", IConfigOptionType.URL, null, true, "URL to read from")); return options; } }); } /* * (non-Javadoc) * * @see com.babeldoc.core.pipeline.PipelineStage#process() */ public PipelineStageResult[] process() throws PipelineException { PipelineDocument newDoc; String feedUrl = this.getOptions(URL); SyndFeedInput input = new SyndFeedInput(); SyndFeed feed = null; try { feed = input.build(new XmlReader(new URL(feedUrl))); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (FeedException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } newDoc = new PipelineDocument(feed.toString()); newDoc.put(PipelineDocument.NAME, feedUrl); return super.processHelper(newDoc); } } |
From: Santi B. <san...@us...> - 2008-01-12 00:46:42
|
Update of /cvsroot/babeldoc/babeldoc/modules/syndication/config/service In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23392/modules/syndication/config/service Added Files: query.properties Log Message: Syndication module added. Documentation start updating process. --- NEW FILE: query.properties --- PipelineStage.SyndicationReader=com.babeldoc.syndication.pipeline.stage.SyndicationReaderPipelineStage |
From: Santi B. <san...@us...> - 2008-01-12 00:46:42
|
Update of /cvsroot/babeldoc/babeldoc/modules/syndication/config/i18n In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23392/modules/syndication/config/i18n Added Files: messages.properties Log Message: Syndication module added. Documentation start updating process. --- NEW FILE: messages.properties --- |
From: Santi B. <san...@us...> - 2008-01-12 00:46:41
|
Update of /cvsroot/babeldoc/babeldoc/modules/syndication/services In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23392/modules/syndication/services Added Files: com.babeldoc.core.module.BabeldocModule Log Message: Syndication module added. Documentation start updating process. --- NEW FILE: com.babeldoc.core.module.BabeldocModule --- com.babeldoc.syndication.module.SyndicationModule |