Package eu.planets_project.services.identify

Examples of eu.planets_project.services.identify.Identify.identify()


                Identify.NAME));
        Identify droid = service.getPort(Identify.class);
        byte[] array = FileUtils.readFileToByteArray(f1);
       
        //invoke the service and extract results
        IdentifyResult identify = droid.identify(new DigitalObject.Builder(Content.byValue(array)).build(), null);
        List<URI> result = identify.getTypes();
        String status = identify.getReport().getMessage();
       
        if(!status.equals("Positive")){
          throw new Exception("Service execution failed");
View Full Code Here


                    ExperimentInspector.persistExperiment();
                }
               
            } else if(sd.getType().equals(Identify.class.getCanonicalName())) {
                Identify idf = new IdentifyWrapper(surl);
                IdentifyResult ir1 = idf.identify( this.getDob1().getDob(), null);
                this.compareServiceReport = ir1.getReport();
                IdentifyResult ir2 = idf.identify( this.getDob2().getDob(), null);
                this.compareServiceReport = ir2.getReport();
               
                me = this.createMeasurementEvent();
View Full Code Here

               
            } else if(sd.getType().equals(Identify.class.getCanonicalName())) {
                Identify idf = new IdentifyWrapper(surl);
                IdentifyResult ir1 = idf.identify( this.getDob1().getDob(), null);
                this.compareServiceReport = ir1.getReport();
                IdentifyResult ir2 = idf.identify( this.getDob2().getDob(), null);
                this.compareServiceReport = ir2.getReport();
               
                me = this.createMeasurementEvent();
                if( me != null ) {
                    me.setAgent(new MeasurementAgent(idf.describe()));
View Full Code Here

            Iterator<QName> ports = service.getPorts();
            while( ports.hasNext() ) {
                System.out.println("Got : "+ports.next());
            }
            Identify droid = (Identify) service.getPort( Identify.class );
            IdentifyResult result = droid.identify(new DigitalObject.Builder(
                    Content.byValue(new File("PC/droid/src/resources/Licence.rtf"))).build(), null);
            System.out.println("Result: "+result.getTypes());
            System.exit(1);
        } catch (MalformedURLException e) {
            // TODO Auto-generated catch block
View Full Code Here

   
    private IdentifyResult runIdentifyService() {
        if( this.getIdentifyService() == null ) return null;
        try {
            Identify id = new IdentifyWrapper(new URL( this.getIdentifyService()));
            IdentifyResult ir = id.identify(this.getDob().getDob(), null);
            return ir;
        } catch( Exception e ) {
            log.error("FAILED! "+e);
            e.printStackTrace();
            return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.