Class MemberExpressionImpl
java.lang.Object
org.apache.olingo.odata2.core.uri.expression.MemberExpressionImpl
- All Implemented Interfaces:
BinaryExpression,CommonExpression,MemberExpression,Visitable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept(ExpressionVisitor visitor) MethodVisitable.accept(ExpressionVisitor)is called when traversing the expression tree.getKind()getPath()Returns the URI literal which lead to the creation of this expression.setEdmType(EdmType edmType) Set the edmType of this expression node
-
Constructor Details
-
MemberExpressionImpl
-
-
Method Details
-
getPath
- Specified by:
getPathin interfaceMemberExpression- Returns:
- Returns the CommonExpression forming the path (the left side of '/') of the method operator.
For OData 2.0 the value returned by
MemberExpression.getPath()is aPropertyExpression
-
getProperty
- Specified by:
getPropertyin interfaceMemberExpression- Returns:
- Return the CommonExpression forming the property (the right side of '/') of the method operator.
For OData 2.0 the value returned by
MemberExpression.getProperty()is aPropertyExpression
-
getEdmType
- Specified by:
getEdmTypein interfaceCommonExpression- Returns:
- The return type of the value represented with
this expression. For example the
CommonExpression.getEdmType()method for an expression representing the "concat" method will return always "Edm.String".
This type information is set while parsing the $filter or $orderby expressions and used to do a first validation of the expression. For calculating operators like "add, sub, mul" this type information is purely based on input and output types of the operator as defined in the OData specification. So for $filter=2 add 7 the
CommonExpression.getEdmType()method of the binary expression will return Edm.Byte and not Edm.Int16 because the parser performs no real addition.
However, the application may change this type while evaluating the expression tree.
-
setEdmType
Description copied from interface:CommonExpressionSet the edmType of this expression node- Specified by:
setEdmTypein interfaceCommonExpression- Parameters:
edmType- Type to be set- Returns:
- A self reference for method chaining"
-
getOperator
- Specified by:
getOperatorin interfaceBinaryExpression- Returns:
- Operator object that represents the used operator
- See Also:
-
getKind
- Specified by:
getKindin interfaceCommonExpression- Returns:
- Kind of this expression
- See Also:
-
getUriLiteral
Description copied from interface:CommonExpressionReturns the URI literal which lead to the creation of this expression.- Specified by:
getUriLiteralin interfaceCommonExpression- Returns:
- URI literal
-
accept
public Object accept(ExpressionVisitor visitor) throws ExceptionVisitExpression, ODataApplicationException Description copied from interface:VisitableMethodVisitable.accept(ExpressionVisitor)is called when traversing the expression tree. This method is invoked on each expression used as node in an expression tree. The implementations should behave as follows:- Call accept on all sub nodes and store the returned Objects
- Call the appropriate method on the
ExpressionVisitorinstance and provide the stored objects to that instance- Return the object which should be passed to the processing algorithm of the parent expression node
- Specified by:
acceptin interfaceVisitable- Parameters:
visitor- Object ( implementingExpressionVisitor) whose methods are called during traversing a expression node of the expression tree.- Returns:
- Object which should be passed to the processing algorithm of the parent expression node
- Throws:
ExceptionVisitExpression- Exception occurred the OData library while traversing the treeODataApplicationException- Exception thrown by the application who implemented the visitor
-
getLeftOperand
- Specified by:
getLeftOperandin interfaceBinaryExpression- Returns:
- Expression sub tree of the left operand
-
getRightOperand
- Specified by:
getRightOperandin interfaceBinaryExpression- Returns:
- Expression sub tree of the right operand
-