Package eu.planets_project.services.identify

Examples of eu.planets_project.services.identify.IdentifyResult


   
    /**
     * @return
     */
    public List<FormatBean> getIdentifyResultList() {
        IdentifyResult ir = this.runIdentifyService();
        if( ir == null ) return null;
        List<FormatBean> fmts = new ArrayList<FormatBean>();
        for( URI type : ir.getTypes() ) {
            FormatBean fb = new FormatBean( ServiceBrowser.fr.getFormatForUri( type ) );
            fmts.add(fb);
        }
        return fmts;
    }
View Full Code Here


   
    /**
     * @return
     */
    public String getIdentifyServiceReport() {
        IdentifyResult ir = this.runIdentifyService();
        if( ir == null ) return null;
        return ""+ir.getReport();
    }
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

    // @Test
    public void testByReference() throws MalformedURLException {
        URL url = new URL("http://www.google.com/intl/en_ALL/images/logo.gif");
        System.out.println("Testing " + url);
        IdentifyResult result = droid.identify(new DigitalObject.Builder(
                Content.byReference(url)).build(), null);
        for (URI f : result.getTypes()) {
            System.out.println("Got f=" + f);
        }
    }
View Full Code Here

            method = IdentifyResult.Method.MAGIC;
        } else if (AnalysisController.FILE_CLASSIFICATION_TENTATIVE_TEXT
                .equals(this.classificationText)) {
            method = IdentifyResult.Method.EXTENSION;
        }
        IdentifyResult result = new IdentifyResult(types, method, report);
        return result;
    }
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.