Package eu.planets_project.services.identify

Examples of eu.planets_project.services.identify.IdentifyResult


   * @param wfresult
   * @return
   * @throws Exception
   */
  private String[] runIdentification2(DigitalObject digo,WorkflowResult wfresult) throws Exception{
        IdentifyResult results = identify2.identify(digo);
        ServiceReport status = results.getReport();
        List<URI> types = results.getTypes();
       
        if(status.equals(status.error)){
          String s = "Service execution failed";
           log.debug(s);
          throw new Exception(s);
View Full Code Here


        }else{
          parameterList = new ArrayList<Parameter>();
        }
 
        //now actually execute the identify operation of the service
        IdentifyResult results = identify.identify(digo, parameterList);
       
        //document the end-time and input digital object and the params
        wfResultItem.setEndTime(System.currentTimeMillis());
        wfResultItem.setInputDigitalObject(digo);
        wfResultItem.setServiceParameters(parameterList);
        wfResultItem.setServiceEndpoint(identify.describe().getEndpoint());
       
        //have a look at the service's results
        ServiceReport report = results.getReport();
        List<URI> types = results.getTypes();

        //report service status and type
        wfResultItem.setServiceReport(report);

        if (report.getType() == Type.ERROR) {
View Full Code Here

        }else{
          parameterList = new ArrayList<Parameter>();
        }
 
        //now actually execute the identify operation of the service
        IdentifyResult results = identify.identify(digo, parameterList);
       
        //document the end-time and input digital object and the params
        wfResultItem.setEndTime(System.currentTimeMillis());
        wfResultItem.setInputDigitalObjectRef(digo.getPermanentUri());
        wfResultItem.setServiceParameters(parameterList);
        wfResultItem.setServiceEndpoint(identify.describe().getEndpoint());
       
        //have a look at the service's results
        ServiceReport report = results.getReport();
        List<URI> types = results.getTypes();

        //report service status and type
        wfResultItem.setServiceReport(report);

        if (report.getType() == Type.ERROR) {
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);
View Full Code Here

   
    //resolve the digital Object reference
    DigitalObject digo = this.retrieveDigitalObjectDataRegistryRef(digoRef);
   
    //call the identification service
    IdentifyResult identifyResults = identifyService.identify(digo,parameterList);
   
    // document
    wfResultItem.setEndTime(System.currentTimeMillis());
    ServiceReport report = identifyResults.getReport();
    // report service status and type
    wfResultItem.setServiceReport(report);
    if (report.getType() == Type.ERROR) {
      String s = "Service execution failed: " + report.getMessage();
      wfResultItem.addLogInfo(s);
      throw new Exception(s);
    }
   
    //document the comparison's output
    URI ret = null;
    if((identifyResults.getTypes()!=null)&&(identifyResults.getTypes().size()>0)){
      wfResultItem.addLogInfo("identifying properties of object: "+digo.getPermanentUri());
      for(URI uri : identifyResults.getTypes()){
        if(ret == null){
          ret = uri;
        }
        String extractedInfo = "[uri: "+uri+"] \n";
        wfResultItem.addExtractedInformation(extractedInfo);
View Full Code Here

   * @return
   * @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);
View Full Code Here

   * @return
   * @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);
View Full Code Here

     * @return
     * @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);
View Full Code Here

     * @throws Exception
     */
    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);
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);
View Full Code Here

TOP

Related Classes of eu.planets_project.services.identify.IdentifyResult

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.