diff --git a/odata4-lib/odata4-client-api/src/main/java/org/apache/olingo/odata4/client/api/ODataConsumer.java b/odata4-lib/odata4-client-api/src/main/java/org/apache/olingo/odata4/client/api/ODataConsumer.java index 07e6aa1cf..5fc7d29b8 100644 --- a/odata4-lib/odata4-client-api/src/main/java/org/apache/olingo/odata4/client/api/ODataConsumer.java +++ b/odata4-lib/odata4-client-api/src/main/java/org/apache/olingo/odata4/client/api/ODataConsumer.java @@ -18,8 +18,6 @@ ******************************************************************************/ package org.apache.olingo.odata4.client.api; -import org.apache.olingo.odata4.commons.api.edm.Edm; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; //TODO: Exceptionhandling public abstract class ODataConsumer { @@ -44,7 +42,4 @@ public abstract class ODataConsumer { } return instance; } - - public abstract Edm createEdm(EdmProvider provider); - } diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/ODataConsumerImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/ODataConsumerImpl.java index 460bb22d8..656bd0bb4 100644 --- a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/ODataConsumerImpl.java +++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/ODataConsumerImpl.java @@ -19,15 +19,7 @@ package org.apache.olingo.odata4.client.core; import org.apache.olingo.odata4.client.api.ODataConsumer; -import org.apache.olingo.odata4.commons.api.edm.Edm; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.core.ODataCommonsCoreImpl; public class ODataConsumerImpl extends ODataConsumer { - @Override - public Edm createEdm(final EdmProvider provider) { - return new ODataCommonsCoreImpl().createEdm(provider); - } - } diff --git a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/ODataConsumerTest.java b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/ODataConsumerTest.java index 91467fb8e..216e1edb7 100644 --- a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/ODataConsumerTest.java +++ b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/ODataConsumerTest.java @@ -18,24 +18,16 @@ ******************************************************************************/ package org.apache.olingo.odata4.client.core; +import static org.junit.Assert.assertNotNull; + import org.apache.olingo.odata4.client.api.ODataConsumer; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.junit.Before; import org.junit.Test; public class ODataConsumerTest { - private ODataConsumer consumer; - - @Before - public void before() { - consumer = ODataConsumer.create(); - } - @Test - public void edmtest() { - EdmProvider provider = null; - consumer.createEdm(provider); + public void before() { + ODataConsumer consumer = ODataConsumer.create(); + assertNotNull(consumer); } - } diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/exception/ODataApplicationException.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/ODataApplicationException.java similarity index 95% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/exception/ODataApplicationException.java rename to odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/ODataApplicationException.java index fed88618d..fc722be32 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/exception/ODataApplicationException.java +++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/ODataApplicationException.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.exception; +package org.apache.olingo.odata4.commons.api; public class ODataApplicationException extends Exception { private static final long serialVersionUID = 1L; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/exception/ODataException.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/ODataException.java similarity index 95% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/exception/ODataException.java rename to odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/ODataException.java index 6b0ba33d2..f5a975f61 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/exception/ODataException.java +++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/ODataException.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.exception; +package org.apache.olingo.odata4.commons.api; public class ODataException extends Exception { private static final long serialVersionUID = 1L; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/exception/ODataNotImplementedException.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/ODataNotImplementedException.java similarity index 95% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/exception/ODataNotImplementedException.java rename to odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/ODataNotImplementedException.java index e546a19ed..e936577c2 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/exception/ODataNotImplementedException.java +++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/ODataNotImplementedException.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.exception; +package org.apache.olingo.odata4.commons.api; public class ODataNotImplementedException extends ODataException { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Edm.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Edm.java index 52db4fa88..635b342c0 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Edm.java +++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Edm.java @@ -20,8 +20,6 @@ package org.apache.olingo.odata4.commons.api.edm; import java.util.List; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; - /** * Entity Data Model (EDM)

