olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chri...@apache.org
Subject [12/29] [OLINGO-161] Refactored module names
Date Mon, 17 Feb 2014 15:35:59 GMT
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/SystemQueryOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/SystemQueryOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/SystemQueryOption.java
new file mode 100644
index 0000000..8abafbd
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/SystemQueryOption.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.producer.api.uri.queryoption;
+
+public interface SystemQueryOption extends QueryOption {
+
+  SupportedQueryOptions getKind();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/TopOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/TopOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/TopOption.java
new file mode 100644
index 0000000..acaf463
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/TopOption.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.producer.api.uri.queryoption;
+
+public interface TopOption extends SystemQueryOption {
+  
+  String getValue();
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/AliasExpression.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/AliasExpression.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/AliasExpression.java
new file mode 100644
index 0000000..e7f41af
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/AliasExpression.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.producer.api.uri.queryoption.expression;
+
+public interface AliasExpression  extends Expression {
+
+  public String getParameterName();
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/BinaryExpression.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/BinaryExpression.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/BinaryExpression.java
new file mode 100644
index 0000000..bd4d159
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/BinaryExpression.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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.api.uri.queryoption.expression;
+
+public interface BinaryExpression extends Expression {
+
+  public SupportedBinaryOperators getOperator();
+
+  public Expression getLeftOperand();
+
+  public Expression getRightOperand();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Constant.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Constant.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Constant.java
new file mode 100644
index 0000000..0961be6
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Constant.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.api.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+
+public interface Constant extends Expression {
+
+  public boolean isNull();
+
+  public boolean isTrue();
+
+  public boolean isFalse();
+
+  public SupportedConstants getKind();
+
+  public EdmType getType();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Enumeration.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Enumeration.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Enumeration.java
new file mode 100644
index 0000000..d870c56
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Enumeration.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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.api.uri.queryoption.expression;
+
+import java.util.List;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmEnumType;
+
+public interface Enumeration extends Expression {
+
+  public List<String> getValues();
+  public EdmEnumType getType();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/ExceptionVisitExpression.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/ExceptionVisitExpression.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/ExceptionVisitExpression.java
new file mode 100644
index 0000000..f722ec0
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/ExceptionVisitExpression.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.producer.api.uri.queryoption.expression;
+
+public class ExceptionVisitExpression extends Exception {
+
+  private static final long serialVersionUID = 1L;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Expression.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Expression.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Expression.java
new file mode 100644
index 0000000..5a1b8b1
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Expression.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.api.uri.queryoption.expression;
+
+public interface Expression extends VisitableExression {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/ExpressionVisitor.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/ExpressionVisitor.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/ExpressionVisitor.java
new file mode 100644
index 0000000..ea3bc3e
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/ExpressionVisitor.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * 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.api.uri.queryoption.expression;
+
+import java.util.List;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmEnumType;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.producer.api.uri.UriInfoResource;
+
+public interface ExpressionVisitor<T> {
+
+  T visitBinaryOperator(SupportedBinaryOperators operator, T left, T right)
+      throws ExceptionVisitExpression, ODataApplicationException;
+
+  T visitUnaryOperator(SupportedUnaryOperators operator, T operand)
+      throws ExceptionVisitExpression, ODataApplicationException;
+
+  T visitMethodCall(SupportedMethodCalls methodCall, List<T> parameters)
+      throws ExceptionVisitExpression, ODataApplicationException;
+  
+  T visitLambdaExpression(String functionText,String variableText, Expression expression)
+      throws ExceptionVisitExpression, ODataApplicationException;
+
+  T visitLiteral(String literal) throws ExceptionVisitExpression, ODataApplicationException;
+
+  T visitMember(UriInfoResource member) throws ExceptionVisitExpression, ODataApplicationException;
+
+  T visitAlias(String referenceName) throws ExceptionVisitExpression, ODataApplicationException;
+
+  T visitTypeLiteral(EdmType type) throws ExceptionVisitExpression, ODataApplicationException;
+
+  T visitLambdaReference(String variableText) throws ExceptionVisitExpression, ODataApplicationException;
+
+  T visitEnum(EdmEnumType type, List<String> enumValues) throws ExceptionVisitExpression, ODataApplicationException;
+  
+  T visitConstant(SupportedConstants kind) throws ExceptionVisitExpression, ODataApplicationException;
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/LambdaRef.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/LambdaRef.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/LambdaRef.java
new file mode 100644
index 0000000..67a18b6
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/LambdaRef.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.producer.api.uri.queryoption.expression;
+
+public interface LambdaRef extends Expression {
+
+  public String getVariableName();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Literal.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Literal.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Literal.java
new file mode 100644
index 0000000..1d9a76c
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Literal.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.producer.api.uri.queryoption.expression;
+
+public interface Literal extends Expression {
+
+  public String getText();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Member.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Member.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Member.java
new file mode 100644
index 0000000..a15d422
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/Member.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.api.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.producer.api.uri.UriInfoResource;
+
+public interface Member extends Expression {
+
+  public UriInfoResource getPath();
+
+  public EdmType getType();
+  
+  public boolean isCollection();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/MethodCall.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/MethodCall.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/MethodCall.java
new file mode 100644
index 0000000..31dfe9b
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/MethodCall.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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.api.uri.queryoption.expression;
+
+import java.util.List;
+
+public interface MethodCall extends Expression {
+
+  public SupportedMethodCalls getMethod();
+
+  public List<Expression> getParameters();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedBinaryOperators.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedBinaryOperators.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedBinaryOperators.java
new file mode 100644
index 0000000..ce52f76
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedBinaryOperators.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * 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.api.uri.queryoption.expression;
+
+public enum SupportedBinaryOperators {
+  
+  //enum
+  HAS("has"),
+  // multiplicative
+  MUL("mul"), DIV("div"), MOD("mod"),
+  // additive
+  ADD("add"), SUB("sub"),
+  // comparism
+  GT("gt"), GE("ge"), LT("lt"), LE("le"),
+  // 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(final 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/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedConstants.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedConstants.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedConstants.java
new file mode 100644
index 0000000..4813729
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedConstants.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.api.uri.queryoption.expression;
+
+public enum SupportedConstants {
+  
+  TRUE("true"),
+  FALSE("false"),
+  NULL("null");
+  
+  private String syntax;
+
+  private SupportedConstants(final String syntax) {
+    this.syntax = syntax;
+  }
+
+  public static SupportedConstants get(final String operator) {
+    for (SupportedConstants op : SupportedConstants.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/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedMethodCalls.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedMethodCalls.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedMethodCalls.java
new file mode 100644
index 0000000..b3e7804
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedMethodCalls.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * 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.api.uri.queryoption.expression;
+
+public enum SupportedMethodCalls {
+  CONTAINS("contains"), STARTSWITH("startswith"), ENDSWITH("endswith"), LENGTH("length"),
+  INDEXOF("indexof"), SUBSTRING("substring"), TOLOWER("tolower"), TOUPPER("toupper"), TRIM("trim"),
+  CONCAT("concat"),
+
+  YEAR("year"), MONTH("month"), DAY("day"), HOUR("hour"), MINUTE("minute"), SECOND("second"),
+  FRACTIONALSECONDS("fractionalseconds"), TOTALSECONDS("totalseconds"), DATE("date"), TIME("time"),
+  TOTALOFFSETMINUTES("totaloffsetminutes"), MINDATETIME("mindatetime"), MAXDATETIME("maxdatetime"), NOW("now"),
+
+  ROUND("round"), FLOOR("floor"),
+
+  CEILING("ceiling"), GEODISTANCE("geo.distance"), GEOLENGTH("geo.length"), GEOINTERSECTS("geo.intersects"),
+  CAST("cast"),
+  ISOF("isof");
+
+  private String syntax;
+
+  private SupportedMethodCalls(final String syntax) {
+    this.syntax = syntax;
+  }
+
+  @Override
+  public String toString() {
+    return syntax;
+  }
+
+  public static SupportedMethodCalls get(final String method) {
+    for (SupportedMethodCalls op : SupportedMethodCalls.values()) {
+      if (op.toString().equals(method )) {
+        return op;
+      }
+    }
+    return null;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedUnaryOperators.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedUnaryOperators.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedUnaryOperators.java
new file mode 100644
index 0000000..cd4a932
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/SupportedUnaryOperators.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.producer.api.uri.queryoption.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(final 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/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/TypeLiteral.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/TypeLiteral.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/TypeLiteral.java
new file mode 100644
index 0000000..4aa6bcf
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/TypeLiteral.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.api.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+
+public interface TypeLiteral extends Expression {
+
+  public EdmType getType();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/UnaryOperator.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/UnaryOperator.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/UnaryOperator.java
new file mode 100644
index 0000000..62d935c
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/UnaryOperator.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.api.uri.queryoption.expression;
+
+public interface UnaryOperator extends Expression {
+
+  public Expression getOperand();
+
+  public SupportedUnaryOperators getOperator();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/VisitableExression.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/VisitableExression.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/VisitableExression.java
new file mode 100644
index 0000000..ab31dd7
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/expression/VisitableExression.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.api.uri.queryoption.expression;
+
+import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+
+public interface VisitableExression {
+
+  /**
+   * 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 which are of the generic type T
+   * <li>Call the appropriate method on the {@link ExpressionVisitor} instance and provide the stored return 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 of type T 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, ODataApplicationException;
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchBinary.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchBinary.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchBinary.java
new file mode 100644
index 0000000..c6b123b
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchBinary.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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.api.uri.queryoption.search;
+
+public interface SearchBinary extends SearchExpression {
+
+  SupportedSearchBinaryOperators getOperator();
+
+  SearchExpression getLeftOperand();
+
+  SearchExpression getRightOperand();
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchExpression.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchExpression.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchExpression.java
new file mode 100644
index 0000000..7c68b5b
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchExpression.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.api.uri.queryoption.search;
+
+public interface SearchExpression {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchTerm.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchTerm.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchTerm.java
new file mode 100644
index 0000000..7979917
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchTerm.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.producer.api.uri.queryoption.search;
+
+public interface SearchTerm extends SearchExpression {
+  
+  String getSearchTerm();
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchUnary.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchUnary.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchUnary.java
new file mode 100644
index 0000000..422641a
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SearchUnary.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.producer.api.uri.queryoption.search;
+
+public interface SearchUnary {
+  
+  SearchExpression getOperand();
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SupportedSearchBinaryOperators.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SupportedSearchBinaryOperators.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SupportedSearchBinaryOperators.java
new file mode 100644
index 0000000..76702b5
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SupportedSearchBinaryOperators.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.api.uri.queryoption.search;
+
+public enum SupportedSearchBinaryOperators {
+  // and/or
+  AND("and"), OR("or");
+
+  private String syntax;
+
+  private SupportedSearchBinaryOperators(final String syntax) {
+    this.syntax = syntax;
+  }
+  
+  @Override
+  public String toString() {
+    return syntax;
+  }
+
+  public static SupportedSearchBinaryOperators get(final String operator) {
+    for (SupportedSearchBinaryOperators op : SupportedSearchBinaryOperators.values()) {
+      if (op.toString().equals(operator)) {
+        return op;
+      }
+    }
+    return null;
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SupportedSearchUnaryOperators.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SupportedSearchUnaryOperators.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SupportedSearchUnaryOperators.java
new file mode 100644
index 0000000..d62941c
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/queryoption/search/SupportedSearchUnaryOperators.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.api.uri.queryoption.search;
+
+public enum SupportedSearchUnaryOperators {
+  NOT("not");
+
+  private String syntax;
+
+  private SupportedSearchUnaryOperators(final String syntax) {
+    this.syntax = syntax;
+  }
+
+  @Override
+  public String toString() {
+    return syntax;
+  }
+
+  public static SupportedSearchUnaryOperators get(final String operator) {
+    for (SupportedSearchUnaryOperators op : SupportedSearchUnaryOperators.values()) {
+      if (op.toString().equals(operator)) {
+        return op;
+      }
+    }
+    return null;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-core/pom.xml
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/pom.xml b/odata4-lib/odata4-server-core/pom.xml
new file mode 100644
index 0000000..e6ada36
--- /dev/null
+++ b/odata4-lib/odata4-server-core/pom.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>olingo-odata4-server-core-incubating</artifactId>
+  <packaging>jar</packaging>
+  <name>${project.artifactId}</name>
+
+  <parent>
+    <groupId>org.apache.olingo</groupId>
+    <artifactId>olingo-odata4-lib-incubating</artifactId>
+    <version>0.1.0-SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent>
+	
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.olingo</groupId>
+      <artifactId>olingo-odata4-server-api-incubating</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.olingo</groupId>
+      <artifactId>olingo-odata4-commons-core-incubating</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.antlr</groupId>
+      <artifactId>antlr4-runtime</artifactId>
+      <version>${antlr.version}</version>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+	
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.antlr</groupId>
+        <artifactId>antlr4-maven-plugin</artifactId>
+        <version>${antlr.version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>antlr4</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <!--<arguments><argument>-atn</argument></arguments>-->
+          <listener>true</listener>
+          <visitor>true</visitor>
+          <!--maven antlr plugin has trouble with grammer import if the grammerfiles are 
+          not directly inside  src/main/antlr4, hence we have to set the libDirectory-->
+          <libDirectory>src/main/antlr4/org/apache/olingo/odata4/producer/core/uri/antlr</libDirectory>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+	
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/c49ff803/odata4-lib/odata4-server-core/src/main/antlr4/org/apache/olingo/odata4/producer/core/uri/antlr/UriLexer.g4
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/antlr4/org/apache/olingo/odata4/producer/core/uri/antlr/UriLexer.g4 b/odata4-lib/odata4-server-core/src/main/antlr4/org/apache/olingo/odata4/producer/core/uri/antlr/UriLexer.g4
new file mode 100644
index 0000000..33e7296
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/antlr4/org/apache/olingo/odata4/producer/core/uri/antlr/UriLexer.g4
@@ -0,0 +1,405 @@
+/*******************************************************************************
+ * 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.
+ ******************************************************************************/
+lexer grammar UriLexer;
+
+//;==============================================================================
+// Mode "DEFAULT_MODE": Processes everything bevor the first '?' char
+// On '?' the next mode "MODE_QUERY" is used
+// The percent encoding rules a defined in RFC3986 ABNF rule "path-rootless" apply
+//;==============================================================================
+QM              : '?'                 ->        pushMode(MODE_QUERY);               //first query parameter
+AMP             : '&'                 ->        pushMode(MODE_QUERY);               //more query parameters
+STRING          : '\''                -> more,  pushMode(MODE_STRING);              //reads up to next single '
+QUOTATION_MARK  : ('\u0022' | '%22')  -> more,  pushMode(MODE_JSON_STRING);         //reads up to next unescaped "
+SEARCH_INLINE   : '$search'           ->        pushMode(MODE_SYSTEM_QUERY_SEARCH); //
+FRAGMENT        : '#'                 ->        pushMode(MODE_FRAGMENT); //
+
+GEOGRAPHY    : G E O G R A P H Y SQUOTE         -> pushMode(MODE_ODATA_GEO); //TODO make case insensitive
+GEOMETRY     : G E O M E T R Y   SQUOTE         -> pushMode(MODE_ODATA_GEO);
+
+//Letters for case insensitivity
+fragment A    : 'A'|'a';
+fragment B    : 'B'|'b';
+fragment D    : 'D'|'d';
+fragment E    : 'E'|'e';
+fragment F    : 'F'|'f';
+fragment G    : 'G'|'g';
+fragment H    : 'H'|'h';
+fragment I    : 'I'|'i';
+fragment L    : 'L'|'l';
+fragment M    : 'M'|'m';
+fragment N    : 'N'|'n';
+fragment O    : 'O'|'o';
+fragment P    : 'P'|'p';
+fragment R    : 'R'|'r';
+fragment S    : 'S'|'s';
+fragment T    : 'T'|'t';
+fragment U    : 'U'|'u';
+fragment Y    : 'Y'|'y';
+fragment Z    : 'Z'|'z';
+
+//special chars
+OPEN            : '(' | '%28';
+CLOSE           : ')' | '%29';
+COMMA           : ',' | '%2C';
+SLASH           : '/';
+POINT           : '.';
+AT              : '@';
+EQ              : '=' ;
+STAR            : '*';
+SEMI            : ';' | '%3b';
+COLON           : ':';
+
+EQ_sq           : '='           -> type(EQ);
+AMP_sq          : '&'           -> type(AMP), popMode;
+fragment WS     : ( ' ' | '%09' | '%20' | '%09' );
+WSP             : WS+;
+
+//JSON support 
+BEGIN_OBJECT    : WS* ( '{' / '%7B' ) WS*;
+END_OBJECT      : WS* ( '}' / '%7D' ) WS*;
+
+BEGIN_ARRAY     : WS* ( '[' / '%5B' ) WS*;
+END_ARRAY       : WS* ( ']' / '%5D' ) WS*;
+
+
+//alpha stuff
+fragment ALPHA                : 'a'..'z' | 'A'..'Z';
+fragment ALPHA_A_TO_F         : 'a'..'f' | 'A'..'F';
+fragment DIGIT                : '0'..'9';
+fragment DIGITS               : DIGIT+;
+fragment HEXDIG               : DIGIT | ALPHA_A_TO_F;
+fragment ODI_LEADINGCHARACTER : ALPHA | '_';            //TODO; add Unicode characters from the categories L or Nl
+fragment ODI_CHARACTER        : ALPHA | '_' | DIGIT;    //TODO; add Unicode characters from the categories L, Nl, Nd, Mn, Mc, Pc, or Cf
+
+//helper for date/time values
+fragment ONE_TO_NINE        : '1'..'9';
+fragment ZERO_TO_FIFTYNINE  : ('0'..'5') DIGIT;
+fragment FRACTIONALSECONDS  : DIGIT+;
+fragment SECOND             : ZERO_TO_FIFTYNINE;
+fragment MINUTE             : ZERO_TO_FIFTYNINE;
+fragment HOUR               : ('0' | '1') DIGIT | '2' ( '0'..'3');
+fragment DAY                : '0' '1'..'9' | ('1'|'2') DIGIT | '3' ('0'|'1');
+fragment MONTH              : '0' ONE_TO_NINE | '1' ( '0' | '1' | '2' );
+fragment YEAR               : ('-')? ( '0' DIGIT DIGIT DIGIT | ONE_TO_NINE DIGIT DIGIT DIGIT );
+
+//tags start with $ 
+BATCH         : '$batch';
+ENTITY        : '$entity';
+METADATA      : '$metadata';
+
+ALL           : '$all';
+CROSSJOIN     : '$crossjoin';
+
+VALUE         : '$value';
+REF           : '$ref';
+COUNT         : '$count';
+
+//inlined query parameters ( e.g. $skip)
+TOP_I    : '$top' -> type(TOP);
+SKIP_I   : '$skip' -> type(SKIP);
+FILTER_I : '$filter' -> type(FILTER);
+ORDERBY_I: '$orderby' -> type(ORDERBY);
+SELECT_I: '$select' -> type(SELECT);
+EXPAND_I: '$expand' -> type(EXPAND);
+LEVELS_I: '$levels' -> type(LEVELS);
+MAX: 'max';
+
+ROOT            : '$root/';
+
+
+
+//rest
+NULLVALUE     : 'null';
+
+TRUE          : 'true';
+FALSE         : 'false';
+BOOLEAN       :  T R U E |  F A L S E; 
+PLUS          : '+';
+SIGN          : PLUS  | '%2B'   |'-';
+INT           : SIGN? DIGITS;
+DECIMAL       : INT '.' DIGITS ('e' SIGN?  DIGITS)?;
+
+//primary types
+BINARY                      : B I N A R Y SQUOTE (HEXDIG HEXDIG)* SQUOTE; 
+DATE                        : YEAR '-' MONTH '-' DAY;
+DATETIMEOFFSET              : YEAR '-' MONTH '-' DAY T HOUR ':' MINUTE ( ':' SECOND ( '.' FRACTIONALSECONDS )? )? ( Z | SIGN HOUR ':' MINUTE );
+fragment DUSECONDFRAG       : DIGITS ('.' DIGITS)? 'S';
+fragment DUTIMEFRAG         : 'T' (   
+                              ( DIGITS 'H' (DIGITS 'M')? DUSECONDFRAG?) 
+                              | (DIGITS 'M' DUSECONDFRAG?) 
+                              | DUSECONDFRAG
+                            );
+fragment DUDAYTIMEFRAG      : DIGITS 'D' DUTIMEFRAG? | DUTIMEFRAG;
+DURATION                    : D U R A T I O N SQUOTE '-'? 'P' DUDAYTIMEFRAG SQUOTE;
+TIMEOFDAY                   : HOUR ':' MINUTE ( ':' SECOND ( '.' FRACTIONALSECONDS )? )?;
+fragment GUIDVALUE          : HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG'-' 
+                              HEXDIG HEXDIG HEXDIG HEXDIG  '-' 
+                              HEXDIG HEXDIG HEXDIG HEXDIG  '-' 
+                              HEXDIG HEXDIG HEXDIG HEXDIG  '-' 
+                              HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG;
+GUID                        : GUIDVALUE;
+
+//expression tokens
+ASC             : 'asc'; 
+DESC            : 'desc';
+MUL             : 'mul';
+DIV             : 'div';
+MOD             : 'mod';
+HAS             : 'has';
+
+ADD             : 'add';
+SUB             : 'sub';
+
+ANY_LAMDA       : 'any';
+ALL_LAMDA       : 'all';
+
+GT              : 'gt';
+GE              : 'ge';
+LT              : 'lt';
+LE              : 'le';
+ISOF            : 'isof';
+
+EQ_ALPHA        : 'eq';
+NE              : 'ne';
+
+AND             : 'and';
+OR              : 'or';
+
+
+NOT             : 'not';
+MINUS           :'-';
+NANINFINITY     : 'NaN' | '-INF' | 'INF';
+
+IT  : '$it';
+ITSLASH  : '$it/';
+LEVELS               : '$levels';
+
+CONTAINS_WORD             : 'contains(';
+STARTSWITH_WORD           : 'startswith(';
+ENDSWITH_WORD             : 'endswith(';
+LENGTH_WORD               : 'length(';
+INDEXOF_WORD              : 'indexof(';
+SUBSTRING_WORD            : 'substring(';
+TOLOWER_WORD              : 'tolower(';
+TOUPPER_WORD              : 'toupper(';
+TRIM_WORD                 : 'trim(';
+CONCAT_WORD               : 'concat(';
+YEAR_WORD                 : 'year(';
+MONTH_WORD                : 'month(';
+DAY_WORD                  : 'day(';
+HOUR_WORD                 : 'hour(';
+MINUTE_WORD               : 'minute(';
+SECOND_WORD               : 'second(';
+FRACTIONALSECONDS_WORD    : 'fractionalseconds(';
+TOTALSECONDS_WORD         : 'totalseconds(';
+DATE_WORD                 : 'date(';
+TIME_WORD                 : 'time(';
+TOTALOFFSETMINUTES_WORD   : 'totaloffsetminutes(';
+
+MINDATETIME_WORD          : 'mindatetime(';
+MAXDATETIME_WORD          : 'maxdatetime(';
+NOW_WORD                  : 'now(';
+
+ROUND_WORD                : 'round(';
+FLOOR_WORD                : 'floor(';
+CEILING_WORD              : 'ceiling(';
+
+GEO_DISTANCE_WORD         : 'geo.distance(';
+GEO_LENGTH_WORD           : 'geo.length(';
+GEO_INTERSECTS_WORD       : 'geo.intersects(';
+ISOF_WORD                 : 'isof(';
+CAST_WORD                 : 'cast(';
+
+COLLECTION_REF            : 'Collection($ref)';
+COLLECTION_ENTITY_TYPE    : 'Collection(Edm.EntityType)';
+COLLECTION_COMPLEX_TYPE   : 'Collection(Edm.ComplexType)';
+COLLECTION                : 'Collection(' -> type(COLLECTION);
+
+//used in fragment only
+DELETED_ENTITY            : '$deletedEntity';
+LINK                      : '$link';
+DELETED_LINK              : '$deletedLink';
+DELTA                     : '$delta';
+
+//ODI
+ODATAIDENTIFIER             : ODI_LEADINGCHARACTER (ODI_CHARACTER)*;
+
+//;==============================================================================
+// Mode "QUERY": Processes everything between the first '?' and the '#' char
+// On '?' the next mode "FRAGMENT" is used
+// The percent encoding rules a defined in RFC3986 ABNF rule "query" apply
+mode MODE_QUERY;
+//;==============================================================================
+
+FRAGMENT_q          : '#'           -> type(FRAGMENT);
+FILTER              : '$filter'     ->                    pushMode(DEFAULT_MODE);
+ORDERBY             : '$orderby'    ->                    pushMode(DEFAULT_MODE);
+EXPAND              : '$expand'     ->                    pushMode(DEFAULT_MODE);
+SELECT              : '$select'     ->                    pushMode(DEFAULT_MODE);
+SKIP                : '$skip'       ->                    pushMode(DEFAULT_MODE);
+SKIPTOKEN           : '$skiptoken'  ->                    pushMode(MODE_SYSTEM_QUERY_REST);
+TOP                 : '$top'        ->                    pushMode(DEFAULT_MODE);
+LEVELS_q            : '$levels'     -> type(LEVELS),      pushMode(DEFAULT_MODE);
+FORMAT              : '$format'     ->                    pushMode(MODE_SYSTEM_QUERY_PCHAR);
+COUNT_q             : '$count'      -> type(COUNT),       pushMode(DEFAULT_MODE);
+REF_q               : '$ref'        -> type(REF);
+VALUE_q             : '$value'      -> type(VALUE);
+ID                  : '$id'         ->                    pushMode(MODE_SYSTEM_QUERY_REST);
+SEARCH              : '$search'     ->                    pushMode(MODE_SYSTEM_QUERY_SEARCH);
+
+EQ_q          : '=' -> type(EQ);
+AMP_q         : '&' -> type(AMP);
+
+AT_Q          : '@' -> pushMode(DEFAULT_MODE);
+
+CUSTOMNAME    : ~[&=@$] ~[&=]* -> pushMode(MODE_SYSTEM_QUERY_REST);
+
+//;==============================================================================
+mode MODE_SYSTEM_QUERY_PCHAR;
+//;==============================================================================
+
+AMP_sqp   : '&' -> type(AMP),       popMode;
+
+fragment ALPHA_sqp          : 'a'..'z'|'A'..'Z';
+fragment A_TO_F_sqp         : 'a'..'f'|'A'..'F';
+fragment DIGIT_sqp          : '0'..'9';
+fragment HEXDIG_sqp         : DIGIT_sqp | A_TO_F_sqp;
+fragment PCT_ENCODED_sqp    : '%' HEXDIG_sqp HEXDIG_sqp;
+fragment SUB_DELIMS_sqp     : '$' | /*'&' |*/ '\'' | EQ_sqp | OTHER_DELIMS_sqp;
+fragment OTHER_DELIMS_sqp   : '!' | '(' | ')' | '*' | '+' | ',' | ';';
+fragment UNRESERVED_sqp     : ALPHA_sqp | DIGIT_sqp | '-' |'.' | '_' | '~'; 
+fragment PCHAR              : UNRESERVED_sqp | PCT_ENCODED_sqp | SUB_DELIMS_sqp | ':' | '@'; 
+fragment PCHARSTART         : UNRESERVED_sqp | PCT_ENCODED_sqp | '$' | /*'&' |*/ '\'' | OTHER_DELIMS_sqp | ':' | '@'; 
+
+
+ATOM : [Aa][Tt][Oo][Mm];
+JSON : [Jj][Ss][Oo][Nn];
+XML  : [Xx][Mm][Ll];
+
+PCHARS : PCHARSTART PCHAR*;
+
+
+SLASH_sqp : '/' -> type(SLASH);
+EQ_sqp    : '=' -> type(EQ);
+FRAGMENT_sqp  : '#'     -> type(FRAGMENT),  pushMode(MODE_FRAGMENT);
+
+//;==============================================================================
+mode MODE_FRAGMENT;
+// Read the remaining characters of a URI queryparameter up to an & or # 
+// character.
+//;==============================================================================
+
+REST_F          : ~('\r'|'\n')* -> type(REST),  popMode;
+
+//;==============================================================================
+mode MODE_SYSTEM_QUERY_REST;
+// Read the remaining characters of a URI queryparameter up to an & or # 
+// character.
+//;==============================================================================
+
+AMP_sqr       : '&'     -> type(AMP),       popMode;
+FRAGMENT_sqr  : '#'     -> type(FRAGMENT),  popMode;
+
+EQ_sqr        : '='     -> type(EQ);
+REST          : ~[&#=] ~[&#]*;
+
+//;==============================================================================
+mode MODE_SYSTEM_QUERY_SEARCH;
+//;==============================================================================
+
+NOT_sqc             : 'NOT'   -> type(NOT);
+AND_sqc             : 'AND'   -> type(AND);
+OR_sqc              : 'OR'    -> type(OR);
+EQ_sqc              : '='     -> type(EQ);
+
+fragment WS_sqc     : ( ' ' | '\u0009' | '%20' | '%09' );
+WSP_sqc             : WS_sqc+ -> type(WSP);
+
+QUOTATION_MARK_sqc  : '\u0022' | '%22';
+
+SEARCHWORD          : ('a'..'z'|'A'..'Z')+;
+SEARCHPHRASE        : QUOTATION_MARK_sqc ~["]* QUOTATION_MARK_sqc -> popMode;
+
+
+//;==============================================================================
+mode MODE_STRING;
+// Read the remaining characters up to an ' character.
+// An "'" character inside a string are expressed as double ''
+//;==============================================================================
+
+STRING_s            : ('\'\'' | ~[\u0027] )* '\'' -> type(STRING), popMode;
+
+//;==============================================================================
+mode MODE_JSON_STRING;
+// Read the remaining characters up to an " character.
+// An "'" character inside a string are expressed excaped \"
+//;==============================================================================
+
+STRING_IN_JSON      : ('\\"' | ~[\u0022] )* ('"' | '%22') -> popMode;
+
+//;==============================================================================
+mode MODE_ODATA_GEO;
+//;==============================================================================
+
+fragment C_  : 'c'|'C';
+fragment D_  : 'd'|'D';
+fragment E_  : 'e'|'E';
+fragment G_  : 'g'|'G';
+fragment H_  : 'h'|'H';
+fragment I_  : 'i'|'I';
+fragment L_  : 'l'|'L';
+fragment M_  : 'm'|'M';
+fragment N_  : 'n'|'N';
+fragment O_  : 'o'|'O';
+fragment P_  : 'p'|'P';
+fragment R_  : 'r'|'R';
+fragment S_  : 's'|'S';
+fragment T_  : 't'|'T';
+fragment U_  : 'u'|'U';
+fragment Y_  : 'y'|'Y';
+
+fragment SP_g   : ' ';//'\u0020'; // a simple space
+fragment WS_g   : ( ' ' | '%20' | '%09' );
+
+OPEN_g          : ('(' | '%28') -> type(OPEN);
+CLOSE_g         : (')' | '%29') -> type(CLOSE);
+COMMA_g         : (',' | '%2C') -> type(COMMA);
+WSP_g           : WS_g+ -> type(WSP);
+POINT_g         : '.' -> type(POINT);
+AT_g            : '@' -> type(AT);
+SEMI_g            : (';' | '%3B') -> type(SEMI);
+EQ_g            : '=' -> type(EQ);
+
+fragment DIGIT_g    : '0'..'9';
+fragment DIGITS_g   : DIGIT_g+;
+SIGN_g              : ('+' | '%2B' |'-') -> type(SIGN);
+INT_g               : SIGN_g? DIGITS_g -> type(INT);
+DECIMAL_g           : INT_g '.' DIGITS_g ('e' SIGN_g?  DIGITS_g)? -> type(DECIMAL);
+COLLECTION_g        : C_ O_ L_ L_ E_ C_ T_ I_ O_ N_ -> type(COLLECTION);
+LINESTRING          : L_ I_ N_ E_ S_ T_ R_ I_ N_ G_ ;
+MULTILINESTRING     : M_ U_ L_ T_ I_ L_ I_ N_ E_ S_ T_ R_ I_ N_ G_;
+MULTIPOINT          : M_ U_ L_ T_ I_ P_ O_ I_ N_ T_ ;
+MULTIPOLYGON        : M_ U_ L_ T_ I_ P_ O_ L_ Y_ G_ O_ N_;
+GEO_POINT           : P_ O_ I_ N_ T_;
+POLYGON             : P_ O_ L_ Y_ G_ O_ N_ ;
+
+SRID                : S_ R_ I_ D_;
+
+SQUOTE              : '\''  -> popMode;


Mime
View raw message