Examples of Query()


Examples of org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient.query()

        TermQueryCriteria termQuery = new TermQueryCriteria();
        termQuery.setElementName("DataVersion");
        termQuery.setValue("4.0");
        query.addCriterion(termQuery);
       
        List<Product> products = fmClient.query(query, genericFile);
        assertEquals(products.get(0).getProductId(), testProduct.getProductId());
    }
   
    public void testGetCatalogAndOrigValuesAndGetCatalogQuery() throws ConnectionException, RepositoryManagerException, XmlRpcException, IOException {
        Metadata met = new Metadata();
View Full Code Here

Examples of org.apache.oodt.product.QueryHandler.query()

    }

    try {                       // OK, let's try
      for (Iterator i = handlers.iterator(); i.hasNext();) {         // Try each query handler
        QueryHandler handler = (QueryHandler) i.next();         // Get the query handler
        query = handler.query(query);             // Give it the query
        if (!query.getResults().isEmpty()) {           // Did it give any result?
          Result result = (Result) query.getResults().get(0); // Yes, get the result
          deliverResult(handler, result, res);         // And deliver it
          return;                 // Done!
        }
View Full Code Here

Examples of org.apache.provisionr.amazon.core.ImageTable.query()

        final String region = provider.getOptionOr(ProviderOptions.REGION, ProviderOptions.DEFAULT_REGION);
        final String version = provider.getOptionOr(SoftwareOptions.BASE_OPERATING_SYSTEM_VERSION,
            SoftwareOptions.DEFAULT_BASE_OPERATING_SYSTEM_VERSION);

        ImageTableQuery query = imageTable.query()
            .filterBy("region", region)
            .filterBy("version", version)
            .filterBy("arch", DEFAULT_ARCH);

        if (instanceType.equals("t1.micro")) {
View Full Code Here

Examples of org.apache.solr.client.solrj.SolrServer.query()

    logger.debug("Solr query terms: " + query);
      SolrQuery queryObj = new SolrQuery();
      queryObj.setQuery(query);
      QueryResponse response = null;
      try {
        response = server.query(queryObj);
      } catch (Exception e){
        logger.error(e.getMessage());
      }
      //logger.info(response.getResults().get(0).getFieldValue("Name").toString());
      List<SolrRecord> results = response.getBeans(SolrRecord.class);
View Full Code Here

Examples of org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.query()

      CoreContainer coreContainer = initializer.initialize();
      SolrServer solrServer = new EmbeddedSolrServer(coreContainer, "");

      ModifiableSolrParams solrParams = new ModifiableSolrParams();
      solrParams.add("q", "annotation:Francesco");
      QueryResponse queryResponse = solrServer.query(solrParams);

      /* check the result contains only one doc with 2 annotations of the mock CAS */
      assertTrue(queryResponse != null);
      SolrDocumentList results = queryResponse.getResults();
      assertTrue(results.getNumFound() == 1);
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.CloudSolrServer.query()

      CloudSolrServer cloudSolrServer = getCloudSolrServer(collectionName);
      assertNotNull("Solr query shouldn't be null.", solrQueryStr);
      SolrDocumentList solrDocs = null;
      try {
        SolrQuery query = new SolrQuery(solrQueryStr);
        QueryResponse response = cloudSolrServer.query(query);
        solrDocs = response.getResults();
        return solrDocs;
      } finally {
        cloudSolrServer.shutdown();
      }
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.query()

      SolrQuery query = new SolrQuery();
      query.setQuery("units_i:2");
      query.addSortField("value_i", SolrQuery.ORDER.asc);
      query.setRows(Integer.MAX_VALUE);

      QueryResponse response = client.query(query);
      SolrDocumentList results = response.getResults();
      Assert.assertEquals(results.getNumFound(), docCount / 10);
      for (int i = 0; i < results.size(); i++) {
        SolrDocument doc = results.get(i);
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.HttpSolrServer.query()

        final ModifiableSolrParams params = new ModifiableSolrParams();
        params.set("qt", "/");
        params.set("q", field + ":" + term);
        final SolrRequest req = new QueryRequest(params);

        final QueryResponse resp = solr.query(params);
        System.out.println("resp: " + resp);
    }
}
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.LBHttpSolrServer.query()

    lbHttpSolrServer.setAliveCheckInterval(500);
    SolrQuery solrQuery = new SolrQuery("*:*");
    Set<String> names = new HashSet<String>();
    QueryResponse resp = null;
    for (String value : s) {
      resp = lbHttpSolrServer.query(solrQuery);
      assertEquals(10, resp.getResults().getNumFound());
      names.add(resp.getResults().get(0).getFieldValue("name").toString());
    }
    assertEquals(3, names.size());

View Full Code Here

Examples of org.apache.tomcat.lite.http.HttpMessage.HttpMessageBytes.query()

        if (serverMode) {
            msgBytes = http.httpReq.getMsgBytes();
            parseRequestLine(line, msgBytes.method(),
                    msgBytes.url(),
                    msgBytes.query(),
                    msgBytes.protocol());
        } else {
            msgBytes = http.httpRes.getMsgBytes();
            parseResponseLine(line, msgBytes.protocol(),
                    msgBytes.status(), msgBytes.message());
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.