Projekt

Obecné

Profil

« Předchozí | Další » 

Revize d3dabe75

Přidáno uživatelem smoldas15 před asi 4 roky(ů)

Re #7915: Zobrazení celého dokumentu na BE

- úprava návratového Stringu

Zobrazit rozdíly:

be/fulltextsearch/src/main/java/cz/zcu/kiv/aswi/fulltextsearch/SolrService.java
489 489
        solrQuery.set("q", FIELD_DOC_FILENAME + ":" + documentName + ".xml");
490 490
        solrQuery.setRows(SEARCH_QUERY_ROWS);
491 491
        SolrDocumentList docList = solrClientFiles.query(solrQuery).getResults();
492
        String ret = "";
493 492

  
494 493
        String imgFilename = (String) docList.get(0).getFieldValue(FIELD_IMG_FILENAME);
495 494
        byte[] imageBytes = getImageFromFilesCore(imgFilename);
......
500 499

  
501 500
        imageBytes = cropImg.getByteArray();
502 501
        imageBytes = Base64.getEncoder().encode(imageBytes);
503
        ret = new String(imageBytes);
504

  
505
        if (ret.equals("")){
506
            LOG.error("File was NOT found in Solr");
507
        } else{
508
            LOG.debug("File was found in Solr");
509
        }
510
        return ret;
502
        return new String(imageBytes);
511 503
    }
512 504

  
513 505
}

Také k dispozici: Unified diff