Package jimm.util

Examples of jimm.util.Getopts.option()


    DataVision dv = new DataVision();

    // Language
    if (g.hasOption('g') || g.hasOption('i'))
  I18N.setLanguage(new Locale(g.option('g', "").toLowerCase(),
            g.option('i', "").toUpperCase()));

    dv.layoutEngineChoiceFromOptions(g);
    dv.dataSourceFromOptions(g);
View Full Code Here


    DataVision dv = new DataVision();

    // Language
    if (g.hasOption('g') || g.hasOption('i'))
  I18N.setLanguage(new Locale(g.option('g', "").toLowerCase(),
            g.option('i', "").toUpperCase()));

    dv.layoutEngineChoiceFromOptions(g);
    dv.dataSourceFromOptions(g);

    if (dv.hasLayoutEngine()) {
View Full Code Here

      ErrorHandler.useGUI(true);
  else if (!g.hasOption('n') && !g.hasOption('p') && !g.hasOption('e'))
      usage(I18N.get("DataVision.n_or_p"));
    }

    dv.paramXMLFile = g.option('r', null); // Parameter XML file name or null
    dv.reportDir = g.option('R', null); // Report Directory or null
    dv.outputDir = g.option('o', null); // Output Directory or null

    // Store the report directory in the preferences for this package
    // These values are stored in the root package jimm.datavision
View Full Code Here

  else if (!g.hasOption('n') && !g.hasOption('p') && !g.hasOption('e'))
      usage(I18N.get("DataVision.n_or_p"));
    }

    dv.paramXMLFile = g.option('r', null); // Parameter XML file name or null
    dv.reportDir = g.option('R', null); // Report Directory or null
    dv.outputDir = g.option('o', null); // Output Directory or null

    // Store the report directory in the preferences for this package
    // These values are stored in the root package jimm.datavision
    if (dv.reportDir != null) {
View Full Code Here

      usage(I18N.get("DataVision.n_or_p"));
    }

    dv.paramXMLFile = g.option('r', null); // Parameter XML file name or null
    dv.reportDir = g.option('R', null); // Report Directory or null
    dv.outputDir = g.option('o', null); // Output Directory or null

    // Store the report directory in the preferences for this package
    // These values are stored in the root package jimm.datavision
    if (dv.reportDir != null) {
        prefs.put("reportDir",dv.reportDir);
View Full Code Here

public void testSimpleCommandLine() {
    String[] args = { "-p", "password", "filename" };
    Getopts g = new Getopts("cdhlxnp:s:r:", args);

    assertTrue(!g.error());
    assertEquals("password", g.option('p'));
    assertEquals(1, g.argc());
    assertEquals("filename", g.argv(0));
}

public static void main(String[] args) {
View Full Code Here

    boolean verbose = g.hasOption('v');
    try {
  // Load the database JDBC driver
  if (verbose) System.out.println("loading driver");
  Driver d = (Driver)Class.forName(g.option('d')).newInstance();
  if (verbose) System.out.println("registering driver");
  DriverManager.registerDriver(d);

  // Connect to the database
  if (verbose) System.out.println("creating database connection");
View Full Code Here

  if (verbose) System.out.println("registering driver");
  DriverManager.registerDriver(d);

  // Connect to the database
  if (verbose) System.out.println("creating database connection");
  Connection conn = DriverManager.getConnection(g.option('c'),
                  g.option('u'),
                  g.option('p'));

  // If verbose, read table names and print them
  if (verbose) {
View Full Code Here

  DriverManager.registerDriver(d);

  // Connect to the database
  if (verbose) System.out.println("creating database connection");
  Connection conn = DriverManager.getConnection(g.option('c'),
                  g.option('u'),
                  g.option('p'));

  // If verbose, read table names and print them
  if (verbose) {
      DatabaseMetaData dbmd = conn.getMetaData();
View Full Code Here

  // Connect to the database
  if (verbose) System.out.println("creating database connection");
  Connection conn = DriverManager.getConnection(g.option('c'),
                  g.option('u'),
                  g.option('p'));

  // If verbose, read table names and print them
  if (verbose) {
      DatabaseMetaData dbmd = conn.getMetaData();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.