Package eu.planets_project.pp.plato.services.action

Examples of eu.planets_project.pp.plato.services.action.IPreservationActionRegistry


   
    public List<PreservationActionDefinition> queryRegistry(FormatInfo formatInfo,
            PreservationActionRegistryDefinition registry)
            throws PlatoServiceException
    {
        IPreservationActionRegistry serviceLocator = null;
        try {
            serviceLocator = PreservationActionRegistryFactory.getInstance(registry);
        } catch (IllegalArgumentException e1) {
            throw new PlatoServiceException( "Registry:  " + registry.getShortname() + " has changed and needs to be reconfigured.");
        }
        if (serviceLocator == null) {
            throw new PlatoServiceException ("Failed to access " + registry.getShortname());
        }
        // query the registry
        return serviceLocator.getAvailableActions(formatInfo);
    }
View Full Code Here


        return true;
    }
   
    public boolean isEprintsPlanPossible() {
       
        IPreservationActionRegistry registry = getMiniMeeRegistry();
       
        if (registry == null) {
            return false;
        }
       
View Full Code Here

    }

   
    private IPreservationActionRegistry getMiniMeeRegistry() {
       
        IPreservationActionRegistry registry = null;
       
        List<PreservationActionRegistryDefinition> list = PreservationActionRegistryFactory.getAvailableRegistries();
       
        PreservationActionRegistryDefinition minimee = null;
        for (PreservationActionRegistryDefinition par : list) {
            if (par.getType().equalsIgnoreCase(MiniMeeServiceRegistry.class.getName())) {
                minimee = par;
                break;
            }
        }
       
        Alternative recommendedAlternative = selectedPlan.getRecommendation().getAlternative();
       
        if (minimee != null) {
            registry = PreservationActionRegistryFactory.getInstance(minimee);
        }
       
        if (registry != null) {
            try {
                registry.connect("");
            } catch (MalformedURLException e) {
            } catch (ServiceException e) {
            }
        }
       
View Full Code Here

      selectedPlan.getExecutablePlanDefinition().setExecutablePlan(byteArray.toString());
    }
   
    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);   
        }
       
View Full Code Here

TOP

Related Classes of eu.planets_project.pp.plato.services.action.IPreservationActionRegistry

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.