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
}
}