Package eu.planets_project.tb.impl.services.wrappers

Examples of eu.planets_project.tb.impl.services.wrappers.CharacteriseWrapper


                   
                    ExperimentInspector.persistExperiment();
                }
               
            } else if(sd.getType().equals(Characterise.class.getCanonicalName())) {
                Characterise chr = new CharacteriseWrapper( surl );
                CharacteriseResult cr1 = chr.characterise( this.getDob1().getDob(), null);
                this.compareServiceReport = cr1.getReport();
                CharacteriseResult cr2 = chr.characterise( this.getDob2().getDob(), null);
                this.compareServiceReport = cr2.getReport();
               
                me = this.createMeasurementEvent();
                if( me != null ) {
                    me.setAgent(new MeasurementAgent(chr.describe()));
                    me.setDate(Calendar.getInstance());
                    this.recordPropertyComparison(me, cr1.getProperties(), this.getDobUri1(), cr2.getProperties(), this.getDobUri2() );
                   
                    ExperimentInspector.persistExperiment();
                }
View Full Code Here


        }

        // Also set the pre services:
        try {
            if( this.preIsCharacterise() ) {
                dpPre = new CharacteriseWrapper(new URL(this.parameters.get(PARAM_PRE_SERVICE)) );
            } else {
                dpPre = null;
            }
            if( this.preIsIdentify() ) {
                idPre = new IdentifyWrapper( new URL(this.parameters.get(PARAM_PRE_SERVICE)) );

            } else {
                idPre = null;
            }
        } catch( MalformedURLException e ) {
            throw new Exception("You did not specify a valid pre-migration service URL!");
        }

        // Also set the post services:
        try {
            if( this.postIsCharacterise() ) {
                dpPost = new CharacteriseWrapper(new URL(this.parameters.get(PARAM_POST_SERVICE)) );
            } else {
                dpPost = null;
            }
            if( this.postIsIdentify() ) {
                idPost = new IdentifyWrapper( new URL(this.parameters.get(PARAM_POST_SERVICE)) );
View Full Code Here

        log.info("Looking for properties using: "+this.getCharacteriseService());
        // Return nothing if no service is selected:
        if( this.getCharacteriseService() == null ) return null;
        // Run the service:
        try {
            Characterise chr = new CharacteriseWrapper(new URL(this.getCharacteriseService()));
            DigitalObject dob = this.getDob().getDob();
            log.info("Got digital object: "+dob);
            CharacteriseResult cr = chr.characterise( dob, null);
            return cr;
        } catch( Exception e ) {
            log.error("FAILED! "+e);
            e.printStackTrace();
            return null;
View Full Code Here

TOP

Related Classes of eu.planets_project.tb.impl.services.wrappers.CharacteriseWrapper

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.