Package eu.planets_project.services.modify

Examples of eu.planets_project.services.modify.ModifyResult


        if (skew != 0) {
            List<Parameter> parameterList = new ArrayList<Parameter>();
            log.info("Extracted skew parameter: " + skew);
            parameterList.add(new Parameter("rotateCounterClockwise", Double.toString(((double) skew) / 100)));

            ModifyResult modifyResult = this.rotate.modify(digO, inputFormatURI, parameterList);
            ServiceReport report = modifyResult.getReport();

            if (report.getType() == Type.ERROR) {
                String s = "Service execution failed: " + report.getMessage();
                log.error(s);
                throw new Exception(s);
            }

            return modifyResult.getDigitalObject();
        } else {
            log.info("Skew 0 - skipping rotate operation");
            return digO; // Skew not specified or null -> skip processing
        }
    }
View Full Code Here


            if (pBottomRightPoint != null) {
                parameterList.add(pBottomRightPoint);
            }
        }

        ModifyResult modifyResult = this.crop.modify(digO, inputFormatURI, parameterList);
        ServiceReport report = modifyResult.getReport();

        if (report.getType() == Type.ERROR) {
            String s = "Service execution failed: " + report.getMessage();
            log.error(s);
            throw new Exception(s);
        }

        return modifyResult.getDigitalObject();
    }
View Full Code Here

TOP

Related Classes of eu.planets_project.services.modify.ModifyResult

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.