Package entagged.listing

Examples of entagged.listing.ListingProcessor


    for (int i = 0; i < selection.length; i++) {
      if (selection[i].getParent() != null)
        pruneStruct.excludeDirectory(selection[i].getParent());
    }
    try {
      ListingProcessor lpc = new ListingProcessor(new FileProcessor(
          this.processingResult, renameConfig), renameConfig
          .getSelection());
      ListingProgressDialog lpd = new ListingProgressDialog(
          getParentFrame());
      lpd.setLocationRelativeTo(null);
      lpc.setListingProgressListener(lpd);
      lpd.setModal(false);
      lpd.setVisible(true);
      lpc.start().join();
      lpd.processingFinished();
      lpd.dispose();
      // If an exception has occured during processing
      if (lpc.getLastSeriouseException() != null) {
        // Throw it, this blocks exception catch diplays the error.
        throw lpc.getLastSeriouseException();
      }
      // If not aborted, display results
      if (!lpd.abort()) {
        /*
         * Now some statistics must be refreshed if the directory pattern
View Full Code Here


        dialog.setVisible(true);
        if (!dialog.isCancelled()) {
            ReportConfig config = reportTask.getConfiguration();
            File source = new File(config.getSourceDirectory());
            File target = new File(config.getReportFile());
            ListingProcessor proc = new ListingProcessor(new File[] { source },
                    config.isRecursive(), target, config.getTransformType());
            proc.setVerbose(true);
            ListingProgressDialog lpd = new ListingProgressDialog(dialog);
            if ((config.getTransformType() & ListingProcessor.REPORT_OTHER) > 0) {
                lpd.setModal(false);
            }
            centerDialog(lpd);
            proc.setListingProgressListener(lpd);
            try {
                Thread thread = proc.start();
                lpd.setVisible(true);
                thread.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            if (config.getTransformType() == ListingProcessor.REPORT_OTHER
                    && !lpd.abort()) {
                /*
                 * Now we need to transform.
                 */
                try {
                    lpd
                            .appendMessage("\n"
                                    + LangageManager
                                            .getProperty("listgen.transformation.start"));
                    FileOutputStream fos = new FileOutputStream(target);
                    ByteArrayInputStream bais = new ByteArrayInputStream(proc
                            .getLister().getContent().getBytes());
                    XslTransformer.process(bais, fos, config
                            .getTransformTarget());
                    fos.flush();
                    fos.close();
View Full Code Here

     * @param dir
     *                   Directory which should be processed.
     * @return A Stringbuffer containing the report.
     */
    public StringBuffer generateListing(File dir) {
        this.processor = new ListingProcessor(listingCreator,
                new File[] { dir });
        this.processor.setVerbose(this.verbose);
        this.processor.run();
        return new StringBuffer(this.listingCreator.getContent());
    }
View Full Code Here

        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                lpd.setVisible(true);
            }
        });
        ListingProcessor processor = new ListingProcessor(collector, files);
        processor.setListingProgressListener(lpd);

        try {
            processor.start().join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        lpd.dispose();
View Full Code Here

TOP

Related Classes of entagged.listing.ListingProcessor

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.