Interface representing a Entity Data Model as described in the Conceptual Schema * Definition. diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmNavigationProperty.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmNavigationProperty.java index 7d4cbbd4d..3abe02db2 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmNavigationProperty.java +++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmNavigationProperty.java @@ -18,7 +18,6 @@ ******************************************************************************/ package org.apache.olingo.odata4.commons.api.edm; -import java.util.List; /** * A CSDL NavigationProperty element diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/FullQualifiedName.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/FullQualifiedName.java similarity index 97% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/FullQualifiedName.java rename to odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/FullQualifiedName.java index 33c27fbc3..c99bce769 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/FullQualifiedName.java +++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/FullQualifiedName.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.commons.api.edm; /** * A full qualified name of any element in the EDM consists of a name and a namespace. diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/ODataCommonsCoreImpl.java b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/ODataCommonsCoreImpl.java deleted file mode 100644 index 62171afe6..000000000 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/ODataCommonsCoreImpl.java +++ /dev/null @@ -1,31 +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.commons.core; - -import org.apache.olingo.odata4.commons.api.edm.Edm; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.core.edm.provider.EdmProviderImpl; - -public class ODataCommonsCoreImpl { - - public Edm createEdm(final EdmProvider provider) { - return new EdmProviderImpl(provider); - } - -} diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/ActionMapKey.java b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/ActionMapKey.java index c33569411..2d36c06af 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/ActionMapKey.java +++ b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/ActionMapKey.java @@ -19,7 +19,7 @@ package org.apache.olingo.odata4.commons.core.edm; import org.apache.olingo.odata4.commons.api.edm.EdmException; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public class ActionMapKey { private final FullQualifiedName actionName; diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/EdmImpl.java b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/EdmImpl.java index 69867e7d5..3c418b51b 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/EdmImpl.java +++ b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/EdmImpl.java @@ -31,7 +31,7 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEnumType; import org.apache.olingo.odata4.commons.api.edm.EdmFunction; import org.apache.olingo.odata4.commons.api.edm.EdmServiceMetadata; import org.apache.olingo.odata4.commons.api.edm.EdmTypeDefinition; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public abstract class EdmImpl implements Edm { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/FunctionMapKey.java b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/FunctionMapKey.java index 6ed112c46..675a9c52b 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/FunctionMapKey.java +++ b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/FunctionMapKey.java @@ -23,7 +23,7 @@ import java.util.Collections; import java.util.List; import org.apache.olingo.odata4.commons.api.edm.EdmException; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public class FunctionMapKey { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/primitivetype/AbstractPrimitiveType.java b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/primitivetype/AbstractPrimitiveType.java index 5ca9cd653..1133a1912 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/primitivetype/AbstractPrimitiveType.java +++ b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/primitivetype/AbstractPrimitiveType.java @@ -20,7 +20,7 @@ package org.apache.olingo.odata4.commons.core.edm.primitivetype; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveTypeException; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; /** * Abstract implementation of the EDM primitive-type interface. diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/primitivetype/EdmPrimitiveTypeKind.java b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/primitivetype/EdmPrimitiveTypeKind.java index 93f80e334..a73bbce9f 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/primitivetype/EdmPrimitiveTypeKind.java +++ b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/primitivetype/EdmPrimitiveTypeKind.java @@ -19,7 +19,7 @@ package org.apache.olingo.odata4.commons.core.edm.primitivetype; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; //TODO: Should we delete this typekind and use a facade? public enum EdmPrimitiveTypeKind { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/ActionMapKeyTest.java b/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/ActionMapKeyTest.java index 7df649315..4a83f1106 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/ActionMapKeyTest.java +++ b/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/ActionMapKeyTest.java @@ -23,7 +23,7 @@ import static org.junit.Assert.assertNotSame; import static org.junit.Assert.fail; import org.apache.olingo.odata4.commons.api.edm.EdmException; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.junit.Test; public class ActionMapKeyTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/EdmImplCachingTest.java b/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/EdmImplCachingTest.java index d923d0a7b..0a3fcb3d7 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/EdmImplCachingTest.java +++ b/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/EdmImplCachingTest.java @@ -39,7 +39,7 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEnumType; import org.apache.olingo.odata4.commons.api.edm.EdmFunction; import org.apache.olingo.odata4.commons.api.edm.EdmServiceMetadata; import org.apache.olingo.odata4.commons.api.edm.EdmTypeDefinition; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.junit.Before; import org.junit.Test; diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/EdmImplCallCreateTest.java b/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/EdmImplCallCreateTest.java index b67389cb7..8960ffa56 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/EdmImplCallCreateTest.java +++ b/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/EdmImplCallCreateTest.java @@ -39,7 +39,7 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEnumType; import org.apache.olingo.odata4.commons.api.edm.EdmFunction; import org.apache.olingo.odata4.commons.api.edm.EdmServiceMetadata; import org.apache.olingo.odata4.commons.api.edm.EdmTypeDefinition; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.junit.Before; import org.junit.Test; diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/FunctionMapKeyTest.java b/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/FunctionMapKeyTest.java index fa4c20521..66b37892d 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/FunctionMapKeyTest.java +++ b/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/FunctionMapKeyTest.java @@ -24,7 +24,7 @@ import static org.junit.Assert.assertNotSame; import java.util.ArrayList; import java.util.List; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.junit.Test; public class FunctionMapKeyTest { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Action.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Action.java similarity index 96% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Action.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Action.java index b074d24e3..7c7feb4ae 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Action.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Action.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ActionImport.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ActionImport.java similarity index 92% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ActionImport.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ActionImport.java index bca2e9f99..0cb2d1143 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ActionImport.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ActionImport.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; + +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public class ActionImport extends OperationImport { private FullQualifiedName action; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/AliasInfo.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/AliasInfo.java similarity index 95% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/AliasInfo.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/AliasInfo.java index fd41af355..11057e399 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/AliasInfo.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/AliasInfo.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; public class AliasInfo { private String namespace; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Annotation.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Annotation.java similarity index 93% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Annotation.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Annotation.java index b54f76758..a7f36441b 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Annotation.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Annotation.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; + public class Annotation { private FullQualifiedName term; // Target should be a target path diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/BindingTarget.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/BindingTarget.java similarity index 93% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/BindingTarget.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/BindingTarget.java index 412eeed55..d28e05a5e 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/BindingTarget.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/BindingTarget.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; + public abstract class BindingTarget { protected String name; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ComplexType.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ComplexType.java similarity index 93% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ComplexType.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ComplexType.java index cd51413cd..2741f9786 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ComplexType.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ComplexType.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; + public class ComplexType extends StructuralType { @Override diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EdmProvider.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EdmProvider.java similarity index 96% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EdmProvider.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EdmProvider.java index 2de16eec9..187fda92e 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EdmProvider.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EdmProvider.java @@ -16,11 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; -import org.apache.olingo.odata4.commons.api.exception.ODataException; +import org.apache.olingo.odata4.commons.api.ODataException; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public abstract class EdmProvider { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntityContainer.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntityContainer.java similarity index 95% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntityContainer.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntityContainer.java index 9334292a2..8eafd3db2 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntityContainer.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntityContainer.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; + public class EntityContainer { private String name; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntityContainerInfo.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntityContainerInfo.java similarity index 92% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntityContainerInfo.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntityContainerInfo.java index e7de3a961..3f83b8df7 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntityContainerInfo.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntityContainerInfo.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; + +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public class EntityContainerInfo { private FullQualifiedName containerName; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntitySet.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntitySet.java similarity index 93% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntitySet.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntitySet.java index 26969e563..ddf1e0816 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntitySet.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntitySet.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; + public class EntitySet extends BindingTarget { private boolean includeInServiceDocument; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntitySetPath.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntitySetPath.java similarity index 96% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntitySetPath.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntitySetPath.java index e2d48f026..7dad11a96 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntitySetPath.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntitySetPath.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; //TODO: Do we really need this class? public class EntitySetPath { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntityType.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntityType.java similarity index 94% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntityType.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntityType.java index d1d07d8f3..153ed3cd9 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EntityType.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EntityType.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; + public class EntityType extends StructuralType { private List key; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EnumMember.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EnumMember.java similarity index 96% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EnumMember.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EnumMember.java index bfc64679c..3fe72365a 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EnumMember.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EnumMember.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmMember; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EnumType.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EnumType.java similarity index 93% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EnumType.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EnumType.java index 010382729..b465af2a1 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/EnumType.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/EnumType.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; + public class EnumType { private String name; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Expression.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Expression.java similarity index 94% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Expression.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Expression.java index 1e2bee642..fd8361cbf 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Expression.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Expression.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; //TODO: Expression implementation public class Expression { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Function.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Function.java similarity index 96% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Function.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Function.java index 489452429..6be13e63f 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Function.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Function.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/FunctionImport.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/FunctionImport.java similarity index 93% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/FunctionImport.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/FunctionImport.java index 503f7762c..a3ec68caa 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/FunctionImport.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/FunctionImport.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; + +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public class FunctionImport extends OperationImport { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Mapping.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Mapping.java similarity index 97% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Mapping.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Mapping.java index 609a09f67..45f785d66 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Mapping.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Mapping.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmMapping; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/NavigationProperty.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/NavigationProperty.java similarity index 95% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/NavigationProperty.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/NavigationProperty.java index ad2bdcb34..1eb04a6c1 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/NavigationProperty.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/NavigationProperty.java @@ -16,10 +16,11 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmOnDelete; public class NavigationProperty { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/NavigationPropertyBinding.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/NavigationPropertyBinding.java similarity index 95% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/NavigationPropertyBinding.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/NavigationPropertyBinding.java index a4950077a..d64c74b66 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/NavigationPropertyBinding.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/NavigationPropertyBinding.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; public class NavigationPropertyBinding { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Operation.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Operation.java similarity index 97% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Operation.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Operation.java index 18c64fb2d..aec6e4059 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Operation.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Operation.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/OperationImport.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/OperationImport.java similarity index 95% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/OperationImport.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/OperationImport.java index 47827e3a5..53cb5df7e 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/OperationImport.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/OperationImport.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; public abstract class OperationImport { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Parameter.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Parameter.java similarity index 95% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Parameter.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Parameter.java index 4b195e463..78ee17929 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Parameter.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Parameter.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; + +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public class Parameter { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Property.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Property.java similarity index 96% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Property.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Property.java index a053b1d40..58779c268 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Property.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Property.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; + +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public class Property { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/PropertyRef.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/PropertyRef.java similarity index 96% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/PropertyRef.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/PropertyRef.java index f26bda77b..25d16d698 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/PropertyRef.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/PropertyRef.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; public class PropertyRef { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ReferentialConstraint.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ReferentialConstraint.java similarity index 96% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ReferentialConstraint.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ReferentialConstraint.java index 600b10486..27a4c4722 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ReferentialConstraint.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ReferentialConstraint.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; public class ReferentialConstraint { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ReturnType.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ReturnType.java similarity index 94% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ReturnType.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ReturnType.java index 4b4b388a6..2f6abf6a6 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/ReturnType.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/ReturnType.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; + +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public class ReturnType { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Schema.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Schema.java similarity index 98% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Schema.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Schema.java index 981db62b2..8a2334897 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Schema.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Schema.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Singleton.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Singleton.java similarity index 92% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Singleton.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Singleton.java index 3dd104416..1cc4fe090 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Singleton.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Singleton.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; + public class Singleton extends BindingTarget { @Override diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/StructuralType.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/StructuralType.java similarity index 95% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/StructuralType.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/StructuralType.java index ad67a7d97..c524e6cd4 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/StructuralType.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/StructuralType.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; + public abstract class StructuralType { protected String name; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Target.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Target.java similarity index 92% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Target.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Target.java index ced9497de..1d0199284 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Target.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Target.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; + +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public class Target { diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Term.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Term.java similarity index 96% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Term.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Term.java index 452c79a87..c564e1709 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/Term.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Term.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; import java.util.List; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; + public class Term { private String name; private FullQualifiedName type; diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/TypeDefinition.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/TypeDefinition.java similarity index 94% rename from odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/TypeDefinition.java rename to odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/TypeDefinition.java index 5c3670a29..5608aef15 100644 --- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/provider/TypeDefinition.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/TypeDefinition.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.api.edm.provider; +package org.apache.olingo.odata4.server.api.edm.provider; + +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; public class TypeDefinition { diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriInfoMetadata.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriInfoMetadata.java index 4d359714e..60ef90c8f 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriInfoMetadata.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriInfoMetadata.java @@ -24,7 +24,7 @@ import org.apache.olingo.odata4.server.api.uri.queryoption.FormatOption; public interface UriInfoMetadata { public FormatOption getFormatOption(); - - public String getFragment() ; - + + public String getFragment(); + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriParameter.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriParameter.java index 6815e857a..1d6e0cd24 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriParameter.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriParameter.java @@ -29,7 +29,7 @@ public interface UriParameter { public Expression getExression(); public String getName(); - + public String getRefencedProperty(); } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResource.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResource.java index 167a1f87e..2693a0401 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResource.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResource.java @@ -19,10 +19,10 @@ package org.apache.olingo.odata4.server.api.uri; public interface UriResource { - + UriResourceKind getKind(); @Override String toString(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceAction.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceAction.java index bd73fcbaf..80b88935f 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceAction.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceAction.java @@ -21,7 +21,7 @@ package org.apache.olingo.odata4.server.api.uri; import org.apache.olingo.odata4.commons.api.edm.EdmAction; import org.apache.olingo.odata4.commons.api.edm.EdmActionImport; -public interface UriResourceAction extends UriResourcePartTyped { +public interface UriResourceAction extends UriResourcePartTyped { EdmAction getAction(); diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceComplexProperty.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceComplexProperty.java index 43840f35e..6f4e8378a 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceComplexProperty.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceComplexProperty.java @@ -21,7 +21,7 @@ package org.apache.olingo.odata4.server.api.uri; import org.apache.olingo.odata4.commons.api.edm.EdmComplexType; public interface UriResourceComplexProperty extends UriResourceProperty { - + EdmComplexType getComplexType(); EdmComplexType getComplexTypeFilter(); diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceIt.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceIt.java index 5fe9055e3..8391d0b56 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceIt.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceIt.java @@ -22,9 +22,9 @@ import org.apache.olingo.odata4.commons.api.edm.EdmType; /** * Class indicating the $it reference. $it may be used within filter to - * refer to the last EDM object reference in the resource path. Since $it is - * optional in some cases ( e.g. first member expressions) the {@link #isExplicitIt()} - * method can be used to check if $it was explicitly noted in the URI + * refer to the last EDM object reference in the resource path. Since $it is + * optional in some cases ( e.g. first member expressions) the {@link #isExplicitIt()} method can be used to check if + * $it was explicitly noted in the URI */ public interface UriResourceIt extends UriResourcePartTyped { diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceKind.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceKind.java index 95ba4021a..a0df760d2 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceKind.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceKind.java @@ -21,5 +21,5 @@ package org.apache.olingo.odata4.server.api.uri; public enum UriResourceKind { action, complexProperty, count, entitySet, function, it, lambdaAll, lambdaAny, - lambdaVariable, navigationProperty, ref, root, primitiveProperty, singleton, startingTypeFilter, value, + lambdaVariable, navigationProperty, ref, root, primitiveProperty, singleton, startingTypeFilter, value, } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAll.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAll.java index b28bbb787..12cf0de11 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAll.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAll.java @@ -21,10 +21,9 @@ package org.apache.olingo.odata4.server.api.uri; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression; public interface UriResourceLambdaAll extends UriResourcePartTyped { - + public String getLamdaVariable(); public Expression getExpression(); - -} +} diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAny.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAny.java index b7e2bda70..3f81b96f2 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAny.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAny.java @@ -21,9 +21,9 @@ package org.apache.olingo.odata4.server.api.uri; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression; public interface UriResourceLambdaAny extends UriResourcePartTyped { - + public String getLamdaVariable(); public Expression getExpression(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaRef.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaRef.java index 6bc523d8d..827ada3c8 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaRef.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaRef.java @@ -18,9 +18,8 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.api.uri; - public interface UriResourceLambdaRef extends UriResourcePartTyped { - public String getVariableText(); + public String getVariableText(); } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceNavigation.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceNavigation.java index 50b848580..ef027fd29 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceNavigation.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceNavigation.java @@ -32,5 +32,5 @@ public interface UriResourceNavigation extends UriResourcePartTyped { EdmType getTypeFilterOnCollection(); EdmType getTypeFilterOnEntry(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourcePartTyped.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourcePartTyped.java index 0f169b181..3eca597fa 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourcePartTyped.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourcePartTyped.java @@ -22,11 +22,11 @@ package org.apache.olingo.odata4.server.api.uri; import org.apache.olingo.odata4.commons.api.edm.EdmType; public interface UriResourcePartTyped extends UriResource { - + EdmType getType(); boolean isCollection(); String toString(boolean includeFilters); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceProperty.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceProperty.java index f743f4908..d4a4e8270 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceProperty.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceProperty.java @@ -21,7 +21,7 @@ package org.apache.olingo.odata4.server.api.uri; import org.apache.olingo.odata4.commons.api.edm.EdmProperty; public interface UriResourceProperty extends UriResourcePartTyped { - + EdmProperty getProperty(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceSingleton.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceSingleton.java index 82794a7ff..c5ee55c3d 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceSingleton.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceSingleton.java @@ -28,5 +28,5 @@ public interface UriResourceSingleton extends UriResourcePartTyped { EdmEntityType getEntityType(); EdmEntityType getEntityTypeFilter(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceStartingTypeFilter.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceStartingTypeFilter.java index a488c3c9b..1fb51c3d5 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceStartingTypeFilter.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceStartingTypeFilter.java @@ -25,5 +25,5 @@ public interface UriResourceStartingTypeFilter extends UriResourcePartTyped { EdmType getTypeFilterOnCollection(); EdmType getTypeFilterOnEntry(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/AliasQueryOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/AliasQueryOption.java index ea1d5ffda..afdaa7dab 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/AliasQueryOption.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/AliasQueryOption.java @@ -21,7 +21,7 @@ package org.apache.olingo.odata4.server.api.uri.queryoption; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression; public interface AliasQueryOption extends QueryOption { - + public Expression getValue(); } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExceptionVisitExpand.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExceptionVisitExpand.java index 4240f9a9b..cc1468108 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExceptionVisitExpand.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExceptionVisitExpand.java @@ -20,6 +20,6 @@ package org.apache.olingo.odata4.server.api.uri.queryoption; public class ExceptionVisitExpand extends Exception { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExpandOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExpandOption.java index 216fdd178..40a8e464a 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExpandOption.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExpandOption.java @@ -21,7 +21,7 @@ package org.apache.olingo.odata4.server.api.uri.queryoption; import java.util.List; public interface ExpandOption extends SystemQueryOption { - + List getExpandItems(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FilterOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FilterOption.java index ed76c5aec..bd58ae784 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FilterOption.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FilterOption.java @@ -21,6 +21,6 @@ package org.apache.olingo.odata4.server.api.uri.queryoption; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression; public interface FilterOption extends SystemQueryOption { - + Expression getExpression(); } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FormatOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FormatOption.java index 8e327c01f..eaf85c9db 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FormatOption.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FormatOption.java @@ -19,7 +19,7 @@ package org.apache.olingo.odata4.server.api.uri.queryoption; public interface FormatOption extends SystemQueryOption { - + // TODO Select best representation for format String getFormat(); } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/IdOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/IdOption.java index 8369caa60..764bd5226 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/IdOption.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/IdOption.java @@ -19,7 +19,7 @@ package org.apache.olingo.odata4.server.api.uri.queryoption; public interface IdOption extends SystemQueryOption { - + String getValue(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/InlineCountOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/InlineCountOption.java index 00530dc83..cb0066fde 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/InlineCountOption.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/InlineCountOption.java @@ -19,7 +19,7 @@ package org.apache.olingo.odata4.server.api.uri.queryoption; public interface InlineCountOption extends SystemQueryOption { - + boolean getValue(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/QueryOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/QueryOption.java index cb2afb5d6..0ed1d93c6 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/QueryOption.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/QueryOption.java @@ -23,5 +23,5 @@ public interface QueryOption { public String getName(); public String getText(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SearchOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SearchOption.java index 8a3f970f8..0355ca141 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SearchOption.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SearchOption.java @@ -23,5 +23,5 @@ import org.apache.olingo.odata4.server.api.uri.queryoption.search.SearchExpressi public interface SearchOption extends SystemQueryOption { SearchExpression getSearchExpression(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SelectItem.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SelectItem.java index 75f7566a8..04cef3e65 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SelectItem.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SelectItem.java @@ -18,7 +18,7 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.api.uri.queryoption; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.server.api.uri.UriInfoResource; public interface SelectItem { @@ -30,5 +30,5 @@ public interface SelectItem { FullQualifiedName getAllOperationsInSchemaNameSpace(); UriInfoResource getResourceInfo(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/TopOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/TopOption.java index ec1ed5981..7f1dbf6be 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/TopOption.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/TopOption.java @@ -19,7 +19,7 @@ package org.apache.olingo.odata4.server.api.uri.queryoption; public interface TopOption extends SystemQueryOption { - + String getValue(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/AliasExpression.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/AliasExpression.java index 133a2c1f0..9e48c6ab3 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/AliasExpression.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/AliasExpression.java @@ -18,8 +18,8 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.api.uri.queryoption.expression; -public interface AliasExpression extends Expression { +public interface AliasExpression extends Expression { public String getParameterName(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Enumeration.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Enumeration.java index 126cb9768..25b6a4030 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Enumeration.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Enumeration.java @@ -25,6 +25,7 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEnumType; public interface Enumeration extends Expression { public List getValues(); + public EdmEnumType getType(); } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/ExpressionVisitor.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/ExpressionVisitor.java index e85d2c2a5..176d3ecb7 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/ExpressionVisitor.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/ExpressionVisitor.java @@ -20,9 +20,9 @@ package org.apache.olingo.odata4.server.api.uri.queryoption.expression; import java.util.List; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; 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.server.api.uri.UriInfoResource; public interface ExpressionVisitor { @@ -35,8 +35,8 @@ public interface ExpressionVisitor { T visitMethodCall(SupportedMethodCalls methodCall, List parameters) throws ExceptionVisitExpression, ODataApplicationException; - - T visitLambdaExpression(String functionText,String variableText, Expression expression) + + T visitLambdaExpression(String functionText, String variableText, Expression expression) throws ExceptionVisitExpression, ODataApplicationException; T visitLiteral(String literal) throws ExceptionVisitExpression, ODataApplicationException; @@ -50,7 +50,7 @@ public interface ExpressionVisitor { T visitLambdaReference(String variableText) throws ExceptionVisitExpression, ODataApplicationException; T visitEnum(EdmEnumType type, List enumValues) throws ExceptionVisitExpression, ODataApplicationException; - + T visitConstant(SupportedConstants kind) throws ExceptionVisitExpression, ODataApplicationException; - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Member.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Member.java index e0d6d19cc..6670454ed 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Member.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Member.java @@ -26,7 +26,7 @@ public interface Member extends Expression { public UriInfoResource getPath(); public EdmType getType(); - + public boolean isCollection(); } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedBinaryOperators.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedBinaryOperators.java index 3e7ca77d2..4a78fd9c3 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedBinaryOperators.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedBinaryOperators.java @@ -19,8 +19,8 @@ package org.apache.olingo.odata4.server.api.uri.queryoption.expression; public enum SupportedBinaryOperators { - - //enum + + // enum HAS("has"), // multiplicative MUL("mul"), DIV("div"), MOD("mod"), diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedConstants.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedConstants.java index 4e7b83526..47b6d1d9a 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedConstants.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedConstants.java @@ -19,11 +19,11 @@ package org.apache.olingo.odata4.server.api.uri.queryoption.expression; public enum SupportedConstants { - + TRUE("true"), FALSE("false"), NULL("null"); - + private String syntax; private SupportedConstants(final String syntax) { diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedMethodCalls.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedMethodCalls.java index cf6d62847..ee264b55b 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedMethodCalls.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedMethodCalls.java @@ -46,7 +46,7 @@ public enum SupportedMethodCalls { public static SupportedMethodCalls get(final String method) { for (SupportedMethodCalls op : SupportedMethodCalls.values()) { - if (op.toString().equals(method )) { + if (op.toString().equals(method)) { return op; } } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/VisitableExression.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/VisitableExression.java index c3dc10874..61f581389 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/VisitableExression.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/VisitableExression.java @@ -18,7 +18,7 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.api.uri.queryoption.expression; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; public interface VisitableExression { @@ -27,7 +27,7 @@ public interface VisitableExression { * each expression used as node in an expression tree. The implementations should * behave as follows: *

  • Call accept on all sub nodes and store the returned Objects which are of the generic type T - *
  • Call the appropriate method on the {@link ExpressionVisitor} instance and provide the stored return objects + *
  • Call the appropriate method on the {@link ExpressionVisitor} instance and provide the stored return objects * to that instance *
  • Return the object which should be passed to the processing algorithm of the parent expression node *
    diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchBinary.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchBinary.java index 1431f9f84..98749b00c 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchBinary.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchBinary.java @@ -25,5 +25,5 @@ public interface SearchBinary extends SearchExpression { SearchExpression getLeftOperand(); SearchExpression getRightOperand(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchTerm.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchTerm.java index 1a8e82358..9125b99cb 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchTerm.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchTerm.java @@ -19,7 +19,7 @@ package org.apache.olingo.odata4.server.api.uri.queryoption.search; public interface SearchTerm extends SearchExpression { - + String getSearchTerm(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchUnary.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchUnary.java index b2fd9ea3a..bd5873bf3 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchUnary.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchUnary.java @@ -19,7 +19,7 @@ package org.apache.olingo.odata4.server.api.uri.queryoption.search; public interface SearchUnary { - + SearchExpression getOperand(); - + } diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SupportedSearchBinaryOperators.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SupportedSearchBinaryOperators.java index cc5c57351..19f1ccd5f 100644 --- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SupportedSearchBinaryOperators.java +++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SupportedSearchBinaryOperators.java @@ -27,7 +27,7 @@ public enum SupportedSearchBinaryOperators { private SupportedSearchBinaryOperators(final String syntax) { this.syntax = syntax; } - + @Override public String toString() { return syntax; @@ -42,5 +42,4 @@ public enum SupportedSearchBinaryOperators { return null; } - } diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImpl.java similarity index 86% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImpl.java index eb1354983..1b6715f8e 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImpl.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmAction; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.Action; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.server.api.edm.provider.Action; public class EdmActionImpl extends EdmOperationImpl implements EdmAction { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImportImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImportImpl.java similarity index 92% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImportImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImportImpl.java index cb767fc24..5b1ae5da9 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImportImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImportImpl.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmAction; import org.apache.olingo.odata4.commons.api.edm.EdmActionImport; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; -import org.apache.olingo.odata4.commons.api.edm.provider.ActionImport; +import org.apache.olingo.odata4.server.api.edm.provider.ActionImport; public class EdmActionImportImpl extends EdmOperationImportImpl implements EdmActionImport { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmBindingTargetImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmBindingTargetImpl.java similarity index 92% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmBindingTargetImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmBindingTargetImpl.java index f42be4c5b..bdafd5546 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmBindingTargetImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmBindingTargetImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.util.List; @@ -24,9 +24,9 @@ import org.apache.olingo.odata4.commons.api.edm.EdmBindingTarget; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; import org.apache.olingo.odata4.commons.api.edm.EdmException; -import org.apache.olingo.odata4.commons.api.edm.provider.BindingTarget; -import org.apache.olingo.odata4.commons.api.edm.provider.NavigationPropertyBinding; -import org.apache.olingo.odata4.commons.api.edm.provider.Target; +import org.apache.olingo.odata4.server.api.edm.provider.BindingTarget; +import org.apache.olingo.odata4.server.api.edm.provider.NavigationPropertyBinding; +import org.apache.olingo.odata4.server.api.edm.provider.Target; public abstract class EdmBindingTargetImpl extends EdmNamedImpl implements EdmBindingTarget { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmComplexTypeImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmComplexTypeImpl.java similarity index 90% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmComplexTypeImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmComplexTypeImpl.java index 191e5152d..f5075e047 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmComplexTypeImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmComplexTypeImpl.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmComplexType; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmStructuralType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.ComplexType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.server.api.edm.provider.ComplexType; public class EdmComplexTypeImpl extends EdmStructuralTypeImpl implements EdmComplexType { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmElementImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmElementImpl.java similarity index 95% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmElementImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmElementImpl.java index c731a08b4..7cecac884 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmElementImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmElementImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmElement; diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityContainerImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityContainerImpl.java similarity index 88% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityContainerImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityContainerImpl.java index 5e89d3232..8908406b2 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityContainerImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityContainerImpl.java @@ -16,25 +16,25 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.util.HashMap; import java.util.Map; +import org.apache.olingo.odata4.commons.api.ODataException; import org.apache.olingo.odata4.commons.api.edm.EdmActionImport; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImport; import org.apache.olingo.odata4.commons.api.edm.EdmSingleton; -import org.apache.olingo.odata4.commons.api.edm.provider.ActionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainerInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySet; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.FunctionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.Singleton; -import org.apache.olingo.odata4.commons.api.exception.ODataException; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; +import org.apache.olingo.odata4.server.api.edm.provider.ActionImport; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainerInfo; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySet; +import org.apache.olingo.odata4.server.api.edm.provider.FunctionImport; +import org.apache.olingo.odata4.server.api.edm.provider.Singleton; public class EdmEntityContainerImpl extends EdmNamedImpl implements EdmEntityContainer { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetImpl.java similarity index 91% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetImpl.java index 311ee448e..61868d4a6 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetImpl.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySet; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySet; public class EdmEntitySetImpl extends EdmBindingTargetImpl implements EdmEntitySet { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetInfoImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetInfoImpl.java similarity index 89% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetInfoImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetInfoImpl.java index aef3cc7bd..f4ae85157 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetInfoImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetInfoImpl.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.net.URI; import org.apache.olingo.odata4.commons.api.edm.EdmEntitySetInfo; import org.apache.olingo.odata4.commons.api.edm.EdmException; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainer; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySet; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainer; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySet; public class EdmEntitySetInfoImpl implements EdmEntitySetInfo { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityTypeImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityTypeImpl.java similarity index 93% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityTypeImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityTypeImpl.java index 038f851e8..55ae0063d 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityTypeImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityTypeImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.util.ArrayList; import java.util.HashMap; @@ -26,10 +26,10 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmKeyPropertyRef; import org.apache.olingo.odata4.commons.api.edm.EdmStructuralType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.PropertyRef; +import org.apache.olingo.odata4.server.api.edm.provider.EntityType; +import org.apache.olingo.odata4.server.api.edm.provider.PropertyRef; public class EdmEntityTypeImpl extends EdmStructuralTypeImpl implements EdmEntityType { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEnumImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEnumImpl.java similarity index 97% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEnumImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEnumImpl.java index 96c3c9bb0..c4912d2ca 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEnumImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEnumImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.util.ArrayList; import java.util.List; @@ -25,11 +25,11 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEnumType; import org.apache.olingo.odata4.commons.api.edm.EdmMember; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveTypeException; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.EnumType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmInt64; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.EnumType; public class EdmEnumImpl extends EdmNamedImpl implements EdmEnumType { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImpl.java similarity index 90% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImpl.java index 4050b3de2..0d7e2dbb4 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImpl.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmFunction; import org.apache.olingo.odata4.commons.api.edm.EdmReturnType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Function; +import org.apache.olingo.odata4.server.api.edm.provider.Function; public class EdmFunctionImpl extends EdmOperationImpl implements EdmFunction { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportImpl.java similarity index 92% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportImpl.java index 827c76f7b..42e04b9ed 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportImpl.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.util.List; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmFunction; import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.FunctionImport; +import org.apache.olingo.odata4.server.api.edm.provider.FunctionImport; public class EdmFunctionImportImpl extends EdmOperationImportImpl implements EdmFunctionImport { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportInfoImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportInfoImpl.java similarity index 89% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportInfoImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportInfoImpl.java index 52f5b4da5..de3927b63 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportInfoImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportInfoImpl.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.net.URI; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImportInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainer; -import org.apache.olingo.odata4.commons.api.edm.provider.FunctionImport; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainer; +import org.apache.olingo.odata4.server.api.edm.provider.FunctionImport; public class EdmFunctionImportInfoImpl implements EdmFunctionImportInfo { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmKeyPropertyRefImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmKeyPropertyRefImpl.java similarity index 96% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmKeyPropertyRefImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmKeyPropertyRefImpl.java index 8eb8ad4d4..79eda0a4a 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmKeyPropertyRefImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmKeyPropertyRefImpl.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmKeyPropertyRef; import org.apache.olingo.odata4.commons.api.edm.EdmProperty; import org.apache.olingo.odata4.commons.api.edm.EdmStructuralType; -import org.apache.olingo.odata4.commons.api.edm.provider.PropertyRef; +import org.apache.olingo.odata4.server.api.edm.provider.PropertyRef; public class EdmKeyPropertyRefImpl implements EdmKeyPropertyRef { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmMemberImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmMemberImpl.java similarity index 91% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmMemberImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmMemberImpl.java index 6b69af7c7..10ecb8574 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmMemberImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmMemberImpl.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmMember; -import org.apache.olingo.odata4.commons.api.edm.provider.EnumMember; +import org.apache.olingo.odata4.server.api.edm.provider.EnumMember; public class EdmMemberImpl extends EdmNamedImpl implements EdmMember { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNamedImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNamedImpl.java similarity index 95% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNamedImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNamedImpl.java index be85736f7..86003da25 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNamedImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNamedImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmNamed; diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNavigationPropertyImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNavigationPropertyImpl.java similarity index 94% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNavigationPropertyImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNavigationPropertyImpl.java index e11738b31..9a85ba5a3 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNavigationPropertyImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNavigationPropertyImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.util.List; @@ -26,8 +26,8 @@ import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmNavigationProperty; import org.apache.olingo.odata4.commons.api.edm.EdmStructuralType; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.edm.provider.NavigationProperty; -import org.apache.olingo.odata4.commons.api.edm.provider.ReferentialConstraint; +import org.apache.olingo.odata4.server.api.edm.provider.NavigationProperty; +import org.apache.olingo.odata4.server.api.edm.provider.ReferentialConstraint; public class EdmNavigationPropertyImpl extends EdmElementImpl implements EdmNavigationProperty { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmOperationImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmOperationImpl.java similarity index 92% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmOperationImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmOperationImpl.java index c0abd24bc..80d6a0b7c 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmOperationImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmOperationImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.util.ArrayList; import java.util.HashMap; @@ -29,11 +29,11 @@ import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmOperation; import org.apache.olingo.odata4.commons.api.edm.EdmParameter; import org.apache.olingo.odata4.commons.api.edm.EdmReturnType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySetPath; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Operation; -import org.apache.olingo.odata4.commons.api.edm.provider.Parameter; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySetPath; +import org.apache.olingo.odata4.server.api.edm.provider.Operation; +import org.apache.olingo.odata4.server.api.edm.provider.Parameter; public class EdmOperationImpl extends EdmTypeImpl implements EdmOperation { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmOperationImportImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmOperationImportImpl.java similarity index 92% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmOperationImportImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmOperationImportImpl.java index 040510b95..746072575 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmOperationImportImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmOperationImportImpl.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmOperationImport; -import org.apache.olingo.odata4.commons.api.edm.provider.OperationImport; -import org.apache.olingo.odata4.commons.api.edm.provider.Target; +import org.apache.olingo.odata4.server.api.edm.provider.OperationImport; +import org.apache.olingo.odata4.server.api.edm.provider.Target; public abstract class EdmOperationImportImpl extends EdmNamedImpl implements EdmOperationImport { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmParameterImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmParameterImpl.java similarity index 93% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmParameterImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmParameterImpl.java index 9eb3b0f45..afebe2971 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmParameterImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmParameterImpl.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmMapping; import org.apache.olingo.odata4.commons.api.edm.EdmParameter; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Parameter; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.Parameter; public class EdmParameterImpl extends EdmElementImpl implements EdmParameter { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmPropertyImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmPropertyImpl.java similarity index 94% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmPropertyImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmPropertyImpl.java index a87a4614b..35da61701 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmPropertyImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmPropertyImpl.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmMapping; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.odata4.commons.api.edm.EdmProperty; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Property; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.Property; public class EdmPropertyImpl extends EdmElementImpl implements EdmProperty { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmProviderImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmProviderImpl.java similarity index 91% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmProviderImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmProviderImpl.java index 50d201d1a..700f01978 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmProviderImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmProviderImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.util.ArrayList; import java.util.Collections; @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.apache.olingo.odata4.commons.api.ODataException; import org.apache.olingo.odata4.commons.api.edm.EdmAction; import org.apache.olingo.odata4.commons.api.edm.EdmComplexType; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; @@ -33,19 +34,18 @@ import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmFunction; import org.apache.olingo.odata4.commons.api.edm.EdmServiceMetadata; import org.apache.olingo.odata4.commons.api.edm.EdmTypeDefinition; -import org.apache.olingo.odata4.commons.api.edm.provider.Action; -import org.apache.olingo.odata4.commons.api.edm.provider.AliasInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.ComplexType; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainerInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.EnumType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Function; -import org.apache.olingo.odata4.commons.api.edm.provider.Parameter; -import org.apache.olingo.odata4.commons.api.edm.provider.TypeDefinition; -import org.apache.olingo.odata4.commons.api.exception.ODataException; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.EdmImpl; +import org.apache.olingo.odata4.server.api.edm.provider.Action; +import org.apache.olingo.odata4.server.api.edm.provider.AliasInfo; +import org.apache.olingo.odata4.server.api.edm.provider.ComplexType; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainerInfo; +import org.apache.olingo.odata4.server.api.edm.provider.EntityType; +import org.apache.olingo.odata4.server.api.edm.provider.EnumType; +import org.apache.olingo.odata4.server.api.edm.provider.Function; +import org.apache.olingo.odata4.server.api.edm.provider.Parameter; +import org.apache.olingo.odata4.server.api.edm.provider.TypeDefinition; public class EdmProviderImpl extends EdmImpl { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmReturnTypeImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmReturnTypeImpl.java similarity index 93% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmReturnTypeImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmReturnTypeImpl.java index d8ade8297..ceb19183e 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmReturnTypeImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmReturnTypeImpl.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.odata4.commons.api.edm.EdmReturnType; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.ReturnType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.EdmImpl; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.ReturnType; public class EdmReturnTypeImpl implements EdmReturnType { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmServiceMetadataImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmServiceMetadataImpl.java similarity index 90% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmServiceMetadataImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmServiceMetadataImpl.java index cbf42ff87..dc0b556ae 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmServiceMetadataImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmServiceMetadataImpl.java @@ -16,25 +16,25 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.io.InputStream; import java.util.ArrayList; import java.util.List; +import org.apache.olingo.odata4.commons.api.ODataException; import org.apache.olingo.odata4.commons.api.edm.EdmEntitySetInfo; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImportInfo; import org.apache.olingo.odata4.commons.api.edm.EdmServiceMetadata; import org.apache.olingo.odata4.commons.api.edm.EdmSingletonInfo; import org.apache.olingo.odata4.commons.api.edm.constants.ODataServiceVersion; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainer; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySet; -import org.apache.olingo.odata4.commons.api.edm.provider.FunctionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.Schema; -import org.apache.olingo.odata4.commons.api.edm.provider.Singleton; -import org.apache.olingo.odata4.commons.api.exception.ODataException; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainer; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySet; +import org.apache.olingo.odata4.server.api.edm.provider.FunctionImport; +import org.apache.olingo.odata4.server.api.edm.provider.Schema; +import org.apache.olingo.odata4.server.api.edm.provider.Singleton; public class EdmServiceMetadataImpl implements EdmServiceMetadata { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonImpl.java similarity index 91% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonImpl.java index 46856af16..f98a328c2 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonImpl.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmSingleton; -import org.apache.olingo.odata4.commons.api.edm.provider.Singleton; +import org.apache.olingo.odata4.server.api.edm.provider.Singleton; public class EdmSingletonImpl extends EdmBindingTargetImpl implements EdmSingleton { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonInfoImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonInfoImpl.java similarity index 89% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonInfoImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonInfoImpl.java index 2e7e37356..1232d8cd8 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonInfoImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonInfoImpl.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.net.URI; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmSingletonInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainer; -import org.apache.olingo.odata4.commons.api.edm.provider.Singleton; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainer; +import org.apache.olingo.odata4.server.api.edm.provider.Singleton; public class EdmSingletonInfoImpl implements EdmSingletonInfo { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmStructuralTypeImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmStructuralTypeImpl.java similarity index 92% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmStructuralTypeImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmStructuralTypeImpl.java index 44c9be770..94c668efe 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmStructuralTypeImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmStructuralTypeImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import java.util.ArrayList; import java.util.HashMap; @@ -27,11 +27,11 @@ import org.apache.olingo.odata4.commons.api.edm.EdmElement; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmStructuralType; import org.apache.olingo.odata4.commons.api.edm.EdmType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.NavigationProperty; -import org.apache.olingo.odata4.commons.api.edm.provider.Property; -import org.apache.olingo.odata4.commons.api.edm.provider.StructuralType; +import org.apache.olingo.odata4.server.api.edm.provider.NavigationProperty; +import org.apache.olingo.odata4.server.api.edm.provider.Property; +import org.apache.olingo.odata4.server.api.edm.provider.StructuralType; public abstract class EdmStructuralTypeImpl extends EdmTypeImpl implements EdmStructuralType { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeDefinitionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeDefinitionImpl.java similarity index 95% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeDefinitionImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeDefinitionImpl.java index 680cec101..5e47b10e3 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeDefinitionImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeDefinitionImpl.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.odata4.commons.api.edm.EdmTypeDefinition; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.TypeDefinition; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.TypeDefinition; public class EdmTypeDefinitionImpl extends EdmNamedImpl implements EdmTypeDefinition { diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeImpl.java similarity index 92% rename from odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeImpl.java rename to odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeImpl.java index 96c8861ee..dd8345627 100644 --- a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeImpl.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import org.apache.olingo.odata4.commons.api.edm.EdmType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; public abstract class EdmTypeImpl extends EdmNamedImpl implements EdmType { diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriInfoImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriInfoImpl.java index 0626c908c..9dadfc4a6 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriInfoImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriInfoImpl.java @@ -154,7 +154,7 @@ public class UriInfoImpl implements UriInfo { public EdmEntityType getEntityTypeCast() { return entityTypeCast; } - + public UriInfoImpl setEntityTypeCast(final EdmEntityType type) { entityTypeCast = type; return this; @@ -189,7 +189,7 @@ public class UriInfoImpl implements UriInfo { public UriInfoKind getKind() { return kind; } - + public UriInfoImpl setKind(final UriInfoKind kind) { this.kind = kind; return this; @@ -230,14 +230,11 @@ public class UriInfoImpl implements UriInfo { return topOption; } - - - public UriInfoImpl setQueryOptions(final List list) { for (QueryOptionImpl item : list) { if (item instanceof SystemQueryOptionImpl) { - setSystemQueryOption((SystemQueryOptionImpl)item); + setSystemQueryOption((SystemQueryOptionImpl) item); } else if (item instanceof CustomQueryOptionImpl) { addCustomQueryOption(item); } @@ -245,12 +242,12 @@ public class UriInfoImpl implements UriInfo { return this; } - public void addCustomQueryOption(QueryOptionImpl item) { + public void addCustomQueryOption(final QueryOptionImpl item) { customQueryOptions.add((CustomQueryOptionImpl) item); } - public UriInfoImpl setSystemQueryOption(SystemQueryOptionImpl systemOption) { - + public UriInfoImpl setSystemQueryOption(final SystemQueryOptionImpl systemOption) { + if (systemOption.getKind() == SupportedQueryOptions.EXPAND) { expandOption = (ExpandOptionImpl) systemOption; } else if (systemOption.getKind() == SupportedQueryOptions.FILTER) { @@ -282,12 +279,12 @@ public class UriInfoImpl implements UriInfo { return this; } - + @Override public String getFragment() { return fragment; } - public UriInfoImpl setFragment(String fragment) { + public UriInfoImpl setFragment(final String fragment) { this.fragment = fragment; return this; } diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriParameterImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriParameterImpl.java index 06396db8e..38c67689f 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriParameterImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriParameterImpl.java @@ -69,15 +69,15 @@ public class UriParameterImpl implements UriParameter { this.expression = expression; return this; } - + @Override public String getRefencedProperty() { - return this.referencedProperty; + return referencedProperty; } - public UriParameterImpl setRefencedProperty(String referencedProperty) { + public UriParameterImpl setRefencedProperty(final String referencedProperty) { this.referencedProperty = referencedProperty; return this; } - + } diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceFunctionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceFunctionImpl.java index 143cee2bc..344faa78d 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceFunctionImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceFunctionImpl.java @@ -52,7 +52,7 @@ public class UriResourceFunctionImpl extends UriResourceWithKeysImpl implements } public UriResourceFunctionImpl setParameters(final List parameters) { - isParameterListFilled = true; + isParameterListFilled = true; this.parameters = parameters; return this; } diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceItImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceItImpl.java index 02b6d28f7..587345bb7 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceItImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceItImpl.java @@ -38,7 +38,7 @@ public class UriResourceItImpl extends UriResourceWithKeysImpl implements UriRes public EdmType getType() { return type; } - + public UriResourceItImpl setType(final EdmType type) { this.type = type; return this; diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceTypedImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceTypedImpl.java index 10330f332..9b2983d5e 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceTypedImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceTypedImpl.java @@ -20,7 +20,7 @@ package org.apache.olingo.odata4.server.core.uri.apiimpl; import org.apache.olingo.odata4.commons.api.edm.EdmStructuralType; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.server.api.uri.UriResourceKind; import org.apache.olingo.odata4.server.api.uri.UriResourcePartTyped; diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceWithKeysImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceWithKeysImpl.java index 66c386766..6fec51e2e 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceWithKeysImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/apiimpl/UriResourceWithKeysImpl.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.util.List; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.server.api.uri.UriParameter; import org.apache.olingo.odata4.server.api.uri.UriResourceKind; import org.apache.olingo.odata4.server.api.uri.UriResourcePartTyped; @@ -68,6 +68,7 @@ public abstract class UriResourceWithKeysImpl extends UriResourceImpl implements return this; } + @Override public String toString(final boolean includeFilters) { if (includeFilters == true) { diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/Parser.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/Parser.java index ad1b2dece..ccee2765c 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/Parser.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/Parser.java @@ -24,6 +24,7 @@ import java.util.List; import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.runtime.BailErrorStrategy; import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.atn.PredictionMode; @@ -37,7 +38,16 @@ import org.apache.olingo.odata4.server.core.uri.UriParserException; import org.apache.olingo.odata4.server.core.uri.UriParserSyntaxException; import org.apache.olingo.odata4.server.core.uri.antlr.UriLexer; import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser; -import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.*; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.AllEOFContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.BatchEOFContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.CrossjoinEOFContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.EntityEOFContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.ExpandItemsEOFContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.FilterExpressionEOFContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.MetadataEOFContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.OrderByEOFContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.PathSegmentEOFContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.SelectEOFContext; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriInfoImpl; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceImpl; import org.apache.olingo.odata4.server.core.uri.queryoption.CustomQueryOptionImpl; @@ -60,20 +70,20 @@ public class Parser { All, Batch, CrossJoin, Entity, ExpandItems, FilterExpression, Metadata, PathSegment, Orderby, Select }; - public Parser setLogLevel(int logLevel) { + public Parser setLogLevel(final int logLevel) { this.logLevel = logLevel; return this; } - public UriInfo parseUri(final String input, Edm edm) + public UriInfo parseUri(final String input, final Edm edm) throws UriParserException { - + boolean readQueryParameter = false; boolean readFragment = false; UriContext context = new UriContext(); - UriParseTreeVisitor uriParseTreeVisitor = new UriParseTreeVisitor(edm,context ); - + UriParseTreeVisitor uriParseTreeVisitor = new UriParseTreeVisitor(edm, context); + try { RawUri uri = UriDecoder.decodeUri(input, 0); // -> 0 segments are before the service url @@ -266,7 +276,7 @@ public class Parser { return null; } - private ParserRuleContext parseRule(final String input, ParserEntryRules entryPoint) + private ParserRuleContext parseRule(final String input, final ParserEntryRules entryPoint) throws UriParserSyntaxException { UriParserParser parser = null; UriLexer lexer = null; @@ -314,15 +324,15 @@ public class Parser { ret = parser.pathSegmentEOF(); break; case FilterExpression: - lexer.mode(UriLexer.DEFAULT_MODE); + lexer.mode(Lexer.DEFAULT_MODE); ret = parser.filterExpressionEOF(); break; case Orderby: - lexer.mode(UriLexer.DEFAULT_MODE); + lexer.mode(Lexer.DEFAULT_MODE); ret = parser.orderByEOF(); break; case ExpandItems: - lexer.mode(UriLexer.DEFAULT_MODE); + lexer.mode(Lexer.DEFAULT_MODE); ret = parser.expandItemsEOF(); break; case Entity: @@ -371,15 +381,15 @@ public class Parser { ret = parser.pathSegmentEOF(); break; case FilterExpression: - lexer.mode(UriLexer.DEFAULT_MODE); + lexer.mode(Lexer.DEFAULT_MODE); ret = parser.filterExpressionEOF(); break; case Orderby: - lexer.mode(UriLexer.DEFAULT_MODE); + lexer.mode(Lexer.DEFAULT_MODE); ret = parser.orderByEOF(); break; case ExpandItems: - lexer.mode(UriLexer.DEFAULT_MODE); + lexer.mode(Lexer.DEFAULT_MODE); ret = parser.expandItemsEOF(); break; case Entity: @@ -404,28 +414,28 @@ public class Parser { return ret; } - protected void addStage1ErrorStategy(UriParserParser parser) { + protected void addStage1ErrorStategy(final UriParserParser parser) { // Throw exception at first syntax error parser.setErrorHandler(new BailErrorStrategy()); } - protected void addStage2ErrorStategy(UriParserParser parser) { + protected void addStage2ErrorStategy(final UriParserParser parser) { // Throw exception at first syntax error parser.setErrorHandler(new BailErrorStrategy()); } - protected void addStage1ErrorListener(UriParserParser parser) { + protected void addStage1ErrorListener(final UriParserParser parser) { // No error logging to System.out or System.err, only exceptions used (depending on ErrorStrategy) parser.removeErrorListeners(); } - protected void addStage2ErrorListener(UriParserParser parser) { + protected void addStage2ErrorListener(final UriParserParser parser) { // No error logging to System.out or System.err, only exceptions used (depending on ErrorStrategy) parser.removeErrorListeners(); } - public void showTokens(String input, List list) { + public void showTokens(final String input, final List list) { boolean first = true; System.out.println("input: " + input); String nL = "\n"; diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/RawUri.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/RawUri.java index a4d93c1d2..1293271ef 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/RawUri.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/RawUri.java @@ -36,11 +36,11 @@ public class RawUri { public static class QueryOption { public String name; public String value; - - QueryOption(String name, String value) { + + QueryOption(final String name, final String value) { this.name = name; this.value = value; } - + } } \ No newline at end of file diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriContext.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriContext.java index 52f9cf250..b752649ac 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriContext.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriContext.java @@ -20,23 +20,24 @@ package org.apache.olingo.odata4.server.core.uri.parser; import java.util.Stack; -import org.apache.olingo.odata4.commons.api.edm.Edm; -import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmType; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.ExpandPathContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.ExpandPathExtensionContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.SelectItemContext; +import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.SelectSegmentContext; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriInfoImpl; import org.apache.olingo.odata4.server.core.uri.parser.UriParseTreeVisitor.TypeInformation; import org.apache.olingo.odata4.server.core.uri.queryoption.ExpandItemImpl; import org.apache.olingo.odata4.server.core.uri.queryoption.SelectItemImpl; public class UriContext { - + public static class LambdaVariables { public boolean isCollection; public String name; public EdmType type; } - - + /** * Hold all currently allowed lambda variables * As lambda functions can be nested there may be more than one allowed lambda variables at a time while parsing a @@ -68,12 +69,12 @@ public class UriContext { public boolean contextReadingFunctionParameters; public UriContext() { - - this.contextExpandItemPath = null; - this.contextReadingFunctionParameters = false; - this.contextSelectItem = null; - this.contextTypes = new Stack(); - this.allowedLambdaVariables = new Stack(); - + + contextExpandItemPath = null; + contextReadingFunctionParameters = false; + contextSelectItem = null; + contextTypes = new Stack(); + allowedLambdaVariables = new Stack(); + } } \ No newline at end of file diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriDecoder.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriDecoder.java index 28876c21c..6aa87b198 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriDecoder.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriDecoder.java @@ -34,7 +34,7 @@ public class UriDecoder { static Pattern uriPattern = Pattern.compile("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"); - public static RawUri decodeUri(String uri, int scipSegments) throws UriParserSyntaxException { + public static RawUri decodeUri(final String uri, final int scipSegments) throws UriParserSyntaxException { RawUri rawUri = new RawUri(); Matcher m = uriPattern.matcher(uri); @@ -53,21 +53,21 @@ public class UriDecoder { return rawUri; } - private static void decode(RawUri rawUri) throws UriParserSyntaxException { + private static void decode(final RawUri rawUri) throws UriParserSyntaxException { rawUri.pathSegmentListDecoded = new ArrayList(); - for ( String segment: rawUri.pathSegmentList) { + for (String segment : rawUri.pathSegmentList) { rawUri.pathSegmentListDecoded.add(decode(segment)); } - + rawUri.queryOptionListDecoded = new ArrayList(); - for ( QueryOption optionPair: rawUri.queryOptionList) { + for (QueryOption optionPair : rawUri.queryOptionList) { rawUri.queryOptionListDecoded.add(new QueryOption( decode(optionPair.name), decode(optionPair.value))); } } - private static void splittOptions(RawUri rawUri) { + private static void splittOptions(final RawUri rawUri) { rawUri.queryOptionList = new ArrayList(); if (rawUri.queryOptionString == null) { @@ -85,7 +85,7 @@ public class UriDecoder { } } - private static List splittFirst(String input, char c) { + private static List splittFirst(final String input, final char c) { int pos = input.indexOf(c, 0); if (pos >= 0) { return Arrays.asList(input.substring(0, pos), input.substring(pos + 1)); @@ -94,7 +94,7 @@ public class UriDecoder { } } - public static void splittPath(RawUri rawUri, int scipSegments) { + public static void splittPath(final RawUri rawUri, int scipSegments) { List list = splitt(rawUri.path, '/'); if (list.size() > 0) { @@ -110,7 +110,7 @@ public class UriDecoder { } } - public static List splitt(String input, char c) { + public static List splitt(final String input, final char c) { List list = new LinkedList(); @@ -129,7 +129,7 @@ public class UriDecoder { return list; } - public static String decode(String encoded) throws UriParserSyntaxException { + public static String decode(final String encoded) throws UriParserSyntaxException { try { return URLDecoder.decode(encoded, "UTF-8"); } catch (UnsupportedEncodingException e) { diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriParseTreeVisitor.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriParseTreeVisitor.java index 967d79432..5d748cc77 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriParseTreeVisitor.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/parser/UriParseTreeVisitor.java @@ -20,7 +20,6 @@ package org.apache.olingo.odata4.server.core.uri.parser; -import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; @@ -43,7 +42,7 @@ import org.apache.olingo.odata4.commons.api.edm.EdmProperty; import org.apache.olingo.odata4.commons.api.edm.EdmSingleton; import org.apache.olingo.odata4.commons.api.edm.EdmStructuralType; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; import org.apache.olingo.odata4.server.api.uri.UriInfoKind; import org.apache.olingo.odata4.server.api.uri.UriResource; @@ -53,7 +52,6 @@ import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedC import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedMethodCalls; import org.apache.olingo.odata4.server.core.uri.UriParserException; import org.apache.olingo.odata4.server.core.uri.UriParserSemanticException; -import org.apache.olingo.odata4.server.core.uri.UriParserSyntaxException; import org.apache.olingo.odata4.server.core.uri.antlr.UriLexer; import org.apache.olingo.odata4.server.core.uri.antlr.UriParserBaseVisitor; import org.apache.olingo.odata4.server.core.uri.antlr.UriParserParser.AliasAndValueContext; @@ -165,7 +163,6 @@ import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceStartingTypeF import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceTypedImpl; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceValueImpl; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceWithKeysImpl; -import org.apache.olingo.odata4.server.core.uri.parser.UriParseTreeVisitor.TypeInformation; import org.apache.olingo.odata4.server.core.uri.queryoption.AliasQueryOptionImpl; import org.apache.olingo.odata4.server.core.uri.queryoption.ExpandItemImpl; import org.apache.olingo.odata4.server.core.uri.queryoption.ExpandOptionImpl; @@ -234,7 +231,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { // --- class --- - public void setContext(UriContext context) { + public void setContext(final UriContext context) { this.context = context; } @@ -242,14 +239,14 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { return context.contextUriInfo; } - public UriParseTreeVisitor(final Edm edm, UriContext context) { + public UriParseTreeVisitor(final Edm edm, final UriContext context) { this.edm = edm; this.context = context; edmEntityContainer = edm.getEntityContainer(null); } @Override - protected Object aggregateResult(Object aggregate, Object nextResult) { + protected Object aggregateResult(final Object aggregate, final Object nextResult) { if (aggregate != null) { return aggregate; } else { @@ -346,10 +343,10 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { if (edmFunctionImport != null) { // read the URI parameters - this.context.contextReadingFunctionParameters = true; + context.contextReadingFunctionParameters = true; @SuppressWarnings("unchecked") List parameters = (List) ctx.vlNVO.get(0).accept(this); - this.context.contextReadingFunctionParameters = false; + context.contextReadingFunctionParameters = false; // mark parameters as consumed ctx.vlNVO.remove(0); @@ -601,10 +598,10 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { + "'")); } - this.context.contextReadingFunctionParameters = true; + context.contextReadingFunctionParameters = true; @SuppressWarnings("unchecked") List parameters = (List) ctx.vlNVO.get(0).accept(this); - this.context.contextReadingFunctionParameters = false; + context.contextReadingFunctionParameters = false; // get names of function parameters List names = new ArrayList(); @@ -643,7 +640,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { } } - private String getName(EdmType type) { + private String getName(final EdmType type) { return type.getNamespace() + "." + type.getName(); } @@ -847,8 +844,6 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { return binary; } - - @Override public Object visitAnyExpr(final AnyExprContext ctx) { UriResourceLambdaAnyImpl any = new UriResourceLambdaAnyImpl(); @@ -872,7 +867,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { } @Override - public Object visitBooleanNonCase(BooleanNonCaseContext ctx) { + public Object visitBooleanNonCase(final BooleanNonCaseContext ctx) { String text = ctx.getText().toLowerCase(); if (text.equals("false")) { @@ -893,7 +888,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { String namespace = ctx.vNS.getText(); namespace = namespace.substring(0, namespace.length() - 1); - FullQualifiedName fullName = new FullQualifiedName(namespace,ctx.vODI.getText()); + FullQualifiedName fullName = new FullQualifiedName(namespace, ctx.vODI.getText()); EdmType type = getType(fullName); method.setMethod(SupportedMethodCalls.CAST); method.addParameter(new TypeLiteralImpl().setType(type)); @@ -1317,7 +1312,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { } @Override - public Object visitLevels(LevelsContext ctx) { + public Object visitLevels(final LevelsContext ctx) { LevelsOptionImpl levels = new LevelsOptionImpl(); @@ -1571,7 +1566,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { } @Override - public Object visitNullrule(NullruleContext ctx) { + public Object visitNullrule(final NullruleContext ctx) { return new ConstantImpl().setKind(SupportedConstants.NULL); } @@ -1610,7 +1605,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { } @Override - public Object visitOrderByItem(OrderByItemContext ctx) { + public Object visitOrderByItem(final OrderByItemContext ctx) { OrderByItemImpl oItem = new OrderByItemImpl(); if (ctx.vD != null) { oItem.setDescending(true); @@ -1997,7 +1992,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor { SkipTokenOptionImpl skiptoken = new SkipTokenOptionImpl(); String text = ctx.children.get(2).getText(); - + return skiptoken.setValue(text).setText(text); } diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/AliasQueryOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/AliasQueryOptionImpl.java index 61581683f..8217d8d4a 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/AliasQueryOptionImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/AliasQueryOptionImpl.java @@ -34,5 +34,5 @@ public class AliasQueryOptionImpl extends QueryOptionImpl implements AliasQueryO this.aliasValue = aliasValue; return this; } - + } diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/OrderByOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/OrderByOptionImpl.java index 1f7cf07fd..b2519a168 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/OrderByOptionImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/OrderByOptionImpl.java @@ -27,7 +27,7 @@ import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions public class OrderByOptionImpl extends SystemQueryOptionImpl implements OrderByOption { - private List orders= new ArrayList(); + private List orders = new ArrayList(); public OrderByOptionImpl() { setKind(SupportedQueryOptions.ORDERBY); diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SearchOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SearchOptionImpl.java index 5ed729ee0..fcaee1795 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SearchOptionImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SearchOptionImpl.java @@ -35,7 +35,5 @@ public class SearchOptionImpl extends SystemQueryOptionImpl implements SearchOpt // TODO $search not supported yet return null; } - - } diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectItemImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectItemImpl.java index 24f656207..060bc7a8c 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectItemImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/SelectItemImpl.java @@ -18,7 +18,7 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.core.uri.queryoption; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.server.api.uri.UriInfoResource; import org.apache.olingo.odata4.server.api.uri.queryoption.SelectItem; @@ -29,13 +29,13 @@ public class SelectItemImpl implements SelectItem { private boolean isStar; private FullQualifiedName addOperationsInSchemaNameSpace; - @Override + @Override public UriInfoResource getResourceInfo() { return path; } - public SelectItemImpl setResourceInfo(UriInfoResource path) { + public SelectItemImpl setResourceInfo(final UriInfoResource path) { this.path = path; return this; } @@ -67,6 +67,5 @@ public class SelectItemImpl implements SelectItem { public void addAllOperationsInSchema(final FullQualifiedName addOperationsInSchemaNameSpace) { this.addOperationsInSchemaNameSpace = addOperationsInSchemaNameSpace; } - } diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/TopOptionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/TopOptionImpl.java index f7f0cfc7a..69acb8d96 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/TopOptionImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/TopOptionImpl.java @@ -40,6 +40,4 @@ public class TopOptionImpl extends SystemQueryOptionImpl implements TopOption { return this; } - - } diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/AliasImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/AliasImpl.java index 1ce145ff7..1e2abffd6 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/AliasImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/AliasImpl.java @@ -18,22 +18,22 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.core.uri.queryoption.expression; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.AliasExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor; -public class AliasImpl extends ExpressionImpl implements AliasExpression { +public class AliasImpl extends ExpressionImpl implements AliasExpression { private String parameterName; - + @Override public String getParameterName() { return parameterName; } public void setParameter(final String ParameterName) { - this.parameterName = ParameterName; + parameterName = ParameterName; } @Override diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/BinaryImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/BinaryImpl.java index fb1c5a285..73b7eb8f4 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/BinaryImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/BinaryImpl.java @@ -18,7 +18,7 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.core.uri.queryoption.expression; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.BinaryExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression; diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ConstantImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ConstantImpl.java index 8d4567cd4..08d97aa72 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ConstantImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ConstantImpl.java @@ -18,8 +18,8 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.core.uri.queryoption.expression; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Constant; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor; @@ -31,7 +31,7 @@ public class ConstantImpl extends ExpressionImpl implements Constant { SupportedConstants kind; @Override - public T accept(ExpressionVisitor visitor) throws ExceptionVisitExpression, ODataApplicationException { + public T accept(final ExpressionVisitor visitor) throws ExceptionVisitExpression, ODataApplicationException { return visitor.visitConstant(kind); } @@ -55,7 +55,7 @@ public class ConstantImpl extends ExpressionImpl implements Constant { return type; } - public ConstantImpl setType(EdmType type) { + public ConstantImpl setType(final EdmType type) { this.type = type; return this; } @@ -65,7 +65,7 @@ public class ConstantImpl extends ExpressionImpl implements Constant { return kind; } - public ConstantImpl setKind(SupportedConstants kind) { + public ConstantImpl setKind(final SupportedConstants kind) { this.kind = kind; return this; } diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/EnumerationImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/EnumerationImpl.java index f47d164f1..549cb3b2b 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/EnumerationImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/EnumerationImpl.java @@ -21,8 +21,8 @@ package org.apache.olingo.odata4.server.core.uri.queryoption.expression; import java.util.ArrayList; import java.util.List; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.commons.api.edm.EdmEnumType; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Enumeration; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor; diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LambdaRefImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LambdaRefImpl.java index ec2cd0ac3..fcf5f5008 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LambdaRefImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LambdaRefImpl.java @@ -18,7 +18,7 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.core.uri.queryoption.expression; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.LambdaRef; diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LiteralImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LiteralImpl.java index 7de63f225..5709d53ec 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LiteralImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/LiteralImpl.java @@ -18,7 +18,7 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.core.uri.queryoption.expression; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Literal; diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MemberImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MemberImpl.java index 1d3c3453b..f97bad25b 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MemberImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MemberImpl.java @@ -18,8 +18,8 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.core.uri.queryoption.expression; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; import org.apache.olingo.odata4.server.api.uri.UriInfoResource; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor; @@ -30,7 +30,6 @@ import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceImpl; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceTypedImpl; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceWithKeysImpl; - public class MemberImpl extends ExpressionImpl implements Member, VisitableExression { private UriInfoResource path; diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MethodCallImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MethodCallImpl.java index 4bd15551f..ef34daf8c 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MethodCallImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/MethodCallImpl.java @@ -21,7 +21,7 @@ package org.apache.olingo.odata4.server.core.uri.queryoption.expression; import java.util.ArrayList; import java.util.List; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor; diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/TypeLiteralImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/TypeLiteralImpl.java index 14fae5d5c..538e25fad 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/TypeLiteralImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/TypeLiteralImpl.java @@ -18,8 +18,8 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.core.uri.queryoption.expression; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.TypeLiteral; diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/UnaryImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/UnaryImpl.java index e2b2f5fc2..879324ce6 100644 --- a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/UnaryImpl.java +++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/UnaryImpl.java @@ -18,7 +18,7 @@ ******************************************************************************/ package org.apache.olingo.odata4.server.core.uri.queryoption.expression; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitor; diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImplTest.java similarity index 93% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImplTest.java index 9e1da3413..9cb51e1ef 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -35,12 +35,12 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmParameter; import org.apache.olingo.odata4.commons.api.edm.EdmSingleton; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.Action; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySetPath; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Parameter; -import org.apache.olingo.odata4.commons.api.edm.provider.ReturnType; +import org.apache.olingo.odata4.server.api.edm.provider.Action; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySetPath; +import org.apache.olingo.odata4.server.api.edm.provider.Parameter; +import org.apache.olingo.odata4.server.api.edm.provider.ReturnType; import org.junit.Before; import org.junit.Test; diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImportImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImportImplTest.java similarity index 93% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImportImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImportImplTest.java index 1421c2307..d7a963e8e 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmActionImportImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImportImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -29,9 +29,9 @@ import org.apache.olingo.odata4.commons.api.edm.EdmActionImport; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet; import org.apache.olingo.odata4.commons.api.edm.EdmException; -import org.apache.olingo.odata4.commons.api.edm.provider.ActionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Target; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; +import org.apache.olingo.odata4.server.api.edm.provider.ActionImport; +import org.apache.olingo.odata4.server.api.edm.provider.Target; import org.junit.Before; import org.junit.Test; diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmComplexTypeImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmComplexTypeImplTest.java similarity index 93% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmComplexTypeImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmComplexTypeImplTest.java index fd34b5bcb..0da3e4183 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmComplexTypeImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmComplexTypeImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -32,12 +32,12 @@ import java.util.List; import org.apache.olingo.odata4.commons.api.edm.EdmComplexType; import org.apache.olingo.odata4.commons.api.edm.EdmElement; import org.apache.olingo.odata4.commons.api.edm.EdmException; -import org.apache.olingo.odata4.commons.api.edm.provider.ComplexType; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.NavigationProperty; -import org.apache.olingo.odata4.commons.api.edm.provider.Property; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.ComplexType; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.NavigationProperty; +import org.apache.olingo.odata4.server.api.edm.provider.Property; import org.junit.Before; import org.junit.Test; diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityContainerImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityContainerImplTest.java similarity index 91% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityContainerImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityContainerImplTest.java index ebf0b58c8..6c65b2853 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityContainerImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityContainerImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -26,20 +26,20 @@ import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import org.apache.olingo.odata4.commons.api.ODataException; import org.apache.olingo.odata4.commons.api.edm.EdmActionImport; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImport; import org.apache.olingo.odata4.commons.api.edm.EdmSingleton; -import org.apache.olingo.odata4.commons.api.edm.provider.ActionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainerInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySet; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.FunctionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.Singleton; -import org.apache.olingo.odata4.commons.api.exception.ODataException; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; +import org.apache.olingo.odata4.server.api.edm.provider.ActionImport; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainerInfo; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySet; +import org.apache.olingo.odata4.server.api.edm.provider.FunctionImport; +import org.apache.olingo.odata4.server.api.edm.provider.Singleton; import org.junit.Before; import org.junit.Test; diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetImplTest.java similarity index 84% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetImplTest.java index bb764201b..58a718017 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -29,14 +29,14 @@ import org.apache.olingo.odata4.commons.api.edm.EdmBindingTarget; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet; import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainerInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySet; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.NavigationPropertyBinding; -import org.apache.olingo.odata4.commons.api.edm.provider.PropertyRef; -import org.apache.olingo.odata4.commons.api.edm.provider.Target; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainerInfo; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySet; +import org.apache.olingo.odata4.server.api.edm.provider.EntityType; +import org.apache.olingo.odata4.server.api.edm.provider.NavigationPropertyBinding; +import org.apache.olingo.odata4.server.api.edm.provider.PropertyRef; +import org.apache.olingo.odata4.server.api.edm.provider.Target; import org.junit.Test; public class EdmEntitySetImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetInfoImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetInfoImplTest.java similarity index 90% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetInfoImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetInfoImplTest.java index c04d72d9e..bbf3dd542 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntitySetInfoImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetInfoImplTest.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import org.apache.olingo.odata4.commons.api.edm.EdmEntitySetInfo; import org.apache.olingo.odata4.commons.api.edm.EdmException; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainer; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySet; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainer; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySet; import org.junit.Test; public class EdmEntitySetInfoImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityTypeImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityTypeImplTest.java similarity index 95% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityTypeImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityTypeImplTest.java index 8db277576..451f8f1c0 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEntityTypeImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityTypeImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -35,14 +35,14 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmKeyPropertyRef; import org.apache.olingo.odata4.commons.api.edm.EdmProperty; -import org.apache.olingo.odata4.commons.api.edm.provider.ComplexType; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.NavigationProperty; -import org.apache.olingo.odata4.commons.api.edm.provider.Property; -import org.apache.olingo.odata4.commons.api.edm.provider.PropertyRef; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.ComplexType; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityType; +import org.apache.olingo.odata4.server.api.edm.provider.NavigationProperty; +import org.apache.olingo.odata4.server.api.edm.provider.Property; +import org.apache.olingo.odata4.server.api.edm.provider.PropertyRef; import org.junit.Before; import org.junit.Test; diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEnumTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEnumTest.java similarity index 95% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEnumTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEnumTest.java index 71bb26a9d..95a1f4486 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmEnumTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEnumTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -29,12 +29,11 @@ import java.util.ArrayList; import java.util.List; import org.apache.olingo.odata4.commons.api.edm.EdmEnumType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.EnumMember; -import org.apache.olingo.odata4.commons.api.edm.provider.EnumType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; -import org.apache.olingo.odata4.commons.core.edm.primitivetype.PrimitiveTypeBaseTest; +import org.apache.olingo.odata4.server.api.edm.provider.EnumMember; +import org.apache.olingo.odata4.server.api.edm.provider.EnumType; import org.junit.Test; public class EdmEnumTest extends PrimitiveTypeBaseTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImplTest.java similarity index 90% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImplTest.java index a9d0e0ffa..242cd5a0a 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -28,9 +28,9 @@ import static org.mockito.Mockito.mock; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmFunction; import org.apache.olingo.odata4.commons.api.edm.EdmReturnType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Function; -import org.apache.olingo.odata4.commons.api.edm.provider.ReturnType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; +import org.apache.olingo.odata4.server.api.edm.provider.Function; +import org.apache.olingo.odata4.server.api.edm.provider.ReturnType; import org.junit.Before; import org.junit.Test; diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportImplTest.java similarity index 87% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportImplTest.java index d874f0ca2..bf0e1425c 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -30,14 +30,14 @@ import java.util.Collections; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmFunction; import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainerInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Function; -import org.apache.olingo.odata4.commons.api.edm.provider.FunctionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.Parameter; -import org.apache.olingo.odata4.commons.api.edm.provider.ReturnType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainerInfo; +import org.apache.olingo.odata4.server.api.edm.provider.Function; +import org.apache.olingo.odata4.server.api.edm.provider.FunctionImport; +import org.apache.olingo.odata4.server.api.edm.provider.Parameter; +import org.apache.olingo.odata4.server.api.edm.provider.ReturnType; import org.junit.Test; public class EdmFunctionImportImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportInfoImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportInfoImplTest.java similarity index 90% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportInfoImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportInfoImplTest.java index dd50231d2..8bce4699c 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmFunctionImportInfoImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmFunctionImportInfoImplTest.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImportInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainer; -import org.apache.olingo.odata4.commons.api.edm.provider.FunctionImport; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainer; +import org.apache.olingo.odata4.server.api.edm.provider.FunctionImport; import org.junit.Test; public class EdmFunctionImportInfoImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmKeyPropertyRefImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmKeyPropertyRefImplTest.java similarity index 98% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmKeyPropertyRefImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmKeyPropertyRefImplTest.java index 91ea8de60..36950b752 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmKeyPropertyRefImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmKeyPropertyRefImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -31,7 +31,7 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmKeyPropertyRef; import org.apache.olingo.odata4.commons.api.edm.EdmProperty; -import org.apache.olingo.odata4.commons.api.edm.provider.PropertyRef; +import org.apache.olingo.odata4.server.api.edm.provider.PropertyRef; import org.junit.Test; public class EdmKeyPropertyRefImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmMemberImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmMemberImplTest.java similarity index 91% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmMemberImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmMemberImplTest.java index 67bebf0db..643a00355 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmMemberImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmMemberImplTest.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; -import org.apache.olingo.odata4.commons.api.edm.provider.EnumMember; +import org.apache.olingo.odata4.server.api.edm.provider.EnumMember; import org.junit.Test; public class EdmMemberImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNamedImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNamedImplTest.java similarity index 95% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNamedImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNamedImplTest.java index e6187e694..d5e24376a 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNamedImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNamedImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNavigationPropertyImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNavigationPropertyImplTest.java similarity index 93% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNavigationPropertyImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNavigationPropertyImplTest.java index d1bc879ef..b3e193a26 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmNavigationPropertyImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmNavigationPropertyImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -33,13 +33,13 @@ import java.util.List; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmNavigationProperty; import org.apache.olingo.odata4.commons.api.edm.EdmType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.NavigationProperty; -import org.apache.olingo.odata4.commons.api.edm.provider.PropertyRef; -import org.apache.olingo.odata4.commons.api.edm.provider.ReferentialConstraint; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityType; +import org.apache.olingo.odata4.server.api.edm.provider.NavigationProperty; +import org.apache.olingo.odata4.server.api.edm.provider.PropertyRef; +import org.apache.olingo.odata4.server.api.edm.provider.ReferentialConstraint; import org.junit.Test; public class EdmNavigationPropertyImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmParameterImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmParameterImplTest.java similarity index 92% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmParameterImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmParameterImplTest.java index f7d3ebca1..a00cee8e7 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmParameterImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmParameterImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -28,14 +28,14 @@ import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmParameter; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.odata4.commons.api.edm.EdmType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.ComplexType; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EnumType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Parameter; -import org.apache.olingo.odata4.commons.api.edm.provider.TypeDefinition; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.ComplexType; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EnumType; +import org.apache.olingo.odata4.server.api.edm.provider.Parameter; +import org.apache.olingo.odata4.server.api.edm.provider.TypeDefinition; import org.junit.Test; public class EdmParameterImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmPropertyImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmPropertyImplTest.java similarity index 93% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmPropertyImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmPropertyImplTest.java index 9c5139350..bb7940aac 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmPropertyImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmPropertyImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -30,14 +30,14 @@ import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.odata4.commons.api.edm.EdmProperty; import org.apache.olingo.odata4.commons.api.edm.EdmType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.ComplexType; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EnumType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Property; -import org.apache.olingo.odata4.commons.api.edm.provider.TypeDefinition; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.ComplexType; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EnumType; +import org.apache.olingo.odata4.server.api.edm.provider.Property; +import org.apache.olingo.odata4.server.api.edm.provider.TypeDefinition; import org.junit.Test; public class EdmPropertyImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmProviderImplOverloadingTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmProviderImplOverloadingTest.java similarity index 95% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmProviderImplOverloadingTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmProviderImplOverloadingTest.java index b652da27a..844bde780 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmProviderImplOverloadingTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmProviderImplOverloadingTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -34,11 +34,11 @@ import org.apache.olingo.odata4.commons.api.edm.Edm; import org.apache.olingo.odata4.commons.api.edm.EdmAction; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmFunction; -import org.apache.olingo.odata4.commons.api.edm.provider.Action; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Function; -import org.apache.olingo.odata4.commons.api.edm.provider.Parameter; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; +import org.apache.olingo.odata4.server.api.edm.provider.Action; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.Function; +import org.apache.olingo.odata4.server.api.edm.provider.Parameter; import org.junit.Before; import org.junit.Test; diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmProviderImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmProviderImplTest.java similarity index 87% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmProviderImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmProviderImplTest.java index 24fcbd2ce..2c83e56dd 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmProviderImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmProviderImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -30,6 +30,7 @@ import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; +import org.apache.olingo.odata4.commons.api.ODataException; import org.apache.olingo.odata4.commons.api.edm.Edm; import org.apache.olingo.odata4.commons.api.edm.EdmComplexType; import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; @@ -37,16 +38,15 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; import org.apache.olingo.odata4.commons.api.edm.EdmEnumType; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmTypeDefinition; -import org.apache.olingo.odata4.commons.api.edm.provider.AliasInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.ComplexType; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainerInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.EnumType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.PropertyRef; -import org.apache.olingo.odata4.commons.api.edm.provider.TypeDefinition; -import org.apache.olingo.odata4.commons.api.exception.ODataException; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; +import org.apache.olingo.odata4.server.api.edm.provider.AliasInfo; +import org.apache.olingo.odata4.server.api.edm.provider.ComplexType; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainerInfo; +import org.apache.olingo.odata4.server.api.edm.provider.EntityType; +import org.apache.olingo.odata4.server.api.edm.provider.EnumType; +import org.apache.olingo.odata4.server.api.edm.provider.PropertyRef; +import org.apache.olingo.odata4.server.api.edm.provider.TypeDefinition; import org.junit.Before; import org.junit.Test; @@ -125,24 +125,24 @@ public class EdmProviderImplTest { try { localEdm.getAction(fqn, null, null); } catch (EdmException e) { - assertEquals("org.apache.olingo.odata4.commons.api.exception.ODataException: msg", e.getMessage()); + assertEquals("org.apache.olingo.odata4.commons.api.ODataException: msg", e.getMessage()); } try { localEdm.getFunction(fqn, null, null, null); } catch (EdmException e) { - assertEquals("org.apache.olingo.odata4.commons.api.exception.ODataException: msg", e.getMessage()); + assertEquals("org.apache.olingo.odata4.commons.api.ODataException: msg", e.getMessage()); } try { localEdm.getAction(fqn, fqn, true); } catch (EdmException e) { - assertEquals("org.apache.olingo.odata4.commons.api.exception.ODataException: msg", e.getMessage()); + assertEquals("org.apache.olingo.odata4.commons.api.ODataException: msg", e.getMessage()); } try { localEdm.getFunction(fqn, fqn, true, null); } catch (EdmException e) { - assertEquals("org.apache.olingo.odata4.commons.api.exception.ODataException: msg", e.getMessage()); + assertEquals("org.apache.olingo.odata4.commons.api.ODataException: msg", e.getMessage()); } } diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmReturnTypeImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmReturnTypeImplTest.java similarity index 96% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmReturnTypeImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmReturnTypeImplTest.java index ae54cec96..2270841d2 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmReturnTypeImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmReturnTypeImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -32,9 +32,9 @@ import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmReturnType; import org.apache.olingo.odata4.commons.api.edm.EdmType; import org.apache.olingo.odata4.commons.api.edm.EdmTypeDefinition; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.ReturnType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.ReturnType; import org.junit.Test; public class EdmReturnTypeImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmServiceMetadataImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmServiceMetadataImplTest.java similarity index 88% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmServiceMetadataImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmServiceMetadataImplTest.java index 62d3e0fbb..f48f08ac1 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmServiceMetadataImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmServiceMetadataImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -26,19 +26,19 @@ import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.List; +import org.apache.olingo.odata4.commons.api.ODataException; import org.apache.olingo.odata4.commons.api.edm.EdmEntitySetInfo; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImportInfo; import org.apache.olingo.odata4.commons.api.edm.EdmServiceMetadata; import org.apache.olingo.odata4.commons.api.edm.EdmSingletonInfo; import org.apache.olingo.odata4.commons.api.edm.constants.ODataServiceVersion; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainer; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySet; -import org.apache.olingo.odata4.commons.api.edm.provider.FunctionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.Schema; -import org.apache.olingo.odata4.commons.api.edm.provider.Singleton; -import org.apache.olingo.odata4.commons.api.exception.ODataException; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainer; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySet; +import org.apache.olingo.odata4.server.api.edm.provider.FunctionImport; +import org.apache.olingo.odata4.server.api.edm.provider.Schema; +import org.apache.olingo.odata4.server.api.edm.provider.Singleton; import org.junit.Test; public class EdmServiceMetadataImplTest { @@ -130,7 +130,7 @@ public class EdmServiceMetadataImplTest { try { svc.getFunctionImportInfos(); } catch (EdmException e) { - assertEquals("org.apache.olingo.odata4.commons.api.exception.ODataException: msg", e.getMessage()); + assertEquals("org.apache.olingo.odata4.commons.api.ODataException: msg", e.getMessage()); return; } fail("Expected EdmException was not thrown"); @@ -141,7 +141,7 @@ public class EdmServiceMetadataImplTest { try { svc.getSingletonInfos(); } catch (EdmException e) { - assertEquals("org.apache.olingo.odata4.commons.api.exception.ODataException: msg", e.getMessage()); + assertEquals("org.apache.olingo.odata4.commons.api.ODataException: msg", e.getMessage()); return; } fail("Expected EdmException was not thrown"); @@ -151,7 +151,7 @@ public class EdmServiceMetadataImplTest { try { svc.getEntitySetInfos(); } catch (EdmException e) { - assertEquals("org.apache.olingo.odata4.commons.api.exception.ODataException: msg", e.getMessage()); + assertEquals("org.apache.olingo.odata4.commons.api.ODataException: msg", e.getMessage()); return; } fail("Expected EdmException was not thrown"); diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonImplTest.java similarity index 90% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonImplTest.java index fa65363ef..d7f193255 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonImplTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -30,14 +30,14 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer; import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmSingleton; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainerInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.NavigationPropertyBinding; -import org.apache.olingo.odata4.commons.api.edm.provider.PropertyRef; -import org.apache.olingo.odata4.commons.api.edm.provider.Singleton; -import org.apache.olingo.odata4.commons.api.edm.provider.Target; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainerInfo; +import org.apache.olingo.odata4.server.api.edm.provider.EntityType; +import org.apache.olingo.odata4.server.api.edm.provider.NavigationPropertyBinding; +import org.apache.olingo.odata4.server.api.edm.provider.PropertyRef; +import org.apache.olingo.odata4.server.api.edm.provider.Singleton; +import org.apache.olingo.odata4.server.api.edm.provider.Target; import org.junit.Test; public class EdmSingletonImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonInfoImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonInfoImplTest.java similarity index 90% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonInfoImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonInfoImplTest.java index bd921371f..93b97cd77 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmSingletonInfoImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmSingletonInfoImplTest.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmSingletonInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainer; -import org.apache.olingo.odata4.commons.api.edm.provider.Singleton; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainer; +import org.apache.olingo.odata4.server.api.edm.provider.Singleton; import org.junit.Test; public class EdmSingletonInfoImplTest { diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeDefinitionImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeDefinitionImplTest.java similarity index 94% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeDefinitionImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeDefinitionImplTest.java index 62d31e9bc..8df155a77 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeDefinitionImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeDefinitionImplTest.java @@ -1,4 +1,4 @@ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -7,10 +7,10 @@ import static org.mockito.Mockito.mock; import org.apache.olingo.odata4.commons.api.edm.EdmException; import org.apache.olingo.odata4.commons.api.edm.EdmTypeDefinition; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.TypeDefinition; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.TypeDefinition; import org.junit.Test; /******************************************************************************* diff --git a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeImplTest.java similarity index 92% rename from odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeImplTest.java rename to odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeImplTest.java index d5de3e17f..d8a04e05b 100644 --- a/odata4-lib/odata4-commons-core/src/test/java/org/apache/olingo/odata4/commons/core/edm/provider/EdmTypeImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/EdmTypeImplTest.java @@ -16,13 +16,13 @@ * specific language governing permissions and limitations * under the License. ******************************************************************************/ -package org.apache.olingo.odata4.commons.core.edm.provider; +package org.apache.olingo.odata4.server.core.edm.provider; import static org.junit.Assert.assertEquals; import org.apache.olingo.odata4.commons.api.edm.EdmType; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; import org.junit.Test; public class EdmTypeImplTest { diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/PrimitiveTypeBaseTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/PrimitiveTypeBaseTest.java new file mode 100644 index 000000000..b5a18535c --- /dev/null +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/edm/provider/PrimitiveTypeBaseTest.java @@ -0,0 +1,117 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + ******************************************************************************/ +package org.apache.olingo.odata4.server.core.edm.provider; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.odata4.commons.api.edm.EdmPrimitiveTypeException; + +public abstract class PrimitiveTypeBaseTest { + + private void expectErrorInValueToString(final EdmPrimitiveType instance, + final Object value, final Boolean isNullable, final Integer maxLength, + final Integer precision, final Integer scale, final Boolean isUnicode, + final String messageReferenceString) { + try { + instance.valueToString(value, isNullable, maxLength, precision, scale, isUnicode); + fail("Expected exception not thrown"); + } catch (final EdmPrimitiveTypeException e) { + assertNotNull(e.getLocalizedMessage()); + assertTrue(e.getLocalizedMessage().startsWith(messageReferenceString)); + } + } + + private void expectErrorInValueToString(final EdmPrimitiveType instance, final Object value, + final String messageReference) { + expectErrorInValueToString(instance, value, null, null, null, null, null, messageReference); + } + + protected void expectTypeErrorInValueToString(final EdmPrimitiveType instance, final Object value) { + expectErrorInValueToString(instance, value, "EdmPrimitiveTypeException.VALUE_TYPE_NOT_SUPPORTED"); + } + + protected void expectContentErrorInValueToString(final EdmPrimitiveType instance, final Object value) { + expectErrorInValueToString(instance, value, "EdmPrimitiveTypeException.VALUE_ILLEGAL_CONTENT"); + } + + protected void expectFacetsErrorInValueToString(final EdmPrimitiveType instance, final Object value, + final Boolean isNullable, final Integer maxLength, final Integer precision, + final Integer scale, final Boolean isUnicode) { + expectErrorInValueToString(instance, value, isNullable, maxLength, precision, scale, isUnicode, + "EdmPrimitiveTypeException.VALUE_FACETS_NOT_MATCHED"); + } + + protected void expectNullErrorInValueToString(final EdmPrimitiveType instance) { + expectErrorInValueToString(instance, null, false, null, null, null, null, + "EdmPrimitiveTypeException.VALUE_NULL_NOT_ALLOWED"); + } + + private void expectErrorInValueOfString(final EdmPrimitiveType instance, + final String value, final Boolean isNullable, final Integer maxLength, final Integer precision, + final Integer scale, final Boolean isUnicode, final Class returnType, final String messageReferenceString) { + try { + instance.valueOfString(value, isNullable, maxLength, precision, scale, isUnicode, returnType); + fail("Expected exception not thrown"); + } catch (final EdmPrimitiveTypeException e) { + assertNotNull(e.getLocalizedMessage()); + assertTrue(e.getLocalizedMessage().startsWith(messageReferenceString)); + } + } + + protected void expectTypeErrorInValueOfString(final EdmPrimitiveType instance, final String value) { + expectErrorInValueOfString(instance, value, null, null, null, null, null, Class.class, + "EdmPrimitiveTypeException.VALUE_TYPE_NOT_SUPPORTED"); + } + + protected void expectUnconvertibleErrorInValueOfString(final EdmPrimitiveType instance, final String value, + final Class type) { + expectErrorInValueOfString(instance, value, null, null, null, null, null, type, + "EdmPrimitiveTypeException.LITERAL_UNCONVERTIBLE_TO_VALUE_TYPE"); + } + + protected void expectContentErrorInValueOfString(final EdmPrimitiveType instance, final String value) { + expectErrorInValueOfString(instance, value, null, null, null, null, null, instance.getDefaultType(), + "EdmPrimitiveTypeException.LITERAL_ILLEGAL_CONTENT"); + } + + protected void expectFacetsErrorInValueOfString(final EdmPrimitiveType instance, final String value, + final Boolean isNullable, final Integer maxLength, final Integer precision, + final Integer scale, final Boolean isUnicode) { + expectErrorInValueOfString(instance, value, isNullable, maxLength, precision, scale, isUnicode, + instance.getDefaultType(), "EdmPrimitiveTypeException.LITERAL_FACETS_NOT_MATCHED"); + } + + protected void expectNullErrorInValueOfString(final EdmPrimitiveType instance) { + expectErrorInValueOfString(instance, null, false, null, null, null, null, instance.getDefaultType(), + "EdmPrimitiveTypeException.LITERAL_NULL_NOT_ALLOWED"); + } + + protected void expectErrorInFromUriLiteral(final EdmPrimitiveType instance, final String value) { + try { + instance.fromUriLiteral(value); + fail("Expected exception not thrown"); + } catch (final EdmPrimitiveTypeException e) { + assertNotNull(e.getLocalizedMessage()); + assertTrue(e.getLocalizedMessage().startsWith("EdmPrimitiveTypeException.LITERAL_ILLEGAL_CONTENT")); + } + } +} diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/EdmTechProvider.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/EdmTechProvider.java index 41e118109..1dfc7d7d5 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/EdmTechProvider.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/EdmTechProvider.java @@ -22,30 +22,30 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.apache.olingo.odata4.commons.api.edm.provider.Action; -import org.apache.olingo.odata4.commons.api.edm.provider.ActionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.AliasInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.ComplexType; -import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityContainerInfo; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySet; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.EnumMember; -import org.apache.olingo.odata4.commons.api.edm.provider.EnumType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Function; -import org.apache.olingo.odata4.commons.api.edm.provider.FunctionImport; -import org.apache.olingo.odata4.commons.api.edm.provider.NavigationProperty; -import org.apache.olingo.odata4.commons.api.edm.provider.NavigationPropertyBinding; -import org.apache.olingo.odata4.commons.api.edm.provider.Parameter; -import org.apache.olingo.odata4.commons.api.edm.provider.Property; -import org.apache.olingo.odata4.commons.api.edm.provider.PropertyRef; -import org.apache.olingo.odata4.commons.api.edm.provider.ReferentialConstraint; -import org.apache.olingo.odata4.commons.api.edm.provider.ReturnType; -import org.apache.olingo.odata4.commons.api.edm.provider.Singleton; -import org.apache.olingo.odata4.commons.api.edm.provider.Target; -import org.apache.olingo.odata4.commons.api.exception.ODataException; +import org.apache.olingo.odata4.commons.api.ODataException; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; +import org.apache.olingo.odata4.server.api.edm.provider.Action; +import org.apache.olingo.odata4.server.api.edm.provider.ActionImport; +import org.apache.olingo.odata4.server.api.edm.provider.AliasInfo; +import org.apache.olingo.odata4.server.api.edm.provider.ComplexType; +import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider; +import org.apache.olingo.odata4.server.api.edm.provider.EntityContainerInfo; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySet; +import org.apache.olingo.odata4.server.api.edm.provider.EntityType; +import org.apache.olingo.odata4.server.api.edm.provider.EnumMember; +import org.apache.olingo.odata4.server.api.edm.provider.EnumType; +import org.apache.olingo.odata4.server.api.edm.provider.Function; +import org.apache.olingo.odata4.server.api.edm.provider.FunctionImport; +import org.apache.olingo.odata4.server.api.edm.provider.NavigationProperty; +import org.apache.olingo.odata4.server.api.edm.provider.NavigationPropertyBinding; +import org.apache.olingo.odata4.server.api.edm.provider.Parameter; +import org.apache.olingo.odata4.server.api.edm.provider.Property; +import org.apache.olingo.odata4.server.api.edm.provider.PropertyRef; +import org.apache.olingo.odata4.server.api.edm.provider.ReferentialConstraint; +import org.apache.olingo.odata4.server.api.edm.provider.ReturnType; +import org.apache.olingo.odata4.server.api.edm.provider.Singleton; +import org.apache.olingo.odata4.server.api.edm.provider.Target; public class EdmTechProvider extends EdmProvider { diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/EdmTechTestProvider.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/EdmTechTestProvider.java index 803226e53..060a275b1 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/EdmTechTestProvider.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/EdmTechTestProvider.java @@ -21,20 +21,19 @@ package org.apache.olingo.odata4.server.core.testutil; import java.util.Arrays; import java.util.List; -import org.apache.olingo.odata4.commons.api.edm.provider.ComplexType; -import org.apache.olingo.odata4.commons.api.edm.provider.EntitySet; -import org.apache.olingo.odata4.commons.api.edm.provider.EntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.edm.provider.Property; -import org.apache.olingo.odata4.commons.api.edm.provider.PropertyRef; -import org.apache.olingo.odata4.commons.api.exception.ODataException; - +import org.apache.olingo.odata4.commons.api.ODataException; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; +import org.apache.olingo.odata4.server.api.edm.provider.ComplexType; +import org.apache.olingo.odata4.server.api.edm.provider.EntitySet; +import org.apache.olingo.odata4.server.api.edm.provider.EntityType; +import org.apache.olingo.odata4.server.api.edm.provider.Property; +import org.apache.olingo.odata4.server.api.edm.provider.PropertyRef; /** * Implement the EdmTechProvider and *
  • adds a entity type ETabc with properties a,b,c,d,e,f
  • *
  • adds a complex type CTabc with properties a,b,c,d,e,f
  • - *
  • adds a abc entity set of type ETabc
  • + *
  • adds a abc entity set of type ETabc
  • */ public class EdmTechTestProvider extends EdmTechProvider { @@ -44,7 +43,7 @@ public class EdmTechTestProvider extends EdmTechProvider { Property propertyDInt16 = new Property().setName("d").setType(nameInt16); Property propertyEInt16 = new Property().setName("e").setType(nameInt16); Property propertyFInt16 = new Property().setName("f").setType(nameInt16); - + public static final FullQualifiedName nameCTabc = new FullQualifiedName(nameSpace, "CTabc"); public static final FullQualifiedName nameETabc = new FullQualifiedName(nameSpace, "ETabc"); diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ExpandValidator.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ExpandValidator.java index fce1932a1..c5a0e2903 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ExpandValidator.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ExpandValidator.java @@ -22,9 +22,9 @@ package org.apache.olingo.odata4.server.core.testutil; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.commons.api.edm.Edm; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.server.api.uri.UriInfoKind; import org.apache.olingo.odata4.server.api.uri.queryoption.ExpandItem; import org.apache.olingo.odata4.server.api.uri.queryoption.SelectItem; @@ -76,10 +76,10 @@ public class ExpandValidator implements Validator { .setUriInfoImplPath(uriInfo); } - + public UriResourceValidator goSelectItemPath(final int index) { SelectOptionImpl select = (SelectOptionImpl) expandItem.getSelectOption(); - + SelectItem item = select.getSelectItems().get(index); UriInfoImpl uriInfo = (UriInfoImpl) item.getResourceInfo(); @@ -89,8 +89,6 @@ public class ExpandValidator implements Validator { .setUriInfoImplPath(uriInfo); } - - public ExpandValidator goExpand() { ExpandValidator val = new ExpandValidator(); @@ -164,24 +162,23 @@ public class ExpandValidator implements Validator { assertEquals(text, option.getText()); return this; } - + public ExpandValidator isSelectItemStar(final int index) { SelectOptionImpl select = (SelectOptionImpl) expandItem.getSelectOption(); - + SelectItem item = select.getSelectItems().get(index); assertEquals(true, item.isStar()); return this; } - - public ExpandValidator isSelectItemAllOp(final int index, FullQualifiedName fqn) { + + public ExpandValidator isSelectItemAllOp(final int index, final FullQualifiedName fqn) { SelectOptionImpl select = (SelectOptionImpl) expandItem.getSelectOption(); - + SelectItem item = select.getSelectItems().get(index); assertEquals(fqn.toString(), item.getAllOperationsInSchemaNameSpace().toString()); return this; } - - + public ExpandValidator isFilterText(final String text) { QueryOptionImpl option = (QueryOptionImpl) expandItem.getFilterOption(); assertEquals(text, option.getText()); diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/FilterTreeToText.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/FilterTreeToText.java index a7c21580e..c0f7ad855 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/FilterTreeToText.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/FilterTreeToText.java @@ -20,9 +20,9 @@ package org.apache.olingo.odata4.server.core.testutil; import java.util.List; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; 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.server.api.uri.UriInfoResource; import org.apache.olingo.odata4.server.api.uri.UriResource; import org.apache.olingo.odata4.server.api.uri.UriResourceLambdaAll; @@ -154,7 +154,8 @@ public class FilterTreeToText implements ExpressionVisitor { } @Override - public String visitConstant(SupportedConstants kind) throws ExceptionVisitExpression, ODataApplicationException { + public String visitConstant(final SupportedConstants kind) + throws ExceptionVisitExpression, ODataApplicationException { // TODO Auto-generated method stub return "<" + kind.toString() + ">"; } diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/FilterValidator.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/FilterValidator.java index 5a03a17f1..6d5d2cccf 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/FilterValidator.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/FilterValidator.java @@ -23,10 +23,10 @@ import static org.junit.Assert.fail; import java.util.List; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.commons.api.edm.Edm; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.server.api.uri.UriInfo; import org.apache.olingo.odata4.server.api.uri.UriInfoKind; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; @@ -40,7 +40,6 @@ import org.apache.olingo.odata4.server.core.uri.UriParserSemanticException; import org.apache.olingo.odata4.server.core.uri.UriParserSyntaxException; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriInfoImpl; import org.apache.olingo.odata4.server.core.uri.parser.Parser; -import org.apache.olingo.odata4.server.core.uri.parser.UriParseTreeVisitor; import org.apache.olingo.odata4.server.core.uri.queryoption.FilterOptionImpl; import org.apache.olingo.odata4.server.core.uri.queryoption.OrderByOptionImpl; import org.apache.olingo.odata4.server.core.uri.queryoption.expression.BinaryImpl; @@ -112,7 +111,7 @@ public class FilterValidator implements Validator { String uri = "ESTwoKeyNav?$orderby=" + orderBy.trim(); return runUriOrderBy(uri); } - + public FilterValidator runOrderByOnETTwoKeyNavEx(final String orderBy) throws UriParserException { String uri = "ESTwoKeyNav?$orderby=" + orderBy.trim(); return runUriOrderByEx(uri); @@ -139,7 +138,7 @@ public class FilterValidator implements Validator { String uri = "ESKeyNav(1)?$filter=" + filter.trim(); return runUri(uri); } - + public FilterValidator runOnETKeyNavEx(final String filter) throws UriParserException { String uri = "ESKeyNav(1)?$filter=" + filter.trim(); return runUriEx(uri); @@ -200,9 +199,9 @@ public class FilterValidator implements Validator { UriInfo uriInfo = null; try { - uriInfo = parser.parseUri(uri, edm); + uriInfo = parser.parseUri(uri, edm); } catch (UriParserException e) { - this.exception = e; + exception = e; return this; } @@ -228,15 +227,15 @@ public class FilterValidator implements Validator { setOrderBy((OrderByOptionImpl) uriInfo.getOrderByOption()); return this; } - + public FilterValidator runUriOrderByEx(final String uri) { Parser parser = new Parser(); UriInfo uriInfo = null; try { - uriInfo = parser.parseUri(uri,edm); + uriInfo = parser.parseUri(uri, edm); } catch (UriParserException e) { - this.exception = e; + exception = e; return this; } @@ -248,7 +247,6 @@ public class FilterValidator implements Validator { return this; } - // --- Navigation --- public Validator goUp() { @@ -389,7 +387,6 @@ public class FilterValidator implements Validator { return this; } - public FilterValidator isParameterText(final int parameterIndex, final String parameterText) throws ExceptionVisitExpression, ODataApplicationException { @@ -417,12 +414,12 @@ public class FilterValidator implements Validator { return this; } - public FilterValidator isTypedLiteral(FullQualifiedName fullName) { + public FilterValidator isTypedLiteral(final FullQualifiedName fullName) { if (!(curExpression instanceof TypeLiteralImpl)) { fail("Current expression not a typeLiteral"); } - this.isType(fullName); + isType(fullName); return this; } @@ -458,7 +455,7 @@ public class FilterValidator implements Validator { return this; } - public FilterValidator isConstant(SupportedConstants kind) { + public FilterValidator isConstant(final SupportedConstants kind) { if (!(curExpression instanceof ConstantImpl)) { fail("Current expression not a constant"); } @@ -468,22 +465,22 @@ public class FilterValidator implements Validator { return this; } - public FilterValidator isSortOrder(int index, boolean descending) { + public FilterValidator isSortOrder(final int index, final boolean descending) { assertEquals(descending, orderBy.getOrders().get(index).isDescending()); return this; } - public FilterValidator goOrder(int index) { + public FilterValidator goOrder(final int index) { curExpression = orderBy.getOrders().get(index).getExpression(); return this; } - public FilterValidator isExSyntax(long errorID) { + public FilterValidator isExSyntax(final long errorID) { assertEquals(UriParserSyntaxException.class, exception.getClass()); return this; } - public FilterValidator isExSemantic(long errorID) { + public FilterValidator isExSemantic(final long errorID) { assertEquals(UriParserSemanticException.class, exception.getClass()); return this; } diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ParserTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ParserTest.java index 35262718a..a5a790443 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ParserTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ParserTest.java @@ -32,20 +32,20 @@ public class ParserTest extends Parser { } @Override - protected void addStage2ErrorStategy(UriParserParser parser) { + protected void addStage2ErrorStategy(final UriParserParser parser) { // Don't throw an at first syntax error, so the error listener will be called parser.setErrorHandler(new DefaultErrorStrategy()); } @Override - protected void addStage1ErrorListener(UriParserParser parser) { + protected void addStage1ErrorListener(final UriParserParser parser) { // Log error to console parser.removeErrorListeners(); parser.addErrorListener(errorCollector1); } @Override - protected void addStage2ErrorListener(UriParserParser parser) { + protected void addStage2ErrorListener(final UriParserParser parser) { // Log error to console parser.removeErrorListeners(); parser.addErrorListener(errorCollector2); diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ParserValidator.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ParserValidator.java index f9c7e14b2..d5af0b6f7 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ParserValidator.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ParserValidator.java @@ -100,7 +100,7 @@ public class ParserValidator { (new TokenValidator()).log(lexerLogLevel).run(input); } - /**///root = parseInput(uri); + /**/// root = parseInput(uri); // if LOG > 0 - Write serialized tree if (logLevel > 0) { @@ -165,79 +165,79 @@ public class ParserValidator { } // --- Helper --- -/* - private OdataRelativeUriEOFContext parseInput(final String input) { - UriParserParser parser = null; - UriLexerWithTrace lexer = null; - OdataRelativeUriEOFContext ret = null; - - // Use 2 stage approach to improve performance - // see https://github.com/antlr/antlr4/issues/192 - // TODO verify this - - // stage= 1 - try { - curException = null; - exceptions.clear(); - - // create parser - lexer = new UriLexerWithTrace(new ANTLRInputStream(input), lexerLogLevel); - parser = new UriParserParser(new CommonTokenStream(lexer)); - - // write always a error message in case of syntax errors - // parser.addErrorListener(new TestErrorHandler()); - // check error message if whether they are allowed or not - // parser.addErrorListener(new ErrorCollector()); - - // bail out of parser at first syntax error. --> proceed in catch block with step 2 - parser.setErrorHandler(new BailErrorStrategy()); - - // user the faster SLL parsing - parser.getInterpreter().setPredictionMode(PredictionMode.SLL); - - // parse - if (logLevel > 0) { - System.out.println("Step 1"); - System.out.println(" PrectictionMode: " + parser.getInterpreter().getPredictionMode()); - } - ret = parser.odataRelativeUriEOF(); - - } catch (Exception exception) { - curException = exception; - try { - // clear status - curException = null; - exceptions.clear(); - - // create parser - lexer = new UriLexerWithTrace(new ANTLRInputStream(input), lexerLogLevel); - parser = new UriParserParser(new CommonTokenStream(lexer)); - - // write always a error message in case of syntax errors - // parser.addErrorListener(new ErrorCollector(this)); - // check error message if whether they are allowed or not - // parser.addErrorListener(new ErrorCollector(this)); - - // Used default error strategy - parser.setErrorHandler(new DefaultErrorStrategy()); - - // User the slower SLL parsing - parser.getInterpreter().setPredictionMode(PredictionMode.LL); - - // parse - if (logLevel > 1) { - System.out.println("Step 2"); - System.out.println(" PrectictionMode: " + parser.getInterpreter().getPredictionMode() + ")"); - } - ret = parser.odataRelativeUriEOF(); - - } catch (Exception exception1) { - curException = exception1; - // exceptionOnStage = 2; - } - } - - return ret; - } -*/ + /* + * private OdataRelativeUriEOFContext parseInput(final String input) { + * UriParserParser parser = null; + * UriLexerWithTrace lexer = null; + * OdataRelativeUriEOFContext ret = null; + * + * // Use 2 stage approach to improve performance + * // see https://github.com/antlr/antlr4/issues/192 + * // TODO verify this + * + * // stage= 1 + * try { + * curException = null; + * exceptions.clear(); + * + * // create parser + * lexer = new UriLexerWithTrace(new ANTLRInputStream(input), lexerLogLevel); + * parser = new UriParserParser(new CommonTokenStream(lexer)); + * + * // write always a error message in case of syntax errors + * // parser.addErrorListener(new TestErrorHandler()); + * // check error message if whether they are allowed or not + * // parser.addErrorListener(new ErrorCollector()); + * + * // bail out of parser at first syntax error. --> proceed in catch block with step 2 + * parser.setErrorHandler(new BailErrorStrategy()); + * + * // user the faster SLL parsing + * parser.getInterpreter().setPredictionMode(PredictionMode.SLL); + * + * // parse + * if (logLevel > 0) { + * System.out.println("Step 1"); + * System.out.println(" PrectictionMode: " + parser.getInterpreter().getPredictionMode()); + * } + * ret = parser.odataRelativeUriEOF(); + * + * } catch (Exception exception) { + * curException = exception; + * try { + * // clear status + * curException = null; + * exceptions.clear(); + * + * // create parser + * lexer = new UriLexerWithTrace(new ANTLRInputStream(input), lexerLogLevel); + * parser = new UriParserParser(new CommonTokenStream(lexer)); + * + * // write always a error message in case of syntax errors + * // parser.addErrorListener(new ErrorCollector(this)); + * // check error message if whether they are allowed or not + * // parser.addErrorListener(new ErrorCollector(this)); + * + * // Used default error strategy + * parser.setErrorHandler(new DefaultErrorStrategy()); + * + * // User the slower SLL parsing + * parser.getInterpreter().setPredictionMode(PredictionMode.LL); + * + * // parse + * if (logLevel > 1) { + * System.out.println("Step 2"); + * System.out.println(" PrectictionMode: " + parser.getInterpreter().getPredictionMode() + ")"); + * } + * ret = parser.odataRelativeUriEOF(); + * + * } catch (Exception exception1) { + * curException = exception1; + * // exceptionOnStage = 2; + * } + * } + * + * return ret; + * } + */ } \ No newline at end of file diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TestErrorLogger.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TestErrorLogger.java index 877b06d17..46e9eb864 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TestErrorLogger.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TestErrorLogger.java @@ -34,7 +34,7 @@ class TestErrorLogger implements ANTLRErrorListener { private String prefix; private int logLevel = 0; - public TestErrorLogger(String prefix, int logLevel) { + public TestErrorLogger(final String prefix, final int logLevel) { this.prefix = prefix; this.logLevel = logLevel; } @@ -49,7 +49,7 @@ class TestErrorLogger implements ANTLRErrorListener { System.out.println("\n" + prefix + " -- SyntaxError"); trace(recognizer, offendingSymbol, line, charPositionInLine, msg, e); } - + } @Override @@ -124,7 +124,7 @@ class TestErrorLogger implements ANTLRErrorListener { public void trace(final Recognizer recognizer, final Object offendingSymbol, final int line, final int charPositionInLine, final String msg, final RecognitionException e) { - System.out.println("Error message: " + msg); + System.out.println("Error message: " + msg); // TODO check also http://stackoverflow.com/questions/14747952/ll-exact-ambig-detection-interpetation printStack(recognizer); @@ -145,30 +145,30 @@ class TestErrorLogger implements ANTLRErrorListener { System.out.println(" line " + line + ":" + charPositionInLine + " at " + offendingSymbol + ": " + msg); } } - - public static int getDecisionRule(Recognizer recognizer, int decision) { + + public static int getDecisionRule(final Recognizer recognizer, final int decision) { if (recognizer == null || decision < 0) { - return -1; + return -1; } if (decision >= recognizer.getATN().decisionToState.size()) { - return -1; + return -1; } return recognizer.getATN().decisionToState.get(decision).ruleIndex; -} + } -public static String getRuleDisplayName(Recognizer recognizer, int ruleIndex) { + public static String getRuleDisplayName(final Recognizer recognizer, final int ruleIndex) { if (recognizer == null || ruleIndex < 0) { - return Integer.toString(ruleIndex); + return Integer.toString(ruleIndex); } String[] ruleNames = recognizer.getRuleNames(); if (ruleIndex < 0 || ruleIndex >= ruleNames.length) { - return Integer.toString(ruleIndex); + return Integer.toString(ruleIndex); } return ruleNames[ruleIndex]; -} + } } \ No newline at end of file diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriResourceValidator.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriResourceValidator.java index 25b46f5df..637f9e380 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriResourceValidator.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriResourceValidator.java @@ -24,11 +24,11 @@ import static org.junit.Assert.fail; import java.util.List; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.commons.api.edm.Edm; import org.apache.olingo.odata4.commons.api.edm.EdmElement; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.server.api.uri.UriInfo; import org.apache.olingo.odata4.server.api.uri.UriInfoKind; import org.apache.olingo.odata4.server.api.uri.UriParameter; @@ -50,7 +50,6 @@ import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceNavigationPro import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourcePrimitivePropertyImpl; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceSingletonImpl; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceWithKeysImpl; -import org.apache.olingo.odata4.server.core.uri.parser.UriParseTreeVisitor; import org.apache.olingo.odata4.server.core.uri.queryoption.CustomQueryOptionImpl; import org.apache.olingo.odata4.server.core.uri.queryoption.ExpandOptionImpl; import org.apache.olingo.odata4.server.core.uri.queryoption.SelectOptionImpl; @@ -86,7 +85,7 @@ public class UriResourceValidator implements Validator { public UriResourceValidator run(final String uri) { ParserTest testParser = new ParserTest(); - //testParser.setLogLevel(1); + // testParser.setLogLevel(1); UriInfoImpl uriInfoTmp = null; uriPathInfo = null; try { @@ -149,10 +148,10 @@ public class UriResourceValidator implements Validator { assertEquals(var, actualVar); return this; } - + public UriResourceValidator goSelectItemPath(final int index) { SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption(); - + SelectItem item = select.getSelectItems().get(index); UriInfoImpl uriInfo1 = (UriInfoImpl) item.getResourceInfo(); @@ -218,7 +217,7 @@ public class UriResourceValidator implements Validator { public UriResourceValidator isTypeFilter(final FullQualifiedName expectedType) { if (uriPathInfo.getKind() != UriResourceKind.complexProperty && - uriPathInfo.getKind() != UriResourceKind.singleton && + uriPathInfo.getKind() != UriResourceKind.singleton && uriPathInfo.getKind() != UriResourceKind.startingTypeFilter) { fail("invalid resource kind: " + uriPathInfo.getKind().toString()); } @@ -347,7 +346,6 @@ public class UriResourceValidator implements Validator { return this; } - public UriResourceValidator isKeyPredicateRef(final int index, final String name, final String refencedProperty) { if (!(uriPathInfo instanceof UriResourceWithKeysImpl)) { fail("invalid resource kind: " + uriPathInfo.getKind().toString()); @@ -360,6 +358,7 @@ public class UriResourceValidator implements Validator { return this; } + public UriResourceValidator isKeyPredicate(final int index, final String name, final String text) { if (!(uriPathInfo instanceof UriResourceWithKeysImpl)) { fail("invalid resource kind: " + uriPathInfo.getKind().toString()); @@ -385,7 +384,7 @@ public class UriResourceValidator implements Validator { return this; } - + public UriResourceValidator isParameterAlias(final int index, final String name, final String alias) { if (!(uriPathInfo instanceof UriResourceFunctionImpl)) { fail("invalid resource kind: " + uriPathInfo.getKind().toString()); @@ -399,14 +398,13 @@ public class UriResourceValidator implements Validator { } - public UriResourceValidator isKind(final UriInfoKind kind) { assertEquals(kind, uriInfo.getKind()); return this; } - public UriResourceValidator isPrimitiveProperty(final String name, - final FullQualifiedName type, boolean isCollection) { + public UriResourceValidator isPrimitiveProperty(final String name, + final FullQualifiedName type, final boolean isCollection) { if (!(uriPathInfo instanceof UriResourcePrimitivePropertyImpl)) { fail("invalid resource kind: " + uriPathInfo.getKind().toString()); } @@ -421,7 +419,8 @@ public class UriResourceValidator implements Validator { return this; } - public UriResourceValidator isComplexProperty(final String name, final FullQualifiedName type, boolean isCollection) { + public UriResourceValidator isComplexProperty(final String name, final FullQualifiedName type, + final boolean isCollection) { if (!(uriPathInfo instanceof UriResourceComplexPropertyImpl)) { fail("invalid resource kind: " + uriPathInfo.getKind().toString()); } @@ -436,7 +435,8 @@ public class UriResourceValidator implements Validator { return this; } - public UriResourceValidator isNavProperty(final String name, final FullQualifiedName type, boolean isCollection) { + public UriResourceValidator + isNavProperty(final String name, final FullQualifiedName type, final boolean isCollection) { if (!(uriPathInfo instanceof UriResourceNavigationPropertyImpl)) { fail("invalid resource kind: " + uriPathInfo.getKind().toString()); } @@ -543,18 +543,18 @@ public class UriResourceValidator implements Validator { assertEquals(skipTokenText, uriInfo.getSkipTokenOption().getText()); return this; } - + public UriResourceValidator isSelectItemStar(final int index) { SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption(); - + SelectItem item = select.getSelectItems().get(index); assertEquals(true, item.isStar()); return this; } - - public UriResourceValidator isSelectItemAllOp(final int index, FullQualifiedName fqn) { + + public UriResourceValidator isSelectItemAllOp(final int index, final FullQualifiedName fqn) { SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption(); - + SelectItem item = select.getSelectItems().get(index); assertEquals(fqn.toString(), item.getAllOperationsInSchemaNameSpace().toString()); return this; diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriValidator.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriValidator.java index 11571e2b9..8e9613f73 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriValidator.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriValidator.java @@ -25,7 +25,7 @@ import java.util.List; import org.apache.olingo.odata4.commons.api.edm.Edm; import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.server.api.uri.UriInfoKind; import org.apache.olingo.odata4.server.api.uri.queryoption.CustomQueryOption; import org.apache.olingo.odata4.server.api.uri.queryoption.SelectItem; @@ -34,7 +34,6 @@ import org.apache.olingo.odata4.server.core.uri.UriParserSemanticException; import org.apache.olingo.odata4.server.core.uri.UriParserSyntaxException; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriInfoImpl; import org.apache.olingo.odata4.server.core.uri.parser.Parser; -import org.apache.olingo.odata4.server.core.uri.parser.UriParseTreeVisitor; import org.apache.olingo.odata4.server.core.uri.queryoption.CustomQueryOptionImpl; import org.apache.olingo.odata4.server.core.uri.queryoption.ExpandOptionImpl; import org.apache.olingo.odata4.server.core.uri.queryoption.FilterOptionImpl; @@ -174,12 +173,12 @@ public class UriValidator implements Validator { } - public UriValidator isExSyntax(long errorID) { + public UriValidator isExSyntax(final long errorID) { assertEquals(UriParserSyntaxException.class, exception.getClass()); return this; } - public UriValidator isExSemantic(long errorID) { + public UriValidator isExSemantic(final long errorID) { assertEquals(UriParserSemanticException.class, exception.getClass()); return this; } @@ -235,7 +234,7 @@ public class UriValidator implements Validator { return this; } - public UriValidator isSelectItemAllOp(final int index, FullQualifiedName fqn) { + public UriValidator isSelectItemAllOp(final int index, final FullQualifiedName fqn) { SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption(); SelectItem item = select.getSelectItems().get(index); diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/RawUriTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/RawUriTest.java index 01fe2e1f0..c7ec93be2 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/RawUriTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/RawUriTest.java @@ -30,7 +30,7 @@ import org.junit.Test; public class RawUriTest { - private RawUri runRawParser(String uri, int scipSegments) throws UriParserSyntaxException { + private RawUri runRawParser(final String uri, final int scipSegments) throws UriParserSyntaxException { return UriDecoder.decodeUri(uri, scipSegments); } @@ -48,10 +48,10 @@ public class RawUriTest { rawUri = runRawParser("?=", 0); checkOption(rawUri, 0, "", ""); - + rawUri = runRawParser("?=b", 0); checkOption(rawUri, 0, "", "b"); - + rawUri = runRawParser("?a&c", 0); checkOption(rawUri, 0, "a", ""); checkOption(rawUri, 1, "c", ""); @@ -63,17 +63,17 @@ public class RawUriTest { rawUri = runRawParser("?a=b&c=d", 0); checkOption(rawUri, 0, "a", "b"); checkOption(rawUri, 1, "c", "d"); - + rawUri = runRawParser("?=&=", 0); checkOption(rawUri, 0, "", ""); checkOption(rawUri, 1, "", ""); - + rawUri = runRawParser("?=&c=d", 0); checkOption(rawUri, 0, "", ""); checkOption(rawUri, 1, "c", "d"); } - private void checkOption(RawUri rawUri, int index, String name, String value) { + private void checkOption(final RawUri rawUri, final int index, final String name, final String value) { RawUri.QueryOption option = rawUri.queryOptionListDecoded.get(index); assertEquals(name, option.name); @@ -81,7 +81,7 @@ public class RawUriTest { } - private void checkOptionCount(RawUri rawUri, int count) { + private void checkOptionCount(final RawUri rawUri, final int count) { assertEquals(count, rawUri.queryOptionListDecoded.size()); } @@ -134,7 +134,7 @@ public class RawUriTest { * } */ - private void checkPath(RawUri rawUri, String path, List list) { + private void checkPath(final RawUri rawUri, final String path, final List list) { assertEquals(path, rawUri.path); assertEquals(list.size(), rawUri.pathSegmentListDecoded.size()); diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriInfoImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriInfoImplTest.java index 2d9602305..3f99b576c 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriInfoImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriInfoImplTest.java @@ -26,7 +26,6 @@ import java.util.List; import org.apache.olingo.odata4.commons.api.edm.Edm; import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; -import org.apache.olingo.odata4.commons.core.edm.provider.EdmProviderImpl; import org.apache.olingo.odata4.server.api.uri.UriInfoAll; import org.apache.olingo.odata4.server.api.uri.UriInfoBatch; import org.apache.olingo.odata4.server.api.uri.UriInfoCrossjoin; @@ -36,6 +35,7 @@ import org.apache.olingo.odata4.server.api.uri.UriInfoMetadata; import org.apache.olingo.odata4.server.api.uri.UriInfoResource; import org.apache.olingo.odata4.server.api.uri.UriInfoService; import org.apache.olingo.odata4.server.api.uri.queryoption.CustomQueryOption; +import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl; import org.apache.olingo.odata4.server.core.testutil.EdmTechProvider; import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriInfoImpl; @@ -58,9 +58,9 @@ import org.apache.olingo.odata4.server.core.uri.queryoption.TopOptionImpl; import org.junit.Test; public class UriInfoImplTest { - + Edm edm = new EdmProviderImpl(new EdmTechTestProvider()); - + @Test public void testKind() { UriInfoImpl uriInfo = new UriInfoImpl().setKind(UriInfoKind.all); @@ -102,7 +102,7 @@ public class UriInfoImplTest { assertEquals("A", uriInfo.getEntitySetNames().get(0)); assertEquals("B", uriInfo.getEntitySetNames().get(1)); - + } @Test @@ -118,9 +118,9 @@ public class UriInfoImplTest { assertEquals(action, uriInfo.getUriResourceParts().get(0)); assertEquals(entitySet0, uriInfo.getUriResourceParts().get(1)); - + assertEquals(entitySet0, uriInfo.getLastResourcePart()); - + uriInfo.addResourcePart(entitySet1); assertEquals(entitySet1, uriInfo.getLastResourcePart()); } @@ -148,7 +148,7 @@ public class UriInfoImplTest { customOption0.setText("A"); CustomQueryOptionImpl customOption1 = new CustomQueryOptionImpl(); customOption1.setText("B"); - + QueryOptionImpl queryOption = new QueryOptionImpl(); queryOptions.add(expand); @@ -164,8 +164,8 @@ public class UriInfoImplTest { queryOptions.add(top); queryOptions.add(customOption0); queryOptions.add(customOption1); - queryOptions.add(levels);//not stored - queryOptions.add(queryOption);//not stored + queryOptions.add(levels);// not stored + queryOptions.add(queryOption);// not stored uriInfo.setQueryOptions(queryOptions); assertEquals(expand, uriInfo.getExpandOption()); @@ -184,21 +184,21 @@ public class UriInfoImplTest { assertEquals(customOption0, customQueryOptions.get(0)); assertEquals(customOption1, customQueryOptions.get(1)); } - + @Test public void testFragment() { UriInfoImpl uriInfo = new UriInfoImpl(); uriInfo.setFragment("F"); - assertEquals("F",uriInfo.getFragment()); + assertEquals("F", uriInfo.getFragment()); } - + @Test public void testEntityTypeCast() { UriInfoImpl uriInfo = new UriInfoImpl(); EdmEntityType entityType = edm.getEntityType(EdmTechProvider.nameETKeyNav); assertNotNull(entityType); - + uriInfo.setEntityTypeCast(entityType); - assertEquals(entityType,uriInfo.getEntityTypeCast()); + assertEquals(entityType, uriInfo.getEntityTypeCast()); } } diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriParameterImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriParameterImplTest.java index 210f52704..1bc747301 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriParameterImplTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriParameterImplTest.java @@ -28,7 +28,6 @@ import java.util.List; import org.apache.olingo.odata4.commons.api.edm.Edm; import org.apache.olingo.odata4.commons.api.edm.EdmAction; import org.apache.olingo.odata4.commons.api.edm.EdmActionImport; -import org.apache.olingo.odata4.commons.api.edm.EdmComplexType; import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; import org.apache.olingo.odata4.commons.api.edm.EdmFunction; import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImport; @@ -36,11 +35,11 @@ import org.apache.olingo.odata4.commons.api.edm.EdmNavigationProperty; import org.apache.olingo.odata4.commons.api.edm.EdmProperty; import org.apache.olingo.odata4.commons.api.edm.EdmType; import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind; -import org.apache.olingo.odata4.commons.core.edm.provider.EdmComplexTypeImpl; -import org.apache.olingo.odata4.commons.core.edm.provider.EdmEntitySetImpl; -import org.apache.olingo.odata4.commons.core.edm.provider.EdmProviderImpl; -import org.apache.olingo.odata4.commons.core.edm.provider.EdmSingletonImpl; import org.apache.olingo.odata4.server.api.uri.UriResourceKind; +import org.apache.olingo.odata4.server.core.edm.provider.EdmComplexTypeImpl; +import org.apache.olingo.odata4.server.core.edm.provider.EdmEntitySetImpl; +import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl; +import org.apache.olingo.odata4.server.core.edm.provider.EdmSingletonImpl; import org.apache.olingo.odata4.server.core.testutil.EdmTechProvider; import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriParameterImpl; @@ -92,10 +91,10 @@ public class UriParameterImplTest { assertEquals("", impl.toString()); // action - EdmAction action = edm.getAction(EdmTechTestProvider.nameUARTETParam, null, null); + EdmAction action = edm.getAction(EdmTechProvider.nameUARTETParam, null, null); impl.setAction(action); assertEquals(action, impl.getAction()); - assertEquals(EdmTechTestProvider.nameUARTETParam.getName(), impl.toString()); + assertEquals(EdmTechProvider.nameUARTETParam.getName(), impl.toString()); // action import impl = new UriResourceActionImpl(); @@ -154,7 +153,7 @@ public class UriParameterImplTest { assertEquals(false, impl.isCollection()); assertEquals(property.getType(), impl.getType()); assertEquals(property.getType(), impl.getComplexType()); - EdmComplexType complexType = impl.getComplexType(); // must work without cast + impl.getComplexType(); EdmComplexTypeImpl complexTypeImplType = (EdmComplexTypeImpl) edm.getComplexType(EdmTechProvider.nameCTBasePrimCompNav); @@ -162,7 +161,7 @@ public class UriParameterImplTest { impl.setTypeFilter(complexTypeImplType); assertEquals(complexTypeImplType, impl.getTypeFilter()); assertEquals(complexTypeImplType, impl.getComplexTypeFilter()); - complexType = impl.getComplexTypeFilter(); // must work without cast + impl.getComplexTypeFilter(); } @@ -201,7 +200,7 @@ public class UriParameterImplTest { assertEquals(entitySet.getEntityType(), impl.getType()); assertEquals(entitySet.getEntityType(), impl.getEntityType()); - EdmEntityType entityType = impl.getEntityType(); // must work without cast + impl.getEntityType(); // is Collection assertEquals(true, impl.isCollection()); @@ -239,8 +238,7 @@ public class UriParameterImplTest { UriParameterImpl parameter = new UriParameterImpl().setName("ParameterInt16"); impl.setFunctionImport(functionImport, Arrays.asList(parameter)); assertEquals("FICRTESTwoKeyNavParam", impl.toString()); - - + impl.setFunction(functionImport.getFunction(Arrays.asList("ParameterInt16"))); assertEquals(true, impl.isCollection()); impl.setKeyPredicates(new ArrayList()); @@ -263,7 +261,7 @@ public class UriParameterImplTest { return type; } - public Mock setType(EdmType type) { + public Mock setType(final EdmType type) { this.type = type; return this; } @@ -308,7 +306,7 @@ public class UriParameterImplTest { assertEquals(entityTypeBaseEntry, impl.getTypeFilterOnEntry()); assertEquals("mock", impl.toString(false)); assertEquals("mock/com.sap.odata.test1.ETTwoBaseTwoKeyNav", impl.toString(true)); - + // set collection // TODO remove ??? impl = new Mock(); @@ -347,7 +345,7 @@ public class UriParameterImplTest { return false; } - public Mock setType(EdmType type) { + public Mock setType(final EdmType type) { this.type = type; return this; } @@ -362,7 +360,7 @@ public class UriParameterImplTest { Mock impl = new Mock(); EdmEntityType entityType = edm.getEntityType(EdmTechProvider.nameETTwoKeyNav); EdmEntityType entityTypeBaseColl = edm.getEntityType(EdmTechProvider.nameETBaseTwoKeyNav); - EdmEntityType entityTypeBaseEntry = edm.getEntityType(EdmTechProvider.nameETTwoBaseTwoKeyNav); + edm.getEntityType(EdmTechProvider.nameETTwoBaseTwoKeyNav); impl.setType(entityType); assertEquals("mock", impl.toString()); @@ -451,7 +449,7 @@ public class UriParameterImplTest { impl.setKeyPredicates(keyPredicates); assertEquals(false, impl.isCollection()); } - + @Test public void testUriResourceSingletonImpl() { UriResourceSingletonImpl impl = new UriResourceSingletonImpl(); @@ -466,33 +464,31 @@ public class UriParameterImplTest { assertEquals(singleton.getEntityType(), impl.getType()); assertEquals(singleton.getEntityType(), impl.getEntityType()); - EdmEntityType entityType = impl.getEntityType(); // must work without cast - - + impl.getEntityType(); + impl.setTypeFilter(entityTypeBaseColl); assertEquals(entityTypeBaseColl, impl.getEntityTypeFilter()); // is Collection assertEquals(false, impl.isCollection()); } - + @Test public void testUriResourceValueImpl() { UriResourceValueImpl impl = new UriResourceValueImpl(); assertEquals(UriResourceKind.value, impl.getKind()); assertEquals("$value", impl.toString()); } - + @Test public void testUriResourceLambdaVarImpl() { UriResourceLambdaVarImpl impl = new UriResourceLambdaVarImpl(); assertEquals(UriResourceKind.lambdaVariable, impl.getKind()); - - + EdmEntityType entityType = edm.getEntityType(EdmTechProvider.nameETTwoKeyNav); impl.setType(entityType); impl.setVariableText("A"); - + assertEquals("A", impl.toString()); assertEquals(entityType, impl.getType()); assertEquals("A", impl.getVariableText()); @@ -500,14 +496,13 @@ public class UriParameterImplTest { impl.setCollection(true); assertEquals(true, impl.isCollection()); } - + @Test - public void testUriResourceStartingTypeFilterImpl () { + public void testUriResourceStartingTypeFilterImpl() { UriResourceStartingTypeFilterImpl impl = new UriResourceStartingTypeFilterImpl(); assertEquals(UriResourceKind.startingTypeFilter, impl.getKind()); EdmEntityType entityType = edm.getEntityType(EdmTechProvider.nameETTwoKeyNav); - impl.setType(entityType); assertEquals("com.sap.odata.test1.ETTwoKeyNav", impl.toString()); @@ -522,6 +517,6 @@ public class UriParameterImplTest { assertEquals(true, impl.isCollection()); impl.setKeyPredicates(keyPredicates); assertEquals(false, impl.isCollection()); - + } } diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestFullResourcePath.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestFullResourcePath.java index 408da858c..4ee024d15 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestFullResourcePath.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestFullResourcePath.java @@ -22,15 +22,15 @@ import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.Arrays; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.commons.api.edm.Edm; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; -import org.apache.olingo.odata4.commons.core.edm.provider.EdmProviderImpl; import org.apache.olingo.odata4.server.api.uri.UriInfoKind; import org.apache.olingo.odata4.server.api.uri.UriResourceKind; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedBinaryOperators; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedConstants; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedMethodCalls; +import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl; import org.apache.olingo.odata4.server.core.testutil.EdmTechProvider; import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider; import org.apache.olingo.odata4.server.core.testutil.FilterValidator; @@ -2252,7 +2252,7 @@ public class TestFullResourcePath { .isType(EdmTechProvider.nameETKeyNav, true) .goUpExpandValidator() .isSelectText("PropertyString") - .goSelectItemPath(0).isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .goSelectItemPath(0).isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testUri.run("ESKeyNav(1)?$expand=NavPropertyETKeyNavMany($expand=NavPropertyETTwoKeyNavOne)") .isKind(UriInfoKind.resource).goPath().goExpand() @@ -2293,7 +2293,7 @@ public class TestFullResourcePath { .isType(EdmTechProvider.nameETKeyNav, true) .goUpExpandValidator() .isSelectText("PropertyString") - .goSelectItemPath(0).isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .goSelectItemPath(0).isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testUri.run("ESKeyNav(1)?$expand=NavPropertyETKeyNavOne($levels=max)") .isKind(UriInfoKind.resource).goPath().goExpand() @@ -2437,7 +2437,7 @@ public class TestFullResourcePath { .isType(EdmTechProvider.nameETTwoKeyNav) .isTypeFilterOnCollection(EdmTechProvider.nameETTwoBaseTwoKeyNav) .goUpExpandValidator() - .goSelectItemPath(0).isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .goSelectItemPath(0).isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testUri.run("ESKeyNav?$expand=NavPropertyETKeyNavOne($expand=NavPropertyETKeyNavMany(" + "$expand=NavPropertyETKeyNavOne))") @@ -2467,7 +2467,7 @@ public class TestFullResourcePath { .isType(EdmTechProvider.nameETKeyNav) .goUpExpandValidator() .isSelectText("PropertyInt16") - .goSelectItemPath(0).isPrimitiveProperty("PropertyInt16", EdmTechTestProvider.nameInt16, false); + .goSelectItemPath(0).isPrimitiveProperty("PropertyInt16", EdmTechProvider.nameInt16, false); testUri.run("ESKeyNav?$expand=NavPropertyETKeyNavOne($select=PropertyComplex/PropertyInt16)") .isKind(UriInfoKind.resource) @@ -2819,14 +2819,14 @@ public class TestFullResourcePath { .isType(EdmTechProvider.nameString) .isMember().goPath() .first() - .isNavProperty("NavPropertyETKeyNavMany", EdmTechTestProvider.nameETKeyNav, false) + .isNavProperty("NavPropertyETKeyNavMany", EdmTechProvider.nameETKeyNav, false) .isKeyPredicate(0, "PropertyInt16", "1") .n() - .isNavProperty("NavPropertyETTwoKeyNavMany", EdmTechTestProvider.nameETTwoKeyNav, false) + .isNavProperty("NavPropertyETTwoKeyNavMany", EdmTechProvider.nameETTwoKeyNav, false) .isKeyPredicateRef(0, "PropertyInt16", "PropertyInt16") .isKeyPredicate(1, "PropertyString", "'2'") .n() - .isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false) + .isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false) .goUpFilterValidator() .root().right(); @@ -2836,8 +2836,8 @@ public class TestFullResourcePath { .isType(EdmTechProvider.nameDate) .isMember().goPath() .first().isUriPathInfoKind(UriResourceKind.startingTypeFilter) - .isType(EdmTechTestProvider.nameETTwoKeyNav).isTypeFilterOnEntry(EdmTechTestProvider.nameETBaseTwoKeyNav) - .n().isPrimitiveProperty("PropertyDate", EdmTechTestProvider.nameDate, false) + .isType(EdmTechProvider.nameETTwoKeyNav).isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav) + .n().isPrimitiveProperty("PropertyDate", EdmTechProvider.nameDate, false) .goUpFilterValidator() .root().right() .isLiteral("2013-11-12"); @@ -2848,8 +2848,8 @@ public class TestFullResourcePath { .isType(EdmTechProvider.nameString) .isMember().goPath() .first().isUriPathInfoKind(UriResourceKind.startingTypeFilter) - .isType(EdmTechTestProvider.nameCTTwoPrim).isTypeFilterOnEntry(EdmTechTestProvider.nameCTBase) - .n().isPrimitiveProperty("AdditionalPropString", EdmTechTestProvider.nameString, false) + .isType(EdmTechProvider.nameCTTwoPrim).isTypeFilterOnEntry(EdmTechProvider.nameCTBase) + .n().isPrimitiveProperty("AdditionalPropString", EdmTechProvider.nameString, false) .goUpFilterValidator() .root().right() .isLiteral("'SomeString'"); @@ -3308,7 +3308,7 @@ public class TestFullResourcePath { .is("< eq <'SomeString'>>") .root().left().goPath() .first() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTPrimComp, false) + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTPrimComp, false) .n() .isFunction("BFCCTPrimCompRTESTwoKeyNavParam") .isParameter(0, "ParameterString", "PropertyComplex/PropertyComplex/PropertyString") @@ -3316,26 +3316,26 @@ public class TestFullResourcePath { .isKeyPredicate(0, "PropertyInt16", "1") .isKeyPredicate(1, "PropertyString", "'2'") .n() - .isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testFilter.runOnETTwoKeyNav("PropertyComplex/com.sap.odata.test1.BFCCTPrimCompRTETTwoKeyNavParam" + "(ParameterString=null)/PropertyString eq 'SomeString'") .is("< eq <'SomeString'>>") .root().left().goPath() .first() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTPrimComp, false) + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTPrimComp, false) .n() .isFunction("BFCCTPrimCompRTETTwoKeyNavParam") // TODO go into parameter .n() - .isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testFilter.runOnETTwoKeyNav("NavPropertyETTwoKeyNavMany/com.sap.odata.test1.BFCESTwoKeyNavRTString()" + " eq 'SomeString'") .is("< eq <'SomeString'>>") .root().left().goPath() .first() - .isNavProperty("NavPropertyETTwoKeyNavMany", EdmTechTestProvider.nameETTwoKeyNav, true) + .isNavProperty("NavPropertyETTwoKeyNavMany", EdmTechProvider.nameETTwoKeyNav, true) .n() .isFunction("BFCESTwoKeyNavRTString"); @@ -3347,7 +3347,7 @@ public class TestFullResourcePath { .n() .isFunction("BFCETTwoKeyNavRTETTwoKeyNav") .n() - .isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testFilter.runOnETTwoKeyNav("com.sap.odata.test1.BFCETTwoKeyNavRTETTwoKeyNav()/PropertyString eq 'SomeString'") .is("< eq <'SomeString'>>") @@ -3355,7 +3355,7 @@ public class TestFullResourcePath { .first() .isFunction("BFCETTwoKeyNavRTETTwoKeyNav") .n() - .isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testFilter.runOnETTwoKeyNav("NavPropertyETTwoKeyNavOne/com.sap.odata.test1.BFCETTwoKeyNavRTETTwoKeyNav()" + "/PropertyComplex/PropertyComplex/PropertyString eq 'Walldorf'") @@ -3363,15 +3363,15 @@ public class TestFullResourcePath { + "eq <'Walldorf'>>") .root().left().goPath() .first() - .isNavProperty("NavPropertyETTwoKeyNavOne", EdmTechTestProvider.nameETTwoKeyNav, false) + .isNavProperty("NavPropertyETTwoKeyNavOne", EdmTechProvider.nameETTwoKeyNav, false) .n() .isFunction("BFCETTwoKeyNavRTETTwoKeyNav") .n() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTPrimComp, false) + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTPrimComp, false) .n() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTAllPrim, false) + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTAllPrim, false) .n() - .isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testFilter.runOnETTwoKeyNav("PropertyComplex/com.sap.odata.test1.BFCCTPrimCompRTESTwoKeyNavParam" + "(ParameterString='1')" @@ -3381,14 +3381,14 @@ public class TestFullResourcePath { + "eq <'SomeString'>>") .root().left().goPath() .first() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTPrimComp, false) + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTPrimComp, false) .n() .isFunction("BFCCTPrimCompRTESTwoKeyNavParam") - .isTypeFilterOnCollection(EdmTechTestProvider.nameETBaseTwoKeyNav) + .isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav) .isKeyPredicate(0, "PropertyInt16", "2") .isKeyPredicate(1, "PropertyString", "'3'") .n() - .isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testFilter.runOnETTwoKeyNav("$it/com.sap.odata.test1.BFCETTwoKeyNavRTCTTwoPrim()/com.sap.odata.test1.CTBase" + "/PropertyString eq 'SomeString'") @@ -3398,9 +3398,9 @@ public class TestFullResourcePath { .isIt() .n() .isFunction("BFCETTwoKeyNavRTCTTwoPrim") - .isTypeFilterOnEntry(EdmTechTestProvider.nameCTBase) + .isTypeFilterOnEntry(EdmTechProvider.nameCTBase) .n() - .isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testFilter.runOnETTwoKeyNav("com.sap.odata.test1.UFCRTETTwoKeyNavParam(ParameterInt16=1)/PropertyInt16 eq 2") .is("< eq <2>>") @@ -3409,7 +3409,7 @@ public class TestFullResourcePath { .isFunction("UFCRTETTwoKeyNavParam") .isParameter(0, "ParameterInt16", "1") .n() - .isPrimitiveProperty("PropertyInt16", EdmTechTestProvider.nameInt16, false); + .isPrimitiveProperty("PropertyInt16", EdmTechProvider.nameInt16, false); testFilter.runOnETTwoKeyNav("com.sap.odata.test1.UFCRTETTwoKeyNavParam(ParameterInt16=@Param1Alias)" + "/PropertyInt16 eq 2") @@ -3418,7 +3418,7 @@ public class TestFullResourcePath { .isFunction("UFCRTETTwoKeyNavParam") .isParameterAlias(0, "ParameterInt16", "Param1Alias") .n() - .isPrimitiveProperty("PropertyInt16", EdmTechTestProvider.nameInt16, false); + .isPrimitiveProperty("PropertyInt16", EdmTechProvider.nameInt16, false); testFilter.runOnETTwoKeyNav("com.sap.odata.test1.UFCRTETTwoKeyNavParam(ParameterInt16=1)" + "/PropertyComplex/PropertyComplex/PropertyString eq 'SomeString'") @@ -3427,11 +3427,11 @@ public class TestFullResourcePath { .isFunction("UFCRTETTwoKeyNavParam") .isParameter(0, "ParameterInt16", "1") .n() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTPrimComp, false) + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTPrimComp, false) .n() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTAllPrim, false) + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTAllPrim, false) .n() - .isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testFilter.runOnETTwoKeyNav("com.sap.odata.test1.UFCRTETTwoKeyNavParam(ParameterInt16=PropertyInt16)" + "/PropertyComplex/PropertyComplex/PropertyString eq 'SomeString'") @@ -3440,11 +3440,11 @@ public class TestFullResourcePath { .isFunction("UFCRTETTwoKeyNavParam") .isParameter(0, "ParameterInt16", "PropertyInt16") // TODO .n() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTPrimComp, false) + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTPrimComp, false) .n() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTAllPrim, false) + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTAllPrim, false) .n() - .isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); } @@ -4078,7 +4078,7 @@ public class TestFullResourcePath { .left().goPath() .first().isUriPathInfoKind(UriResourceKind.lambdaVariable) .isType(EdmTechProvider.nameETKeyNav, false) - .n().isPrimitiveProperty("PropertyInt16", EdmTechTestProvider.nameInt16, false); + .n().isPrimitiveProperty("PropertyInt16", EdmTechProvider.nameInt16, false); testFilter.runOnETKeyNav("NavPropertyETTwoKeyNavMany/any(d:d/PropertyString eq 'SomeString')") .is(" eq <'SomeString'>>>>") @@ -4131,7 +4131,7 @@ public class TestFullResourcePath { .is(" eq <1>> or " + " eq <'SomeString'>>>>>>>") .root().goPath() - .first().isNavProperty("NavPropertyETTwoKeyNavMany", EdmTechTestProvider.nameETTwoKeyNav, true) + .first().isNavProperty("NavPropertyETTwoKeyNavMany", EdmTechProvider.nameETTwoKeyNav, true) .n().isUriPathInfoKind(UriResourceKind.lambdaAny) .goLambdaExpression() .root().isBinary(SupportedBinaryOperators.OR) @@ -4141,7 +4141,7 @@ public class TestFullResourcePath { .goPath() .first().isUriPathInfoKind(UriResourceKind.lambdaVariable) .isType(EdmTechProvider.nameETTwoKeyNav, false) - .n().isPrimitiveProperty("PropertyInt16", EdmTechTestProvider.nameInt16, false) + .n().isPrimitiveProperty("PropertyInt16", EdmTechProvider.nameInt16, false) .goUpFilterValidator() .root().right() .goPath() @@ -4152,7 +4152,7 @@ public class TestFullResourcePath { .root().left().goPath() .first().isUriPathInfoKind(UriResourceKind.lambdaVariable) .isType(EdmTechProvider.nameETTwoKeyNav, false) - .n().isPrimitiveProperty("CollPropertyString", EdmTechTestProvider.nameString, true); + .n().isPrimitiveProperty("CollPropertyString", EdmTechProvider.nameString, true); testFilter.runOnETKeyNav("NavPropertyETTwoKeyNavMany/any(d:d/PropertyInt16 eq 1 or d/CollPropertyString/any" + "(e:e eq 'SomeString'))") @@ -4982,7 +4982,7 @@ public class TestFullResourcePath { testFilter.runOrderByOnETTwoKeyNavEx("PropertyInt16 asc, PropertyInt32 PropertyDuration desc").isExSyntax(0); } - public static String encode(String decoded) throws UnsupportedEncodingException { + public static String encode(final String decoded) throws UnsupportedEncodingException { return URLEncoder.encode(decoded, "UTF-8"); diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestLexer.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestLexer.java index c2deef88c..309e6324d 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestLexer.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestLexer.java @@ -40,7 +40,7 @@ public class TestLexer { @Test public void test() { - + } // ;------------------------------------------------------------------------------ diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestParser.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestParser.java index 1b8e9d0c1..09d932b7a 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestParser.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestParser.java @@ -40,16 +40,16 @@ public class TestParser { @Test public void test() { - //test.aAM().aFC().aCS().log(1).run("ODI?$filter=PropertyEnumString has com.sap.odata.test1.ENString'String1'"); + // test.aAM().aFC().aCS().log(1).run("ODI?$filter=PropertyEnumString has com.sap.odata.test1.ENString'String1'"); } // ;------------------------------------------------------------------------------ // ; 0. URI // ;------------------------------------------------------------------------------ - //@Test + // @Test public void testUri() { // Test parser rule odataRelativeUri - + test.run("$batch").isText("odataRelativeUriEOF(odataRelativeUri(altBatch($batch)) )"); // TODO do more tests on entity @@ -483,7 +483,7 @@ public class TestParser { // test.run("ODI").isText(""); }; - //@Test + // @Test public void testExpressions() { // Test parser rule commonExpr -> primitiveLiteral test.run("ODI?$filter=null").isText("odataRelativeUriEOF(odataRelativeUri(" @@ -1136,115 +1136,117 @@ public class TestParser { @Test public void testFragment() { - /*test.run("$metadata#Collection($ref)").isText("odataRelativeUriEOF(odataRelativeUri(" - + "$metadata # contextFragment(Collection($ref))) )");*/ -/* - test.run("$metadata#Collection(Edm.EntityType)").isText("odataRelativeUriEOF(odataRelativeUri(" - + "$metadata # contextFragment(Collection(Edm.EntityType))) )"); - - test.run("$metadata#Collection(Edm.ComplexType)").isText("odataRelativeUriEOF(odataRelativeUri(" - + "$metadata # contextFragment(Collection(Edm.ComplexType))) )"); - - test.run("$metadata#singletonEntity").isText("odataRelativeUriEOF(odataRelativeUri(" - + "$metadata # contextFragment(singletonEntity)) )"); - - test.run("$metadata#NS.ODI").isText("odataRelativeUriEOF(odataRelativeUri(" - + "$metadata # contextFragment(NS . ODI)) )"); - - test.run("$metadata#Edm.Boolean").isText("odataRelativeUriEOF(odataRelativeUri(" - + "$metadata # contextFragment(Edm . Boolean)) )"); - - test.run("$metadata#ODI/$deletedEntity").isText("odataRelativeUriEOF(" - + "odataRelativeUri($metadata # contextFragment(ODI / $deletedEntity)) )"); - - test.run("$metadata#ODI/$link").isText("odataRelativeUriEOF(" - + "odataRelativeUri($metadata # contextFragment(ODI / $link)) )"); - - test.run("$metadata#ODI/$deletedLink").isText("odataRelativeUriEOF(" - + "odataRelativeUri($metadata # contextFragment(ODI / $deletedLink)) )"); - - test.run("$metadata#ODI(1)/ODI") - .isText( - "odataRelativeUriEOF(odataRelativeUri($metadata # contextFragment(odataIdentifier(ODI) " - + "nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) / odataIdentifier(ODI))) )"); - - test.run("$metadata#ODI(1)/NS.ODI") - .isText( - "odataRelativeUriEOF(odataRelativeUri($metadata # contextFragment(odataIdentifier(ODI) " - + "nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) / namespace(odataIdentifier(NS) .) " - + "odataIdentifier(ODI))) )"); - - test.run("$metadata#ODI(1)/NS.ODI/ODI") - .isText( - "odataRelativeUriEOF(odataRelativeUri($metadata # contextFragment(odataIdentifier(ODI) " - + "nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) / namespace(odataIdentifier(NS) .) " - + "odataIdentifier(ODI) / odataIdentifier(ODI))) )"); - - test.run("$metadata#NS.ODI(*)").isText("odataRelativeUriEOF(odataRelativeUri(" - + "$metadata # contextFragment(namespace(odataIdentifier(NS) .) odataIdentifier(ODI) " - + "propertyList(( propertyListItem(*) )))) )"); - - test.run("$metadata#ODI(1)") - .isText( - "odataRelativeUriEOF(odataRelativeUri($metadata " - + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(" - + "primitiveLiteral(1))) )))) )"); - - test.run("$metadata#ODI(1)/ODI").isText("odataRelativeUriEOF(odataRelativeUri($metadata " - + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " - + "/ odataIdentifier(ODI))) )"); - - test.run("$metadata#ODI(1)/NS.ODI").isText("odataRelativeUriEOF(odataRelativeUri($metadata " - + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " - + "/ namespace(odataIdentifier(NS) .) odataIdentifier(ODI))) )"); - - test.run("$metadata#ODI(1)/NS.ODI/ODI").isText("odataRelativeUriEOF(odataRelativeUri($metadata" - + " # contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " - + "/ namespace(odataIdentifier(NS) .) odataIdentifier(ODI) / odataIdentifier(ODI))) )"); - - test.run("$metadata#ODI(1)(*)").isText("odataRelativeUriEOF(odataRelativeUri($metadata " - + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " - + "propertyList(( propertyListItem(*) )))) )"); - - test.run("$metadata#ODI(1)(PROP)").isText("odataRelativeUriEOF(odataRelativeUri($metadata " - + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " - + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(PROP))) )))) )"); - test.run("$metadata#ODI(1)(NAVPROP+)").isText("odataRelativeUriEOF(odataRelativeUri($metadata " - + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " - + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) +)) )))) )"); - test.run("$metadata#ODI(1)(NAVPROP+(*))").isText("odataRelativeUriEOF(odataRelativeUri($metadata " - + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " - + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) + propertyList(( " - + "propertyListItem(*) )))) )))) )"); - test.run("$metadata#ODI(1)(NAVPROP+(A,B,C))").isText("odataRelativeUriEOF(odataRelativeUri($metadata " - + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " - + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) + propertyList(( " - + "propertyListItem(propertyListProperty(odataIdentifier(A))) , propertyListItem(propertyListProperty(" - + "odataIdentifier(B))) , propertyListItem(propertyListProperty(odataIdentifier(C))) )))) )))) )"); - - test.run("$metadata#ODI(1)(NAVPROP+(A,B,C))/$delta").isText("odataRelativeUriEOF(odataRelativeUri($metadata " - + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " - + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) + propertyList(( " - + "propertyListItem(propertyListProperty(odataIdentifier(A))) , propertyListItem(propertyListProperty(" - + "odataIdentifier(B))) , propertyListItem(propertyListProperty(odataIdentifier(C))) )))) )) / " - + "$delta)) )"); - - test.run("$metadata#ODI(1)(NAVPROP+(A,B,C))/$entity").isText("odataRelativeUriEOF(odataRelativeUri($metadata # " - + "contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " - + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) + propertyList(( " - + "propertyListItem(propertyListProperty(odataIdentifier(A))) , propertyListItem(propertyListProperty(" - + "odataIdentifier(B))) , propertyListItem(propertyListProperty(odataIdentifier(C))) )))) )) / " - + "$entity)) )"); - test.run("$metadata#ODI(1)(NAVPROP+(A,B,C))/$delta/$entity").isText("odataRelativeUriEOF(odataRelativeUri(" - + "$metadata # contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(" - + "primitiveLiteral(1))) )) propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) + " - + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(A))) , propertyListItem(" - + "propertyListProperty(odataIdentifier(B))) , propertyListItem(propertyListProperty(" - + "odataIdentifier(C))) )))) )) / $delta / $entity)) )"); -*/ + /* + * test.run("$metadata#Collection($ref)").isText("odataRelativeUriEOF(odataRelativeUri(" + * + "$metadata # contextFragment(Collection($ref))) )"); + */ + /* + * test.run("$metadata#Collection(Edm.EntityType)").isText("odataRelativeUriEOF(odataRelativeUri(" + * + "$metadata # contextFragment(Collection(Edm.EntityType))) )"); + * + * test.run("$metadata#Collection(Edm.ComplexType)").isText("odataRelativeUriEOF(odataRelativeUri(" + * + "$metadata # contextFragment(Collection(Edm.ComplexType))) )"); + * + * test.run("$metadata#singletonEntity").isText("odataRelativeUriEOF(odataRelativeUri(" + * + "$metadata # contextFragment(singletonEntity)) )"); + * + * test.run("$metadata#NS.ODI").isText("odataRelativeUriEOF(odataRelativeUri(" + * + "$metadata # contextFragment(NS . ODI)) )"); + * + * test.run("$metadata#Edm.Boolean").isText("odataRelativeUriEOF(odataRelativeUri(" + * + "$metadata # contextFragment(Edm . Boolean)) )"); + * + * test.run("$metadata#ODI/$deletedEntity").isText("odataRelativeUriEOF(" + * + "odataRelativeUri($metadata # contextFragment(ODI / $deletedEntity)) )"); + * + * test.run("$metadata#ODI/$link").isText("odataRelativeUriEOF(" + * + "odataRelativeUri($metadata # contextFragment(ODI / $link)) )"); + * + * test.run("$metadata#ODI/$deletedLink").isText("odataRelativeUriEOF(" + * + "odataRelativeUri($metadata # contextFragment(ODI / $deletedLink)) )"); + * + * test.run("$metadata#ODI(1)/ODI") + * .isText( + * "odataRelativeUriEOF(odataRelativeUri($metadata # contextFragment(odataIdentifier(ODI) " + * + "nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) / odataIdentifier(ODI))) )"); + * + * test.run("$metadata#ODI(1)/NS.ODI") + * .isText( + * "odataRelativeUriEOF(odataRelativeUri($metadata # contextFragment(odataIdentifier(ODI) " + * + "nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) / namespace(odataIdentifier(NS) .) " + * + "odataIdentifier(ODI))) )"); + * + * test.run("$metadata#ODI(1)/NS.ODI/ODI") + * .isText( + * "odataRelativeUriEOF(odataRelativeUri($metadata # contextFragment(odataIdentifier(ODI) " + * + "nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) / namespace(odataIdentifier(NS) .) " + * + "odataIdentifier(ODI) / odataIdentifier(ODI))) )"); + * + * test.run("$metadata#NS.ODI(*)").isText("odataRelativeUriEOF(odataRelativeUri(" + * + "$metadata # contextFragment(namespace(odataIdentifier(NS) .) odataIdentifier(ODI) " + * + "propertyList(( propertyListItem(*) )))) )"); + * + * test.run("$metadata#ODI(1)") + * .isText( + * "odataRelativeUriEOF(odataRelativeUri($metadata " + * + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(" + * + "primitiveLiteral(1))) )))) )"); + * + * test.run("$metadata#ODI(1)/ODI").isText("odataRelativeUriEOF(odataRelativeUri($metadata " + * + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " + * + "/ odataIdentifier(ODI))) )"); + * + * test.run("$metadata#ODI(1)/NS.ODI").isText("odataRelativeUriEOF(odataRelativeUri($metadata " + * + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " + * + "/ namespace(odataIdentifier(NS) .) odataIdentifier(ODI))) )"); + * + * test.run("$metadata#ODI(1)/NS.ODI/ODI").isText("odataRelativeUriEOF(odataRelativeUri($metadata" + * + " # contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " + * + "/ namespace(odataIdentifier(NS) .) odataIdentifier(ODI) / odataIdentifier(ODI))) )"); + * + * test.run("$metadata#ODI(1)(*)").isText("odataRelativeUriEOF(odataRelativeUri($metadata " + * + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " + * + "propertyList(( propertyListItem(*) )))) )"); + * + * test.run("$metadata#ODI(1)(PROP)").isText("odataRelativeUriEOF(odataRelativeUri($metadata " + * + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " + * + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(PROP))) )))) )"); + * test.run("$metadata#ODI(1)(NAVPROP+)").isText("odataRelativeUriEOF(odataRelativeUri($metadata " + * + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " + * + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) +)) )))) )"); + * test.run("$metadata#ODI(1)(NAVPROP+(*))").isText("odataRelativeUriEOF(odataRelativeUri($metadata " + * + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " + * + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) + propertyList(( " + * + "propertyListItem(*) )))) )))) )"); + * test.run("$metadata#ODI(1)(NAVPROP+(A,B,C))").isText("odataRelativeUriEOF(odataRelativeUri($metadata " + * + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " + * + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) + propertyList(( " + * + "propertyListItem(propertyListProperty(odataIdentifier(A))) , propertyListItem(propertyListProperty(" + * + "odataIdentifier(B))) , propertyListItem(propertyListProperty(odataIdentifier(C))) )))) )))) )"); + * + * test.run("$metadata#ODI(1)(NAVPROP+(A,B,C))/$delta").isText("odataRelativeUriEOF(odataRelativeUri($metadata " + * + "# contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " + * + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) + propertyList(( " + * + "propertyListItem(propertyListProperty(odataIdentifier(A))) , propertyListItem(propertyListProperty(" + * + "odataIdentifier(B))) , propertyListItem(propertyListProperty(odataIdentifier(C))) )))) )) / " + * + "$delta)) )"); + * + * test.run("$metadata#ODI(1)(NAVPROP+(A,B,C))/$entity").isText("odataRelativeUriEOF(odataRelativeUri($metadata # " + * + "contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(primitiveLiteral(1))) )) " + * + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) + propertyList(( " + * + "propertyListItem(propertyListProperty(odataIdentifier(A))) , propertyListItem(propertyListProperty(" + * + "odataIdentifier(B))) , propertyListItem(propertyListProperty(odataIdentifier(C))) )))) )) / " + * + "$entity)) )"); + * test.run("$metadata#ODI(1)(NAVPROP+(A,B,C))/$delta/$entity").isText("odataRelativeUriEOF(odataRelativeUri(" + * + "$metadata # contextFragment(odataIdentifier(ODI) nameValueOptList(( valueOnly(commonExpr(" + * + "primitiveLiteral(1))) )) propertyList(( propertyListItem(propertyListProperty(odataIdentifier(NAVPROP) + " + * + "propertyList(( propertyListItem(propertyListProperty(odataIdentifier(A))) , propertyListItem(" + * + "propertyListProperty(odataIdentifier(B))) , propertyListItem(propertyListProperty(" + * + "odataIdentifier(C))) )))) )) / $delta / $entity)) )"); + */ } - //@Test + // @Test public void testPrecedence() { // Test operator precedence @@ -1354,5 +1356,4 @@ public class TestParser { + "searchExpr(searchWord(abc)))))))))) )"); } - } diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestUriParserImpl.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestUriParserImpl.java index b74cf3e91..e87c55779 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestUriParserImpl.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestUriParserImpl.java @@ -25,11 +25,11 @@ import java.net.URLEncoder; import java.util.Arrays; import org.apache.olingo.odata4.commons.api.edm.Edm; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.core.edm.provider.EdmProviderImpl; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.server.api.uri.UriInfoKind; import org.apache.olingo.odata4.server.api.uri.UriResourceKind; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedMethodCalls; +import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl; import org.apache.olingo.odata4.server.core.testutil.EdmTechProvider; import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider; import org.apache.olingo.odata4.server.core.testutil.FilterValidator; @@ -72,7 +72,7 @@ public class TestUriParserImpl { @Test public void test() throws UriParserException, UnsupportedEncodingException { - + } @Test @@ -1014,27 +1014,27 @@ public class TestUriParserImpl { .goFilter().root().isMember().goPath() .at(0) .isUriPathInfoKind(UriResourceKind.startingTypeFilter) - .isType(EdmTechTestProvider.nameETTwoKeyNav, false) - .isTypeFilterOnEntry(EdmTechTestProvider.nameETBaseTwoKeyNav) - .at(1).isType(EdmTechTestProvider.nameDate); + .isType(EdmTechProvider.nameETTwoKeyNav, false) + .isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav) + .at(1).isType(EdmTechProvider.nameDate); // on EntityType collection testUri.run("ESTwoKeyNav?$filter=com.sap.odata.test1.ETBaseTwoKeyNav/PropertyDate") .goFilter().root().isMember().goPath() .at(0) .isUriPathInfoKind(UriResourceKind.startingTypeFilter) - .isType(EdmTechTestProvider.nameETTwoKeyNav, true) - .isTypeFilterOnCollection(EdmTechTestProvider.nameETBaseTwoKeyNav) - .at(1).isType(EdmTechTestProvider.nameDate); + .isType(EdmTechProvider.nameETTwoKeyNav, true) + .isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav) + .at(1).isType(EdmTechProvider.nameDate); testUri.run("FICRTCTTwoPrimParam(ParameterInt16=1,ParameterString='2')?" + "$filter=com.sap.odata.test1.CTBase/AdditionalPropString") .goFilter().root().isMember().goPath() .at(0) .isUriPathInfoKind(UriResourceKind.startingTypeFilter) - .isType(EdmTechTestProvider.nameCTTwoPrim, false) - .isTypeFilterOnEntry(EdmTechTestProvider.nameCTBase) - .at(1).isType(EdmTechTestProvider.nameString); + .isType(EdmTechProvider.nameCTTwoPrim, false) + .isTypeFilterOnEntry(EdmTechProvider.nameCTBase) + .at(1).isType(EdmTechProvider.nameString); // on Complex collection testUri.run("FICRTCollCTTwoPrimParam(ParameterInt16=1,ParameterString='2')?" @@ -1042,9 +1042,9 @@ public class TestUriParserImpl { .goFilter().root().isMember().goPath() .at(0) .isUriPathInfoKind(UriResourceKind.startingTypeFilter) - .isType(EdmTechTestProvider.nameCTTwoPrim, true) - .isTypeFilterOnCollection(EdmTechTestProvider.nameCTBase) - .at(1).isType(EdmTechTestProvider.nameString); + .isType(EdmTechProvider.nameCTTwoPrim, true) + .isTypeFilterOnCollection(EdmTechProvider.nameCTBase) + .at(1).isType(EdmTechProvider.nameString); } @@ -1104,48 +1104,48 @@ public class TestUriParserImpl { .isSelectItemAllOp(0, new FullQualifiedName("com.sap.odata.test1", "*")); testUri.run("ESTwoKeyNav?$select=PropertyString") - .goSelectItemPath(0).isPrimitiveProperty("PropertyString", EdmTechTestProvider.nameString, false); + .goSelectItemPath(0).isPrimitiveProperty("PropertyString", EdmTechProvider.nameString, false); testUri.run("ESTwoKeyNav?$select=PropertyComplex") - .goSelectItemPath(0).isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTPrimComp, false); + .goSelectItemPath(0).isComplexProperty("PropertyComplex", EdmTechProvider.nameCTPrimComp, false); testUri.run("ESTwoKeyNav?$select=PropertyComplex/PropertyInt16") .goSelectItemPath(0) .first() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTPrimComp, false) + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTPrimComp, false) .n() - .isPrimitiveProperty("PropertyInt16", EdmTechTestProvider.nameInt16, false); + .isPrimitiveProperty("PropertyInt16", EdmTechProvider.nameInt16, false); testUri.run("ESTwoKeyNav?$select=PropertyComplex/PropertyComplex") .goSelectItemPath(0) .first() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTPrimComp, false) + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTPrimComp, false) .n() - .isComplexProperty("PropertyComplex", EdmTechTestProvider.nameCTAllPrim, false); + .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTAllPrim, false); testUri.run("ESTwoKeyNav?$select=com.sap.odata.test1.ETBaseTwoKeyNav") .goSelectItemPath(0) .first() .isUriPathInfoKind(UriResourceKind.startingTypeFilter) - .isTypeFilterOnCollection(EdmTechTestProvider.nameETBaseTwoKeyNav); + .isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav); testUri.run("ESTwoKeyNav/PropertyComplexNav?$select=com.sap.odata.test1.CTTwoBasePrimCompNav") .goSelectItemPath(0) .first() .isUriPathInfoKind(UriResourceKind.startingTypeFilter) - .isTypeFilterOnCollection(EdmTechTestProvider.nameCTTwoBasePrimCompNav); + .isTypeFilterOnCollection(EdmTechProvider.nameCTTwoBasePrimCompNav); testUri.run("ESTwoKeyNav?$select=PropertyComplexNav/com.sap.odata.test1.CTTwoBasePrimCompNav") .goSelectItemPath(0) .first() - .isComplexProperty("PropertyComplexNav", EdmTechTestProvider.nameCTBasePrimCompNav, false) + .isComplexProperty("PropertyComplexNav", EdmTechProvider.nameCTBasePrimCompNav, false) .n() - .isTypeFilterOnCollection(EdmTechTestProvider.nameCTTwoBasePrimCompNav); + .isTypeFilterOnCollection(EdmTechProvider.nameCTTwoBasePrimCompNav); ; } - public static String encode(String decoded) throws UnsupportedEncodingException { + public static String encode(final String decoded) throws UnsupportedEncodingException { return URLEncoder.encode(decoded, "UTF-8"); diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionTest.java index db7f0d699..a4979f7ab 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionTest.java @@ -24,11 +24,10 @@ import java.util.ArrayList; import java.util.List; import org.apache.olingo.odata4.commons.api.edm.Edm; -import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; -import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName; -import org.apache.olingo.odata4.commons.core.edm.provider.EdmProviderImpl; +import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName; import org.apache.olingo.odata4.server.api.uri.UriInfoResource; import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions; +import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl; import org.apache.olingo.odata4.server.core.testutil.EdmTechProvider; import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider; import org.apache.olingo.odata4.server.core.uri.apiimpl.UriInfoImpl; @@ -231,7 +230,7 @@ public class QueryOptionTest { public void testSelectItemImpl() { SelectItemImpl option = new SelectItemImpl(); - EdmEntityType entityType = edm.getEntityType(EdmTechProvider.nameETKeyNav); + edm.getEntityType(EdmTechProvider.nameETKeyNav); // no typed collection else case ( e.g. if not path is added) option = new SelectItemImpl(); diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionTest.java index 160185455..fd785d212 100644 --- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionTest.java +++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionTest.java @@ -23,14 +23,13 @@ import static org.junit.Assert.assertNotNull; import java.util.Arrays; +import org.apache.olingo.odata4.commons.api.ODataApplicationException; import org.apache.olingo.odata4.commons.api.edm.Edm; import org.apache.olingo.odata4.commons.api.edm.EdmAction; import org.apache.olingo.odata4.commons.api.edm.EdmEntityType; import org.apache.olingo.odata4.commons.api.edm.EdmEnumType; import org.apache.olingo.odata4.commons.api.edm.EdmFunction; import org.apache.olingo.odata4.commons.api.edm.EdmType; -import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException; -import org.apache.olingo.odata4.commons.core.edm.provider.EdmProviderImpl; import org.apache.olingo.odata4.server.api.uri.UriInfoKind; import org.apache.olingo.odata4.server.api.uri.UriInfoResource; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExceptionVisitExpression; @@ -38,6 +37,7 @@ import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedB import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedConstants; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedMethodCalls; import org.apache.olingo.odata4.server.api.uri.queryoption.expression.SupportedUnaryOperators; +import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl; import org.apache.olingo.odata4.server.core.testutil.EdmTechProvider; import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider; import org.apache.olingo.odata4.server.core.testutil.FilterTreeToText; @@ -48,20 +48,20 @@ import org.junit.Test; public class ExpressionTest { Edm edm = new EdmProviderImpl(new EdmTechTestProvider()); - + @Test public void testSupportedOperators() { - assertEquals(SupportedUnaryOperators.MINUS, SupportedUnaryOperators.get("-") ); - assertEquals(null, SupportedUnaryOperators.get("XXX") ); - - assertEquals(SupportedBinaryOperators.MOD, SupportedBinaryOperators.get("mod") ); - assertEquals(null, SupportedBinaryOperators.get("XXX") ); - - assertEquals(SupportedMethodCalls.CONCAT, SupportedMethodCalls.get("concat") ); - assertEquals(null, SupportedMethodCalls.get("XXX") ); - - assertEquals(SupportedConstants.TRUE, SupportedConstants.get("true") ); - assertEquals(null, SupportedConstants.get("XXX") ); + assertEquals(SupportedUnaryOperators.MINUS, SupportedUnaryOperators.get("-")); + assertEquals(null, SupportedUnaryOperators.get("XXX")); + + assertEquals(SupportedBinaryOperators.MOD, SupportedBinaryOperators.get("mod")); + assertEquals(null, SupportedBinaryOperators.get("XXX")); + + assertEquals(SupportedMethodCalls.CONCAT, SupportedMethodCalls.get("concat")); + assertEquals(null, SupportedMethodCalls.get("XXX")); + + assertEquals(SupportedConstants.TRUE, SupportedConstants.get("true")); + assertEquals(null, SupportedConstants.get("XXX")); } @Test @@ -166,8 +166,7 @@ public class ExpressionTest { MemberImpl expression = new MemberImpl(); EdmEntityType entityType = edm.getEntityType(EdmTechProvider.nameETKeyNav); - // UriResourceImplTyped - UriInfoImpl resource = new UriInfoImpl().setKind(UriInfoKind.resource); + new UriInfoImpl().setKind(UriInfoKind.resource); EdmAction action = edm.getAction(EdmTechProvider.nameUARTPrimParam, null, null); UriInfoResource uriInfo = new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart( new UriResourceActionImpl().setAction(action)).asUriInfoResource(); @@ -181,32 +180,28 @@ public class ExpressionTest { // UriResourceImplTyped check collection = false case assertEquals(false, expression.isCollection()); - // UriResourceImplTyped check collection = true case - resource = new UriInfoImpl().setKind(UriInfoKind.resource); + new UriInfoImpl().setKind(UriInfoKind.resource); action = edm.getAction(EdmTechProvider.nameUARTPrimCollParam, null, null); expression.setPath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart( new UriResourceActionImpl().setAction(action)) .asUriInfoResource()); assertEquals(true, expression.isCollection()); - // UriResourceImplTyped with filter - resource = new UriInfoImpl().setKind(UriInfoKind.resource); + new UriInfoImpl().setKind(UriInfoKind.resource); action = edm.getAction(EdmTechProvider.nameUARTPrimParam, null, null); expression.setPath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart( new UriResourceActionImpl().setAction(action).setTypeFilter(entityType)) .asUriInfoResource()); assertEquals(entityType, expression.getType()); - // UriResourceImplKeyPred - resource = new UriInfoImpl().setKind(UriInfoKind.resource); + new UriInfoImpl().setKind(UriInfoKind.resource); EdmFunction function = edm.getFunction(EdmTechProvider.nameUFCRTETKeyNav, null, null, null); expression.setPath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart( new UriResourceFunctionImpl().setFunction(function)) .asUriInfoResource()); assertEquals(function.getReturnType().getType(), expression.getType()); - // UriResourceImplKeyPred typeFilter on entry - resource = new UriInfoImpl().setKind(UriInfoKind.resource); + new UriInfoImpl().setKind(UriInfoKind.resource); EdmEntityType entityBaseType = edm.getEntityType(EdmTechProvider.nameETBaseTwoKeyNav); function = edm.getFunction(EdmTechProvider.nameUFCRTESTwoKeyNavParam, null, null, Arrays.asList(("ParameterInt16"))); @@ -215,8 +210,7 @@ public class ExpressionTest { .asUriInfoResource()); assertEquals(entityBaseType, expression.getType()); - // UriResourceImplKeyPred typeFilter on entry - resource = new UriInfoImpl().setKind(UriInfoKind.resource); + new UriInfoImpl().setKind(UriInfoKind.resource); entityBaseType = edm.getEntityType(EdmTechProvider.nameETBaseTwoKeyNav); function = edm.getFunction(EdmTechProvider.nameUFCRTESTwoKeyNavParam, null, null, Arrays.asList(("ParameterInt16"))); @@ -225,8 +219,7 @@ public class ExpressionTest { .asUriInfoResource()); assertEquals(entityBaseType, expression.getType()); - // no typed - resource = new UriInfoImpl().setKind(UriInfoKind.resource); + new UriInfoImpl().setKind(UriInfoKind.resource); entityBaseType = edm.getEntityType(EdmTechProvider.nameETBaseTwoKeyNav); function = edm.getFunction(EdmTechProvider.nameUFCRTESTwoKeyNavParam, null, null, Arrays.asList(("ParameterInt16"))); @@ -253,30 +246,29 @@ public class ExpressionTest { assertEquals(p0, expression.getParameters().get(0)); assertEquals(p1, expression.getParameters().get(1)); } - + @Test public void testTypeLiteralExpression() throws ExceptionVisitExpression, ODataApplicationException { TypeLiteralImpl expression = new TypeLiteralImpl(); EdmEntityType entityBaseType = edm.getEntityType(EdmTechProvider.nameETBaseTwoKeyNav); expression.setType(entityBaseType); - + assertEquals(entityBaseType, expression.getType()); assertEquals("", expression.accept(new FilterTreeToText())); } - + @Test public void testUnaryExpression() throws ExceptionVisitExpression, ODataApplicationException { UnaryImpl expression = new UnaryImpl(); expression.setOperator(SupportedUnaryOperators.MINUS); - + ExpressionImpl operand = new LiteralImpl().setText("A"); expression.setOperand(operand); - + assertEquals(SupportedUnaryOperators.MINUS, expression.getOperator()); assertEquals(operand, expression.getOperand()); - + assertEquals("<- >", expression.accept(new FilterTreeToText())); } - }