Package org.wikipediacleaner.gui.swing.basic

Examples of org.wikipediacleaner.gui.swing.basic.BasicWorker


    }
    String action = args[0];
    currentArg++;

    // Execute action depending on the parameters
    BasicWorker worker = null;
    if ("UpdateDabWarnings".equalsIgnoreCase(action)) {
      Configuration config = Configuration.getConfiguration();
      String start = config.getString(null, ConfigurationValueString.LAST_DAB_WARNING);
      worker = new UpdateDabWarningWorker(wiki, null, start);
    } else if ("UpdateISBNWarnings".equalsIgnoreCase(action)) {
      worker = new UpdateISBNWarningWorker(wiki, null, false);
    } else if ("ListISBNWarnings".equalsIgnoreCase(action)) {
      worker = new UpdateISBNWarningWorker(wiki, null, true);
    } else if ("FixCheckWiki".equalsIgnoreCase(action)) {
      List<CheckErrorAlgorithm> algorithms = new ArrayList<CheckErrorAlgorithm>();
      List<CheckErrorAlgorithm> allAlgorithms = new ArrayList<CheckErrorAlgorithm>();
      for (int i = 1; i < args.length; i++) {
        boolean addition = false;
        String algorithmNumber = args[i];
        if (algorithmNumber.startsWith("+")) {
          addition = true;
          algorithmNumber = algorithmNumber.substring(1);
        }
        CheckErrorAlgorithm algorithm = CheckErrorAlgorithms.getAlgorithm(wiki, Integer.parseInt(algorithmNumber));
        if (algorithm != null) {
          if (!addition) {
            algorithms.add(algorithm);
          }
          allAlgorithms.add(algorithm);
        }
      }
      worker = new AutomaticCWWorker(
          wiki, null, algorithms, 10000, allAlgorithms, null, true, false);
    }
    if (worker != null) {
      worker.setListener(this);
      worker.setTimeLimit(timeLimit);
      worker.start();
    }
  }
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.gui.swing.basic.BasicWorker

Copyright © 2018 www.massapicom. 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.