java.lang.Object
org.apache.olingo.odata2.core.uri.expression.JsonVisitor
All Implemented Interfaces:
ExpressionVisitor

public class JsonVisitor extends Object implements ExpressionVisitor
  • Constructor Details

    • JsonVisitor

      public JsonVisitor()
  • Method Details

    • visitFilterExpression

      public Object visitFilterExpression(FilterExpression filterExpression, String expressionString, Object expression)
      Description copied from interface: ExpressionVisitor
      Visits a filter expression
      Specified by:
      visitFilterExpression in interface ExpressionVisitor
      Parameters:
      filterExpression - The visited filter expression node
      expressionString - The $filter expression string used to build the filter expression tree
      expression - The expression node representing the first operator,method,literal or property of the expression tree
      Returns:
      The overall result of evaluating the whole filter expression tree
    • visitBinary

      public Object visitBinary(BinaryExpression binaryExpression, BinaryOperator operator, Object leftSide, Object rightSide)
      Description copied from interface: ExpressionVisitor
      Visits a binary expression
      Specified by:
      visitBinary in interface ExpressionVisitor
      Parameters:
      binaryExpression - The visited binary expression node
      operator - The operator used in the binary expression
      leftSide - The result of visiting the left expression node
      rightSide - The result of visiting the right expression node
      Returns:
      Returns the result from evaluating operator, leftSide and rightSide
    • visitOrderByExpression

      public Object visitOrderByExpression(OrderByExpression orderByExpression, String expressionString, List<Object> orders)
      Description copied from interface: ExpressionVisitor
      Visits a orderby expression
      Specified by:
      visitOrderByExpression in interface ExpressionVisitor
      Parameters:
      orderByExpression - The visited orderby expression node
      expressionString - The $orderby expression string used to build the orderby expression tree
      orders - The result of visiting the orders of the orderby expression
      Returns:
      The overall result of evaluating the orderby expression tree
    • visitOrder

      public Object visitOrder(OrderExpression orderExpression, Object filterResult, SortOrder sortOrder)
      Description copied from interface: ExpressionVisitor
      Visits a order expression
      Specified by:
      visitOrder in interface ExpressionVisitor
      Parameters:
      orderExpression - The visited order expression node
      filterResult - The result of visiting the filter expression contained in the order
      sortOrder - The sort order
      Returns:
      The overall result of evaluating the order
    • visitLiteral

      public Object visitLiteral(LiteralExpression literal, EdmLiteral edmLiteral)
      Description copied from interface: ExpressionVisitor
      Visits a literal expression
      Specified by:
      visitLiteral in interface ExpressionVisitor
      Parameters:
      literal - The visited literal expression node
      edmLiteral - The detected EDM literal (value and type)
      Returns:
      The value of the literal
    • visitMethod

      public Object visitMethod(MethodExpression methodExpression, MethodOperator method, List<Object> parameters)
      Description copied from interface: ExpressionVisitor
      Visits a method expression
      Specified by:
      visitMethod in interface ExpressionVisitor
      Parameters:
      methodExpression - The visited method expression node
      method - The method used in the method expression
      parameters - The result of visiting the parameters of the method
      Returns:
      Returns the result from evaluating the method and the method parameters
    • visitMember

      public Object visitMember(MemberExpression memberExpression, Object path, Object property)
      Description copied from interface: ExpressionVisitor
      Visits a member expression (e.g. /)
      Specified by:
      visitMember in interface ExpressionVisitor
      Parameters:
      memberExpression - The visited member expression node
      path - The result of visiting the path property expression node (the left side of the property operator)
      property - The result of visiting the member property expression node
      Returns:
      Returns the value of the corresponding property (which may be a single EDM value or a structured EDM value)
    • visitProperty

      public Object visitProperty(PropertyExpression propertyExpression, String uriLiteral, EdmTyped edmProperty)
      Description copied from interface: ExpressionVisitor
      Visits a property expression
      Specified by:
      visitProperty in interface ExpressionVisitor
      Parameters:
      propertyExpression - The visited property expression node
      uriLiteral - The URI literal of the property
      edmProperty - The EDM property matching the property name used in the expression String
      Returns:
      Returns the value of the corresponding property ( which may be a single EDM value or a structured EDM value)
    • visitUnary

      public Object visitUnary(UnaryExpression unaryExpression, UnaryOperator operator, Object operand)
      Description copied from interface: ExpressionVisitor
      Visits a unary expression
      Specified by:
      visitUnary in interface ExpressionVisitor
      Parameters:
      unaryExpression - The visited unary expression node
      operator - The operator used in the unary expression
      operand - The result of visiting the operand expression node
      Returns:
      Returns the result from evaluating operator and operand