You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ko...@apache.org on 2014/01/23 12:30:38 UTC

[07/12] [OLINGO-63] Uri Parser: Add support for II

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceRefImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceRefImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceRefImpl.java
new file mode 100644
index 0000000..690034e
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceRefImpl.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.producer.core.uri;
+
+
+import org.apache.olingo.odata4.producer.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.producer.api.uri.UriResourceRef;
+public class UriResourceRefImpl extends UriResourcePartImpl implements UriResourceRef {
+
+  public UriResourceRefImpl() {
+    super(UriResourceKind.ref);
+
+  }
+
+  
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceRootImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceRootImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceRootImpl.java
new file mode 100644
index 0000000..bf2c3fb
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceRootImpl.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.producer.core.uri;
+
+import org.apache.olingo.odata4.producer.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.producer.api.uri.UriResourceRoot;
+
+public class UriResourceRootImpl  extends UriResourcePartImpl implements UriResourceRoot {
+
+  public UriResourceRootImpl() {
+    super(UriResourceKind.root);
+  }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceSimplePropertyImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceSimplePropertyImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceSimplePropertyImpl.java
new file mode 100644
index 0000000..e16a73c
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceSimplePropertyImpl.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.producer.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.producer.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.producer.api.uri.UriResourceSimpleProperty;
+
+public class UriResourceSimplePropertyImpl extends UriResourceImplTyped implements UriResourceSimpleProperty {
+
+  EdmProperty property;
+  
+  public UriResourceSimplePropertyImpl() {
+    super(UriResourceKind.simpleProperty);
+  }
+
+  
+
+  @Override
+  public EdmProperty getProperty() {
+    return property;
+  }
+  
+  public UriResourceSimplePropertyImpl setProperty( EdmProperty property) {
+   this.property = property;
+    return this;
+  }
+
+  @Override
+  public EdmType getType() {
+    return property.getType();
+  }
+
+  @Override
+  public boolean isCollection() {
+    return property.isCollection();
+  }
+ 
+  
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceSingletonImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceSingletonImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceSingletonImpl.java
new file mode 100644
index 0000000..f6666a2
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceSingletonImpl.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.producer.core.uri;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmSingleton;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.producer.api.uri.UriResourceKind;
+
+public class UriResourceSingletonImpl extends UriResourceImplTyped {
+
+  private EdmSingleton singleton;
+
+  public UriResourceSingletonImpl() {
+    super(UriResourceKind.singleton);
+  }
+
+  public UriResourceSingletonImpl setSingleton(EdmSingleton singleton) {
+
+    this.singleton = singleton;
+    return this;
+  }
+
+  @Override
+  public String toString() {
+    return singleton.getName() + super.toString();
+  }
+
+  @Override
+  public EdmType getType() {
+    return singleton.getEntityType();
+  }
+
+  @Override
+  public boolean isCollection() {
+    return false;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceValueImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceValueImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceValueImpl.java
new file mode 100644
index 0000000..ceae82a
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/UriResourceValueImpl.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.producer.core.uri;
+
+
+
+import org.apache.olingo.odata4.producer.api.uri.UriResourceKind;
+import org.apache.olingo.odata4.producer.api.uri.UriResourceValue;
+public class UriResourceValueImpl extends UriResourcePartImpl implements UriResourceValue {
+
+  public UriResourceValueImpl() {
+    super(UriResourceKind.value);
+
+  }
+
+  
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Alias.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Alias.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Alias.java
deleted file mode 100644
index a5630f1..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Alias.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-
-public class Alias extends Expression {
-
-  private String referenceName;
-
-  public void setReference(String referenceName) {
-    this.referenceName = referenceName;
-  }
-
-  @Override
-  public <T> T accept(ExpressionVisitor<T> visitor) throws ExceptionVisitExpression {
-    return visitor.visitAlias(referenceName);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Binary.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Binary.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Binary.java
deleted file mode 100644
index 5ee51a8..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Binary.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-public class Binary extends Expression implements Visitable {
-
-  private SupportedBinaryOperators operator;
-  private Expression left;
-  private Expression right;
-
-  public Binary setOperator(SupportedBinaryOperators operator) {
-    this.operator = operator;
-    return this;
-  }
-
-  public void setLeftOperand(Expression operand) {
-    this.left = operand;
-
-  }
-
-  public void setRightOperand(Expression operand) {
-    this.right = operand;
-
-  }
-
-  @Override
-  public <T> T accept(ExpressionVisitor<T> visitor) throws ExceptionVisitExpression {
-    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/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/ExceptionVisitExpression.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/ExceptionVisitExpression.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/ExceptionVisitExpression.java
deleted file mode 100644
index 8cbc166..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/ExceptionVisitExpression.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-public class ExceptionVisitExpression extends Exception {
-
-  /**
-   * 
-   */
-  private static final long serialVersionUID = 822365726050299076L;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Expression.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Expression.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Expression.java
deleted file mode 100644
index 0d3c517..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Expression.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-public abstract class Expression implements Visitable{
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/ExpressionVisitor.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/ExpressionVisitor.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/ExpressionVisitor.java
deleted file mode 100644
index 92e4dc1..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/ExpressionVisitor.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-import java.util.List;
-
-public interface ExpressionVisitor<T> {
-
-  T visitBinaryOperator(SupportedBinaryOperators operator, T left, T right) throws ExceptionVisitExpression;
-  
-  T visitUnaryOperator( SupportedUnaryOperators operator, T operand) throws ExceptionVisitExpression;
-  
-  T visitMethodCall( SupportedMethodCalls methodCall, List<T> parameters)throws ExceptionVisitExpression;
-  
-  T visitLiteral(String literal) throws ExceptionVisitExpression;
-
-  T visitMember(Member member) throws ExceptionVisitExpression;
-
-  T visitAlias(String referenceName) throws ExceptionVisitExpression;
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Literal.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Literal.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Literal.java
deleted file mode 100644
index 2b20f4f..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Literal.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-public class Literal extends Expression implements Visitable {
-
-  private String text;
-
-  public void setText(String text) {
-    this.text = text;
-  }
-
-  @Override
-  public <T> T accept(ExpressionVisitor<T> visitor) throws ExceptionVisitExpression {
-    return visitor.visitLiteral(text);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Member.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Member.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Member.java
deleted file mode 100644
index c3132a2..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Member.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-import org.apache.olingo.odata4.producer.core.uri.UriInfoImplPath;
-
-public class Member extends Expression implements Visitable {
-
-  private boolean isIT; // means $it as defined in the ABNF 
-  private UriInfoImplPath path;
-
-  public boolean isIT() {
-    return isIT;
-  }
-  
-  public Member setIT(boolean isIT) {
-    this.isIT = isIT;
-    return this;
-  } 
-
-  
-  public UriInfoImplPath getPath() {
-    return path;
-  }
-  
-  public Member setPath(UriInfoImplPath pathSegments) {
-    this.path = pathSegments;
-    return this;
-  }
-   
-
-  @Override
-  public <T> T accept(ExpressionVisitor<T> visitor) throws ExceptionVisitExpression {
-    return visitor.visitMember(this);
-  }
-
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/MethodCall.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/MethodCall.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/MethodCall.java
deleted file mode 100644
index 6872ad9..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/MethodCall.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class MethodCall extends Expression  implements Visitable{
-
-  private SupportedMethodCalls method;
-  private List<Expression> parameters = new ArrayList<Expression>();
-
-  public void setMethod(SupportedMethodCalls methodCalls) {
-    this.method = methodCalls;
-  }
-
-  public void addParameter(Expression readCommonExpression) {
-    parameters.add(readCommonExpression);
-  }
-
-  @Override
-  public <T> T accept(ExpressionVisitor<T>  visitor) throws ExceptionVisitExpression {
-    List<T> userParameters = new ArrayList<T>();
-    for (Expression parameter : parameters ) {
-      userParameters.add(parameter.accept(visitor));
-    }
-    return visitor.visitMethodCall(method, userParameters);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedBinaryOperators.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedBinaryOperators.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedBinaryOperators.java
deleted file mode 100644
index 72fb9df..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedBinaryOperators.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-public enum SupportedBinaryOperators {
-  //multiplicative
-  MUL("mul"), DIV("div"), MOD("mod"),
-  //additive
-  ADD("add"), SUB("sub"),
-  //comparism
-  GT("gt"), GE("ge"), LT("lt"), LE("le"),
-  //isof
-  ISOF("isof"),
-  //equality
-  EQ("eq"), NE("ne"),
-  //and/or
-  AND("and"), OR("or");
-
-  private String syntax;
-
-  private SupportedBinaryOperators(final String syntax) {
-    this.syntax = syntax;
-  }
-
-  public static SupportedBinaryOperators get(String operator) {
-    for (SupportedBinaryOperators op : SupportedBinaryOperators.values()) {
-      if (op.toString().equals(operator)) {
-        return op;
-      }
-    }
-    return null;
-  }
-  
-  @Override
-  public String toString() {
-    return syntax;
-  }
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedMethodCalls.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedMethodCalls.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedMethodCalls.java
deleted file mode 100644
index 949992b..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedMethodCalls.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-public enum SupportedMethodCalls {
-  MUL("mul"), DIV("div"), MOD("mod"),
-  ADD("add"), SUB("sub"), GT("gt"), GE("ge"), LT("lt"), LE("le"),
-  ISOF("isof"),
-  EQ("eq"), NE("ne"),
-  AND("and"), OR("or");
-
-  private String syntax;
-
-  private SupportedMethodCalls(final String syntax) {
-    this.syntax = syntax;
-  }
-
-  @Override
-  public String toString() {
-    return syntax;
-  }
-
-  public static SupportedMethodCalls get(String operator) {
-    for (SupportedMethodCalls op : SupportedMethodCalls.values()) {
-      if (op.toString().equals(operator)) {
-        return op;
-      }
-    }
-    return null;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedUnaryOperators.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedUnaryOperators.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedUnaryOperators.java
deleted file mode 100644
index 3f2318f..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/SupportedUnaryOperators.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-public enum SupportedUnaryOperators {
-  MINUS("-"), NOT("not");
-
-  private String syntax;
-
-  private SupportedUnaryOperators(final String syntax) {
-    this.syntax = syntax;
-  }
-
-  @Override
-  public String toString() {
-    return syntax;
-  }
-
-  public static SupportedUnaryOperators get(String operator) {
-    for (SupportedUnaryOperators op : SupportedUnaryOperators.values()) {
-      if (op.toString().equals(operator)) {
-        return op;
-      }
-    }
-    return null;
-  }
- 
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/UnaryOperator.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/UnaryOperator.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/UnaryOperator.java
deleted file mode 100644
index 2e7cc90..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/UnaryOperator.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-public class UnaryOperator extends Expression implements Visitable {
-
-  private SupportedUnaryOperators operator;
-  private Expression expression;
-
-  public void setOperand(Expression expression) {
-    this.expression = expression;
-  }
-
-  public void setOperator(SupportedUnaryOperators operator) {
-    this.operator = operator;
-  }
-
-  @Override
-  public <T> T accept(ExpressionVisitor<T> visitor) throws ExceptionVisitExpression {
-    T operand = expression.accept(visitor); 
-    return visitor.visitUnaryOperator(operator, operand);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Visitable.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Visitable.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Visitable.java
deleted file mode 100644
index 76cfe7c..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/expression/Visitable.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.expression;
-
-
-
-
-/* TODO update documentation*/
-public interface Visitable {
-
-  /**
-   * Method {@link #accept(ExpressionVisitor)} is called when traversing the expression tree. This method is invoked on
-   * each
-   * expression used as node in an expression tree. The implementations should
-   * behave as follows:
-   * <li>Call accept on all sub nodes and store the returned Objects
-   * <li>Call the appropriate method on the {@link ExpressionVisitor} instance and provide the stored objects to that
-   * instance
-   * <li>Return the object which should be passed to the processing algorithm of the parent expression node
-   * <br>
-   * <br>
-   * @param visitor
-   * Object ( implementing {@link ExpressionVisitor}) whose methods are called during traversing a expression node of
-   * the expression tree.
-   * @return
-   * Object which should be passed to the processing algorithm of the parent expression node
-   * @throws ExceptionVisitExpression
-   * Exception occurred the OData library while traversing the tree
-   * @throws ODataApplicationException
-   * Exception thrown by the application who implemented the visitor
-   */
-  <T> T accept(ExpressionVisitor<T> visitor)   throws ExceptionVisitExpression;
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/AliasQueryOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/AliasQueryOptionImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/AliasQueryOptionImpl.java
new file mode 100644
index 0000000..2e0a9e1
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/AliasQueryOptionImpl.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.producer.core.uri.queryoption;
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.AliasQueryOption;
+import org.apache.olingo.odata4.producer.core.uri.queryoption.expression.ExpressionImpl;
+
+public class AliasQueryOptionImpl extends QueryOptionImpl implements AliasQueryOption {
+  // TODO change value of alias to a interface which need to be defined
+  private ExpressionImpl aliasValue;
+
+  @Override
+  public ExpressionImpl getAliasValue() {
+    return aliasValue;
+  }
+
+  
+  
+  public AliasQueryOptionImpl setAliasValue(ExpressionImpl aliasValue) {
+    this.aliasValue = aliasValue;
+    return this;
+  }
+ 
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/CustomQueryOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/CustomQueryOptionImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/CustomQueryOptionImpl.java
new file mode 100644
index 0000000..2096d6f
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/CustomQueryOptionImpl.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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.producer.core.uri.queryoption;
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.CustomQueryOption;
+
+public class CustomQueryOptionImpl extends QueryOptionImpl implements CustomQueryOption {
+  
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandItemImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandItemImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandItemImpl.java
new file mode 100644
index 0000000..22b34d7
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandItemImpl.java
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * 
+ * 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.producer.core.uri.queryoption;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.odata4.commons.api.edm.Edm;
+import org.apache.olingo.odata4.producer.api.uri.UriResourceProperty;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.ExceptionVisitExpand;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.ExpandItem;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.ExpandOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.ExpandVisitor;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.FilterOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.InlineCountOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.LevelExpandOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.OrderByOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SearchOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SelectOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SkipOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SystemQueryOptionEnum;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.TopOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.VisitableExpand;
+
+public class ExpandItemImpl implements ExpandItem, VisitableExpand {
+  private Edm edm;
+
+  private ExpandSegment lastExpandSegment = null;
+
+  private List<ExpandSegment> segments = new ArrayList<ExpandSegment>();
+
+  private boolean isStar;
+  private LevelExpandOption levelExpandOption;
+  private FilterOption filterOption;
+  private SearchOption searchOption;
+  private OrderByOption orderByOption;
+  private SkipOption skipOption;
+  private TopOption topOption;
+  private InlineCountOption inlineCountOption;
+  private SelectOption selectOption;
+  private ExpandOption expandOption;
+
+  public ExpandItemImpl setEdm(Edm edm) {
+    this.edm = edm;
+    return this;
+  }
+
+  
+  public ExpandItemImpl setStar(boolean isStar) {
+    this.isStar = isStar;
+    return this;
+  }
+
+  
+
+  public ExpandSegment getLastSegement() {
+    return lastExpandSegment;
+  }
+   
+  
+  public ExpandItemImpl setExpandQueryOption(QueryOptionImpl item) {
+    if (item instanceof SystemQueryOptionImpl) {
+        SystemQueryOptionImpl sysItem = (SystemQueryOptionImpl) item;
+
+        if (sysItem.getKind() == SystemQueryOptionEnum.EXPAND) {
+          expandOption = (ExpandOptionImpl) sysItem;
+        } else if (sysItem.getKind() == SystemQueryOptionEnum.FILTER) {
+          filterOption = (FilterOptionImpl) sysItem;
+        } else if (sysItem.getKind() == SystemQueryOptionEnum.INLINECOUNT) {
+          inlineCountOption = (InlineCountImpl) sysItem;
+        } else if (sysItem.getKind() == SystemQueryOptionEnum.ORDERBY) {
+          orderByOption = (OrderByImpl) sysItem;
+        } else if (sysItem.getKind() == SystemQueryOptionEnum.SEARCH) {
+          searchOption = (SearchOptionImpl) sysItem;
+        } else if (sysItem.getKind() == SystemQueryOptionEnum.SELECT) {
+          selectOption = (SelectOptionImpl) sysItem;
+        } else if (sysItem.getKind() == SystemQueryOptionEnum.SKIP) {
+          skipOption = (SkipOptionImpl) sysItem;
+        } else if (sysItem.getKind() == SystemQueryOptionEnum.TOP) {
+          topOption = (TopOptionImpl) sysItem;
+        }
+      }
+    return this;
+  }
+  public ExpandItemImpl setExpandQueryOptions(List<QueryOptionImpl> list) {
+
+    for (QueryOptionImpl item : list) {
+      setExpandQueryOption(item);
+    }
+    return this;
+  }
+
+  public ExpandItemImpl addSegment(ExpandSegment segment) {
+    lastExpandSegment = segment;
+    segments.add(segment);
+    return this;
+  }
+
+
+  @Override
+  public <T> T accept(ExpandVisitor<T> visitor) throws ExceptionVisitExpand {
+
+    List<T> parameters = new ArrayList<T>();
+    for (ExpandSegment segment : segments) {
+      parameters.add(segment.accept(visitor));
+    }
+
+    // TODO implement visitor pattern for options
+
+    return null; //visitor.visitExpandItem(parameters, isStar, isRef, finalType);
+  }
+
+  @Override
+  public boolean isStar() {
+    return isStar;
+  }
+
+  
+
+  
+
+  @Override
+  public List<UriResourceProperty> getPropertyChainList() {
+
+    return null;
+  }
+
+  @Override
+  public LevelExpandOption getLevel() {
+    return levelExpandOption;
+  }
+
+  @Override
+  public FilterOption getFilter() {
+    return filterOption;
+  }
+
+  @Override
+  public SearchOption getSearch() {
+    return searchOption;
+  }
+
+  @Override
+  public OrderByOption getOrderBy() {
+    return orderByOption;
+  }
+
+  @Override
+  public SkipOption getSkip() {
+    return skipOption;
+  }
+
+  @Override
+  public TopOption getTop() {
+    return topOption;
+  }
+
+  @Override
+  public InlineCountOption getInlineCount() {
+    return inlineCountOption;
+  }
+
+  @Override
+  public SelectOption getSelect() {
+
+    return selectOption;
+  }
+
+  @Override
+  public ExpandOption getExpand() {
+    return expandOption;
+  }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandOptionImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandOptionImpl.java
new file mode 100644
index 0000000..08161a3
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandOptionImpl.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * 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.producer.core.uri.queryoption;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.ExceptionVisitExpand;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.ExpandItem;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.ExpandOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.ExpandVisitor;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SystemQueryOptionEnum;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.VisitableExpand;
+
+public class ExpandOptionImpl extends SystemQueryOptionImpl implements ExpandOption, VisitableExpand {
+
+  List<ExpandItemImpl> expandItems = new ArrayList<ExpandItemImpl>();
+
+  public ExpandOptionImpl() {
+    setKind(SystemQueryOptionEnum.EXPAND);
+  }
+
+  public void addExpandItem(ExpandItemImpl expandItem) {
+    expandItems.add(expandItem);
+  }
+
+  public List<ExpandItem> getExpandItems() {
+    List<ExpandItem> retList = new ArrayList<ExpandItem>();
+    for (ExpandItemImpl item : expandItems) {
+      retList.add(item);
+    }
+    return retList;
+  }
+
+  @Override
+  public <T> T accept(ExpandVisitor<T> visitor) throws ExceptionVisitExpand {
+    List<T> parameters = new ArrayList<T>();
+    for (ExpandItemImpl expandItem : expandItems) {
+      parameters.add(expandItem.accept(visitor));
+    }
+
+    return visitor.visitExpand(parameters);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandSegment.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandSegment.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandSegment.java
new file mode 100644
index 0000000..173cbce
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/ExpandSegment.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * 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.producer.core.uri.queryoption;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmElement;
+import org.apache.olingo.odata4.commons.api.edm.EdmStructuralType;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.ExceptionVisitExpand;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.ExpandVisitor;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.VisitableExpand;
+/*TODO fix this*/
+public class ExpandSegment  implements VisitableExpand {
+  private EdmType typeFilter;
+  private EdmElement property;
+
+  public ExpandSegment setProperty(EdmElement property) {
+    this.property = property;
+    return this;
+  }
+
+  public EdmType getType() {
+    return property.getType();
+  }
+  
+  public EdmType getTypeFilter() {
+    return this.typeFilter;
+  }
+  
+
+  public void setFilter(EdmStructuralType type) {
+    this.typeFilter = type;
+  }
+  
+  @Override
+  public <T> T accept(ExpandVisitor<T> visitor) throws ExceptionVisitExpand {
+    return null;//visitor.visitExpandSegment(property, initialType, finalType); 
+  }
+  
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/Filter.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/Filter.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/Filter.java
deleted file mode 100644
index 0f45289..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/Filter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.queryoption;
-
-import org.apache.olingo.odata4.producer.core.uri.expression.Expression;
-
-public class Filter extends SystemQueryOption {
-  
-  
-  Expression expression;
-
-  public Filter(Expression expression) {
-    this.expression = expression;
-  }
-
-  public Expression getTree() {
-    return expression;
-  }
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/FilterOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/FilterOptionImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/FilterOptionImpl.java
new file mode 100644
index 0000000..bb1d6ec
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/FilterOptionImpl.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.producer.core.uri.queryoption;
+
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.FilterOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SystemQueryOptionEnum;
+import org.apache.olingo.odata4.producer.core.uri.queryoption.expression.ExpressionImpl;
+
+public class FilterOptionImpl extends SystemQueryOptionImpl implements FilterOption {
+
+  private ExpressionImpl expression;
+
+  public FilterOptionImpl() {
+    setKind(SystemQueryOptionEnum.FILTER);
+  }
+  
+  public FilterOptionImpl  setExpression(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/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/FormatOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/FormatOptionImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/FormatOptionImpl.java
new file mode 100644
index 0000000..ab8e280
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/FormatOptionImpl.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.producer.core.uri.queryoption;
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.FormatOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SystemQueryOptionEnum;
+
+
+public class FormatOptionImpl extends SystemQueryOptionImpl implements FormatOption {
+  private String value;
+
+  public FormatOptionImpl() {
+    setKind(SystemQueryOptionEnum.FORMAT);
+  }
+
+  public FormatOptionImpl setValue(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/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/IdOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/IdOptionImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/IdOptionImpl.java
new file mode 100644
index 0000000..6d5722e
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/IdOptionImpl.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * 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.producer.core.uri.queryoption;
+
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.IdOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SystemQueryOptionEnum;
+
+public class IdOptionImpl extends SystemQueryOptionImpl implements IdOption {
+  private String value;
+  
+
+  public IdOptionImpl() {
+    setKind(SystemQueryOptionEnum.ID);
+  }
+  
+  public IdOptionImpl setValue(String value) {
+    this.value = value;
+    return this;
+  }
+  
+  //TODO remove
+  public String getValue() {
+    return value;
+  }
+
+
+  @Override
+  public String getIdValue() {
+    return value;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/InlineCountImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/InlineCountImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/InlineCountImpl.java
new file mode 100644
index 0000000..3610d60
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/InlineCountImpl.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * 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.producer.core.uri.queryoption;
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.InlineCountOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SystemQueryOptionEnum;
+
+
+public class InlineCountImpl extends SystemQueryOptionImpl implements InlineCountOption {
+
+  private String count;
+
+  public InlineCountImpl() {
+    setKind(SystemQueryOptionEnum.INLINECOUNT);
+  }
+
+  public String getCount() {
+    return count;
+  }
+
+  public InlineCountImpl setCount(String count) {
+    this.count = count;
+    return this;
+  }
+
+  @Override
+  public boolean getInlineCountValue() {
+    // TODO Auto-generated method stub
+    return false;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/LevelOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/LevelOption.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/LevelOption.java
new file mode 100644
index 0000000..34bdaaf
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/LevelOption.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * 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.producer.core.uri.queryoption;
+
+public interface LevelOption {
+  boolean isMax();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/LevelOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/LevelOptionImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/LevelOptionImpl.java
new file mode 100644
index 0000000..ab0d34f
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/LevelOptionImpl.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.producer.core.uri.queryoption;
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SystemQueryOptionEnum;
+
+public class LevelOptionImpl extends SystemQueryOptionImpl implements LevelOption{
+  private boolean isMax;
+  private String value;
+
+  public LevelOptionImpl() {
+    setKind(SystemQueryOptionEnum.LEVEL);
+  }
+
+  public LevelOptionImpl setValue(String value) {
+    this.value = value;
+    return this;
+  }
+
+  public String getValue() {
+    return value;
+  }
+
+  
+  @Override
+  public boolean isMax() {
+    return isMax;
+  }
+  
+  public LevelOptionImpl setMax() {
+    isMax = true;
+    return this;
+    
+  }
+
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/OrderByImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/OrderByImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/OrderByImpl.java
new file mode 100644
index 0000000..a9b2014
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/OrderByImpl.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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.producer.core.uri.queryoption;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.OrderByItem;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.OrderByOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SystemQueryOptionEnum;
+
+public class OrderByImpl extends SystemQueryOptionImpl implements OrderByOption{
+  
+  private List<OrderByOptionImpl> orders;
+
+  public OrderByImpl() {
+    setKind(SystemQueryOptionEnum.ORDERBY);
+  }
+  
+  public List<OrderByItem>  getOrders() {
+    List<OrderByItem> retList = new ArrayList<OrderByItem>();
+    for ( OrderByOptionImpl item: orders) {
+      retList.add(item);
+    }
+    return Collections.unmodifiableList(retList);
+  }
+  
+  public OrderByImpl addOrder(OrderByOptionImpl order) {
+    orders.add(order);
+    return this;
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/OrderByOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/OrderByOptionImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/OrderByOptionImpl.java
new file mode 100644
index 0000000..2da85cb
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/OrderByOptionImpl.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 
+ * 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.producer.core.uri.queryoption;
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.OrderByItem;
+import org.apache.olingo.odata4.producer.core.uri.queryoption.expression.ExpressionImpl;
+
+public class OrderByOptionImpl extends SystemQueryOptionImpl implements OrderByItem {
+
+  private ExpressionImpl expression;
+  private boolean descending;
+
+  @Override
+  public boolean isDescending() {
+    return descending;
+  }
+  
+  public OrderByItem setSortOrder( boolean  descending) {
+    this.descending = descending;
+    return this;
+  }
+
+  
+  public ExpressionImpl getExpression() {
+    return expression;
+  }
+  
+  public OrderByItem  setExpression(ExpressionImpl expression) {
+    this.expression = expression;
+    return this;
+  }
+
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/QueryOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/QueryOption.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/QueryOption.java
deleted file mode 100644
index f1a40a3..0000000
--- a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/QueryOption.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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.producer.core.uri.queryoption;
-
-public class QueryOption {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/QueryOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/QueryOptionImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/QueryOptionImpl.java
new file mode 100644
index 0000000..b6c2bb2
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/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.producer.core.uri.queryoption;
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.QueryOption;
+
+public class QueryOptionImpl implements QueryOption {
+  private String name;
+  private String text;
+
+  @Override
+  public String getName() {
+    return name;
+  }
+
+  public QueryOptionImpl setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  @Override
+  public String getText() {
+    return text;
+  }
+
+  public QueryOptionImpl setText(String value) {
+    this.text = value;
+    return this;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/7955eadf/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/SearchOptionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/SearchOptionImpl.java b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/SearchOptionImpl.java
new file mode 100644
index 0000000..c271907
--- /dev/null
+++ b/odata4-lib/odata4-producer-core/src/main/java/org/apache/olingo/odata4/producer/core/uri/queryoption/SearchOptionImpl.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.producer.core.uri.queryoption;
+
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SearchOption;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.SystemQueryOptionEnum;
+import org.apache.olingo.odata4.producer.api.uri.queryoption.search.SearchExpression;
+
+/*TODO implement*/
+public class SearchOptionImpl extends SystemQueryOptionImpl implements SearchOption {
+
+  public SearchOptionImpl() {
+    setKind(SystemQueryOptionEnum.SEARCH);
+  }
+
+  @Override
+  public SearchExpression getSearchExpression() {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  
+}