Package eu.planets_project.services.datatypes

Examples of eu.planets_project.services.datatypes.ServiceReport


   * @throws Exception
   */
  private String[] runIdentification1(DigitalObject digo, WorkflowResult wfresult) throws Exception{
    List<Parameter> parameterList = new ArrayList<Parameter>();    
        IdentifyResult results = identify1.identify(digo,parameterList);
        ServiceReport report = results.getReport();
        List<URI> types = results.getTypes();
       
        if(report.getType() == Type.ERROR){
          String s = "Service execution failed: " + report.getMessage();
           log.debug(s);
          throw new Exception(s);
        }
        if(types.size()<1){
          String s = "The specified file type is currently not supported by this workflow";
View Full Code Here


   * @throws Exception
   */
  private String[] runIdentification2(DigitalObject digo,WorkflowResult wfresult) throws Exception{
    List<Parameter> parameterList = new ArrayList<Parameter>();
    IdentifyResult results = identify2.identify(digo,parameterList);
        ServiceReport report = results.getReport();
        List<URI> types = results.getTypes();
       
        if(report.getType() == Type.ERROR){
            String s = "Service execution failed: " + report.getMessage();
           log.debug(s);
          throw new Exception(s);
        }
        if(types.size()<1){
          String s = "The specified file type is currently not supported by this workflow";
View Full Code Here

   
    /*
     * Now call the migration service
     */
    MigrateResult migrateResult = this.migrate1.migrate(digO, migrateFromURI, migrateToURI, parameterList);
    ServiceReport report = migrateResult.getReport();
   
    if(report.getType() == Type.ERROR){
            String s = "Service execution failed: " + report.getMessage();
       log.debug(s);
          throw new Exception(s);
        }
   
    return migrateResult.getDigitalObject();
View Full Code Here

     * @throws Exception
     */
    private String[] runIdentification1(DigitalObject digo, WorkflowResult wfresult) throws Exception{
        List<Parameter> parameterList = new ArrayList<Parameter>();    
        IdentifyResult results = identify1.identify(digo,parameterList);
        ServiceReport report = results.getReport();
        List<URI> types = results.getTypes();

        if(report.getType() == Type.ERROR){
            String s = "Service execution failed: " + report.getMessage();
            log.info(s);
            throw new Exception(s);
        }
        if(types.size()<1){
            String s = "The specified file type is currently not supported by this workflow";
View Full Code Here

    private String[] runIdentification2(DigitalObject digo,WorkflowResult wfresult) throws Exception{
        log.info("identification 2 - got digo with title: " + digo.getTitle());
        List<Parameter> parameterList = new ArrayList<Parameter>();
        IdentifyResult results = identify2.identify(digo,parameterList);
        log.info("identification 2 - results: " + results);
        ServiceReport report = results.getReport();
        List<URI> types = results.getTypes();

        if(report.getType() == Type.ERROR){
            String s = "Service execution failed: " + report.getMessage();
            log.info(s);
            throw new Exception(s);
        }
        if(types.size()<1){
            String s = "The specified file type is currently not supported by this workflow";
View Full Code Here

        /*
         * Now call the migration service
         */
        MigrateResult migrateResult = this.migrate1.migrate(digO, migrateFromURI, migrateToURI, parameterList);
        ServiceReport report = migrateResult.getReport();

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

        return migrateResult.getDigitalObject();
View Full Code Here

    private String[] runIdentification(DigitalObject digo, WorkflowResult wfresult) throws Exception {
        log.info("STEP 1: Identification...");
        List<Parameter> parameterList = new ArrayList<Parameter>();
        IdentifyResult results = identify.identify(digo, parameterList);
        ServiceReport report = results.getReport();
        List<URI> types = results.getTypes();

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

        if (types.size() < 1) {
View Full Code Here

            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();
View Full Code Here

                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

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

        MigrateResult migrateResult = this.migrate.migrate(digO, migrateFromURI, migrateToURI, parameterList);
        ServiceReport report = migrateResult.getReport();

        if (report.getType() == Type.ERROR) {
            String s = "Service execution failed: " + report.getMessage();
            log.debug(s);
            throw new Exception(s);
        }
        return migrateResult.getDigitalObject();
    }
View Full Code Here

TOP

Related Classes of eu.planets_project.services.datatypes.ServiceReport

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.