@Test public void testGetRequestToElasticsearch() { try { final SelectParserMultiple request1 = new SelectParserMultiple(); request1.parse(exampleSelectElasticsearch); assertNotNull(request1); assertTrue(RequestToElasticsearch.getRequestToElasticsearch(request1) instanceof SelectToElasticsearch); } catch (final Exception e) { e.printStackTrace(); fail(e.getMessage()); } }
public static RequestToElasticsearch getRequestToElasticsearch(AbstractParser<?> requestParser) throws VitamException { if (requestParser instanceof SelectParserMultiple || requestParser instanceof SelectParserSingle) { return new SelectToElasticsearch(requestParser); } else { throw new VitamException("Only Select Request is allowed on Indexation"); } }
RequestToElasticsearch extends RequestToAbstract { public static RequestToElasticsearch getRequestToElasticsearch(AbstractParser<?> requestParser) throws VitamException { if (requestParser instanceof SelectParserMultiple || requestParser instanceof SelectParserSingle) { return new SelectToElasticsearch(requestParser); } else { throw new VitamException("Only Select Request is allowed on Indexation"); } } }
RequestToElasticsearch extends RequestToAbstract { public static RequestToElasticsearch getRequestToElasticsearch(AbstractParser<?> requestParser) throws VitamException { if (requestParser instanceof SelectParserMultiple || requestParser instanceof SelectParserSingle) { return new SelectToElasticsearch(requestParser); } else { throw new VitamException("Only Select Request is allowed on Indexation"); } } RequestToElasticsearch(AbstractParser<?> requestParser); }
RequestToElasticsearch extends RequestToAbstract { public static RequestToElasticsearch getRequestToElasticsearch(AbstractParser<?> requestParser) throws VitamException { if (requestParser instanceof SelectParserMultiple || requestParser instanceof SelectParserSingle) { return new SelectToElasticsearch(requestParser); } else { throw new VitamException("Only Select Request is allowed on Indexation"); } } RequestToElasticsearch(AbstractParser<?> requestParser); static RequestToElasticsearch getRequestToElasticsearch(AbstractParser<?> requestParser); QueryBuilder getInitialRoots(final String field); QueryBuilder getRequest(QueryBuilder roots, QueryBuilder query); QueryBuilder getNthQueries(final int nth, VarNameAdapter adapter, DynamicParserTokens parserTokens); }
RequestToElasticsearch extends RequestToAbstract { public static RequestToElasticsearch getRequestToElasticsearch(AbstractParser<?> requestParser) throws VitamException { if (requestParser instanceof SelectParserMultiple || requestParser instanceof SelectParserSingle) { return new SelectToElasticsearch(requestParser); } else { throw new VitamException("Only Select Request is allowed on Indexation"); } } RequestToElasticsearch(AbstractParser<?> requestParser); static RequestToElasticsearch getRequestToElasticsearch(AbstractParser<?> requestParser); QueryBuilder getInitialRoots(final String field); QueryBuilder getRequest(QueryBuilder roots, QueryBuilder query); QueryBuilder getNthQueries(final int nth, VarNameAdapter adapter, DynamicParserTokens parserTokens);  }