Package eu.planets_project.pp.plato.model

Examples of eu.planets_project.pp.plato.model.Alternative


       
        if (registry == null) {
            return false;
        }
       
        Alternative recommendedAlternative = selectedPlan.getRecommendation().getAlternative();
       
        if (recommendedAlternative.getAction() == null) {
            return false;
        }
       
        if ("MiniMEE-migration".equals(recommendedAlternative.getAction().getActionIdentifier())) {

            String toolIdentifier = getToolIdentifier(registry);
           
            if (toolIdentifier != null && !"".equals(toolIdentifier)) {
                return true;
View Full Code Here


        return false;
    }
   
    private String getToolIdentifier(IPreservationActionRegistry registry) {
       
        Alternative recommendedAlternative = selectedPlan.getRecommendation().getAlternative();
               
        String toolIdentifier = registry.getToolIdentifier(recommendedAlternative.getAction().getUrl());
       
        return toolIdentifier;
    }
View Full Code Here

                minimee = par;
                break;
            }
        }
       
        Alternative recommendedAlternative = selectedPlan.getRecommendation().getAlternative();
       
        if (minimee != null) {
            registry = PreservationActionRegistryFactory.getInstance(minimee);
        }
       
View Full Code Here

   
    private void generateEprintsExecutablePlan() {
       
        IPreservationActionRegistry registry = getMiniMeeRegistry();
       
        Alternative recommendedAlternative = selectedPlan.getRecommendation().getAlternative();
       
        Element eprintsPlan = new Element("eprintsPlan");
       
        Element tool = new Element("tool");
       
        eprintsPlan.addContent(tool);
       
        String id = getToolIdentifier(registry);
       
        Element toolIdentifier = new Element("toolIdentifier").setAttribute("uri", id);
       
        tool.addContent(toolIdentifier);
       
        String settings = selectedPlan.getRecommendation().getAlternative().getExperiment().getSettings();
       
        String toolParameters = registry.getToolParameters(recommendedAlternative.getAction().getUrl());
       
        if (settings != null) {
            toolParameters += (" " + settings);   
        }
       
        // TODO: we shouldn't need that here, this should come from the registry
        //       at the moment we only have the OUTFILE which is not enough. we anticipate
        //       that the tool can work with the structure <params> <input file> <output file>
        // CB: from the minimee experience, you CANNOT always assume that!
        // e.g. -i IN -o OUT etc.! or even TOOL -param IN > OUT etc.
        toolParameters += (" " + "%INFILE% %OUTFILE%");
       
        Element parameters = new Element("parameters").setAttribute("toolParameters", toolParameters);
        tool.addContent(parameters);
       
        Element targetFormat = new Element("targetFormat").setText(recommendedAlternative.getAction().getTargetFormat());
        tool.addContent(targetFormat);
       
        XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
       
        ByteArrayOutputStream byteArray = new ByteArrayOutputStream();
View Full Code Here

TOP

Related Classes of eu.planets_project.pp.plato.model.Alternative

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.