Package eu.scape_project.planning.services.action

Examples of eu.scape_project.planning.services.action.ActionInfo


            log.error("querying miniREEF/P2 knowledge base failed for statement: " + statement);
            return result;
        }

        for (int i = 0; i < resultSet.size(); i++) {
            ActionInfo def = new ActionInfo();
            def.setShortname("Convert using " + resultSet.getRow(i).get(0) + " " + resultSet.getRow(i).get(1));
            def.setTargetFormat(resultSet.getRow(i).get(2) + " " + resultSet.getRow(i).get(3));
            def.setInfo("by " + resultSet.getRow(i).get(4));
            def.setActionIdentifier("P2");
            def.setExecutable(false);
            // if (service.getTargetFormat() != null) {
            // def.setTargetFormat(service.getTargetFormat().getDefaultExtension());
            // def.setTargetFormatInfo(service.getTargetFormat());
            // }
            // def.setInfo(service.getDescription());
View Full Code Here


    public List<IServiceInfo> getAvailableActions(FormatInfo sourceFormat) throws PlatoException {
        List<PreservationActionService> services = registry.findServices(sourceFormat, null);
        ArrayList<IServiceInfo> result = new ArrayList<IServiceInfo>();
        for (PreservationActionService service : services) {
            ActionInfo def = new ActionInfo();
            def.setShortname(service.getName());
            if (service.getTargetFormat() != null) {
                def.setTargetFormat(service.getTargetFormat().getDefaultExtension());
                def.setTargetFormatInfo(service.getTargetFormat());
            }
            def.setInfo(service.getDescription());
            def.setUrl(service.getUrl());
            def.setDescriptor(service.getDescriptor());
            if (service.isMigration())
                def.setServiceIdentifier("MiniMEE-migration");
            else {
                def.setEmulated(true);
                def.setServiceIdentifier("MiniMEE-emulation");
                // TODO: refine setting type according to sourceFormat
                if ("avi".equals(sourceFormat.getDefaultExtension())
                    || "mpg".equals(sourceFormat.getDefaultExtension())
                    || "mpeg".equals(sourceFormat.getDefaultExtension())) {
                    def.setParamByName("filetype", "1");
                } else if ("jpg".equals(sourceFormat.getDefaultExtension())
                    || "gif".equals(sourceFormat.getDefaultExtension())
                    || "tif".equals(sourceFormat.getDefaultExtension())) {
                    def.setParamByName("filetype", "2");
                } else if ("pdf".equals(sourceFormat.getDefaultExtension())
                    || "sam".equals(sourceFormat.getDefaultExtension())) {
                    def.setParamByName("filetype", "3");
                }
            }
            result.add(def);
        }
View Full Code Here

        actionInfos = new HashMap<Alternative, ActionInfo>(alternatives.size());
        for (Alternative a : alternatives) {
            PreservationActionDefinition pad = a.getAction();
            if (pad != null) {
                targetMimetypes.put(a, "");
                ActionInfo actionInfo = ActionInfoFactory.createActionInfo(pad);
                actionInfos.put(a, actionInfo);
                myExperimentServices.load(actionInfo);
            }
        }
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.services.action.ActionInfo

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.