Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/eireneh/bible/book/ser/SerUtil.java


1   package com.eireneh.bible.book.ser;
2   
3   import java.net.*;
4   
5   import com.eireneh.util.*;
6   import com.eireneh.bible.util.*;
7   import com.eireneh.bible.book.*;
8   import com.eireneh.config.*;
9   
10  import com.eireneh.util.config.*;
11  import com.eireneh.swing.config.*;
12  import com.eireneh.bible.util.config.*;
13  import com.eireneh.bible.book.config.*;
14  import com.eireneh.bible.book.raw.config.*;
15  import com.eireneh.bible.book.sword.config.*;
16  import com.eireneh.bible.control.test.swing.*;
17  
18  /**
19   * Quick utils stuff for the SerBible classes
20   *
21   * <table border='1' cellPadding='3' cellSpacing='0' width="100%">
22   * <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
23   * Distribution Licence:<br />
24   * Project B is free software; you can redistribute it
25   * and/or modify it under the terms of the GNU General Public License,
26   * version 2 as published by the Free Software Foundation.<br />
27   * This program is distributed in the hope that it will be useful,
28   * but WITHOUT ANY WARRANTY; without even the implied warranty of
29   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30   * General Public License for more details.<br />
31   * The License is available on the internet
32   * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
33   * <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
34   * MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
35   * The copyright to this program is held by it's authors.
36   * </font></td></tr></table>
37   * @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
38   * @see docs.Licence
39   * @author Joe Walker
40   * @version D0.I0.T0
41   */
42  public class SerUtil
43  {
44      /**
45       * A quick hack to convert the old serialized system to a the new ascii
46       * version.
47       */
48      public static void main(String[] args)
49      {
50          try
51          {
52              Project.init("jbuilder");
53  
54              URL config_url = NetUtil.lengthenURL(Project.getConfigRoot(), "Tools.properties");
55  
56              LookAndFeelChoices plaf_class = new LookAndFeelChoices();
57              Config config = new Config("Tool Shed Options");
58              config.add("Bibles.Cache Versions", new CacheBiblesChoice());
59              config.add("Bibles.Raw.Cache Data", new CacheDataChoice());
60  
61              config.add("Reports.File", new FileChoice());
62              config.add("Reports.Log to StdOut", new StdOutCaptureLogChoice());
63              config.add("Reports.Exceptions to StdOut", new StdOutCaptureInformChoice());
64              config.add("Reports.Exceptions to Dialog Box", new DisplayExceptionChoice());
65              config.add("Reports.Exceptions to Log Window", new ShelfExceptionChoice());
66  
67              config.add("Advanced.Source Path", new SourcePathChoice());
68              config.add("Advanced.User Level", new UserLevelChoice());
69              config.add("Advanced.Available Drivers", new DriversChoice());
70  
71              config.permanentToLocal(config_url);
72              config.localToApplication(true);
73  
74              SerBible ser = (SerBible) Bibles.getBible("av-ser");
75  
76              // ser.convert();
77          }
78          catch (Exception ex)
79          {
80              Reporter.informUser(SerBible.class, ex);
81          }
82      }
83  
84  }