Package org.fao.geonet.kernel.search

Examples of org.fao.geonet.kernel.search.MetaSearcher.present()


    searcher.search(context, params, config);

    params.addContent(new Element("from").setText("1"));
    params.addContent(new Element("to").setText(searcher.getSize() +""));

    Element result = searcher.present(context, params, config);

    searcher.close();

    return result;
  }
View Full Code Here


    params.addContent(new Element("from").setText("1"));
    params.addContent(new Element("to").setText(searcher.getSize() +""));

    context.info("Records found : "+ searcher.getSize());

    Element records = searcher.present(context, params, dummyConfig);

    records.getChild("summary").detach();

    List<Integer> result = new ArrayList<Integer>();
View Full Code Here

            parameters.addContent(new Element("to").addContent(to));

            searcher.search(context, parameters, _config);

            Element response = new Element(type);
            Element relatedElement = searcher.present(context, parameters, _config);
            response.addContent(relatedElement);
            return response;
        } finally {
            searcher.close();
        }
View Full Code Here

        presentRequest.addContent(new Element("fast").setText("true"));
        presentRequest.addContent(new Element("from").setText("1"));
        presentRequest.addContent(new Element("to").setText(searcher.getSize()+""));
             
        @SuppressWarnings("unchecked")
                List<Element> results = searcher.present(context, presentRequest, _config).getChildren();
 
        _response = new Element("response");
        for (int i = 0; i < _maxItems && results.size() > 1; i++) {
          Random rnd = new Random();
          int r = rnd.nextInt(results.size() - 1) + 1// skip summary
View Full Code Here

    // If element type found, then get their uuid
    if (searcher.getSize() != 0) {
            if(Log.isDebugEnabled(Geonet.MEF))
                Log.debug(Geonet.MEF, "  Exporting record(s) found for metadata: " + uuid);
      Element elt = searcher.present(context, request, _config);

      // Get ISO records only
      @SuppressWarnings("unchecked")
            List<Element> isoElt = elt.getChildren();
      for (Element md : isoElt) {
View Full Code Here

        // FIXME ? from and to parameter could be used but if not
        // set, the service return the whole range of results
        // which could be huge in non fast mode ?
        elData.addContent(new Element("to").setText(searcher.getSize() +""));
   
        Element result = searcher.present(context, elData, _config);
       
        // Update result elements to present
        SelectionManager.updateMDResult(context.getUserSession(), result);
   
        return result;
View Full Code Here

        params.addContent(new Element("from").setText("1"));
        params.addContent(new Element("to").setText(range));
      }


    Element result = searcher.present(context, params, _config);

    // Update result elements to present
    SelectionManager.updateMDResult(context.getUserSession(), result);

    // Restore last search if set
View Full Code Here

    params.addContent(new Element("from").setText("1"));
    params.addContent(new Element("to").setText(searcher.getSize() +""));
    params.addContent(new Element("fast").setText("index"));

    Element result = searcher.present(context, params, config);

    searcher.close();

    return result;
  }
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.