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:25 UTC
[16/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/UriParserSemanticException.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriParserSemanticException.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriParserSemanticException.java
new file mode 100644
index 0000000..ad3e820
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriParserSemanticException.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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;
+
+//TODO Check name of this exception when implementing proper error handling
+public class UriParserSemanticException extends UriParserException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ public UriParserSemanticException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public UriParserSemanticException(final String message) {
+ super(message, 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/UriParserSyntaxException.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriParserSyntaxException.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriParserSyntaxException.java
new file mode 100644
index 0000000..3125557
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriParserSyntaxException.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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;
+
+public class UriParserSyntaxException extends UriParserException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ public UriParserSyntaxException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public UriParserSyntaxException(final String message) {
+ super(message, 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/UriResourceActionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceActionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceActionImpl.java
new file mode 100644
index 0000000..e4b1113
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceActionImpl.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmAction;
+import org.apache.olingo.odata4.commons.api.edm.EdmActionImport;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.server.api.uri.UriResourceAction;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+
+public class UriResourceActionImpl extends UriResourceTypedImpl implements UriResourceAction {
+
+ protected EdmAction action;
+ protected EdmActionImport actionImport;
+
+ public UriResourceActionImpl() {
+ super(UriResourceKind.action);
+ }
+
+ @Override
+ public EdmAction getAction() {
+ return action;
+ }
+
+ public UriResourceActionImpl setAction(final EdmAction action) {
+ this.action = action;
+ return this;
+ }
+
+ @Override
+ public EdmActionImport getActionImport() {
+ return actionImport;
+ }
+
+ public UriResourceActionImpl setActionImport(final EdmActionImport actionImport) {
+ this.actionImport = actionImport;
+ setAction(actionImport.getAction());
+ return this;
+ }
+
+ @Override
+ public boolean isCollection() {
+ return action.getReturnType().isCollection();
+ }
+
+ @Override
+ public EdmType getType() {
+ return action.getReturnType().getType();
+ }
+
+ @Override
+ public String toString() {
+ if (actionImport != null) {
+ return actionImport.getName();
+ } else if (action != null) {
+ return action.getName();
+ }
+ return "";
+ }
+
+}
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/UriResourceComplexPropertyImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceComplexPropertyImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceComplexPropertyImpl.java
new file mode 100644
index 0000000..18f803f
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceComplexPropertyImpl.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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmComplexType;
+import org.apache.olingo.odata4.commons.api.edm.EdmProperty;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.server.api.uri.UriResourceComplexProperty;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+
+public class UriResourceComplexPropertyImpl extends UriResourceTypedImpl implements UriResourceComplexProperty {
+
+ protected EdmProperty property;
+
+ public UriResourceComplexPropertyImpl() {
+ super(UriResourceKind.complexProperty);
+ }
+
+ @Override
+ public EdmProperty getProperty() {
+ return property;
+ }
+
+ public UriResourceComplexPropertyImpl setProperty(final EdmProperty property) {
+ this.property = property;
+ return this;
+ }
+
+ @Override
+ public EdmComplexType getComplexType() {
+ return (EdmComplexType) getType();
+ }
+
+ @Override
+ public EdmComplexType getComplexTypeFilter() {
+ return (EdmComplexType) typeFilter;
+ }
+
+ @Override
+ public EdmType getType() {
+ return property.getType();
+ }
+
+ @Override
+ public boolean isCollection() {
+ return property.isCollection();
+ }
+
+ @Override
+ public String toString() {
+ return property.getName();
+ }
+
+}
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/UriResourceCountImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceCountImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceCountImpl.java
new file mode 100644
index 0000000..179d174
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceCountImpl.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.server.api.uri.UriResourceCount;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+
+public class UriResourceCountImpl extends UriResourceImpl implements UriResourceCount {
+
+ public UriResourceCountImpl() {
+ super(UriResourceKind.count);
+ }
+
+ @Override
+ public String toString() {
+ return "$count";
+ }
+
+}
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/UriResourceEntitySetImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceEntitySetImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceEntitySetImpl.java
new file mode 100644
index 0000000..8c1617a
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceEntitySetImpl.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityType;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.server.api.uri.UriResourceEntitySet;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+
+public class UriResourceEntitySetImpl extends UriResourceWithKeysImpl implements UriResourceEntitySet {
+ protected EdmEntitySet edmEntitySet = null;
+
+ public UriResourceEntitySetImpl() {
+ super(UriResourceKind.entitySet);
+ }
+
+ @Override
+ public EdmEntitySet getEntitySet() {
+ return edmEntitySet;
+ }
+
+ public UriResourceEntitySetImpl setEntitSet(final EdmEntitySet edmES) {
+ edmEntitySet = edmES;
+ return this;
+ }
+
+ @Override
+ public EdmEntityType getEntityType() {
+ return edmEntitySet.getEntityType();
+ }
+
+ @Override
+ public EdmType getType() {
+ return edmEntitySet.getEntityType();
+ }
+
+ @Override
+ public boolean isCollection() {
+ if (keyPredicates == null) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ return edmEntitySet.getName();
+ }
+}
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/UriResourceFunctionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceFunctionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceFunctionImpl.java
new file mode 100644
index 0000000..f1c35bc
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceFunctionImpl.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmFunction;
+import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImport;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.server.api.uri.UriParameter;
+import org.apache.olingo.odata4.server.api.uri.UriResourceFunction;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+
+/**
+ * Covers Function imports and BoundFunction in URI
+ */
+public class UriResourceFunctionImpl extends UriResourceWithKeysImpl implements UriResourceFunction {
+
+ protected List<UriParameterImpl> parameters;
+ protected EdmFunction function;
+ protected EdmFunctionImport functionImport;
+ private boolean isParameterListFilled = false;
+
+ public UriResourceFunctionImpl() {
+ super(UriResourceKind.function);
+ }
+
+ @Override
+ public List<UriParameter> getParameters() {
+ List<UriParameter> retList = new ArrayList<UriParameter>();
+ for (UriParameterImpl item : parameters) {
+ retList.add(item);
+ }
+ return retList;
+ }
+
+ public UriResourceFunctionImpl setParameters(final List<UriParameterImpl> parameters) {
+ isParameterListFilled = true;
+ this.parameters = parameters;
+ return this;
+ }
+
+ @Override
+ public EdmFunction getFunction() {
+ return function;
+ }
+
+ public UriResourceFunctionImpl setFunction(final EdmFunction function) {
+ this.function = function;
+ return this;
+ }
+
+ @Override
+ public EdmFunctionImport getFunctionImport() {
+ return functionImport;
+ }
+
+ public UriResourceFunctionImpl setFunctionImport(final EdmFunctionImport edmFI,
+ final List<UriParameterImpl> parameters) {
+ functionImport = edmFI;
+
+ setParameters(parameters);
+
+ return this;
+ }
+
+ @Override
+ public EdmType getType() {
+ return function.getReturnType().getType();
+ }
+
+ @Override
+ public boolean isCollection() {
+ if (keyPredicates != null) {
+ return false;
+ }
+ return function.getReturnType().isCollection();
+ }
+
+ @Override
+ public String toString() {
+ if (functionImport != null) {
+ return functionImport.getName();
+ } else if (function != null) {
+ return function.getName();
+ }
+ return "";
+ }
+
+ public boolean isParameterListFilled() {
+ return isParameterListFilled;
+ }
+
+}
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/UriResourceImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceImpl.java
new file mode 100644
index 0000000..c0b04c6
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceImpl.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.server.api.uri.UriResource;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+
+/**
+ * Covers Functionimports and BoundFunction in URI
+ */
+public abstract class UriResourceImpl implements UriResource {
+ protected UriResourceKind kind;
+
+ public UriResourceImpl(final UriResourceKind kind) {
+ this.kind = kind;
+ }
+
+ @Override
+ public UriResourceKind getKind() {
+ return kind;
+ }
+
+}
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/UriResourceItImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceItImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceItImpl.java
new file mode 100644
index 0000000..baaf684
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceItImpl.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.server.api.uri.UriResourceIt;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+
+/**
+ * Covers Functionimports and BoundFunction in URI
+ */
+public class UriResourceItImpl extends UriResourceWithKeysImpl implements UriResourceIt {
+
+ private EdmType type;
+ private boolean isCollection;
+
+ public UriResourceItImpl() {
+ super(UriResourceKind.it);
+ }
+
+ @Override
+ public EdmType getType() {
+ return type;
+ }
+
+ public UriResourceItImpl setType(final EdmType type) {
+ this.type = type;
+ return this;
+ }
+
+ @Override
+ public boolean isCollection() {
+ if (keyPredicates != null) {
+ return false;
+ }
+ return isCollection;
+ }
+
+ public UriResourceItImpl setCollection(final boolean isCollection) {
+ this.isCollection = isCollection;
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ return "$it";
+ }
+
+}
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/UriResourceLambdaAllImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceLambdaAllImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceLambdaAllImpl.java
new file mode 100644
index 0000000..39ca238
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceLambdaAllImpl.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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmProperty;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourceLambdaAll;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression;
+import org.apache.olingo.odata4.server.core.uri.queryoption.expression.ExpressionImpl;
+
+public class UriResourceLambdaAllImpl extends UriResourceTypedImpl implements UriResourceLambdaAll {
+ protected EdmProperty property;
+ private String lamdaVariable;
+ private ExpressionImpl expression;
+
+ public UriResourceLambdaAllImpl() {
+ super(UriResourceKind.lambdaAll);
+ }
+
+ @Override
+ public EdmType getType() {
+ return EdmPrimitiveTypeKind.Boolean.getEdmPrimitiveTypeInstance();
+ }
+
+ @Override
+ public boolean isCollection() {
+ return false;
+ }
+
+ @Override
+ public String getLamdaVariable() {
+ return lamdaVariable;
+ }
+
+ public UriResourceLambdaAllImpl setLamdaVariable(final String lamdaVariable) {
+ this.lamdaVariable = lamdaVariable;
+ return this;
+ };
+
+ @Override
+ public Expression getExpression() {
+ return expression;
+ }
+
+ public UriResourceLambdaAllImpl setExpression(final ExpressionImpl expression) {
+ this.expression = expression;
+ return this;
+ };
+
+ @Override
+ public String toString() {
+ return "all";
+ }
+
+}
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/UriResourceLambdaAnyImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceLambdaAnyImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceLambdaAnyImpl.java
new file mode 100644
index 0000000..3a20c81
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceLambdaAnyImpl.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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmProperty;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourceLambdaAny;
+import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression;
+import org.apache.olingo.odata4.server.core.uri.queryoption.expression.ExpressionImpl;
+
+public class UriResourceLambdaAnyImpl extends UriResourceTypedImpl implements UriResourceLambdaAny {
+ protected EdmProperty property;
+ private String lamdaVariable;
+ private ExpressionImpl expression;
+
+ public UriResourceLambdaAnyImpl() {
+ super(UriResourceKind.lambdaAny);
+ }
+
+ @Override
+ public EdmType getType() {
+ return EdmPrimitiveTypeKind.Boolean.getEdmPrimitiveTypeInstance();
+ }
+
+ @Override
+ public boolean isCollection() {
+ return false;
+ }
+
+ @Override
+ public String getLamdaVariable() {
+ return lamdaVariable;
+ }
+
+ public UriResourceLambdaAnyImpl setLamdaVariable(final String lamdaVariable) {
+ this.lamdaVariable = lamdaVariable;
+ return this;
+ };
+
+ @Override
+ public Expression getExpression() {
+ return expression;
+ }
+
+ public UriResourceLambdaAnyImpl setExpression(final ExpressionImpl expression) {
+ this.expression = expression;
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ return "any";
+ };
+}
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/UriResourceLambdaVarImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceLambdaVarImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceLambdaVarImpl.java
new file mode 100644
index 0000000..e3154dc
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceLambdaVarImpl.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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourceLambdaRef;
+
+public class UriResourceLambdaVarImpl extends UriResourceTypedImpl implements UriResourceLambdaRef {
+
+ private EdmType type;
+ private boolean isCollection;
+ private String variableText;
+
+ public UriResourceLambdaVarImpl() {
+ super(UriResourceKind.lambdaVariable);
+ }
+
+ @Override
+ public String getVariableText() {
+ return variableText;
+ }
+
+ public UriResourceLambdaVarImpl setVariableText(final String variableText) {
+ this.variableText = variableText;
+ return this;
+ }
+
+ @Override
+ public EdmType getType() {
+ return type;
+ }
+
+ public UriResourceLambdaVarImpl setType(final EdmType type) {
+ this.type = type;
+ return this;
+
+ }
+
+ @Override
+ public boolean isCollection() {
+ return isCollection;
+ }
+
+ public UriResourceLambdaVarImpl setCollection(final boolean isCollection) {
+ this.isCollection = isCollection;
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ return 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/UriResourceNavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceNavigationPropertyImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceNavigationPropertyImpl.java
new file mode 100644
index 0000000..637f09a
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceNavigationPropertyImpl.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmNavigationProperty;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourceNavigation;
+
+public class UriResourceNavigationPropertyImpl extends UriResourceWithKeysImpl implements UriResourceNavigation {
+
+ protected EdmNavigationProperty navigationProperty;
+
+ public UriResourceNavigationPropertyImpl() {
+ super(UriResourceKind.navigationProperty);
+ }
+
+ @Override
+ public EdmNavigationProperty getProperty() {
+ return navigationProperty;
+ }
+
+ public UriResourceNavigationPropertyImpl setNavigationProperty(final EdmNavigationProperty property) {
+ navigationProperty = property;
+ return this;
+
+ }
+
+ @Override
+ public EdmType getType() {
+ return navigationProperty.getType();
+ }
+
+ @Override
+ public boolean isCollection() {
+ if (keyPredicates != null) {
+ return false;
+ }
+ return navigationProperty.isCollection();
+ }
+
+ @Override
+ public String toString() {
+ return navigationProperty.getName();
+ }
+
+}
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/UriResourcePrimitivePropertyImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourcePrimitivePropertyImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourcePrimitivePropertyImpl.java
new file mode 100644
index 0000000..3fd4139
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourcePrimitivePropertyImpl.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmProperty;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourcePrimitiveProperty;
+
+public class UriResourcePrimitivePropertyImpl extends UriResourceTypedImpl implements UriResourcePrimitiveProperty {
+
+ EdmProperty property;
+
+ public UriResourcePrimitivePropertyImpl() {
+ super(UriResourceKind.primitiveProperty);
+ }
+
+ @Override
+ public EdmProperty getProperty() {
+ return property;
+ }
+
+ public UriResourcePrimitivePropertyImpl setProperty(final EdmProperty property) {
+ this.property = property;
+ return this;
+ }
+
+ @Override
+ public EdmType getType() {
+ return property.getType();
+ }
+
+ @Override
+ public boolean isCollection() {
+ return property.isCollection();
+ }
+
+ @Override
+ public String toString() {
+ return property.getName();
+ }
+
+}
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/UriResourceRefImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceRefImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceRefImpl.java
new file mode 100644
index 0000000..17cf8f3
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceRefImpl.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourceRef;
+
+public class UriResourceRefImpl extends UriResourceImpl implements UriResourceRef {
+
+ public UriResourceRefImpl() {
+ super(UriResourceKind.ref);
+
+ }
+
+ @Override
+ public String toString() {
+ return "$ref";
+ }
+
+}
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/UriResourceRootImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceRootImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceRootImpl.java
new file mode 100644
index 0000000..1d5f55d
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceRootImpl.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourceRoot;
+
+public class UriResourceRootImpl extends UriResourceWithKeysImpl implements UriResourceRoot {
+
+ private EdmType type;
+ private boolean isCollection;
+
+ public UriResourceRootImpl() {
+ super(UriResourceKind.root);
+ }
+
+ @Override
+ public EdmType getType() {
+ return type;
+ }
+
+ public UriResourceRootImpl setType(final EdmType type) {
+ this.type = type;
+ return this;
+ }
+
+ @Override
+ public boolean isCollection() {
+ if (keyPredicates != null) {
+ return false;
+ }
+ return isCollection;
+ }
+
+ public UriResourceRootImpl setCollection(final boolean isCollection) {
+ this.isCollection = isCollection;
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ return "$root";
+ }
+
+}
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/UriResourceSingletonImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceSingletonImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceSingletonImpl.java
new file mode 100644
index 0000000..abb8964
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceSingletonImpl.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityType;
+import org.apache.olingo.odata4.commons.api.edm.EdmSingleton;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourceSingleton;
+
+public class UriResourceSingletonImpl extends UriResourceTypedImpl implements UriResourceSingleton {
+
+ private EdmSingleton singleton;
+
+ public UriResourceSingletonImpl() {
+ super(UriResourceKind.singleton);
+ }
+
+ @Override
+ public EdmSingleton getSingleton() {
+ return singleton;
+ }
+
+ public UriResourceSingletonImpl setSingleton(final EdmSingleton singleton) {
+
+ this.singleton = singleton;
+ return this;
+ }
+
+ @Override
+ public EdmEntityType getEntityTypeFilter() {
+ return (EdmEntityType) typeFilter;
+ }
+
+ @Override
+ public EdmType getType() {
+ return singleton.getEntityType();
+ }
+
+ @Override
+ public EdmEntityType getEntityType() {
+ return singleton.getEntityType();
+ }
+
+ @Override
+ public boolean isCollection() {
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ return singleton.getName();
+ }
+
+}
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/UriResourceStartingTypeFilterImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceStartingTypeFilterImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceStartingTypeFilterImpl.java
new file mode 100644
index 0000000..4d635c9
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceStartingTypeFilterImpl.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourceStartingTypeFilter;
+
+public class UriResourceStartingTypeFilterImpl extends UriResourceWithKeysImpl
+ implements UriResourceStartingTypeFilter {
+
+ private EdmType type;
+ private boolean isCollection;
+
+ public UriResourceStartingTypeFilterImpl() {
+ super(UriResourceKind.startingTypeFilter);
+ }
+
+ @Override
+ public UriResourceKind getKind() {
+ return kind;
+ }
+
+ @Override
+ public EdmType getType() {
+ return type;
+ }
+
+ public UriResourceStartingTypeFilterImpl setType(final EdmType type) {
+ this.type = type;
+ return this;
+ }
+
+ @Override
+ public boolean isCollection() {
+ if (keyPredicates != null) {
+ return false;
+ }
+ return isCollection;
+ }
+
+ public UriResourceStartingTypeFilterImpl setCollection(final boolean isCollection) {
+ this.isCollection = isCollection;
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ return type.getNamespace() + "." + type.getName();
+ }
+
+}
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/UriResourceTypedImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceTypedImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceTypedImpl.java
new file mode 100644
index 0000000..f718f75
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceTypedImpl.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;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmStructuralType;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourcePartTyped;
+
+public abstract class UriResourceTypedImpl extends UriResourceImpl implements UriResourcePartTyped {
+
+ protected EdmType typeFilter = null;
+
+ public UriResourceTypedImpl(final UriResourceKind kind) {
+ super(kind);
+ }
+
+ public EdmType getTypeFilter() {
+ return typeFilter;
+ }
+
+ public UriResourceTypedImpl setTypeFilter(final EdmStructuralType typeFilter) {
+ this.typeFilter = typeFilter;
+ return this;
+ }
+
+ @Override
+ public String toString(final boolean includeFilters) {
+ if (includeFilters) {
+ if (typeFilter != null) {
+ return toString() + "/" + getFQN(typeFilter).toString();
+ } else {
+ return toString();
+ }
+ }
+ return toString();
+ }
+
+ private FullQualifiedName getFQN(final EdmType type) {
+ return new FullQualifiedName(type.getNamespace(), type.getName());
+ }
+
+}
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/UriResourceValueImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceValueImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceValueImpl.java
new file mode 100644
index 0000000..9544b98
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceValueImpl.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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;
+
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourceValue;
+
+public class UriResourceValueImpl extends UriResourceImpl implements UriResourceValue {
+
+ public UriResourceValueImpl() {
+ super(UriResourceKind.value);
+
+ }
+
+ @Override
+ public String toString() {
+ return "$value";
+ }
+
+}
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/UriResourceWithKeysImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceWithKeysImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceWithKeysImpl.java
new file mode 100644
index 0000000..a54f16a
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/UriResourceWithKeysImpl.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName;
+import org.apache.olingo.odata4.server.api.uri.UriParameter;
+import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.server.api.uri.UriResourcePartTyped;
+
+public abstract class UriResourceWithKeysImpl extends UriResourceImpl implements UriResourcePartTyped {
+
+ protected EdmType collectionTypeFilter = null;
+ protected List<UriParameterImpl> keyPredicates = null;
+ protected EdmType entryTypeFilter = null;
+
+ public UriResourceWithKeysImpl(final UriResourceKind kind) {
+ super(kind);
+ }
+
+ public EdmType getTypeFilterOnCollection() {
+ return collectionTypeFilter;
+ }
+
+ public EdmType getTypeFilterOnEntry() {
+ return entryTypeFilter;
+ }
+
+ public List<UriParameter> getKeyPredicates() {
+ List<UriParameter> retList = new ArrayList<UriParameter>();
+ for (UriParameterImpl item : keyPredicates) {
+ retList.add(item);
+ }
+ return retList;
+ }
+
+ public UriResourceWithKeysImpl setKeyPredicates(final List<UriParameterImpl> list) {
+ keyPredicates = list;
+ return this;
+ }
+
+ public UriResourceWithKeysImpl setEntryTypeFilter(final EdmType entryTypeFilter) {
+ this.entryTypeFilter = entryTypeFilter;
+ return this;
+ }
+
+ public UriResourceWithKeysImpl setCollectionTypeFilter(final EdmType collectionTypeFilter) {
+ this.collectionTypeFilter = collectionTypeFilter;
+ return this;
+ }
+
+ public String toString(final boolean includeFilters) {
+
+ if (includeFilters == true) {
+ String tmp = "";
+ if (collectionTypeFilter != null) {
+ tmp += getFQN(collectionTypeFilter).toString();
+ }
+
+ if (entryTypeFilter != null) {
+ if (tmp.length() == 0) {
+ tmp = getFQN(entryTypeFilter).toString();
+ } else {
+ tmp += "/()" + getFQN(entryTypeFilter).toString();
+ }
+ }
+ if (tmp.length() != 0) {
+ return toString() + "/" + tmp;
+ }
+ }
+
+ return toString();
+ }
+
+ private FullQualifiedName getFQN(final EdmType type) {
+ return new FullQualifiedName(type.getNamespace(), type.getName());
+ }
+
+}
\ No newline at end of file
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/AliasQueryOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/AliasQueryOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/AliasQueryOptionImpl.java
new file mode 100644
index 0000000..6158168
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/AliasQueryOptionImpl.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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.AliasQueryOption;
+import org.apache.olingo.odata4.server.core.uri.queryoption.expression.ExpressionImpl;
+
+public class AliasQueryOptionImpl extends QueryOptionImpl implements AliasQueryOption {
+
+ private ExpressionImpl aliasValue;
+
+ @Override
+ public ExpressionImpl getValue() {
+ return aliasValue;
+ }
+
+ public AliasQueryOptionImpl setAliasValue(final ExpressionImpl aliasValue) {
+ this.aliasValue = aliasValue;
+ 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/CustomQueryOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/CustomQueryOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/CustomQueryOptionImpl.java
new file mode 100644
index 0000000..07ad60a
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/CustomQueryOptionImpl.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;
+
+import org.apache.olingo.odata4.server.api.uri.queryoption.CustomQueryOption;
+
+public class CustomQueryOptionImpl extends QueryOptionImpl implements CustomQueryOption {
+
+}
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/ExpandItemImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/ExpandItemImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/ExpandItemImpl.java
new file mode 100644
index 0000000..5d7ab42
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/ExpandItemImpl.java
@@ -0,0 +1,163 @@
+/*******************************************************************************
+ *
+ * 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.List;
+
+import org.apache.olingo.odata4.server.api.uri.UriInfoResource;
+import org.apache.olingo.odata4.server.api.uri.queryoption.ExpandItem;
+import org.apache.olingo.odata4.server.api.uri.queryoption.ExpandOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.FilterOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.InlineCountOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.LevelsExpandOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.OrderByOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SearchOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SelectOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SkipOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+import org.apache.olingo.odata4.server.api.uri.queryoption.TopOption;
+
+public class ExpandItemImpl implements ExpandItem {
+ private LevelsExpandOption levelsExpandOption;
+ private FilterOption filterOption;
+ private SearchOption searchOption;
+ private OrderByOption orderByOption;
+ private SkipOption skipOption;
+ private TopOption topOption;
+ private InlineCountOption inlineCountOption;
+ private SelectOption selectOption;
+ private ExpandOption expandOption;
+
+ private UriInfoResource resourceInfo;
+
+ private boolean isStar;
+
+ private boolean isRef;
+
+ public ExpandItemImpl setSystemQueryOption(final SystemQueryOptionImpl sysItem) {
+
+ if (sysItem.getKind() == SupportedQueryOptions.EXPAND) {
+ expandOption = (ExpandOptionImpl) sysItem;
+ } else if (sysItem.getKind() == SupportedQueryOptions.FILTER) {
+ filterOption = (FilterOptionImpl) sysItem;
+ } else if (sysItem.getKind() == SupportedQueryOptions.INLINECOUNT) {
+ inlineCountOption = (InlineCountOptionImpl) sysItem;
+ } else if (sysItem.getKind() == SupportedQueryOptions.ORDERBY) {
+ orderByOption = (OrderByOptionImpl) sysItem;
+ } else if (sysItem.getKind() == SupportedQueryOptions.SEARCH) {
+ searchOption = (SearchOptionImpl) sysItem;
+ } else if (sysItem.getKind() == SupportedQueryOptions.SELECT) {
+ selectOption = (SelectOptionImpl) sysItem;
+ } else if (sysItem.getKind() == SupportedQueryOptions.SKIP) {
+ skipOption = (SkipOptionImpl) sysItem;
+ } else if (sysItem.getKind() == SupportedQueryOptions.TOP) {
+ topOption = (TopOptionImpl) sysItem;
+ } else if (sysItem.getKind() == SupportedQueryOptions.LEVELS) {
+ levelsExpandOption = (LevelsExpandOption) sysItem;
+ }
+ return this;
+ }
+
+ public ExpandItemImpl setSystemQueryOptions(final List<SystemQueryOptionImpl> list) {
+
+ for (SystemQueryOptionImpl item : list) {
+ setSystemQueryOption(item);
+ }
+ return this;
+ }
+
+ @Override
+ public LevelsExpandOption getLevelsOption() {
+ return levelsExpandOption;
+ }
+
+ @Override
+ public FilterOption getFilterOption() {
+ return filterOption;
+ }
+
+ @Override
+ public SearchOption getSearchOption() {
+ return searchOption;
+ }
+
+ @Override
+ public OrderByOption getOrderByOption() {
+ return orderByOption;
+ }
+
+ @Override
+ public SkipOption getSkipOption() {
+ return skipOption;
+ }
+
+ @Override
+ public TopOption getTopOption() {
+ return topOption;
+ }
+
+ @Override
+ public InlineCountOption getInlineCountOption() {
+ return inlineCountOption;
+ }
+
+ @Override
+ public SelectOption getSelectOption() {
+
+ return selectOption;
+ }
+
+ @Override
+ public ExpandOption getExpandOption() {
+ return expandOption;
+ }
+
+ public ExpandItemImpl setResourceInfo(final UriInfoResource resourceInfo) {
+ this.resourceInfo = resourceInfo;
+ return this;
+ }
+
+ @Override
+ public UriInfoResource getResourceInfo() {
+
+ return resourceInfo;
+ }
+
+ @Override
+ public boolean isStar() {
+ return isStar;
+ }
+
+ public ExpandItemImpl setIsStar(final boolean isStar) {
+ this.isStar = isStar;
+ return this;
+ }
+
+ @Override
+ public boolean isRef() {
+ return isRef;
+ }
+
+ public ExpandItemImpl setIsRef(final boolean isRef) {
+ this.isRef = isRef;
+ 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/ExpandOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/ExpandOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/ExpandOptionImpl.java
new file mode 100644
index 0000000..b3ac035
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/ExpandOptionImpl.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.ExpandItem;
+import org.apache.olingo.odata4.server.api.uri.queryoption.ExpandOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+
+public class ExpandOptionImpl extends SystemQueryOptionImpl implements ExpandOption {
+
+ List<ExpandItemImpl> expandItems = new ArrayList<ExpandItemImpl>();
+
+ public ExpandOptionImpl() {
+ setKind(SupportedQueryOptions.EXPAND);
+ }
+
+ public void addExpandItem(final ExpandItemImpl expandItem) {
+ expandItems.add(expandItem);
+ }
+
+ @Override
+ public List<ExpandItem> getExpandItems() {
+ List<ExpandItem> retList = new ArrayList<ExpandItem>();
+ for (ExpandItemImpl item : expandItems) {
+ 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/FilterOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/FilterOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/FilterOptionImpl.java
new file mode 100644
index 0000000..106ea52
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/FilterOptionImpl.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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.FilterOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+import org.apache.olingo.odata4.server.core.uri.queryoption.expression.ExpressionImpl;
+
+public class FilterOptionImpl extends SystemQueryOptionImpl implements FilterOption {
+
+ private ExpressionImpl expression;
+
+ public FilterOptionImpl() {
+ setKind(SupportedQueryOptions.FILTER);
+ }
+
+ public FilterOptionImpl setExpression(final ExpressionImpl expression) {
+ this.expression = expression;
+ return this;
+ }
+
+ @Override
+ public ExpressionImpl getExpression() {
+ return 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/FormatOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/FormatOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/FormatOptionImpl.java
new file mode 100644
index 0000000..67a1982
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/FormatOptionImpl.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.FormatOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+
+public class FormatOptionImpl extends SystemQueryOptionImpl implements FormatOption {
+ private String value;
+
+ public FormatOptionImpl() {
+ setKind(SupportedQueryOptions.FORMAT);
+ }
+
+ public FormatOptionImpl setFormat(final String value) {
+ this.value = value;
+ return this;
+ }
+
+ @Override
+ public String getFormat() {
+ return value;
+ }
+
+}
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/IdOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/IdOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/IdOptionImpl.java
new file mode 100644
index 0000000..0789bfd
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/IdOptionImpl.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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.IdOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+
+public class IdOptionImpl extends SystemQueryOptionImpl implements IdOption {
+ private String value;
+
+ public IdOptionImpl() {
+ setKind(SupportedQueryOptions.ID);
+ }
+
+ public IdOptionImpl setValue(final String value) {
+ this.value = value;
+ return this;
+ }
+
+ @Override
+ public String getValue() {
+ return value;
+ }
+}
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/InlineCountOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/InlineCountOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/InlineCountOptionImpl.java
new file mode 100644
index 0000000..a274c0a
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/InlineCountOptionImpl.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.InlineCountOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+
+public class InlineCountOptionImpl extends SystemQueryOptionImpl implements InlineCountOption {
+
+ private boolean count;
+
+ public InlineCountOptionImpl() {
+ setKind(SupportedQueryOptions.INLINECOUNT);
+ }
+
+ @Override
+ public boolean getValue() {
+ return count;
+ }
+
+ public InlineCountOptionImpl setValue(final boolean count) {
+ this.count = count;
+ 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/LevelsOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/LevelsOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/LevelsOptionImpl.java
new file mode 100644
index 0000000..538dc52
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/LevelsOptionImpl.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ *
+ * 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.LevelsExpandOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+
+public class LevelsOptionImpl extends SystemQueryOptionImpl implements LevelsExpandOption {
+ private boolean isMax;
+ private int value;
+
+ public LevelsOptionImpl() {
+ setKind(SupportedQueryOptions.LEVELS);
+ }
+
+ public LevelsOptionImpl setLevel(final int value) {
+ this.value = value;
+ return this;
+ }
+
+ @Override
+ public boolean isMax() {
+ return isMax;
+ }
+
+ public LevelsOptionImpl setMax() {
+ isMax = true;
+ return this;
+
+ }
+
+ @Override
+ public int getLevel() {
+ return value;
+ }
+
+}
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/OrderByItemImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/OrderByItemImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/OrderByItemImpl.java
new file mode 100644
index 0000000..da7ae63
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/OrderByItemImpl.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 org.apache.olingo.odata4.server.api.uri.queryoption.OrderByItem;
+import org.apache.olingo.odata4.server.core.uri.queryoption.expression.ExpressionImpl;
+
+public class OrderByItemImpl implements OrderByItem {
+
+ private ExpressionImpl expression;
+ private boolean descending = false; // default sort order is ascending
+
+ @Override
+ public boolean isDescending() {
+ return descending;
+ }
+
+ public OrderByItem setDescending(final boolean descending) {
+ this.descending = descending;
+ return this;
+ }
+
+ @Override
+ public ExpressionImpl getExpression() {
+ return expression;
+ }
+
+ public OrderByItem setExpression(final ExpressionImpl expression) {
+ this.expression = expression;
+ 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/OrderByOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/OrderByOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/OrderByOptionImpl.java
new file mode 100644
index 0000000..1f7cf07
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/OrderByOptionImpl.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.OrderByItem;
+import org.apache.olingo.odata4.server.api.uri.queryoption.OrderByOption;
+import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
+
+public class OrderByOptionImpl extends SystemQueryOptionImpl implements OrderByOption {
+
+ private List<OrderByItemImpl> orders= new ArrayList<OrderByItemImpl>();
+
+ public OrderByOptionImpl() {
+ setKind(SupportedQueryOptions.ORDERBY);
+ }
+
+ @Override
+ public List<OrderByItem> getOrders() {
+ List<OrderByItem> retList = new ArrayList<OrderByItem>();
+ for (OrderByItemImpl item : orders) {
+ retList.add(item);
+ }
+ return retList;
+ }
+
+ public OrderByOptionImpl addOrder(final OrderByItemImpl order) {
+ orders.add(order);
+ return this;
+ }
+
+}