You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2014/02/17 16:45:24 UTC
[15/28] [OLINGO-161] Refactored Java package names
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionImpl.java
new file mode 100644
index 0000000..46aa8f4
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionImpl.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption;
+
+import org.apache.olingo.odata4.server.api.uri.queryoption.QueryOption;
+
+public class QueryOptionImpl implements QueryOption {
+ private String name;
+ private String text;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public QueryOptionImpl setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ @Override
+ public String getText() {
+ return text;
+ }
+
+ public QueryOptionImpl setText(final String value) {
+ text = value;
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SearchOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SearchOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SearchOptionImpl.java
new file mode 100644
index 0000000..5ed729e
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SearchOptionImpl.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption;
+
+import org.apache.olingo.odata4.server.api.uri.queryoption.SearchOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+import org.apache.olingo.odata4.server.api.uri.queryoption.search.SearchExpression;
+
+/* TODO implement */
+public class SearchOptionImpl extends SystemQueryOptionImpl implements SearchOption {
+
+ public SearchOptionImpl() {
+ setKind(SupportedQueryOptions.SEARCH);
+ }
+
+ @Override
+ public SearchExpression getSearchExpression() {
+ // TODO $search not supported yet
+ return null;
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectItemImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectItemImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectItemImpl.java
new file mode 100644
index 0000000..24f6562
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectItemImpl.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption;
+
+import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName;
+import org.apache.olingo.odata4.server.api.uri.UriInfoResource;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SelectItem;
+
+public class SelectItemImpl implements SelectItem {
+
+ private UriInfoResource path;
+
+ private boolean isStar;
+ private FullQualifiedName addOperationsInSchemaNameSpace;
+
+ @Override
+ public UriInfoResource getResourceInfo() {
+
+ return path;
+ }
+
+ public SelectItemImpl setResourceInfo(UriInfoResource path) {
+ this.path = path;
+ return this;
+ }
+
+ @Override
+ public boolean isStar() {
+ return isStar;
+ }
+
+ public SelectItemImpl setStar(final boolean isStar) {
+ this.isStar = isStar;
+ return this;
+ }
+
+ @Override
+ public boolean isAllOperationsInSchema() {
+ if (addOperationsInSchemaNameSpace == null) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ @Override
+ public FullQualifiedName getAllOperationsInSchemaNameSpace() {
+ return addOperationsInSchemaNameSpace;
+ }
+
+ public void addAllOperationsInSchema(final FullQualifiedName addOperationsInSchemaNameSpace) {
+ this.addOperationsInSchemaNameSpace = addOperationsInSchemaNameSpace;
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectOptionImpl.java
new file mode 100644
index 0000000..07ec2e2
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectOptionImpl.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.odata4.server.api.uri.queryoption.SelectItem;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SelectOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+
+public class SelectOptionImpl extends SystemQueryOptionImpl implements SelectOption {
+
+ private List<SelectItemImpl> selectItems;
+
+ public SelectOptionImpl() {
+ setKind(SupportedQueryOptions.SELECT);
+ }
+
+ public SelectOptionImpl setSelectItems(final List<SelectItemImpl> selectItems) {
+ this.selectItems = selectItems;
+ return this;
+ }
+
+ @Override
+ public List<SelectItem> getSelectItems() {
+ List<SelectItem> retList = new ArrayList<SelectItem>();
+ for (SelectItemImpl item : selectItems) {
+ retList.add(item);
+ }
+ return retList;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SkipOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SkipOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SkipOptionImpl.java
new file mode 100644
index 0000000..f9edca1
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SkipOptionImpl.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption;
+
+import org.apache.olingo.odata4.server.api.uri.queryoption.SkipOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+
+public class SkipOptionImpl extends SystemQueryOptionImpl implements SkipOption {
+ private String value;
+
+ public SkipOptionImpl() {
+ setKind(SupportedQueryOptions.SKIP);
+ }
+
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ public SkipOptionImpl setValue(final String value) {
+ this.value = value;
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SkipTokenOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SkipTokenOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SkipTokenOptionImpl.java
new file mode 100644
index 0000000..759cfae
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SkipTokenOptionImpl.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption;
+
+import org.apache.olingo.odata4.server.api.uri.queryoption.SkipTokenOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+
+public class SkipTokenOptionImpl extends SystemQueryOptionImpl implements SkipTokenOption {
+ private String skipTokenValue;
+
+ public SkipTokenOptionImpl() {
+ setKind(SupportedQueryOptions.SKIPTOKEN);
+ }
+
+ @Override
+ public String getValue() {
+ return skipTokenValue;
+ }
+
+ public SkipTokenOptionImpl setValue(final String skipTokenValue) {
+ this.skipTokenValue = skipTokenValue;
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SystemQueryOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SystemQueryOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SystemQueryOptionImpl.java
new file mode 100644
index 0000000..9c58776
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SystemQueryOptionImpl.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption;
+
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SystemQueryOption;
+
+public class SystemQueryOptionImpl extends QueryOptionImpl implements SystemQueryOption {
+
+ private SupportedQueryOptions kind;
+
+ @Override
+ public SupportedQueryOptions getKind() {
+ return kind;
+ }
+
+ void setKind(final SupportedQueryOptions kind) {
+ this.kind = kind;
+ }
+
+ @Override
+ public String getName() {
+ return kind.toString();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/TopOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/TopOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/TopOptionImpl.java
new file mode 100644
index 0000000..f7f0cfc
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/TopOptionImpl.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption;
+
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+import org.apache.olingo.odata4.server.api.uri.queryoption.TopOption;
+
+/* TODO implement */
+public class TopOptionImpl extends SystemQueryOptionImpl implements TopOption {
+ private String value;
+
+ public TopOptionImpl() {
+ setKind(SupportedQueryOptions.TOP);
+ }
+
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ public TopOptionImpl setValue(final String value) {
+ this.value = value;
+ return this;
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/AliasImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/AliasImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/AliasImpl.java
new file mode 100644
index 0000000..1ce145f
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/AliasImpl.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.AliasExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor;
+
+public class AliasImpl extends ExpressionImpl implements AliasExpression {
+
+ private String parameterName;
+
+ @Override
+ public String getParameterName() {
+ return parameterName;
+ }
+
+ public void setParameter(final String ParameterName) {
+ this.parameterName = ParameterName;
+ }
+
+ @Override
+ public <T> T accept(final ExpressionVisitor<T> visitor) throws ExceptionVisitExpression, ODataApplicationException {
+ return visitor.visitAlias(parameterName);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/BinaryImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/BinaryImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/BinaryImpl.java
new file mode 100644
index 0000000..fb1c5a2
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/BinaryImpl.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.BinaryExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedBinaryOperators;
+
+public class BinaryImpl extends ExpressionImpl implements BinaryExpression {
+
+ private SupportedBinaryOperators operator;
+ private ExpressionImpl left;
+ private ExpressionImpl right;
+
+ @Override
+ public SupportedBinaryOperators getOperator() {
+ return operator;
+ }
+
+ public BinaryExpression setOperator(final SupportedBinaryOperators operator) {
+ this.operator = operator;
+ return this;
+ }
+
+ @Override
+ public Expression getLeftOperand() {
+ return left;
+ }
+
+ public void setLeftOperand(final ExpressionImpl operand) {
+ left = operand;
+ }
+
+ @Override
+ public Expression getRightOperand() {
+ return right;
+ }
+
+ public void setRightOperand(final ExpressionImpl operand) {
+ right = operand;
+
+ }
+
+ @Override
+ public <T> T accept(final ExpressionVisitor<T> visitor) throws ExceptionVisitExpression, ODataApplicationException {
+ T left = this.left.accept(visitor);
+ T right = this.right.accept(visitor);
+ return visitor.visitBinaryOperator(operator, left, right);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ConstantImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ConstantImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ConstantImpl.java
new file mode 100644
index 0000000..8d4567c
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ConstantImpl.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Constant;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedConstants;
+
+public class ConstantImpl extends ExpressionImpl implements Constant {
+
+ EdmType type;
+ SupportedConstants kind;
+
+ @Override
+ public <T> T accept(ExpressionVisitor<T> visitor) throws ExceptionVisitExpression, ODataApplicationException {
+ return visitor.visitConstant(kind);
+ }
+
+ @Override
+ public boolean isNull() {
+ return kind == SupportedConstants.NULL;
+ }
+
+ @Override
+ public boolean isTrue() {
+ return kind == SupportedConstants.TRUE;
+ }
+
+ @Override
+ public boolean isFalse() {
+ return kind == SupportedConstants.FALSE;
+ }
+
+ @Override
+ public EdmType getType() {
+ return type;
+ }
+
+ public ConstantImpl setType(EdmType type) {
+ this.type = type;
+ return this;
+ }
+
+ @Override
+ public SupportedConstants getKind() {
+ return kind;
+ }
+
+ public ConstantImpl setKind(SupportedConstants kind) {
+ this.kind = kind;
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/EnumerationImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/EnumerationImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/EnumerationImpl.java
new file mode 100644
index 0000000..f47d164
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/EnumerationImpl.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption.expression;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmEnumType;
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Enumeration;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor;
+
+public class EnumerationImpl extends ExpressionImpl implements Enumeration {
+
+ private EdmEnumType type;
+ private List<String> values = new ArrayList<String>();
+
+ @Override
+ public List<String> getValues() {
+ return values;
+ }
+
+ public EnumerationImpl addValue(final String enumValue) {
+ values.add(enumValue);
+ return this;
+ }
+
+ @Override
+ public EdmEnumType getType() {
+ return type;
+ }
+
+ public EnumerationImpl setType(final EdmEnumType type) {
+ this.type = type;
+ return this;
+ }
+
+ @Override
+ public <T> T accept(final ExpressionVisitor<T> visitor) throws ExceptionVisitExpression, ODataApplicationException {
+ return visitor.visitEnum(type, values);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionImpl.java
new file mode 100644
index 0000000..399709d
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionImpl.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression;
+
+public abstract class ExpressionImpl implements Expression {
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LambdaRefImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LambdaRefImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LambdaRefImpl.java
new file mode 100644
index 0000000..ec2cd0a
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LambdaRefImpl.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.LambdaRef;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.VisitableExression;
+
+public class LambdaRefImpl extends ExpressionImpl implements LambdaRef, VisitableExression {
+
+ private String variableText;
+
+ @Override
+ public String getVariableName() {
+ return variableText;
+ }
+
+ public LambdaRefImpl setVariableText(final String text) {
+ variableText = text;
+ return this;
+ }
+
+ @Override
+ public <T> T accept(final ExpressionVisitor<T> visitor) throws ExceptionVisitExpression, ODataApplicationException {
+ return visitor.visitLambdaReference(variableText);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LiteralImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LiteralImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LiteralImpl.java
new file mode 100644
index 0000000..7de63f2
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LiteralImpl.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Literal;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.VisitableExression;
+
+public class LiteralImpl extends ExpressionImpl implements Literal, VisitableExression {
+
+ private String text;
+
+ @Override
+ public String getText() {
+ return text;
+ }
+
+ public LiteralImpl setText(final String text) {
+ this.text = text;
+ return this;
+ }
+
+ @Override
+ public <T> T accept(final ExpressionVisitor<T> visitor) throws ExceptionVisitExpression, ODataApplicationException {
+ return visitor.visitLiteral(text);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MemberImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MemberImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MemberImpl.java
new file mode 100644
index 0000000..e8e7b4a
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MemberImpl.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.server.api.uri.UriInfoResource;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Member;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.VisitableExression;
+import org.apache.olingo.odata4.server.core.uri.UriInfoImpl;
+import org.apache.olingo.odata4.server.core.uri.UriResourceImpl;
+import org.apache.olingo.odata4.server.core.uri.UriResourceTypedImpl;
+import org.apache.olingo.odata4.server.core.uri.UriResourceWithKeysImpl;
+
+public class MemberImpl extends ExpressionImpl implements Member, VisitableExression {
+
+ private UriInfoResource path;
+
+ @Override
+ public UriInfoResource getPath() {
+ return path;
+ }
+
+ public Member setPath(final UriInfoResource pathSegments) {
+ path = pathSegments;
+ return this;
+ }
+
+ @Override
+ public <T> T accept(final ExpressionVisitor<T> visitor) throws ExceptionVisitExpression, ODataApplicationException {
+ return visitor.visitMember(path);
+ }
+
+ @Override
+ public EdmType getType() {
+ UriInfoImpl uriInfo = (UriInfoImpl) path;
+ UriResourceImpl lastResourcePart = (UriResourceImpl) uriInfo.getLastResourcePart();
+
+ if (lastResourcePart instanceof UriResourceWithKeysImpl) {
+ UriResourceWithKeysImpl lastKeyPred = (UriResourceWithKeysImpl) lastResourcePart;
+ if (lastKeyPred.getTypeFilterOnEntry() != null) {
+ return lastKeyPred.getTypeFilterOnEntry();
+ } else if (lastKeyPred.getTypeFilterOnCollection() != null) {
+ return lastKeyPred.getTypeFilterOnCollection();
+ }
+ return lastKeyPred.getType();
+ } else if (lastResourcePart instanceof UriResourceTypedImpl) {
+ UriResourceTypedImpl lastTyped = (UriResourceTypedImpl) lastResourcePart;
+ EdmType type = lastTyped.getTypeFilter();
+ if (type != null) {
+ return type;
+ }
+ return lastTyped.getType();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean isCollection() {
+ UriInfoImpl uriInfo = (UriInfoImpl) path;
+ UriResourceImpl lastResourcePart = (UriResourceImpl) uriInfo.getLastResourcePart();
+ if (lastResourcePart instanceof UriResourceTypedImpl) {
+ UriResourceTypedImpl lastTyped = (UriResourceTypedImpl) lastResourcePart;
+ return lastTyped.isCollection();
+ }
+ return false;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MethodCallImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MethodCallImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MethodCallImpl.java
new file mode 100644
index 0000000..4bd1555
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MethodCallImpl.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption.expression;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.MethodCall;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedMethodCalls;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.VisitableExression;
+
+public class MethodCallImpl extends ExpressionImpl implements MethodCall, VisitableExression {
+
+ private SupportedMethodCalls method;
+ private List<ExpressionImpl> parameters = new ArrayList<ExpressionImpl>();
+
+ @Override
+ public SupportedMethodCalls getMethod() {
+ return method;
+ }
+
+ public MethodCallImpl setMethod(final SupportedMethodCalls methodCalls) {
+ method = methodCalls;
+ return this;
+ }
+
+ @Override
+ public List<Expression> getParameters() {
+ List<Expression> list = new ArrayList<Expression>();
+ for (ExpressionImpl item : parameters) {
+ list.add(item);
+ }
+ return list;
+ }
+
+ public MethodCallImpl addParameter(final ExpressionImpl readCommonExpression) {
+ parameters.add(readCommonExpression);
+ return this;
+ }
+
+ @Override
+ public <T> T accept(final ExpressionVisitor<T> visitor) throws ExceptionVisitExpression, ODataApplicationException {
+ List<T> userParameters = new ArrayList<T>();
+ for (ExpressionImpl parameter : parameters) {
+ userParameters.add(parameter.accept(visitor));
+ }
+ return visitor.visitMethodCall(method, userParameters);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/TypeLiteralImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/TypeLiteralImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/TypeLiteralImpl.java
new file mode 100644
index 0000000..14fae5d
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/TypeLiteralImpl.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.TypeLiteral;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.VisitableExression;
+
+public class TypeLiteralImpl extends ExpressionImpl implements TypeLiteral, VisitableExression {
+
+ private EdmType type;
+
+ @Override
+ public EdmType getType() {
+ return type;
+ }
+
+ public TypeLiteralImpl setType(final EdmType type) {
+ this.type = type;
+ return this;
+ }
+
+ @Override
+ public <T> T accept(final ExpressionVisitor<T> visitor) throws ExceptionVisitExpression, ODataApplicationException {
+ return visitor.visitTypeLiteral(type);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/UnaryImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/UnaryImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/UnaryImpl.java
new file mode 100644
index 0000000..e2b2f5f
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/UnaryImpl.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedUnaryOperators;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.UnaryOperator;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.VisitableExression;
+
+public class UnaryImpl extends ExpressionImpl implements UnaryOperator, VisitableExression {
+
+ private SupportedUnaryOperators operator;
+ private ExpressionImpl expression;
+
+ @Override
+ public SupportedUnaryOperators getOperator() {
+ return operator;
+ }
+
+ public void setOperator(final SupportedUnaryOperators operator) {
+ this.operator = operator;
+ }
+
+ @Override
+ public Expression getOperand() {
+ return expression;
+ }
+
+ public void setOperand(final ExpressionImpl expression) {
+ this.expression = expression;
+ }
+
+ @Override
+ public <T> T accept(final ExpressionVisitor<T> visitor) throws ExceptionVisitExpression, ODataApplicationException {
+ T operand = expression.accept(visitor);
+ return visitor.visitUnaryOperator(operator, operand);
+ }
+
+}