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: David G. <dgl...@us...> - 2004-12-21 17:03:14
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20700/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker Modified Files: SqlScanner.java Log Message: Remove debug output Index: SqlScanner.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker/SqlScanner.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** SqlScanner.java 17 Dec 2004 16:22:01 -0000 1.18 --- SqlScanner.java 21 Dec 2004 17:03:06 -0000 1.19 *************** *** 206,210 **** // only submit the document if we have any rows in the result set if (rowCount > 0) { - System.out.println(sb); enqueue(sb.toString().getBytes("UTF-8"), new NameValuePair[] {new NameValuePair(SCAN_MIMETYPE_KEY, "text/xml")}); --- 206,209 ---- |
From: David G. <dgl...@us...> - 2004-12-20 18:03:06
|
Update of /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/journal/browser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12980/babeldoc/modules/gui/src/com/babeldoc/gui/journal/browser Modified Files: JournalBrowserFrame.java JournalTree.java JournalBrowserModel.java Log Message: Show most current journal tickets first; prepare for user-selectable ticket-count option Index: JournalBrowserFrame.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/journal/browser/JournalBrowserFrame.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JournalBrowserFrame.java 6 Sep 2003 00:58:45 -0000 1.5 --- JournalBrowserFrame.java 20 Dec 2004 18:02:50 -0000 1.6 *************** *** 73,77 **** import java.util.Set; - import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JMenu; --- 73,76 ---- *************** *** 93,97 **** import com.babeldoc.core.config.ConfigService; - import com.babeldoc.core.journal.IJournal; import com.babeldoc.core.journal.JournalException; import com.babeldoc.core.journal.JournalOperation; --- 92,95 ---- *************** *** 114,118 **** private String TITLE_MESSAGE = "JournalBrowser v" + version; private String ABOUT_MESSAGE = TITLE_MESSAGE + "\n\n" + ! "(C)opyright 2000-2003 The Apache Software Foundation\n" + "All rights reserved"; private String COMING_SOON_MESSAGE = "This feature will soon be implemented.\nPlease be patient!"; --- 112,116 ---- private String TITLE_MESSAGE = "JournalBrowser v" + version; private String ABOUT_MESSAGE = TITLE_MESSAGE + "\n\n" + ! "(C)opyright 2000-2005 The Apache Software Foundation\n" + "All rights reserved"; private String COMING_SOON_MESSAGE = "This feature will soon be implemented.\nPlease be patient!"; *************** *** 272,276 **** // Link the controller to this frame. ! JournalTree tree = new JournalTree(model); tree.getModel().addTreeModelListener(new MyTreeModelListener()); --- 270,274 ---- // Link the controller to this frame. ! JournalTree tree = new JournalTree(model, journalStart, journalCount); tree.getModel().addTreeModelListener(new MyTreeModelListener()); Index: JournalBrowserModel.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/journal/browser/JournalBrowserModel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JournalBrowserModel.java 6 Sep 2003 00:58:45 -0000 1.3 --- JournalBrowserModel.java 20 Dec 2004 18:02:51 -0000 1.4 *************** *** 69,72 **** --- 69,73 ---- import com.babeldoc.core.journal.*; import com.babeldoc.core.journal.query.JournalQuery; + import com.babeldoc.core.journal.query.QueryOption; import com.babeldoc.core.journal.query.QueryTicket; *************** *** 120,126 **** public QueryTicket[] getTickets(int start, int number) { try { JournalOperation[] jo = new JournalOperation[] { JournalOperation.newTicket }; JournalQuery jQuery = new JournalQuery(start, number, null, new Date(), ! null, jo); return JournalFactory.getJournal().getTickets(jQuery); --- 121,128 ---- public QueryTicket[] getTickets(int start, int number) { try { + QueryOption[] qo = new QueryOption[] { QueryOption.newestFirst }; JournalOperation[] jo = new JournalOperation[] { JournalOperation.newTicket }; JournalQuery jQuery = new JournalQuery(start, number, null, new Date(), ! qo, jo); return JournalFactory.getJournal().getTickets(jQuery); Index: JournalTree.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/journal/browser/JournalTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JournalTree.java 6 Sep 2003 00:58:45 -0000 1.4 --- JournalTree.java 20 Dec 2004 18:02:51 -0000 1.5 *************** *** 88,91 **** --- 88,94 ---- private DefaultTreeModel journalTreeModel; private JournalBrowserModel browserModel; + private int journalStart = 0; + private int journalCount = 100; + /** *************** *** 94,98 **** * @param browserModel DOCUMENT ME! */ ! public JournalTree(JournalBrowserModel browserModel) { super(); this.browserModel = browserModel; --- 97,101 ---- * @param browserModel DOCUMENT ME! */ ! public JournalTree(JournalBrowserModel browserModel, int journalStart, int journalCount) { super(); this.browserModel = browserModel; *************** *** 101,105 **** this.journalTreeModel = new DefaultTreeModel(this.rootNode); ! this.populateTree(); super.setModel(this.journalTreeModel); --- 104,108 ---- this.journalTreeModel = new DefaultTreeModel(this.rootNode); ! this.populateTree(journalStart, journalCount); super.setModel(this.journalTreeModel); *************** *** 112,116 **** */ private void populateTree() { ! populateTree(0, 100); } --- 115,119 ---- */ private void populateTree() { ! populateTree(journalStart, journalCount); } |
From: David G. <dgl...@us...> - 2004-12-17 16:22:21
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10376/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker Modified Files: SqlScanner.java Log Message: Per vanstalle's patch request on sourceforge (ID #1007027) fix handleXmlDocuments() to only queue documents that return a non-zero resultset. I would have simply applied vanstalle's patch, but he neglected to submit it in the patch request (shame, shame! :-) ). Index: SqlScanner.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker/SqlScanner.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** SqlScanner.java 17 Oct 2003 06:41:14 -0000 1.17 --- SqlScanner.java 17 Dec 2004 16:22:01 -0000 1.18 *************** *** 176,182 **** */ public void handleXmlDocuments(ResultSet rs) throws Exception { int columnCount = rs.getMetaData().getColumnCount(); StringBuffer sb = new StringBuffer( ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); int rowCount = 0; --- 176,183 ---- */ 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; *************** *** 201,212 **** } - if (rowCount == 0) { - } - sb.append("</" + headingTag + ">\n"); - // System.out.println(sb); ! enqueue(sb.toString().getBytes("UTF-8"), ! new NameValuePair[] {new NameValuePair(SCAN_MIMETYPE_KEY, "text/xml")}); } } --- 202,213 ---- } sb.append("</" + headingTag + ">\n"); ! // only submit the document if we have any rows in the result set ! if (rowCount > 0) { ! System.out.println(sb); ! enqueue(sb.toString().getBytes("UTF-8"), ! new NameValuePair[] {new NameValuePair(SCAN_MIMETYPE_KEY, "text/xml")}); ! } } } *************** *** 293,297 **** stmt = conn.createStatement(); rs = stmt.executeQuery(sqlStatement); ! if (DOC_TYPE_CSV.equalsIgnoreCase(documentType)) { handleCsvDocument(rs); --- 294,298 ---- stmt = conn.createStatement(); rs = stmt.executeQuery(sqlStatement); ! if (DOC_TYPE_CSV.equalsIgnoreCase(documentType)) { handleCsvDocument(rs); |
From: Ken G. <kg...@us...> - 2004-10-05 20:21:09
|
Update of /cvsroot/babeldoc/babeldoc/modules/web/docs/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1612/modules/web/docs/modules Modified Files: index.vm Log Message: Now the modules section in the web console actually works! Index: index.vm =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/web/docs/modules/index.vm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.vm 27 May 2003 03:04:56 -0000 1.1 --- index.vm 5 Oct 2004 20:20:53 -0000 1.2 *************** *** 16,25 **** depends list </td> - <td> - </td> - <td> - </td> </tr> ! #set($modules = $babel.ModuleList.SortedModules) #foreach($module in $modules) <tr> --- 16,21 ---- depends list </td> </tr> ! #set($modules = $babel.ModuleListing.SortedModules) #foreach($module in $modules) <tr> *************** *** 28,34 **** </td> <td> </td> - <td></td> - <td></td> </tr> #end --- 24,31 ---- </td> <td> + #foreach($dependency in $module.DependsOn) + $dependency + #end </td> </tr> #end |
From: Ken G. <kg...@us...> - 2004-10-05 20:21:08
|
Update of /cvsroot/babeldoc/babeldoc/modules/web/src/com/babeldoc/web/context In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1612/modules/web/src/com/babeldoc/web/context Modified Files: ModuleListingContext.java Log Message: Now the modules section in the web console actually works! Index: ModuleListingContext.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/web/src/com/babeldoc/web/context/ModuleListingContext.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ModuleListingContext.java 27 Jun 2003 02:09:20 -0000 1.2 --- ModuleListingContext.java 5 Oct 2004 20:20:53 -0000 1.3 *************** *** 82,86 **** */ public ModuleListingContext() { ! BabeldocModuleList moduleList = BabeldocModuleList.getInstance(); } --- 82,86 ---- */ public ModuleListingContext() { ! moduleList = BabeldocModuleList.getInstance(); } |
From: Ken G. <kg...@us...> - 2004-09-30 19:11:13
|
Update of /cvsroot/babeldoc/babeldoc/modules/web/docs/journal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1051/modules/web/docs/journal Modified Files: ticketstep.vm Log Message: fix a couple of bugs in ticket handling Index: ticketstep.vm =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/web/docs/journal/ticketstep.vm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ticketstep.vm 24 Feb 2003 22:48:07 -0000 1.1.1.1 --- ticketstep.vm 30 Sep 2004 19:11:04 -0000 1.2 *************** *** 71,75 **** #set($row = $row + 1) #end ! <td><a href="ticketstep.vm?ticket=$ticket">$ticket</a></td> #if( $count == 7 ) #set($count = 0) --- 71,75 ---- #set($row = $row + 1) #end ! <td><a href="ticketstep.vm?ticket=${ticket.Id}">${ticket.Id}</a></td> #if( $count == 7 ) #set($count = 0) |
From: Ken G. <kg...@us...> - 2004-09-30 19:11:13
|
Update of /cvsroot/babeldoc/babeldoc/modules/sql/src/com/babeldoc/sql/journal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1051/modules/sql/src/com/babeldoc/sql/journal Modified Files: PostgreSqlJournal.java Log Message: fix a couple of bugs in ticket handling Index: PostgreSqlJournal.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/sql/src/com/babeldoc/sql/journal/PostgreSqlJournal.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PostgreSqlJournal.java 3 Sep 2003 03:25:32 -0000 1.2 --- PostgreSqlJournal.java 30 Sep 2004 19:11:04 -0000 1.3 *************** *** 158,162 **** // Log the operation ! log(ticket, JournalOperation.forkTicket, parentTicket.toString(), null, null); --- 158,162 ---- // Log the operation ! log(ticket, JournalOperation.forkTicket, parentTicket.getId(), null, null); |
From: David G. <dgl...@us...> - 2004-09-03 16:57:41
|
Update of /cvsroot/babeldoc/babeldoc/modules/sql/config/sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22496/babeldoc/modules/sql/config/sql Modified Files: query.properties Log Message: Added journal support for Sql Server Index: query.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/sql/config/sql/query.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** query.properties 15 Aug 2003 21:22:04 -0000 1.3 --- query.properties 3 Sep 2004 16:57:01 -0000 1.4 *************** *** 7,10 **** --- 7,11 ---- journalAddBlankDataRow-oracle=insert into JOURNAL values ( ? , ? , empty_blob() ) journalAddBlankDataRow-mysql=insert into journal values ( ? , ? , ? ) + journalAddBlankDataRow-sqlserver=insert into journal values ( ? , ? , ? ) journalSelectBlob=select jrn_data from journal where jrn_log_id=? and jrn_log_step=? journalSelectBlobForUpdate-oracle=select jrn_data from journal where jrn_log_id=? and jrn_log_step=? for update |
From: David G. <dgl...@us...> - 2004-09-03 16:57:29
|
Update of /cvsroot/babeldoc/babeldoc/modules/sql/config/journal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22496/babeldoc/modules/sql/config/journal Modified Files: config.properties Log Message: Added journal support for Sql Server Index: config.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/sql/config/journal/config.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** config.properties 3 Sep 2003 03:25:32 -0000 1.1 --- config.properties 3 Sep 2004 16:57:04 -0000 1.2 *************** *** 7,10 **** --- 7,11 ---- #journalType=postgresql #journalType=oracle + #journalType=sqlserver # |
From: David G. <dgl...@us...> - 2004-09-03 16:57:15
|
Update of /cvsroot/babeldoc/babeldoc/readme/userguide In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22496/babeldoc/readme/userguide Modified Files: chapter4.xml Log Message: Added journal support for Sql Server Index: chapter4.xml =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/userguide/chapter4.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** chapter4.xml 14 Apr 2004 20:13:41 -0000 1.4 --- chapter4.xml 3 Sep 2004 16:57:02 -0000 1.5 *************** *** 32,35 **** --- 32,37 ---- <listitem>mysql</listitem> <listitem>oracle</listitem> + <listitem>postgresql</listitem> + <listitem>sqlserver</listitem> <listitem>ejb</listitem> </orderedlist> *************** *** 77,81 **** <userinput>journal_data</userinput>: Storage for the enriched variables associated with the document. The primary reason that these variables are stored separately is that they can be used as query parameters for console operations. Note that long and binary variables are not stored to the database and that strings can get truncated.</listitem> </orderedlist> ! <para>The configuration for both the Mysql and Oracle journals are stored in the configuration file: <userinput>config/journal/sql/config.properties</userinput>. The only configuration option in this file is <userinput>resourceName</userinput> indicates that name of the resource that will manage the database connection. Current the journal is implemented in a separate schema (instance, whatever) than the other database storage areas (user, and console).</para> </section> --- 79,83 ---- <userinput>journal_data</userinput>: Storage for the enriched variables associated with the document. The primary reason that these variables are stored separately is that they can be used as query parameters for console operations. Note that long and binary variables are not stored to the database and that strings can get truncated.</listitem> </orderedlist> ! <para>The configuration for the Mysql, Oracle, PostgreSQL, and SQL Server journals are stored in the configuration file: <userinput>config/journal/sql/config.properties</userinput>. The only configuration option in this file is <userinput>resourceName</userinput> indicates that name of the resource that will manage the database connection. Currently the journal is implemented in a separate schema (instance, whatever) than the other database storage areas (user, and console).</para> </section> *************** *** 85,89 **** </section> </section> ! <section> <title>Journal Tool</title> --- 87,91 ---- </section> </section> ! <section> <title>Journal Tool</title> |
From: David G. <dgl...@us...> - 2004-09-03 16:57:15
|
Update of /cvsroot/babeldoc/babeldoc/readme/sql/sqlserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22496/babeldoc/readme/sql/sqlserver Added Files: journal-tables.sql Log Message: Added journal support for Sql Server --- NEW FILE: journal-tables.sql --- IF OBJECT_ID('journal') IS NOT NULL DROP TABLE journal ; CREATE TABLE journal ( jrn_log_id INTEGER NOT NULL, jrn_log_step INTEGER NOT NULL, jrn_data IMAGE, PRIMARY KEY (jrn_log_id, jrn_log_step) ) ; IF OBJECT_ID('journal_data') IS NOT NULL DROP TABLE journal_data ; CREATE TABLE journal_data ( jda_log_id INTEGER NOT NULL, jda_log_step INTEGER NOT NULL, jda_name VARCHAR(255), jda_value VARCHAR(255), PRIMARY KEY (jda_log_id, jda_log_step, jda_name) ) ; IF OBJECT_ID('log') IS NOT NULL DROP TABLE [log] ; CREATE TABLE [log] ( log_id INTEGER NOT NULL, log_step INTEGER NOT NULL, log_operation VARCHAR(255) NOT NULL, log_datetime BIGINT NOT NULL, log_other_data VARCHAR(255), log_pipeline VARCHAR(255), log_additional VARCHAR(2000), PRIMARY KEY (log_id, log_step) ) ; IF OBJECT_ID('table_key') IS NOT NULL DROP TABLE table_key ; CREATE TABLE table_key ( key_table_name VARCHAR(255) NOT NULL UNIQUE, key_val VARCHAR(255) NOT NULL, PRIMARY KEY (key_table_name) ) ; IF OBJECT_ID('config') IS NOT NULL DROP TABLE config ; CREATE TABLE config ( cfg_name VARCHAR(255) NOT NULL UNIQUE, cfg_value VARCHAR(255) NOT NULL, PRIMARY KEY (cfg_name) ) ; IF OBJECT_ID('babel_user') IS NOT NULL DROP TABLE babel_user ; CREATE TABLE babel_user ( [user_name] VARCHAR(255) NOT NULL UNIQUE, user_passwd VARCHAR(255) NOT NULL, PRIMARY KEY ([user_name]) ) ; |
From: David G. <dgl...@us...> - 2004-09-03 16:57:15
|
Update of /cvsroot/babeldoc/babeldoc/modules/sql/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22496/babeldoc/modules/sql/lib Added Files: jtds-0.8.1.jar Log Message: Added journal support for Sql Server --- NEW FILE: jtds-0.8.1.jar --- (This appears to be a binary file; contents omitted.) |
From: David G. <dgl...@us...> - 2004-09-03 16:57:14
|
Update of /cvsroot/babeldoc/babeldoc/modules/sql/config/service In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22496/babeldoc/modules/sql/config/service Modified Files: query.properties Log Message: Added journal support for Sql Server Index: query.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/sql/config/service/query.properties,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** query.properties 2 Jul 2004 14:57:16 -0000 1.4 --- query.properties 3 Sep 2004 16:57:02 -0000 1.5 *************** *** 6,9 **** --- 6,10 ---- Journal.oracle=com.babeldoc.sql.journal.OracleJournal Journal.postgresql=com.babeldoc.sql.journal.PostgreSqlJournal + Journal.sqlserver=com.babeldoc.sql.journal.SqlServerJournal Resource.jdbc=com.babeldoc.sql.resource.SimpleJdbc |
From: David G. <dgl...@us...> - 2004-09-03 16:57:14
|
Update of /cvsroot/babeldoc/babeldoc/modules/sql/src/com/babeldoc/sql/journal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22496/babeldoc/modules/sql/src/com/babeldoc/sql/journal Added Files: SqlServerJournal.java Log Message: Added journal support for Sql Server --- NEW FILE: SqlServerJournal.java --- /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * ==================================================================== * * Babeldoc: The Universal Document Processor * * $Header: /cvsroot/babeldoc/babeldoc/modules/sql/src/com/babeldoc/sql/journal/SqlServerJournal.java,v 1.1 2004/09/03 16:57:04 dglick02 Exp $ * $DateTime$ * $Author: dglick02 $ * */ package com.babeldoc.sql.journal; import com.babeldoc.core.I18n; import com.babeldoc.core.LogService; import com.babeldoc.core.pipeline.PipelineDocument; import com.babeldoc.core.journal.query.JournalQuery; import com.babeldoc.sql.util.SqlQueryManager; import java.io.ByteArrayOutputStream; import java.io.ObjectOutputStream; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; /** * * Copied from MySqlServer.java. Rather then simply extend MySqlServer, it makes sense * to keep the database-specific classes totally separate so that one can change * MySqlServer without affecting this module, which could otherwise break. Propagating * bug fixes, you say? This is based on Bruce McDonald code, man; there are no bugs. * @author David Glick * @version 1.0 */ public class SqlServerJournal extends GenericSqlJournal { public static final String DELTA_MAKEROW = "journalAddBlankDataRow-sqlserver"; /** * getTicketsProcessQueryString concoct the query string from the bits and * pieces. Calls back to the getTicketsProcess... * * @param jQuery * * @return */ protected StringBuffer getTicketsProcessQueryString(JournalQuery jQuery) { boolean whereAdded; StringBuffer query = new StringBuffer(SqlQueryManager.getSqlQuery( LOG_QUERY_TICKETS)); whereAdded = getTicketsProcessDates(jQuery.getStartDate(), jQuery.getEndDate(), query); whereAdded = getTicketsProcessJournalOperations(whereAdded, query, jQuery.getJournalOperations()); getTicketsProcessQueryOptions(jQuery.getQueryOptions(), query); // Limit stuff if (jQuery.getStartIndex() > 0) { query.append(" limit " + jQuery.getStartIndex() + ", " + jQuery.getNumResults()); // HACK ALERT - need to do this to stop the parent skipping // on the result set. jQuery.setStartIndex(0); } return query; } /** * writeDelta - Write a document to the rdbms. * * @param con the connection * @param id the log id * @param step the log step * @param doc DOCUMENT ME! * * @throws SQLException DOCUMENT ME! */ protected void writeDelta(Connection con, long id, long step, PipelineDocument doc) throws SQLException { String insertStmt = SqlQueryManager.getSqlQuery(DELTA_MAKEROW); PreparedStatement pstmt = null; ResultSet rset = null; ByteArrayOutputStream baos = null; try { // Write the document object to an array of bytes baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(doc); oos.flush(); byte[] docData = baos.toByteArray(); // Now write the row pstmt = con.prepareStatement(insertStmt); pstmt.setLong(1, id); pstmt.setLong(2, step); pstmt.setBytes(3, docData); pstmt.execute(); writeExtraData(con, id, step, doc); } catch (Exception e) { throw new SQLException(e.toString()); } finally { try { if (rset != null) { rset.close(); } if (pstmt != null) { pstmt.close(); } if (baos != null) { baos.close(); } } catch (Exception e) { LogService.getInstance().logError(I18n.get("014003"), e); } } } } |
From: David G. <dgl...@us...> - 2004-08-27 15:58:19
|
Update of /cvsroot/babeldoc/babeldoc/readme/sql/sqlserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5667/babeldoc/readme/sql/sqlserver Log Message: Directory /cvsroot/babeldoc/babeldoc/readme/sql/sqlserver added to the repository |
From: Bruce M. <br...@mc...> - 2004-08-25 01:58:17
|
All, Please check out this release, 1.3.1. This is going to be released soon... regards, Bruce. On Tuesday 24 August 2004 09:40 pm, bruce mcdonald wrote: > Update of /cvsroot/babeldoc/babeldoc/readme > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17278/readme > > Modified Files: > INSTALL README > Log Message: > Updated build so that support directory is excluded from distributions > files. Set the build number to 1.3.1. Reversed (kinda) some of the > changes that webhiker made to the quick start document. All in preparation > for 1.3.1 > > Index: README > =================================================================== > RCS file: /cvsroot/babeldoc/babeldoc/readme/README,v > retrieving revision 1.3 > retrieving revision 1.4 > diff -C2 -d -r1.3 -r1.4 > *** README 13 Aug 2003 11:37:22 -0000 1.3 > --- README 25 Aug 2004 01:40:50 -0000 1.4 > *************** > *** 2,6 **** > =================== > > ! This is babeldoc version 1.1.7 It is in a usable state > Please see the examples directory and follow the directions > in the readme file in each sub-directory > --- 2,6 ---- > =================== > > ! This is babeldoc version 1.2.x It is in a usable state > Please see the examples directory and follow the directions > in the readme file in each sub-directory > > Index: INSTALL > =================================================================== > RCS file: /cvsroot/babeldoc/babeldoc/readme/INSTALL,v > retrieving revision 1.3 > retrieving revision 1.4 > diff -C2 -d -r1.3 -r1.4 > *** INSTALL 13 Aug 2003 11:44:51 -0000 1.3 > --- INSTALL 25 Aug 2004 01:40:50 -0000 1.4 > *************** > *** 9,13 **** > 2. Unpacking > ------------ > ! a. Unpack the zip or tar.gz into a directory > b. Change into the created babeldoc directory. > > --- 9,13 ---- > 2. Unpacking > ------------ > ! a. Unpack the zip or tar.gz into a directory, > b. Change into the created babeldoc directory. > > *************** > *** 18,28 **** > > 4. Environment variables > ! a. Set the BABELDOC_HOME environmet variable to the created directory > b. Add %BABELDOC_HOME%\bin (Windows) or ${BABELDOC_HOME}\bin (*nix) to > your path > > 4. Documentation: userguide > ---------------------------- > ! a. Windows: bin\babeldoc process -p documentation -f > readme\userguide.xml -a style=html ! b. Unix: bin/babeldoc process -p > documentation -f readme/userguide.xml -a style=html (The documentation will > be: readme/userguide.xml.html) > > --- 18,28 ---- > > 4. Environment variables > ! a. Set the BABELDOC_HOME environment variable to the created 'build' > directory b. Add %BABELDOC_HOME%\bin (Windows) or ${BABELDOC_HOME}\bin > (*nix) to your path > > 4. Documentation: userguide > ---------------------------- > ! a. Windows: babeldoc process -p documentation -f readme\userguide.xml > -a style=html ! b. Unix: babeldoc process -p documentation -f > readme/userguide.xml -a style=html (The documentation will be: > readme/userguide.xml.html) > > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Babeldoc-devel mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel |
From: bruce m. <tr...@us...> - 2004-08-25 01:40:59
|
Update of /cvsroot/babeldoc/babeldoc/readme In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17278/readme Modified Files: INSTALL README Log Message: Updated build so that support directory is excluded from distributions files. Set the build number to 1.3.1. Reversed (kinda) some of the changes that webhiker made to the quick start document. All in preparation for 1.3.1 Index: README =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/README,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** README 13 Aug 2003 11:37:22 -0000 1.3 --- README 25 Aug 2004 01:40:50 -0000 1.4 *************** *** 2,6 **** =================== ! This is babeldoc version 1.1.7 It is in a usable state Please see the examples directory and follow the directions in the readme file in each sub-directory --- 2,6 ---- =================== ! This is babeldoc version 1.2.x It is in a usable state Please see the examples directory and follow the directions in the readme file in each sub-directory Index: INSTALL =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/INSTALL,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** INSTALL 13 Aug 2003 11:44:51 -0000 1.3 --- INSTALL 25 Aug 2004 01:40:50 -0000 1.4 *************** *** 9,13 **** 2. Unpacking ------------ ! a. Unpack the zip or tar.gz into a directory b. Change into the created babeldoc directory. --- 9,13 ---- 2. Unpacking ------------ ! a. Unpack the zip or tar.gz into a directory, b. Change into the created babeldoc directory. *************** *** 18,28 **** 4. Environment variables ! a. Set the BABELDOC_HOME environmet variable to the created directory b. Add %BABELDOC_HOME%\bin (Windows) or ${BABELDOC_HOME}\bin (*nix) to your path 4. Documentation: userguide ---------------------------- ! a. Windows: bin\babeldoc process -p documentation -f readme\userguide.xml -a style=html ! b. Unix: bin/babeldoc process -p documentation -f readme/userguide.xml -a style=html (The documentation will be: readme/userguide.xml.html) --- 18,28 ---- 4. Environment variables ! a. Set the BABELDOC_HOME environment variable to the created 'build' directory b. Add %BABELDOC_HOME%\bin (Windows) or ${BABELDOC_HOME}\bin (*nix) to your path 4. Documentation: userguide ---------------------------- ! a. Windows: babeldoc process -p documentation -f readme\userguide.xml -a style=html ! b. Unix: babeldoc process -p documentation -f readme/userguide.xml -a style=html (The documentation will be: readme/userguide.xml.html) |
From: bruce m. <tr...@us...> - 2004-08-25 01:40:59
|
Update of /cvsroot/babeldoc/babeldoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17278 Modified Files: build.properties build.xml quickstart-en.txt Log Message: Updated build so that support directory is excluded from distributions files. Set the build number to 1.3.1. Reversed (kinda) some of the changes that webhiker made to the quick start document. All in preparation for 1.3.1 Index: build.xml =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/build.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** build.xml 9 Aug 2004 09:51:28 -0000 1.21 --- build.xml 25 Aug 2004 01:40:50 -0000 1.22 *************** *** 53,57 **** <zipfileset dir="." includes="quickstart*.txt" prefix="${bin_zip_file}"/> <!--<zipfileset dir="readme" prefix="${bin_zip_file}/readme"/>--> ! <zipfileset dir="build" includes="**/*" prefix="${bin_zip_file}"/> </zip> </target> --- 53,57 ---- <zipfileset dir="." includes="quickstart*.txt" prefix="${bin_zip_file}"/> <!--<zipfileset dir="readme" prefix="${bin_zip_file}/readme"/>--> ! <zipfileset dir="build" includes="bin/**,lib/**,examples/**, readme/**" prefix="${bin_zip_file}"/> </zip> </target> Index: build.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/build.properties,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** build.properties 6 Dec 2003 00:04:55 -0000 1.22 --- build.properties 25 Aug 2004 01:40:50 -0000 1.23 *************** *** 9,13 **** src = ./src ! babeldoc_version = 1.3.0_DEV config = ./config modules = ./modules --- 9,13 ---- src = ./src ! babeldoc_version = 1.3.1 config = ./config modules = ./modules Index: quickstart-en.txt =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/quickstart-en.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** quickstart-en.txt 9 Aug 2004 10:00:58 -0000 1.7 --- quickstart-en.txt 25 Aug 2004 01:40:50 -0000 1.8 *************** *** 1,3 **** ! Babeldoc v1.0 Quickstart Guide ============================== --- 1,3 ---- ! Babeldoc v1.2 Quickstart Guide ============================== *************** *** 5,9 **** -------------- a. Java JDK 1.4.1 or later. ! b. Ant 1.6.2 or later 2. Unpacking --- 5,9 ---- -------------- a. Java JDK 1.4.1 or later. ! b. (optional) Ant 1.5 or later 2. Unpacking *************** *** 16,20 **** 3. Building (if required) ----------- ! a. Unix, Windows, Linux, from the command prompt type : ant build --- 16,27 ---- 3. Building (if required) ----------- ! a. Unix & Linux, from the command prompt type: ! ./build.sh ! Windows, from the command prompt type: ! build ! --OR-- ! ! b. If you have Jakarta Ant installed and the ant command is in your path, ! from the command prompt type : ant build *************** *** 25,31 **** attempt to find the correct BABELDOC_HOME directory. ! a. Set the BABELDOC_HOME environment variable to the subdirectory ! 'build' in the directory you have installed Babeldoc. ! b. Add %BABELDOC_HOME%\bin (Windows) or ${BABELDOC_HOME}\bin (*nix) to your path --- 32,42 ---- attempt to find the correct BABELDOC_HOME directory. ! a. Set the BABELDOC_HOME environment variable: ! ! 1. If you have built from the source, set to the 'build' directory. ! 2. If you have installed the binary, simply set to the directory you ! unpacked Babeldoc into. ! ! b. Add %BABELDOC_HOME%\bin (Windows) or ${BABELDOC_HOME}/bin (*nix) to your path |
From: Web H. <web...@us...> - 2004-08-10 10:49:46
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14094/modules/scanner/src/com/babeldoc/scanner Modified Files: Scanner.java Log Message: Modified entry points and supporting files to allow programmatically starting and stopping Babeldoc from within the same JVM. Some problems still exist when restarting, the PipelineStage method getOptions(...) return null, under investigation. Regular method of invocation via babeldoc script files is unchanged. Added some optimisations to method of invocation of "main" methodsvia reflection, now istead of looping thru all available methods, directly retrieve the method of interest. Index: Scanner.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/Scanner.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Scanner.java 29 Mar 2004 21:09:48 -0000 1.33 --- Scanner.java 10 Aug 2004 10:49:06 -0000 1.34 *************** *** 145,150 **** * @param args DOCUMENT ME! */ ! public static void main(String[] args) { ! new Scanner(args); } --- 145,150 ---- * @param args DOCUMENT ME! */ ! public static BabeldocCommand main(String[] args) { ! return new Scanner(args); } |
From: Web H. <web...@us...> - 2004-08-10 10:49:29
|
Update of /cvsroot/babeldoc/babeldoc/modules/init/src/com/babeldoc/init In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14094/modules/init/src/com/babeldoc/init Modified Files: Main.java Log Message: Modified entry points and supporting files to allow programmatically starting and stopping Babeldoc from within the same JVM. Some problems still exist when restarting, the PipelineStage method getOptions(...) return null, under investigation. Regular method of invocation via babeldoc script files is unchanged. Added some optimisations to method of invocation of "main" methodsvia reflection, now istead of looping thru all available methods, directly retrieve the method of interest. Index: Main.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/init/src/com/babeldoc/init/Main.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Main.java 23 Jul 2004 03:32:06 -0000 1.8 --- Main.java 10 Aug 2004 10:49:06 -0000 1.9 *************** *** 69,73 **** import java.io.FilenameFilter; ! import java.lang.reflect.Method; import java.util.Vector; --- 69,73 ---- import java.io.FilenameFilter; ! import java.lang.reflect.*; import java.util.Vector; *************** *** 87,287 **** public class Main { ! // private static ClassLoader loader; ! public static final String BABELDOC_HOME = "babeldoc.home"; ! public static final String BABELDOC_CP = "babeldoc.cp"; ! public static final String BABELDOC_SCANDIR = "babeldoc.scandir"; ! public static final String BABELDOC_MAIN = "com.babeldoc.core.Main"; ! public static final String BABELDOC_CLASSLOADER = "babeldoc.classloader"; ! public static final String ADAPTIVE = "adaptive"; ! public static final String LIB = "lib"; ! public static final String DOT_JAR = ".jar"; ! public static final String DOT_ZIP = ".zip"; ! public static final String MAIN = "main"; ! /** ! * The starting point for commandline Babeldoc. This then ! * checks the BABELDOC_HOME variable. Gets all the jar and ! * zip files. Proceed with this. ! * ! * @param args command line arguments. Set in script: babeldoc.sh/.bat ! */ ! public static void main(String[] args) { ! String home = System.getProperty(BABELDOC_HOME); ! if (home != null) { ! File fileHome = new File(home); ! if (fileHome.exists() && fileHome.isDirectory()) { ! runBabeldocMain(getLibraryFiles(home), args); ! return; ! } } ! System.err.println("Babeldoc home: " + home + " is invalid"); ! } ! /** ! * Get the urls for all the jars and zips in the library directory ! * ! * @param home path to the $BABELDOC_HOME directory ! * ! * @return list of zips and jars from 'lib' subdirectory ! */ ! private static File[] getLibraryFiles(String home) { ! File fileLib = new File(home, LIB); ! if (fileLib.exists() && fileLib.isDirectory()) { ! System.setProperty(BABELDOC_SCANDIR, fileLib.getAbsolutePath()); ! File[] libs = fileLib.listFiles(new FilenameFilter() { ! public boolean accept(File dir, String name) { ! if (name.endsWith(DOT_JAR) || name.endsWith(DOT_ZIP)) { ! return true; ! } else { ! return false; ! } ! } ! }); ! return libs; ! } else { ! System.err.println("The directory: " + fileLib + ! " does not exist or is not a directory. Babeldoc cannot find its library files and is quitting now."); } ! return null; ! } ! /** ! * Create a ClassLoader with the list of jars and zips and add them to the ! * classpath. Then call into the CORE Main method. ! * ! * @param files all the zip and the jar files ! * @param args command line arguments ! */ ! private static void runBabeldocMain(File[] files, String[] args) { ! if (files != null) { ! ClassLoader loader = setupClassLoader(files); ! try { ! Class main = loader.loadClass(BABELDOC_MAIN); ! Method[] methods = main.getDeclaredMethods(); ! for (int i = 0; i < methods.length; ++i) { ! if (MAIN.equals(methods[i].getName())) { ! Method method = methods[i]; ! Object[] methodArgs = new Object[] { args }; ! try { ! method.invoke(main, methodArgs); ! return; ! } catch (Exception e) { ! System.err.println(e); ! e.printStackTrace(); ! } ! break; ! } ! } ! System.err.println("Main does not have a main"); ! } catch (ClassNotFoundException e) { ! System.err.println(e); ! } } - } ! /** ! * Setup the particular classloader. There are two: Adaptive ! * and URLClassLoader. Configure either one ! * with the library files. ! * <br/> ! * <strong>NOTE</strong> At the end of the method, this new ! * classloader is applied to the current thread. ! * ! * @param inFiles files discovered in the lib directory ! * @return the classloader with all the library files added. ! */ ! private static ClassLoader setupClassLoader(File[] inFiles) { ! File [] files = incorporateClassPath(inFiles); ! ClassLoader loader = null; ! if(ADAPTIVE.equals(System.getProperty(BABELDOC_CLASSLOADER))) { ! Vector vec = new Vector(files.length); ! for (int i = 0; i < files.length; i++) { ! vec.add(files[i]); ! } ! loader = new AdaptiveClassLoader(vec, false); ! } else { ! URL [] urls = new URL[files.length]; ! for (int i = 0; i < files.length; i++) { ! try { ! urls[i] = files[i].toURL(); ! } catch (MalformedURLException e) { ! System.err.println(e); ! } ! } ! loader = new URLClassLoader(urls); } - Thread.currentThread().setContextClassLoader(loader); - return loader; - } ! /** ! * Load those classpath entries into the grand list of ! * files to place in the classpath ! * ! * @param files ! * @return ! */ ! private static File[] incorporateClassPath(File[] files) { ! File [] cpFiles = getClasspathFiles(); ! if(cpFiles!=null&&cpFiles.length>0) { ! File [] newFiles = new File[cpFiles.length+files.length]; ! int j = 0; ! for (int i = 0; i < files.length; i++) { ! newFiles[j++] = files[i]; ! } ! for(int i = 0; i < cpFiles.length; i++) { ! newFiles[j++] = cpFiles[i]; ! } ! files = newFiles; } - return files; - } ! /** ! * Get the files from the classpath - this is a hack to get around the ! * hidden classpath issue when running -jar (which is how babeldoc runs) ! * ! * @return array of files representing the classpath ! */ ! private static File[] getClasspathFiles() { ! String cp = System.getProperty(BABELDOC_CP); ! if(cp!=null) { ! StringTokenizer st = new StringTokenizer(cp, File.pathSeparator); ! Collection files = new ArrayList(); ! while(st.hasMoreTokens()) { ! String token = st.nextToken(); ! File file = new File(token); ! if (file.exists() && ( ! (token.endsWith(DOT_JAR)) || ! (token.endsWith(DOT_ZIP)) || ! (file.isDirectory()) ) ) { ! //System.out.println("Adding: "+token); ! files.add(file); ! } else { ! //System.out.println("Ignoring : "+token); ! } ! } ! return (File[])files.toArray(new File[0]); ! } else { ! return null; } - } } --- 87,333 ---- public class Main { ! // private static ClassLoader loader; ! public static final String BABELDOC_HOME = "babeldoc.home"; ! public static final String BABELDOC_CP = "babeldoc.cp"; ! public static final String BABELDOC_SCANDIR = "babeldoc.scandir"; ! public static final String BABELDOC_MAIN = "com.babeldoc.core.Main"; ! public static final String BABELDOC_CLASSLOADER = "babeldoc.classloader"; ! public static final String ADAPTIVE = "adaptive"; ! public static final String LIB = "lib"; ! public static final String DOT_JAR = ".jar"; ! public static final String DOT_ZIP = ".zip"; ! public static final String MAIN = "main"; ! public static final String INTERRUPT = "interrupt"; ! private Object babelDocThread; ! /** ! * Creates a new <code>Main</code> instance. ! * This is usefull for classes which need to programatically launch and stop ! * Babeldoc. ! * ! */ ! public Main(String[] args) { ! String home = System.getProperty(BABELDOC_HOME); ! if (home != null) { ! File fileHome = new File(home); ! ! if (fileHome.exists() && fileHome.isDirectory()) { ! File[] files = getLibraryFiles(home); ! if (files != null) { ! try { ! ClassLoader loader = setupClassLoader(files); ! Class main = loader.loadClass(BABELDOC_MAIN); ! // Constructor[] constructors = main.getConstructors(); ! Constructor constructor = main.getConstructor(new Class[]{String[].class}); ! babelDocThread = constructor.newInstance(new Object[]{args}); ! } ! catch (Throwable e) { ! System.err.println(e); ! e.printStackTrace(); ! } ! return; ! } ! } ! } ! System.err.println("Babeldoc home: " + home + " is invalid"); } ! public void interrupt() { ! if (babelDocThread != null) { ! try { ! // invoke the interrupt() method ! Method method = babelDocThread.getClass().getDeclaredMethod(INTERRUPT, null); ! method.invoke(babelDocThread,null); ! } ! catch (Throwable e) { ! System.err.println(e); ! } ! } ! } ! /** ! * The starting point for commandline Babeldoc. This then ! * checks the BABELDOC_HOME variable. Gets all the jar and ! * zip files. Proceed with this. ! * ! * @param args command line arguments. Set in script: babeldoc.sh/.bat ! */ ! public static void main(String[] args) { ! String home = System.getProperty(BABELDOC_HOME); ! if (home != null) { ! File fileHome = new File(home); ! if (fileHome.exists() && fileHome.isDirectory()) { ! runBabeldocMain(getLibraryFiles(home), args); ! return; ! } ! } ! ! System.err.println("Babeldoc home: " + home + " is invalid"); } ! /** ! * Get the urls for all the jars and zips in the library directory ! * ! * @param home path to the $BABELDOC_HOME directory ! * ! * @return list of zips and jars from 'lib' subdirectory ! */ ! private static File[] getLibraryFiles(String home) { ! File fileLib = new File(home, LIB); ! if (fileLib.exists() && fileLib.isDirectory()) { ! System.setProperty(BABELDOC_SCANDIR, fileLib.getAbsolutePath()); ! File[] libs = fileLib.listFiles(new FilenameFilter() { ! public boolean accept(File dir, String name) { ! if (name.endsWith(DOT_JAR) || name.endsWith(DOT_ZIP)) { ! return true; ! } else { ! return false; ! } ! } ! }); ! return libs; ! } else { ! System.err.println("The directory: " + fileLib + ! " does not exist or is not a directory. Babeldoc cannot find its library files and is quitting now."); ! } ! return null; ! } ! /** ! * Create a ClassLoader with the list of jars and zips and add them to the ! * classpath. Then call into the CORE Main method. ! * ! * @param files all the zip and the jar files ! * @param args command line arguments ! */ ! private static void runBabeldocMain(File[] files, String[] args) { ! if (files != null) { ! ClassLoader loader = setupClassLoader(files); ! try { ! Class main = loader.loadClass(BABELDOC_MAIN); ! Method method = main.getDeclaredMethod(MAIN, new Class[]{String[].class}); ! Object[] methodArgs = new Object[] { args }; ! ! method.invoke(main, methodArgs); ! return; ! ! } ! catch (java.lang.reflect.InvocationTargetException e) { ! System.err.println(e); ! } ! catch (java.lang.IllegalAccessException e) { ! System.err.println(e); ! } ! catch (java.lang.NoSuchMethodException e) { ! System.err.println(e); ! } ! catch (ClassNotFoundException e) { ! System.err.println(e); ! } ! } } ! /** ! * Setup the particular classloader. There are two: Adaptive ! * and URLClassLoader. Configure either one ! * with the library files. ! * <br/> ! * <strong>NOTE</strong> At the end of the method, this new ! * classloader is applied to the current thread. ! * ! * @param inFiles files discovered in the lib directory ! * @return the classloader with all the library files added. ! */ ! private static ClassLoader setupClassLoader(File[] inFiles) { ! File [] files = incorporateClassPath(inFiles); ! ClassLoader loader = null; ! if(ADAPTIVE.equals(System.getProperty(BABELDOC_CLASSLOADER))) { ! Vector vec = new Vector(files.length); ! for (int i = 0; i < files.length; i++) { ! vec.add(files[i]); ! } ! loader = new AdaptiveClassLoader(vec, false); ! } else { ! URL [] urls = new URL[files.length]; ! for (int i = 0; i < files.length; i++) { ! try { ! urls[i] = files[i].toURL(); ! } catch (MalformedURLException e) { ! System.err.println(e); ! } ! } ! loader = new URLClassLoader(urls); ! } ! Thread.currentThread().setContextClassLoader(loader); ! return loader; } ! /** ! * Load those classpath entries into the grand list of ! * files to place in the classpath ! * ! * @param files ! * @return ! */ ! private static File[] incorporateClassPath(File[] files) { ! File [] cpFiles = getClasspathFiles(); ! if(cpFiles!=null&&cpFiles.length>0) { ! File [] newFiles = new File[cpFiles.length+files.length]; ! int j = 0; ! for (int i = 0; i < files.length; i++) { ! newFiles[j++] = files[i]; ! } ! for(int i = 0; i < cpFiles.length; i++) { ! newFiles[j++] = cpFiles[i]; ! } ! files = newFiles; ! } ! return files; } ! /** ! * Get the files from the classpath - this is a hack to get around the ! * hidden classpath issue when running -jar (which is how babeldoc runs) ! * ! * @return array of files representing the classpath ! */ ! private static File[] getClasspathFiles() { ! String cp = System.getProperty(BABELDOC_CP); ! if(cp!=null) { ! StringTokenizer st = new StringTokenizer(cp, File.pathSeparator); ! Collection files = new ArrayList(); ! while(st.hasMoreTokens()) { ! String token = st.nextToken(); ! File file = new File(token); ! if (file.exists() && ( ! (token.endsWith(DOT_JAR)) || ! (token.endsWith(DOT_ZIP)) || ! (file.isDirectory()) ) ) { ! //System.out.println("Adding: "+token); ! files.add(file); ! } else { ! //System.out.println("Ignoring : "+token); ! } ! } ! return (File[])files.toArray(new File[0]); ! } else { ! return null; ! } } } |
From: Web H. <web...@us...> - 2004-08-10 10:49:16
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14094/modules/core/src/com/babeldoc/core Modified Files: BabeldocCommand.java Main.java Log Message: Modified entry points and supporting files to allow programmatically starting and stopping Babeldoc from within the same JVM. Some problems still exist when restarting, the PipelineStage method getOptions(...) return null, under investigation. Regular method of invocation via babeldoc script files is unchanged. Added some optimisations to method of invocation of "main" methodsvia reflection, now istead of looping thru all available methods, directly retrieve the method of interest. Index: BabeldocCommand.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/BabeldocCommand.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** BabeldocCommand.java 30 Jul 2004 01:32:59 -0000 1.20 --- BabeldocCommand.java 10 Aug 2004 10:49:06 -0000 1.21 *************** *** 195,199 **** * Stopping - execute all necessary shutdown processing. */ ! public void finishUp() { } --- 195,199 ---- * Stopping - execute all necessary shutdown processing. */ ! public void stop() { } *************** *** 295,299 **** public void run() { LogService.getInstance().logDebug(I18n.get("001001")); ! command.finishUp(); } } --- 295,299 ---- public void run() { LogService.getInstance().logDebug(I18n.get("001001")); ! command.stop(); } } Index: Main.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/Main.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Main.java 30 Jul 2004 01:32:59 -0000 1.11 --- Main.java 10 Aug 2004 10:49:06 -0000 1.12 *************** *** 75,78 **** --- 75,80 ---- import java.util.Set; import java.util.Map; + import java.util.List; + import java.util.ArrayList; *************** *** 89,194 **** * @version 1.0 */ ! public class Main { ! /** Service prefix for commands.*/ ! public static final String SERVICE_PREFIX = "Command."; ! /** ! * <p>This method initializes the environment by loading the ! * <code>System.properties</code> from the env/configuration. ! * It then takes the first argument on the command line and ! * finds the service that corresponds to it. It then calls ! * that service. ! * ! * @param args command line arguments ! */ ! public static void handleCommand(String[] args) { ! //load env file. It is necessary for logger configuration ! EnvironmentLoader.loadEnvironment(); - if (args.length > 0) { - String serviceName = args[0]; ! try { ! Class cls = ServiceFactory.getServiceClass(SERVICE_PREFIX + ! serviceName); ! Method[] methods = cls.getDeclaredMethods(); ! boolean hasMain = false; ! for (int i = 0; i < methods.length; ++i) { ! if ("main".equals(methods[i].getName())) { ! Method method = methods[i]; ! Object[] methodArgs = new Object[] { args }; ! try { ! hasMain = true; ! method.invoke(cls, methodArgs); ! return; ! } catch (IllegalAccessException e) { ! com.babeldoc.core.LogService.getInstance().logError(e); ! } catch (IllegalArgumentException e) { ! com.babeldoc.core.LogService.getInstance().logError(e); ! } catch (InvocationTargetException e) { ! com.babeldoc.core.LogService.getInstance().logError(e); ! } ! break; ! } ! } ! if (!hasMain) { ! System.out.println(I18n.get("core.Main.noMainMethod", cls.getName())); ! } ! //throw new ServiceException(); ! } catch (ServiceException e) { ! System.out.println(I18n.get("001011", serviceName)); ! System.out.println(I18n.get("001012")); ! listCommandServices(); ! System.out.println(""); ! } ! } else { ! System.out.println(I18n.get("001012")); ! listCommandServices(); ! String version = ConfigService.getString("env/build", "babeldoc_version"); ! System.out.println("\n\n" + I18n.get("001006", version)); ! System.out.println(I18n.get("001007")); ! System.out.println(I18n.get("001008")); ! System.out.println(I18n.get("001009")); } ! } ! /** ! * List all the command services. ! */ ! public static void listCommandServices() { ! Map services = ServiceFactory.getAllServices(SERVICE_PREFIX); ! if (services != null) { ! Set keys = services.keySet(); ! Object[] objectArray = keys.toArray(); - for (int i = 0; i < objectArray.length; i++) { - if (i != (objectArray.length - 1)) { - System.out.print(objectArray[i] + ", "); - } else { - System.out.print("or "+objectArray[i] + "."); - } - } } ! } ! ! /** ! * The main method of babeldoc command is a little difference. If there is a ! * first argument on the commandline, it will try and load this from the ! * service catalog. Using reflection it will attempt to forward execution to ! * the main method of that class. By this means you can get babeldoc ! * command to run any other command in babeldoc. ! * ! * @param args command line arguments ! */ ! public static void main(String[] args) { ! handleCommand(args); ! } } --- 91,218 ---- * @version 1.0 */ ! public class Main implements Runnable { ! /** Service prefix for commands.*/ ! public static final String SERVICE_PREFIX = "Command."; ! private String[] args; ! private Thread thread; ! private List commandList; ! /** ! * Creates a new <code>Main</code> instance. ! * This is usefull for classes which need to programatically launch and stop ! * Babeldoc. ! * ! */ ! public Main(String[] args) { ! this.args = args; ! commandList = new ArrayList(); ! thread = new Thread(this); ! thread.start(); ! } ! public void run() { ! commandList.add(handleCommand(args)); ! } ! public void interrupt() { ! thread.interrupt(); ! // interrupt any commands that were started as well ! BabeldocCommand command; ! for (int i = 0; i < commandList.size(); i++) { ! command = (BabeldocCommand)commandList.get(i); ! command.stop(); ! } ! } ! /** ! * <p>This method initializes the environment by loading the ! * <code>System.properties</code> from the env/configuration. ! * It then takes the first argument on the command line and ! * finds the service that corresponds to it. It then calls ! * that service. ! * ! * @param args command line arguments ! */ ! public static BabeldocCommand handleCommand(String[] args) { ! BabeldocCommand command = null; ! //load env file. It is necessary for logger configuration ! EnvironmentLoader.loadEnvironment(); ! if (args.length > 0) { ! String serviceName = args[0]; ! try { ! Class cls = ServiceFactory.getServiceClass(SERVICE_PREFIX + ! serviceName); ! try { ! Method method = cls.getDeclaredMethod("main",new Class[]{String[].class}); ! Object[] methodArgs = new Object[] { args }; ! ! command = (BabeldocCommand)method.invoke(cls, methodArgs); ! ! return command; ! } catch (IllegalAccessException e) { ! com.babeldoc.core.LogService.getInstance().logError(e); ! } catch (NoSuchMethodException e) { ! System.out.println(I18n.get("core.Main.noMainMethod", cls.getName())); ! com.babeldoc.core.LogService.getInstance().logError(e); ! } catch (IllegalArgumentException e) { ! com.babeldoc.core.LogService.getInstance().logError(e); ! } catch (InvocationTargetException e) { ! com.babeldoc.core.LogService.getInstance().logError(e); ! } ! //throw new ServiceException(); ! } catch (ServiceException e) { ! System.out.println(I18n.get("001011", serviceName)); ! System.out.println(I18n.get("001012")); ! listCommandServices(); ! System.out.println(""); ! } ! } else { ! System.out.println(I18n.get("001012")); ! listCommandServices(); ! String version = ConfigService.getString("env/build", "babeldoc_version"); ! System.out.println("\n\n" + I18n.get("001006", version)); ! System.out.println(I18n.get("001007")); ! System.out.println(I18n.get("001008")); ! System.out.println(I18n.get("001009")); } ! return command; ! } ! /** ! * List all the command services. ! */ ! public static void listCommandServices() { ! Map services = ServiceFactory.getAllServices(SERVICE_PREFIX); ! if (services != null) { ! Set keys = services.keySet(); ! Object[] objectArray = keys.toArray(); ! for (int i = 0; i < objectArray.length; i++) { ! if (i != (objectArray.length - 1)) { ! System.out.print(objectArray[i] + ", "); ! } else { ! System.out.print("or "+objectArray[i] + "."); ! } ! } ! } } ! /** ! * The main method of babeldoc command is a little difference. If there is a ! * first argument on the commandline, it will try and load this from the ! * service catalog. Using reflection it will attempt to forward execution to ! * the main method of that class. By this means you can get babeldoc ! * command to run any other command in babeldoc. ! * ! * @param args command line arguments ! */ ! public static void main(String[] args) { ! handleCommand(args); ! } } |
From: Web H. <web...@us...> - 2004-08-09 10:01:06
|
Update of /cvsroot/babeldoc/babeldoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30904 Modified Files: quickstart-en.txt Log Message: Updated the readme to no longer mention the .bat and .sh scripts Index: quickstart-en.txt =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/quickstart-en.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** quickstart-en.txt 4 Sep 2003 03:16:53 -0000 1.6 --- quickstart-en.txt 9 Aug 2004 10:00:58 -0000 1.7 *************** *** 5,22 **** -------------- a. Java JDK 1.4.1 or later. ! b. Windows / Unix ! 2. Unpacking ------------ a. Unpack the zip or tar.gz into a directory, babeldoc 3. Building (if required) ----------- ! a. Windows: build setup build ! b. Unix: ./build.sh setup build ! ! (you might need to make the build.sh script executable) --- 5,21 ---- -------------- a. Java JDK 1.4.1 or later. ! b. Ant 1.6.2 or later 2. Unpacking ------------ a. Unpack the zip or tar.gz into a directory, babeldoc + b. If using the cvs copy, check out the required module as per the + instructions here http://sourceforge.net/cvs/?group_id=56976 3. Building (if required) ----------- ! a. Unix, Windows, Linux, from the command prompt type : ! ant build |
From: Web H. <web...@us...> - 2004-08-09 09:51:36
|
Update of /cvsroot/babeldoc/babeldoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29172 Modified Files: build.xml Log Message: All generated files now go in build directory, including bootstrap classes. "ant clean" will now revert the workspace to exactly it's state after cvs checkout. Index: build.xml =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/build.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** build.xml 5 Aug 2004 08:14:17 -0000 1.20 --- build.xml 9 Aug 2004 09:51:28 -0000 1.21 *************** *** 16,20 **** <property name="base_dir" value="${basedir}"/> ! <property name="babeldoc.bootstrap.jar" value="${basedir}/support/ant/lib/babeldoc_bootstrap.jar" /> <property name="jalopy.jar" value="${basedir}/support/jalopy/lib/jalopy-ant-0.6.1.jar" /> --- 16,24 ---- <property name="base_dir" value="${basedir}"/> ! <property name="build.dir" value="${basedir}/build" /> ! <property name="support.build.dir" value="${basedir}/build/support" /> ! <property name="support.classes.dir" value="${support.build.dir}/classes" /> ! <property name="support.lib.dir" value="${support.build.dir}/lib" /> ! <property name="babeldoc.bootstrap.jar" value="${support.lib.dir}/babeldoc_bootstrap.jar" /> <property name="jalopy.jar" value="${basedir}/support/jalopy/lib/jalopy-ant-0.6.1.jar" /> *************** *** 81,87 **** name="bootstrap" description="Compile the bootstrap babeldoc classes"> ! <mkdir dir="support/build"/> <javac ! destdir="support/build" srcdir="support/src" deprecation="${compile.deprecation}" --- 85,93 ---- name="bootstrap" description="Compile the bootstrap babeldoc classes"> ! <mkdir dir="${support.build.dir}"/> ! <mkdir dir="${support.lib.dir}"/> ! <mkdir dir="${support.classes.dir}"/> <javac ! destdir="${support.classes.dir}" srcdir="support/src" deprecation="${compile.deprecation}" *************** *** 93,97 **** <jar jarfile="${babeldoc.bootstrap.jar}" ! basedir="support/build"/> </target> --- 99,103 ---- <jar jarfile="${babeldoc.bootstrap.jar}" ! basedir="${support.classes.dir}"/> </target> *************** *** 142,146 **** <modulefinder ! moduleSearchPath="${modules} ${extra.modules}" modulesProperty="babeldoc_modules" subdirectories="src build config" --- 148,152 ---- <modulefinder ! moduleSearchPath="${modules} ${extra.modules}" modulesProperty="babeldoc_modules" subdirectories="src build config" *************** *** 179,192 **** </target> ! <!-- ! Clean target - call clean on all the modules ! --> <target ! name="clean" depends="depends"> - <delete dir="${build}"/> <moduleRunner target="clean" modules="${babeldoc_modules}"/> </target> <!-- Setup the project --- 185,201 ---- </target> ! <!-- Clean target - call clean on all the modules --> <target ! name="module_clean" depends="depends"> <moduleRunner target="clean" modules="${babeldoc_modules}"/> </target> + <!-- Clean target - clean all generated directories --> + <target + name="clean"> + <delete dir="${build}"/> + </target> + <!-- Setup the project |
From: Web H. <web...@us...> - 2004-08-09 09:38:41
|
Update of /cvsroot/babeldoc/babeldoc/support/ant/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27503/support/ant/lib Removed Files: babeldoc_bootstrap.jar Log Message: This file should not be in CVS - it is build as part of the workspace. --- babeldoc_bootstrap.jar DELETED --- |
From: bruce m. <tr...@us...> - 2004-08-06 18:46:07
|
Update of /cvsroot/babeldoc/babeldoc/readme/userguide In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24050/readme/userguide Modified Files: chapter1.xml chapter7.xml Log Message: documentation, javadoc and formatting here. Index: chapter1.xml =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/userguide/chapter1.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** chapter1.xml 14 Apr 2004 20:13:41 -0000 1.6 --- chapter1.xml 6 Aug 2004 18:45:57 -0000 1.7 *************** *** 89,96 **** <computeroutput> <simplelist> <member>Usage: babeldoc <command></member> <member>where command must be one of:</member> <member>xls2xml, scanmon, addstagewiz, setupwiz, lightconfig, sqlload, pipeline, setentrywiz, journal, process, journalbrowser, flat2xml, scanner, guiprocess, pipelineb uilder, babelfish, module.</member> ! <member>Babeldoc 1.2.1 Copyright (C) 2002 Bruce McDonald, Dejan Krsmanovic, et al.</member> <member>Babeldoc comes with ABSOLUTELY NO WARRANTY;</member> <member>This is free software, and you are welcome to redistribute it under certain conditions</member> --- 89,100 ---- <computeroutput> <simplelist> + <member>*** This is Babeldoc! ***</member> + <member> </member> <member>Usage: babeldoc <command></member> + <member> </member> <member>where command must be one of:</member> <member>xls2xml, scanmon, addstagewiz, setupwiz, lightconfig, sqlload, pipeline, setentrywiz, journal, process, journalbrowser, flat2xml, scanner, guiprocess, pipelineb uilder, babelfish, module.</member> ! <member> </member> ! <member>Babeldoc 1.3.0 Copyright (C) 2002,2003,2004 The Babeldoc Team!!</member> <member>Babeldoc comes with ABSOLUTELY NO WARRANTY;</member> <member>This is free software, and you are welcome to redistribute it under certain conditions</member> *************** *** 279,291 **** <section> <title>Setting up a new project</title> ! <para>This section briefly describes the steps necessary to setup a new babeldoc project. It is assumed that <productname>Babeldoc</productname> is installed in c:\babeldoc.</para> ! <itemizedlist> ! <listitem>Create a project directory: c:\project (for instance)</listitem> ! <listitem>Add the following variables to your environment</listitem> ! <listitem>BABELDOC_HOME - This variable must point to the root of your babeldoc binary installation, <userinput>c:\babeldoc</userinput>. At a minimum it must contain the bin and lib directories. The bin directory must contain the babeldoc run scripts and the lib directory must contain all the babeldoc Java archive (JAR) files</listitem> ! <listitem>BABELDOC_USER - This variable must point to your project directory, <userinput>c:\project</userinput>, in this case</listitem> ! <listitem>PATH - Add the <userinput>c:\babeldoc\bin</userinput> directory to your path. This is not absolutely required, but will make running babeldoc easier by cutting down the commandline length</listitem> ! <listitem>Add the configuration directories to the <userinput>c:\project</userinput> directory. These could include <userinput>pipeline</userinput>, <userinput>journal</userinput>, etc </listitem> ! </itemizedlist> </section> --- 283,302 ---- <section> <title>Setting up a new project</title> ! <para>This section briefly describes the steps necessary to setup a new <productname>Babeldoc</productname> project. In the interests of brevity, the following assumptions are made:</para> ! <itemizedlist> ! <listitem>You are on a MS Windows environment.</listitem> ! <listitem>You have installed the Java SDK into the <userinput>c:\j2sdk1.4.2_04</userinput> directory.</listitem> ! <listitem><productname>Babeldoc</productname> is installed in the <userinput>c:\babeldoc</userinput> directory.</listitem> ! <listitem>Your project is in the <userinput>c:\project</userinput> directory.</listitem> ! </itemizedlist> ! <para>The simplest method of configuring your environment is to create a setup batch file in the project directory. This file is usually called <userinput>setup.bat</userinput> but the name is unimportant. The purpose of the file is to configure the local environment so that <productname>Babeldoc</productname> can run. The contents of this file for this environment is given below:</para> ! <simplelist> ! <member>@echo off</member> ! <member>set JAVA_HOME=c:\j2sdk1.4.2_04</member> ! <member>set BABELDOC_HOME=c:\babeldoc</member> ! <member>set BABELDOC_USER=c:\project</member> ! <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.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** chapter7.xml 14 Apr 2004 20:13:41 -0000 1.1 --- chapter7.xml 6 Aug 2004 18:45:57 -0000 1.2 *************** *** 1,70 **** <?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.</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> ! </chapter> --- 1,92 ---- <?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> |