while (currentExpression != null) {
final PropertyExpression currentPropertyExpression =
(PropertyExpression) (currentExpression.getKind() == ExpressionKind.MEMBER ?
((MemberExpression) currentExpression).getProperty() : currentExpression);
final EdmTyped currentProperty = currentPropertyExpression.getEdmProperty();
final EdmTypeKind kind = currentProperty.getType().getKind();
if (kind == EdmTypeKind.SIMPLE || kind == EdmTypeKind.COMPLEX) {
propertyPath.add(0, (EdmProperty) currentProperty);
} else {
throw new ODataNotImplementedException();
}