Package eu.scape_project.planning.evaluation

Examples of eu.scape_project.planning.evaluation.EvaluatorException


        workflowDescription.readMetadata();

        if (!workflowDescription.getProfile().equals("http://purl.org/DP/components#Characterisation")
            && !workflowDescription.getProfile().equals("http://purl.org/DP/components#QAObjectComparison")) {
            LOG.warn("The workflow {} is no CC or QA component.", service.getDescriptor());
            throw new EvaluatorException("The workflow " + service.getDescriptor() + " is no CC or QA component.");
        }

        // Input
        if (workflowDescription.getProfile().equals("http://purl.org/DP/components#Characterisation")) {
            setCCInputData(workflowDescription, result, tavernaExecutor);
        } else {
            setQAInputData(workflowDescription, sample, result, tavernaExecutor);
        }

        // Workflow
        tavernaExecutor.setWorkflow(service.getContentUri());

        // Output ports to receive
        List<Port> outputPorts = workflowDescription.getOutputPorts();
        Set<String> outputPortNames = new HashSet<String>(outputPorts.size());
        for (Port p : outputPorts) {
            outputPortNames.add(p.getName());
        }
        tavernaExecutor.setOutputPorts(outputPortNames);

        // Execute
        try {
            tavernaExecutor.execute();
        } catch (IOException e) {
            LOG.error("Error connecting to execution server", e);
            throw new EvaluatorException("Error connecting to execution server", e);
        } catch (TavernaExecutorException e) {
            LOG.error("Error executing taverna workflow", e);
            throw new EvaluatorException("Error executing taverna workflow", e);
        }

        Map<String, ?> outputData = tavernaExecutor.getOutputData();
        for (Port p : outputPorts) {
            String measure = p.getValue();
View Full Code Here


                inputData.put(p.getName(),
                    tavernaExecutor.new ByteArraySourceFile(FileUtils.makeFilename(digitalObject.getFullname()),
                        digitalObject.getData().getData()));
            } else {
                LOG.warn("The workflow has an unsupported port {} of type {}", p.getName(), p.getValue());
                throw new EvaluatorException("The workflow has an unsupported port " + p.getName() + " that accepts "
                    + p.getValue());
            }
        }

        tavernaExecutor.setInputData(inputData);
View Full Code Here

                    inputData.put(p.getName(),
                        tavernaExecutor.new ByteArraySourceFile(FileUtils.makeFilename(digitalObject2.getFullname()),
                            digitalObject2.getData().getData()));
                } else {
                    LOG.warn("The workflow has an unsupported port {} of type {}", p.getName(), p.getValue());
                    throw new EvaluatorException("The workflow has an unsupported port " + p.getName()
                        + " that accepts " + p.getValue());
                }
            }
        }
        tavernaExecutor.setInputData(inputData);
View Full Code Here

                }
            }
            return results;

        } catch (ParserConfigurationException e) {
            throw new EvaluatorException("Could not access PCDL descriptor", e);
        } catch (SAXException e) {
            throw new EvaluatorException("Could not access PCDL descriptor", e);
        } catch (IOException e) {
            throw new EvaluatorException("Could not access PCDL descriptor", e);
        }
    }
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.evaluation.EvaluatorException

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.