Project

General

Profile

« Previous | Next » 

Revision c1e4fe4e

Added by Andreas Kohlbecker over 8 years ago

resetting CHECK_UPDATE_MINUTES to once a day & fixing missing subchecklistInfo in responses of the EEA_BDC_Client

View differences:

src/main/java/org/cybertaxonomy/utis/checklist/EEA_BDC_Client.java
57 57
    /**
58 58
     * check for updates once a day
59 59
     */
60
    private static final int CHECK_UPDATE_MINUTES = 1; //60 * 24;
60
    private static final int CHECK_UPDATE_MINUTES = 60 * 24;
61 61

  
62 62
    public static final EnumSet<SearchMode> SEARCH_MODES = EnumSet.of(
63 63
            SearchMode.scientificNameExact,
......
482 482
            queryString = QueryParser.escape(queryString);
483 483
            ArrayList<Vertex> hitVs = queryClient.vertexIndexQuery("value:" + queryString);
484 484
            if(hitVs.size() > 0) {
485
                Response response = tnrResponseFromResource(hitVs.get(0), query.getRequest(), null, null);
485
                Response response = tnrResponseFromResource(hitVs.get(0), query.getRequest(), null, null, checklistInfo);
486 486
                query.getResponse().add(response);
487 487
            } else if(hitVs.size() > 1) {
488 488
                throw new DRFChecklistException("More than one node with the id '" + queryString + "' found");
......
501 501
        for (Vertex v : taxonNodes) {
502 502
            i++;
503 503
            logger.debug("  " + v.toString());
504
            printPropertyKeys(v, System.err);
504
            if(logger.isTraceEnabled()) {
505
                logger.trace("updateQueriesWithResponse() : printing propertyKeys to System.err");
506
                printPropertyKeys(v, System.err);
507
            }
505 508
            if(v.getProperty("kind").equals("url")) {
506 509
                logger.error("vertex of type 'url' expected, but was " + v.getProperty("type").equals("url"));
507 510
                continue;
......
510 513
            if(matchNodes != null) {
511 514
                matchNode = matchNodes.get(i);
512 515
            }
513
            Response tnrResponse = tnrResponseFromResource(v, query.getRequest(), matchNode, matchType);
516
            Response tnrResponse = tnrResponseFromResource(v, query.getRequest(), matchNode, matchType, ci);
514 517
            if(tnrResponse != null) {
515 518
                query.getResponse().add(tnrResponse);
516 519
            }
......
523 526
     * @param request
524 527
     * @param matchType
525 528
     * @param matchNode
529
     * @param ci
526 530
     * @return
527 531
     */
528
    private Response tnrResponseFromResource(Vertex taxonV, Request request, Vertex matchNode, NameType matchType) {
532
    private Response tnrResponseFromResource(Vertex taxonV, Request request, Vertex matchNode, NameType matchType, ServiceProviderInfo ci) {
529 533

  
530
        Response tnrResponse = TnrMsgUtils.tnrResponseFor(getServiceProviderInfo());
534
        Response tnrResponse = TnrMsgUtils.tnrResponseFor(ci);
531 535

  
532 536
        GremlinPipeline<Graph, Vertex> pipe = new GremlinPipeline<Graph, Vertex>(taxonV);
533 537

  

Also available in: Unified diff