Package com.netflix.infix

Examples of com.netflix.infix.PathValueEventFilter


    Tree valueNode = getChild(1);
   
    switch(valueNode.getType()){
    case NUMBER:
      Number value = (Number)((ValueTreeNode)valueNode).getValue();
      return new PathValueEventFilter(xpath, new NumericValuePredicate(value, getToken().getText()));
    case TIME_MILLIS_FUN_NAME:
      TimeMillisValueTreeNode timeValueNode = (TimeMillisValueTreeNode)valueNode;
      return new PathValueEventFilter(
        xpath,
        new TimeMillisValuePredicate(
          timeValueNode.getValueFormat(),
          timeValueNode.getValue(),
          getToken().getText()));
    case TIME_STRING_FUN_NAME:
      TimeStringValueTreeNode timeStringNode = (TimeStringValueTreeNode)valueNode;
     
      return new PathValueEventFilter(
        xpath,
        new TimeStringValuePredicate(
          timeStringNode.getValueTimeFormat(),
          timeStringNode.getInputTimeFormat(),
          timeStringNode.getValue(),
View Full Code Here


    TimeMillisValueTreeNode lowerBoundNode = (TimeMillisValueTreeNode)getChild(1);
   
    TimeMillisValueTreeNode upperBoundNode = (TimeMillisValueTreeNode)getChild(2);
   
    return Predicates.and(
                new PathValueEventFilter(
                        xpath,
                        new TimeMillisValuePredicate(lowerBoundNode.getValueFormat(), lowerBoundNode.getValue(), ">=")),
                new PathValueEventFilter(
                        xpath,
                        new TimeMillisValuePredicate(upperBoundNode.getValueFormat(), upperBoundNode.getValue(), "<"))
        );
   
  }
View Full Code Here

  public Predicate<Object> translate() {
    String xpath = getXPath(getChild(0));
     
    StringTreeNode valueNode = (StringTreeNode)getChild(1);
     
      return new PathValueEventFilter(xpath, new RegexValuePredicate(valueNode.getValue(), RegexValuePredicate.MatchPolicy.FULL));
   
  }
View Full Code Here

  @Override
  public Predicate<Object> translate() {
    String xpath = getXPath(getChild(0));
   
    return new PathValueEventFilter(xpath, NullValuePredicate.INSTANCE);
  }
View Full Code Here

    return Predicates.or(
                Lists.transform(children.subList(1, children.size()), new Function<Object, Predicate<Object>>() {
                    @Override
                    public Predicate<Object> apply(Object node) {
                        String value = ((StringTreeNode) node).getValue();
                        return new PathValueEventFilter(xpath, new StringValuePredicate(value));
                    }
                })
        );
  }
View Full Code Here

    return Predicates.or(
                Lists.transform(children.subList(1, children.size()), new Function<Object, Predicate<Object>>() {
                    @Override
                    public Predicate<Object> apply(Object node) {
                        Number value = ((NumberTreeNode) node).getValue();
                        return new PathValueEventFilter(xpath, new NumericValuePredicate(value, "="));
                    }
                })
        );
  }
View Full Code Here

   
    ValueTreeNode upperBoundNode = (ValueTreeNode)getChild(2);
    Number upperBound = (Number)upperBoundNode.getValue();
   
    return Predicates.and(
                new PathValueEventFilter(xpath, new NumericValuePredicate(lowerBound, ">=")),
                new PathValueEventFilter(xpath, new NumericValuePredicate(upperBound, "<"))
        );
   
  }
View Full Code Here

    TimeStringValueTreeNode lowerBoundNode = (TimeStringValueTreeNode)getChild(1);
   
    TimeStringValueTreeNode upperBoundNode = (TimeStringValueTreeNode)getChild(2);
   
    return Predicates.and(
                new PathValueEventFilter(
                        xpath,
                        new TimeStringValuePredicate(
                                lowerBoundNode.getValueTimeFormat(),
                                lowerBoundNode.getInputTimeFormat(),
                                lowerBoundNode.getValue(),
                                ">=")),
                new PathValueEventFilter(
                        xpath,
                        new TimeStringValuePredicate(
                                upperBoundNode.getValueTimeFormat(),
                                upperBoundNode.getInputTimeFormat(),
                                upperBoundNode.getValue(),
View Full Code Here

TOP

Related Classes of com.netflix.infix.PathValueEventFilter

Copyright © 2018 www.massapicom. 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.