Examples of apply()


Examples of io.druid.query.extraction.RegexDimExtractionFn.apply()

    String regex = "/([^/]+)/";
    DimExtractionFn dimExtractionFn = new RegexDimExtractionFn(regex);
    Set<String> extracted = Sets.newHashSet();

    for (String path : paths) {
      extracted.add(dimExtractionFn.apply(path));
    }

    Assert.assertEquals(2, extracted.size());
    Assert.assertTrue(extracted.contains("druid"));
    Assert.assertTrue(extracted.contains("dash"));
View Full Code Here

Examples of io.druid.query.extraction.SearchQuerySpecDimExtractionFn.apply()

    DimExtractionFn dimExtractionFn = new SearchQuerySpecDimExtractionFn(spec);
    List<String> expected = Arrays.asList("Kyoto", "Tokyo", "Toyokawa", "Yorktown");
    Set<String> extracted = Sets.newHashSet();

    for (String str : testStrings) {
      String res = dimExtractionFn.apply(str);
      if (res != null) {
        extracted.add(res);
      }
    }
View Full Code Here

Examples of io.druid.query.extraction.TimeDimExtractionFn.apply()

  {
    Set<String> months = Sets.newHashSet();
    DimExtractionFn dimExtractionFn = new TimeDimExtractionFn("MM/dd/yyyy", "MM/yyyy");

    for (String dim : dims) {
      months.add(dimExtractionFn.apply(dim));
    }

    Assert.assertEquals(months.size(), 4);
    Assert.assertTrue(months.contains("01/2012"));
    Assert.assertTrue(months.contains("03/2012"));
View Full Code Here

Examples of io.fabric8.kubernetes.api.Controller.apply()

            Object dto = KubernetesHelper.loadJson(json);
            if (dto == null) {
                throw new MojoFailureException("Could not load kubernetes json: " + json);
            }
            Controller controller = new Controller(kubernetes);
            controller.apply(dto, json.getName());
        } catch (IOException e) {
            throw new MojoExecutionException(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of io.fabric8.patch.impl.Offline.apply()

        });

        try {
            for (File patch : patches) {
                getLog().info("Applying patch: " + patch);
                offline.apply(patch);
            }
        } catch (Exception e) {
            throw new MojoFailureException("Error processing patches", e);
        }
    }
View Full Code Here

Examples of it.eng.qbe.statement.jpa.JPQLStatementConditionalOperators.IConditionalOperator.apply()

       
        if (OPERAND_TYPE_STATIC.equalsIgnoreCase(whereField.getRightOperand().type) )  {
          rightOperandElements = getTypeBoundedStaticOperand(whereField.getLeftOperand(), whereField.getOperator(), rightOperandElements);
        }
       
        whereClauseElement = conditionalOperator.apply(leftOperandElements[0], rightOperandElements);
      }
     
      logger.debug("where element value [" + whereClauseElement + "]");
    } finally {
      logger.debug("OUT");
View Full Code Here

Examples of it.eng.spagobi.tools.dataset.common.query.IAggregationFunction.apply()

          logger.error("Alias " + aMeasure.getAlias() + " not found on the base query!!!!");
          throw new RuntimeException("Alias " + aMeasure.getAlias() + " not found on the base query!!!!");
        }
      } else {
        if (function != AggregationFunctions.NONE_FUNCTION) {
          toReturn.append(function.apply(alias));
        } else {
          toReturn.append(alias);
        }
      }
      if (measuresIt.hasNext()) {
View Full Code Here

Examples of jaque.expressions.Expression.apply()

  }

  public Expression visit(MemberExpression e) {
    Expression instance = e.getInstance();
    if (instance != null) {
      instance = stripQuotes(instance.apply(this));
      if (instance.getExpressionType() == ExpressionType.Lambda)
        return instance;
      if (instance != e.getInstance())
        return Expression.member(e.getExpressionType(), instance, e
            .getMember(), e.getResultType(), e.getParameters());
View Full Code Here

Examples of jason.asSyntax.Literal.apply()

        //And apply the unifier to them
        for (Iterator iter = templatePreconds.iterator(); iter
            .hasNext();) {
          PropositionImpl precond = (PropositionImpl) iter.next();
          Literal literal = new LiteralImpl(precond);
          literal.apply(un);
          PropositionImpl concretePrecond = (PropositionImpl)propositionFactory.getProposition(literal.toString());
          // XXX Uncomment the code to debug operator instantiation, it is removed to avoid wasting time here
//          if(!concretePrecond.isGround()) {
//            //throw new OperatorFactoryException("We have a non-concrete precond in operator "+signature+": "+concretePrecond);
//            System.err.println("We have a non-concrete precond in operator "+signature+": "+concretePrecond);
View Full Code Here

Examples of jason.asSyntax.LiteralImpl.apply()

        //And apply the unifier to them
        for (Iterator iter = templatePreconds.iterator(); iter
            .hasNext();) {
          PropositionImpl precond = (PropositionImpl) iter.next();
          Literal literal = new LiteralImpl(precond);
          literal.apply(un);
          PropositionImpl concretePrecond = (PropositionImpl)propositionFactory.getProposition(literal.toString());
          // XXX Uncomment the code to debug operator instantiation, it is removed to avoid wasting time here
//          if(!concretePrecond.isGround()) {
//            //throw new OperatorFactoryException("We have a non-concrete precond in operator "+signature+": "+concretePrecond);
//            System.err.println("We have a non-concrete precond in operator "+signature+": "+concretePrecond);
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.