Package eu.planets_project.pp.plato.util

Examples of eu.planets_project.pp.plato.util.CommandExecutor.runCommand()


        if (workingDir != null) {
            cmdExecutor.setWorkingDirectory(workingDir);
        }
        long startTime = System.nanoTime();
        try {
            int exitStatus = cmdExecutor.runCommand(command);
            r.setSuccess(exitStatus == 0);
            r.setReport(cmdExecutor.getCommandError());
           
            if (r.isSuccess() && "".equals(r.getReport())) {
                String report = cmdExecutor.getCommandOutput();
View Full Code Here


            cmdExecutor.setWorkingDirectory(getConfigParam());
            /* now we have to expand the command with the working directory! */
            String cmd = getConfigParam() + extractorCommand.replace("%FILE%", file)
                                         .replace("%XCDL%", outXCDL);
           
            int exitStatus = cmdExecutor.runCommand(cmd);
            if (exitStatus == 0) {
               // WHAT IS THE OUTPUT FILE??
            } else {
                log.error("Problem calling Extractor on file "+file+" : "+cmdExecutor.getCommandError());
                outXCDL = null;
View Full Code Here

            String cmd = getConfigParam() + comparatorCommand.replace("%XCDL1%", in)
                                          .replace("%XCDL2%", out)
                                          .replace("%PCR%", pcr)
                                          .replace("%OUTDIR%", workingDir);
           
            int exitStatus = cmdExecutor.runCommand(cmd);
            if (exitStatus != 0) {
                log.error("Problem calling Comparator on files "+in+", "+out+", "+pcr+" : "+cmdExecutor.getCommandError());
                return "";
            }
        } catch (Exception e) {
View Full Code Here

       
        CommandExecutor cmdEx = new CommandExecutor();
        cmdEx.setWorkingDirectory(OS.getTmpPath());
        String command = commandTemplate.replace("%METRIC%", metric);
        try {
            cmdEx.runCommand(command);
            String out = cmdEx.getCommandError();
            log.debug(command+ " == "+out);
            Double value = Scale.MAX_VALUE;

            try {
View Full Code Here

            String commandLine = FITS_COMMAND.replace("%FITS_EXEC%", scriptExt)
                .replace("%INPUT%", input.getAbsolutePath())
                .replace("%OUTPUT%", output.getAbsolutePath());
           
            try {
                int exitcode = cmdExecutor.runCommand(commandLine);
                if (exitcode != 0) {
                    String cmdError = cmdExecutor.getCommandError();
                    throw new PlatoServiceException("FITS characterisation for file: " + input + " failed: " + cmdError);
                }
                if (!output.exists()) {
View Full Code Here

            cmdExecutor.setWorkingDirectory(extractorHome);
            /* now we have to expand the command with the working directory! */
            String cmd = extractorHome + extractorCommand.replace("%FILE%", filename)
                                         .replace("%XCDL%", outXCDL);
           
            int exitStatus = cmdExecutor.runCommand(cmd);
            if (exitStatus == 0) {
               // WHAT IS THE OUTPUT FILE??
            } else {
                log.error("Problem calling Extractor on file "+filename+" : "+cmdExecutor.getCommandError());
                outXCDL = null;
View Full Code Here

            String cmd = comparatorHome + comparatorCommand.replace("%XCDL1%", in)
                                          .replace("%XCDL2%", out)
                                          .replace("%PCR%", pcr)
                                          .replace("%OUTDIR%", workingDir);
           
            int exitStatus = cmdExecutor.runCommand(cmd);
            if (exitStatus != 0) {
                log.error("Problem calling Comparator on files "+in+", "+out+", "+pcr+" : "+cmdExecutor.getCommandError());
                return "";
            }
        } catch (Exception e) {
View Full Code Here

       
        try {
            CommandExecutor cmdExecutor = new CommandExecutor();
            cmdExecutor.setWorkingDirectory(xclExplorerPath);
            try {
                int exitStatus = cmdExecutor.runCommand(command);
                // r.setSuccess(exitStatus == 0);
                //r.setReport(cmdExecutor.getCommandError());
            } catch (Exception e) {
              log.error(e.getMessage(),e);
            }
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.