You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2014/02/17 16:45:35 UTC
[26/28] [OLINGO-161] Refactored Java package names
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/deserializer/JsonReaderTest.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/deserializer/JsonReaderTest.java b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/deserializer/JsonReaderTest.java
new file mode 100644
index 0000000..6fbef03
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/deserializer/JsonReaderTest.java
@@ -0,0 +1,374 @@
+/*******************************************************************************
+ * 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.client.core.deserializer;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.apache.olingo.odata4.client.api.deserializer.ComplexValue;
+import org.apache.olingo.odata4.client.api.deserializer.Entity;
+import org.apache.olingo.odata4.client.api.deserializer.EntitySet;
+import org.apache.olingo.odata4.client.api.deserializer.Property;
+import org.apache.olingo.odata4.client.api.deserializer.Reader;
+import org.apache.olingo.odata4.client.api.deserializer.StructuralProperty;
+import org.apache.olingo.odata4.client.api.deserializer.Value;
+import org.apache.olingo.odata4.client.core.deserializer.JsonReader;
+import org.junit.Test;
+
+public class JsonReaderTest {
+
+ @Test
+ public void testEntitySet() throws Exception {
+ Reader consumer = new JsonReader();
+
+ EntitySet entitySet = consumer.readEntitySet(
+ JsonReaderTest.class.getResourceAsStream("/fullEntitySet.json"));
+
+ List<Entity> entities = entitySet.getEntities();
+ validateEntitySet(entitySet);
+ assertNotNull(entities);
+ Entity entity = entities.get(0);
+ assertNotNull(entity);
+ validateEntityAlfki(entity);
+
+ StructuralProperty structuralProperty = entity.getProperty("Address", StructuralProperty.class);
+ assertEquals("Address", structuralProperty.getName());
+
+ Value value = structuralProperty.getValue();
+ assertTrue(value.isComplex());
+ ComplexValue complexValue = (ComplexValue) value;
+ validateAddressBerlin(complexValue);
+ validateComplexValueNavigationLinks(complexValue);
+ }
+
+ @Test
+ public void testEntitySetWithTwoEntities() throws Exception {
+ Reader consumer = new JsonReader();
+
+ EntitySet entitySet = consumer.readEntitySet(getJson("/fullEntitySetWithTwoEntities.json"));
+
+ List<Entity> entities = entitySet.getEntities();
+ validateEntitySet(entitySet);
+ assertNotNull(entities);
+ assertEquals(2, entities.size());
+ //
+ Entity firstEntity = entities.get(0);
+ assertNotNull(firstEntity);
+ validateEntityAlfki(firstEntity);
+
+ StructuralProperty structuralProperty = firstEntity.getProperty("Address", StructuralProperty.class);
+ assertEquals("Address", structuralProperty.getName());
+
+ Value value = structuralProperty.getValue();
+ assertTrue(value.isComplex());
+ ComplexValue complexValue = (ComplexValue) value;
+ validateAddressBerlin(complexValue);
+ validateComplexValueNavigationLinks(complexValue);
+
+ //
+ Entity secondEntity = entities.get(1);
+ assertNotNull(secondEntity);
+ validateEntityMuski(secondEntity);
+
+ StructuralProperty addressMuster = secondEntity.getProperty("Address", StructuralProperty.class);
+ assertEquals("Address", addressMuster.getName());
+ validateAddressMuster((ComplexValue) addressMuster.getValue());
+ }
+
+ @Test
+ public void streamingTestForEntitySetWithTwoEntities() throws Exception {
+ Reader consumer = new JsonReader();
+
+ EntitySet entitySet = consumer.readEntitySet(getJson("/fullEntitySetWithTwoEntities.json"));
+ validateEntitySet(entitySet, false);
+
+ for (Entity entity : entitySet) {
+ if ("Customers('ALFKI')".equals(entity.getODataId())) {
+ validateEntityAlfki(entity);
+
+ StructuralProperty structuralProperty = entity.getProperty("Address", StructuralProperty.class);
+ assertEquals("Address", structuralProperty.getName());
+
+ Value value = structuralProperty.getValue();
+ assertTrue(value.isComplex());
+ ComplexValue complexValue = (ComplexValue) value;
+ validateAddressBerlin(complexValue);
+ validateComplexValueNavigationLinks(complexValue);
+ } else if ("Customers('MUSKI')".equals(entity.getODataId())) {
+ validateEntityMuski(entity);
+
+ StructuralProperty addressMuster = entity.getProperty("Address", StructuralProperty.class);
+ assertEquals("Address", addressMuster.getName());
+ validateAddressMuster((ComplexValue) addressMuster.getValue());
+ } else {
+ fail("Got unknown entity with id '" + entity.getODataId() + "'.");
+ }
+ }
+
+ validateEntitySet(entitySet, true);
+ }
+
+ @Test
+ public void iteratorTestForEntitySetWithTwoEntities() throws Exception {
+ Reader consumer = new JsonReader();
+
+ EntitySet entitySet = consumer.readEntitySet(getJson("/fullEntitySetWithTwoEntities.json"));
+ assertEquals(2, entitySet.getEntities().size());
+ validateEntitySet(entitySet, true);
+
+ for (Entity entity : entitySet) {
+ if ("Customers('ALFKI')".equals(entity.getODataId())) {
+ validateEntityAlfki(entity);
+
+ StructuralProperty structuralProperty = entity.getProperty("Address", StructuralProperty.class);
+ assertEquals("Address", structuralProperty.getName());
+
+ Value value = structuralProperty.getValue();
+ assertTrue(value.isComplex());
+ ComplexValue complexValue = (ComplexValue) value;
+ validateAddressBerlin(complexValue);
+ validateComplexValueNavigationLinks(complexValue);
+ } else if ("Customers('MUSKI')".equals(entity.getODataId())) {
+ validateEntityMuski(entity);
+
+ StructuralProperty addressMuster = entity.getProperty("Address", StructuralProperty.class);
+ assertEquals("Address", addressMuster.getName());
+ validateAddressMuster((ComplexValue) addressMuster.getValue());
+ } else {
+ fail("Got unknown entity with id '" + entity.getODataId() + "'.");
+ }
+ }
+ }
+
+ @Test
+ public void testEntity() throws Exception {
+ Reader consumer = new JsonReader();
+
+ Entity entity = consumer.readEntity(JsonReaderTest.class.getResourceAsStream("/fullEntity.json"));
+ validateEntityAlfki(entity);
+
+ StructuralProperty structuralProperty = entity.getProperty("Address", StructuralProperty.class);
+ assertEquals("Address", structuralProperty.getName());
+
+ Value value = structuralProperty.getValue();
+ assertTrue(value.isComplex());
+ ComplexValue complexValue = (ComplexValue) value;
+ validateAddressBerlin(complexValue);
+ validateComplexValueNavigationLinks(complexValue);
+ }
+
+ @Test
+ public void testComplexProperty() throws Exception {
+ Reader consumer = new JsonReader();
+
+ Property property = consumer.readProperty(getJson("/complexProperty.json"));
+ assertEquals("Address", property.getName());
+
+ assertTrue(property instanceof StructuralProperty);
+ StructuralProperty structuralProperty = (StructuralProperty) property;
+ Value value = structuralProperty.getValue();
+ assertTrue(value.isComplex());
+ ComplexValue complexValue = (ComplexValue) value;
+ validateAddressBerlin(complexValue);
+ validateAddressBerlin(complexValue);
+ }
+
+ @Test
+ public void testEntityWithCollectionOfComplexProperty() throws Exception {
+ Reader consumer = new JsonReader();
+
+ Entity entity = consumer.readEntity(getJson("/fullEntityWithCollectionOfComplexValues.json"));
+ StructuralProperty address = entity.getProperty("Address", StructuralProperty.class);
+ assertTrue(address.containsCollection());
+ assertEquals("Address", address.getName());
+
+ List<Value> values = address.getValues();
+ assertEquals(2, values.size());
+
+ Value value = values.get(0);
+ assertTrue(value.isComplex());
+ validateAddressBerlin((ComplexValue) value);
+ //
+ ComplexValue addressTwo = (ComplexValue) values.get(1);
+ validateAddressMuster(addressTwo);
+ }
+
+ @Test
+ public void testSetOfPrimitive() throws Exception {
+ Reader consumer = new JsonReader();
+
+ InputStream content = JsonReaderTest.class.getResourceAsStream("/setOfPrimitiveProperties.json");
+ Property property = consumer.readProperty(content);
+ assertEquals("EmailAddresses", property.getName());
+
+ assertTrue(property instanceof StructuralProperty);
+ StructuralProperty structuralProperty = (StructuralProperty) property;
+
+ assertTrue(structuralProperty.containsCollection());
+ Collection<Value> values = structuralProperty.getValues();
+ Iterator<Value> valueIt = values.iterator();
+ assertEquals("Julie@Swansworth.com", valueIt.next().getContent());
+ assertEquals("Julie.Swansworth@work.com", valueIt.next().getContent());
+ }
+
+ @Test
+ public void testSetOfComplex() throws Exception {
+ Reader consumer = new JsonReader();
+
+ InputStream content = JsonReaderTest.class.getResourceAsStream("/setOfComplexProperties.json");
+ Property property = consumer.readProperty(content);
+ Assert.assertEquals("PhoneNumbers", property.getName());
+ Assert.assertTrue(property instanceof StructuralProperty);
+
+ StructuralProperty structuralProperty = (StructuralProperty) property;
+ assertTrue(structuralProperty.containsCollection());
+ List<Value> values = structuralProperty.getValues();
+ assertEquals(2, values.size());
+
+ ComplexValue phoneNumberOne = (ComplexValue) values.get(0);
+ assertEquals("425-555-1212", phoneNumberOne.getValue("Number").getContent());
+ assertEquals("Home", phoneNumberOne.getValue("Type").getContent());
+ assertEquals(null, phoneNumberOne.getValue("Carrier"));
+ assertEquals(null, phoneNumberOne.getAnnotationProperties().get("odata.type"));
+
+ ComplexValue phoneNumberTwo = (ComplexValue) values.get(1);
+ assertEquals("425-555-0178", phoneNumberTwo.getValue("Number").getContent());
+ assertEquals("Cell", phoneNumberTwo.getValue("Type").getContent());
+ assertEquals("Sprint", phoneNumberTwo.getValue("Carrier").getContent());
+ assertEquals("#Model.CellPhoneNumber",
+ phoneNumberTwo.getAnnotationProperties().get("odata.type").getValue());
+
+ // ComplexValue complex = consumer.parseComplexValue(content);
+ //
+ // Value value = complex.getValue("PhoneNumbers");
+ // assertNotNull(value);
+ // assertTrue(value.isComplex());
+ // ComplexValue complexValue = (ComplexValue) value;
+ }
+
+ private void validateEntityAlfki(final Entity entity) {
+ assertNotNull(entity);
+
+ assertEquals("http://host/service/$metadata#Customers/$entity", entity.getODataContext());
+ assertEquals("Customers('ALFKI')", entity.getODataId());
+ assertEquals("W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"", entity.getODataETag());
+ assertEquals("Customers('ALFKI')", entity.getODataEditLink());
+
+ assertNotNull(entity.getNavigationProperties());
+ assertTrue(entity.getNavigationProperties().containsKey("Orders"));
+ assertEquals("Customers('ALFKI')/Orders",
+ entity.getNavigationProperties().get("Orders").getNavigationLink());
+
+ assertNotNull(entity.getNavigationProperties());
+ assertTrue(entity.getNavigationProperties().containsKey("Orders"));
+ assertEquals("Customers('ALFKI')/Orders/$ref",
+ entity.getNavigationProperties().get("Orders").getAssociationLink());
+
+ assertNotNull(entity.getPropertyContent("ID"));
+ assertEquals("ALFKI", entity.getPropertyContent("ID"));
+ assertEquals("Alfreds Futterkiste", entity.getPropertyContent("CompanyName"));
+ assertEquals("Maria Anders", entity.getPropertyContent("ContactName"));
+ assertEquals("Sales Representative", entity.getPropertyContent("ContactTitle"));
+ assertEquals("030-0074321", entity.getPropertyContent("Phone"));
+ assertEquals("030-0076545", entity.getPropertyContent("Fax"));
+ }
+
+ private void validateEntityMuski(final Entity entity) {
+ assertNotNull(entity);
+
+ assertEquals("http://host/service/$metadata#Customers/$entity", entity.getODataContext());
+ assertEquals("Customers('MUSKI')", entity.getODataId());
+ assertEquals("W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"", entity.getODataETag());
+ assertEquals("Customers('MUSKI')", entity.getODataEditLink());
+
+ assertNotNull(entity.getNavigationProperties());
+ assertTrue(entity.getNavigationProperties().containsKey("Orders"));
+ assertEquals("Customers('MUSKI')/Orders", entity.getNavigationProperties().get("Orders").getNavigationLink());
+
+ assertNotNull(entity.getNavigationProperties());
+ assertTrue(entity.getNavigationProperties().containsKey("Orders"));
+ assertEquals("Customers('MUSKI')/Orders/$ref",
+ entity.getNavigationProperties().get("Orders").getAssociationLink());
+
+ assertNotNull(entity.getPropertyContent("ID"));
+ assertEquals("MUSKI", entity.getPropertyContent("ID"));
+ assertEquals("Mustermanns Futterkiste", entity.getPropertyContent("CompanyName"));
+ assertEquals("Mustermann Max", entity.getPropertyContent("ContactName"));
+ assertEquals("Some Guy", entity.getPropertyContent("ContactTitle"));
+ assertEquals("030-002222", entity.getPropertyContent("Phone"));
+ assertEquals("030-004444", entity.getPropertyContent("Fax"));
+ }
+
+ private void validateAddressMuster(final ComplexValue addressTwo) {
+ assertEquals("Musterstrasse 42", addressTwo.getValue("Street").getContent());
+ assertEquals("Musterstadt", addressTwo.getValue("City").getContent());
+ assertEquals("SomeRegion", addressTwo.getValue("Region").getContent());
+ assertEquals("D-42042", addressTwo.getValue("PostalCode").getContent());
+ }
+
+ private void validateAddressBerlin(final ComplexValue complex) {
+ assertNotNull(complex);
+
+ assertEquals("Obere Str. 57", complex.getValue("Street").getContent());
+ assertEquals("Berlin", complex.getValue("City").getContent());
+ assertNull(complex.getValue("Region").getContent());
+ assertEquals("D-12209", complex.getValue("PostalCode").getContent());
+ }
+
+ private void validateComplexValueNavigationLinks(final ComplexValue complex) {
+ assertNotNull(complex.getNavigationProperties());
+ assertTrue(complex.getNavigationProperties().containsKey("Country"));
+ assertEquals("Customers('ALFKI')/Address/Country",
+ complex.getNavigationProperties().get("Country").getNavigationLink());
+
+ assertNotNull(complex.getNavigationProperties());
+ assertTrue(complex.getNavigationProperties().containsKey("Country"));
+ assertEquals("Customers('ALFKI')/Address/Country/$ref",
+ complex.getNavigationProperties().get("Country").getAssociationLink());
+ }
+
+ private void validateEntitySet(final EntitySet entitySet) {
+ validateEntitySet(entitySet, true);
+ }
+
+ private void validateEntitySet(final EntitySet entitySet, final boolean validateLinks) {
+ assertNotNull(entitySet);
+
+ assertEquals("http://host/service/$metadata#Customers/$entity", entitySet.getODataContext());
+ assertEquals(Long.valueOf(1), entitySet.getODataCount());
+ if (validateLinks) {
+ assertEquals("http://host/service/EntitySet?$skiptoken=342r89", entitySet.getODataNextLink());
+ assertNull(entitySet.getODataDeltaLink());
+ }
+ }
+
+ private InputStream getJson(final String filename) {
+ return JsonReaderTest.class.getResourceAsStream(filename);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/testutil/StringHelper.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/testutil/StringHelper.java b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/testutil/StringHelper.java
new file mode 100644
index 0000000..8097e9f
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/testutil/StringHelper.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * 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.client.core.testutil;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
+
+/**
+ * @author SAP AG
+ */
+public class StringHelper {
+
+ public static String inputStreamToString(final InputStream in, final boolean preserveLineBreaks) throws IOException {
+ final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in, Charset.forName("UTF-8")));
+ final StringBuilder stringBuilder = new StringBuilder();
+ String line = null;
+
+ while ((line = bufferedReader.readLine()) != null) {
+ stringBuilder.append(line);
+ if (preserveLineBreaks) {
+ stringBuilder.append("\n");
+ }
+ }
+
+ bufferedReader.close();
+
+ final String result = stringBuilder.toString();
+
+ return result;
+ }
+
+ public static String inputStreamToString(final InputStream in) throws IOException {
+ return inputStreamToString(in, false);
+ }
+
+ /**
+ * Encapsulate given content in an {@link InputStream} with charset <code>UTF-8</code>.
+ *
+ * @param content to encapsulate content
+ * @return content as stream
+ */
+ public static InputStream encapsulate(final String content) {
+ try {
+ return encapsulate(content, "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ // we know that UTF-8 is supported
+ throw new RuntimeException("UTF-8 MUST be supported.", e);
+ }
+ }
+
+ /**
+ * Encapsulate given content in an {@link InputStream} with given charset.
+ *
+ * @param content to encapsulate content
+ * @param charset to be used charset
+ * @return content as stream
+ * @throws UnsupportedEncodingException if charset is not supported
+ */
+ public static InputStream encapsulate(final String content, final String charset)
+ throws UnsupportedEncodingException {
+ return new ByteArrayInputStream(content.getBytes(charset));
+ }
+
+ /**
+ * Generate a string with given length containing random upper case characters ([A-Z]).
+ *
+ * @param len length of to generated string
+ * @return random upper case characters ([A-Z]).
+ */
+ public static InputStream generateDataStream(final int len) {
+ return encapsulate(generateData(len));
+ }
+
+ /**
+ * Generate a string with given length containing random upper case characters ([A-Z]).
+ *
+ * @param len length of to generated string
+ * @return random upper case characters ([A-Z]).
+ */
+ public static String generateData(final int len) {
+ StringBuilder b = new StringBuilder(len);
+ for (int j = 0; j < len; j++) {
+ char c = (char) (Math.random() * 26 + 65);
+ b.append(c);
+ }
+ return b.toString();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/ODataConsumerTest.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/ODataConsumerTest.java b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/ODataConsumerTest.java
deleted file mode 100644
index bde0de5..0000000
--- a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/ODataConsumerTest.java
+++ /dev/null
@@ -1,41 +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.consumer.core;
-
-import org.apache.olingo.odata4.commons.api.edm.provider.EdmProvider;
-import org.apache.olingo.odata4.consumer.api.ODataConsumer;
-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);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/deserializer/JsonReaderPerformance.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/deserializer/JsonReaderPerformance.java b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/deserializer/JsonReaderPerformance.java
deleted file mode 100644
index e88c76a..0000000
--- a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/deserializer/JsonReaderPerformance.java
+++ /dev/null
@@ -1,72 +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.consumer.core.deserializer;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.InputStream;
-
-import org.apache.olingo.odata4.consumer.api.deserializer.ComplexValue;
-import org.apache.olingo.odata4.consumer.api.deserializer.Property;
-import org.apache.olingo.odata4.consumer.api.deserializer.StructuralProperty;
-import org.apache.olingo.odata4.consumer.api.deserializer.Value;
-import org.apache.olingo.odata4.consumer.core.testutil.StringHelper;
-import org.junit.Test;
-
-public class JsonReaderPerformance {
-
- @Test
- public void testComplexPropertyPerformance() throws Exception {
- JsonReader consumer = new JsonReader();
- int runs = 1000; // * 100;
-
- InputStream in = JsonReaderPerformance.class.getResourceAsStream("/complexProperty.json");
- String content = StringHelper.inputStreamToString(in);
-
-// System.out.println("Started...");
- ComplexValue complex = null;
-// long startTime = System.currentTimeMillis();
- for (int i = 0; i < runs; i++) {
- Property property = consumer.readProperty(StringHelper.encapsulate(content));
- complex = (ComplexValue) ((StructuralProperty) property).getValue();
- }
-// long endTime = System.currentTimeMillis();
-
-// long duration = endTime - startTime;
-// System.out.println("Duration: " + duration + " ms");
-// System.out.println("Duration per run: " + (duration / (float) runs) + " ms");
-
- testComplexProperty(complex);
- }
-
- private void testComplexProperty(final Value value) {
- assertNotNull(value);
- assertTrue(value.isComplex());
-
- ComplexValue complex = (ComplexValue) value;
-
- assertEquals("Obere Str. 57", complex.getValue("Street").getContent());
- assertEquals("Berlin", complex.getValue("City").getContent());
- assertNull(complex.getValue("Region").getContent());
- assertEquals("D-12209", complex.getValue("PostalCode").getContent());
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/deserializer/JsonReaderTest.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/deserializer/JsonReaderTest.java b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/deserializer/JsonReaderTest.java
deleted file mode 100644
index 978282e..0000000
--- a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/deserializer/JsonReaderTest.java
+++ /dev/null
@@ -1,373 +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.consumer.core.deserializer;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.InputStream;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import junit.framework.Assert;
-
-import org.apache.olingo.odata4.consumer.api.deserializer.ComplexValue;
-import org.apache.olingo.odata4.consumer.api.deserializer.Entity;
-import org.apache.olingo.odata4.consumer.api.deserializer.EntitySet;
-import org.apache.olingo.odata4.consumer.api.deserializer.Property;
-import org.apache.olingo.odata4.consumer.api.deserializer.Reader;
-import org.apache.olingo.odata4.consumer.api.deserializer.StructuralProperty;
-import org.apache.olingo.odata4.consumer.api.deserializer.Value;
-import org.junit.Test;
-
-public class JsonReaderTest {
-
- @Test
- public void testEntitySet() throws Exception {
- Reader consumer = new JsonReader();
-
- EntitySet entitySet = consumer.readEntitySet(
- JsonReaderTest.class.getResourceAsStream("/fullEntitySet.json"));
-
- List<Entity> entities = entitySet.getEntities();
- validateEntitySet(entitySet);
- assertNotNull(entities);
- Entity entity = entities.get(0);
- assertNotNull(entity);
- validateEntityAlfki(entity);
-
- StructuralProperty structuralProperty = entity.getProperty("Address", StructuralProperty.class);
- assertEquals("Address", structuralProperty.getName());
-
- Value value = structuralProperty.getValue();
- assertTrue(value.isComplex());
- ComplexValue complexValue = (ComplexValue) value;
- validateAddressBerlin(complexValue);
- validateComplexValueNavigationLinks(complexValue);
- }
-
- @Test
- public void testEntitySetWithTwoEntities() throws Exception {
- Reader consumer = new JsonReader();
-
- EntitySet entitySet = consumer.readEntitySet(getJson("/fullEntitySetWithTwoEntities.json"));
-
- List<Entity> entities = entitySet.getEntities();
- validateEntitySet(entitySet);
- assertNotNull(entities);
- assertEquals(2, entities.size());
- //
- Entity firstEntity = entities.get(0);
- assertNotNull(firstEntity);
- validateEntityAlfki(firstEntity);
-
- StructuralProperty structuralProperty = firstEntity.getProperty("Address", StructuralProperty.class);
- assertEquals("Address", structuralProperty.getName());
-
- Value value = structuralProperty.getValue();
- assertTrue(value.isComplex());
- ComplexValue complexValue = (ComplexValue) value;
- validateAddressBerlin(complexValue);
- validateComplexValueNavigationLinks(complexValue);
-
- //
- Entity secondEntity = entities.get(1);
- assertNotNull(secondEntity);
- validateEntityMuski(secondEntity);
-
- StructuralProperty addressMuster = secondEntity.getProperty("Address", StructuralProperty.class);
- assertEquals("Address", addressMuster.getName());
- validateAddressMuster((ComplexValue) addressMuster.getValue());
- }
-
- @Test
- public void streamingTestForEntitySetWithTwoEntities() throws Exception {
- Reader consumer = new JsonReader();
-
- EntitySet entitySet = consumer.readEntitySet(getJson("/fullEntitySetWithTwoEntities.json"));
- validateEntitySet(entitySet, false);
-
- for (Entity entity : entitySet) {
- if ("Customers('ALFKI')".equals(entity.getODataId())) {
- validateEntityAlfki(entity);
-
- StructuralProperty structuralProperty = entity.getProperty("Address", StructuralProperty.class);
- assertEquals("Address", structuralProperty.getName());
-
- Value value = structuralProperty.getValue();
- assertTrue(value.isComplex());
- ComplexValue complexValue = (ComplexValue) value;
- validateAddressBerlin(complexValue);
- validateComplexValueNavigationLinks(complexValue);
- } else if ("Customers('MUSKI')".equals(entity.getODataId())) {
- validateEntityMuski(entity);
-
- StructuralProperty addressMuster = entity.getProperty("Address", StructuralProperty.class);
- assertEquals("Address", addressMuster.getName());
- validateAddressMuster((ComplexValue) addressMuster.getValue());
- } else {
- fail("Got unknown entity with id '" + entity.getODataId() + "'.");
- }
- }
-
- validateEntitySet(entitySet, true);
- }
-
- @Test
- public void iteratorTestForEntitySetWithTwoEntities() throws Exception {
- Reader consumer = new JsonReader();
-
- EntitySet entitySet = consumer.readEntitySet(getJson("/fullEntitySetWithTwoEntities.json"));
- assertEquals(2, entitySet.getEntities().size());
- validateEntitySet(entitySet, true);
-
- for (Entity entity : entitySet) {
- if ("Customers('ALFKI')".equals(entity.getODataId())) {
- validateEntityAlfki(entity);
-
- StructuralProperty structuralProperty = entity.getProperty("Address", StructuralProperty.class);
- assertEquals("Address", structuralProperty.getName());
-
- Value value = structuralProperty.getValue();
- assertTrue(value.isComplex());
- ComplexValue complexValue = (ComplexValue) value;
- validateAddressBerlin(complexValue);
- validateComplexValueNavigationLinks(complexValue);
- } else if ("Customers('MUSKI')".equals(entity.getODataId())) {
- validateEntityMuski(entity);
-
- StructuralProperty addressMuster = entity.getProperty("Address", StructuralProperty.class);
- assertEquals("Address", addressMuster.getName());
- validateAddressMuster((ComplexValue) addressMuster.getValue());
- } else {
- fail("Got unknown entity with id '" + entity.getODataId() + "'.");
- }
- }
- }
-
- @Test
- public void testEntity() throws Exception {
- Reader consumer = new JsonReader();
-
- Entity entity = consumer.readEntity(JsonReaderTest.class.getResourceAsStream("/fullEntity.json"));
- validateEntityAlfki(entity);
-
- StructuralProperty structuralProperty = entity.getProperty("Address", StructuralProperty.class);
- assertEquals("Address", structuralProperty.getName());
-
- Value value = structuralProperty.getValue();
- assertTrue(value.isComplex());
- ComplexValue complexValue = (ComplexValue) value;
- validateAddressBerlin(complexValue);
- validateComplexValueNavigationLinks(complexValue);
- }
-
- @Test
- public void testComplexProperty() throws Exception {
- Reader consumer = new JsonReader();
-
- Property property = consumer.readProperty(getJson("/complexProperty.json"));
- assertEquals("Address", property.getName());
-
- assertTrue(property instanceof StructuralProperty);
- StructuralProperty structuralProperty = (StructuralProperty) property;
- Value value = structuralProperty.getValue();
- assertTrue(value.isComplex());
- ComplexValue complexValue = (ComplexValue) value;
- validateAddressBerlin(complexValue);
- validateAddressBerlin(complexValue);
- }
-
- @Test
- public void testEntityWithCollectionOfComplexProperty() throws Exception {
- Reader consumer = new JsonReader();
-
- Entity entity = consumer.readEntity(getJson("/fullEntityWithCollectionOfComplexValues.json"));
- StructuralProperty address = entity.getProperty("Address", StructuralProperty.class);
- assertTrue(address.containsCollection());
- assertEquals("Address", address.getName());
-
- List<Value> values = address.getValues();
- assertEquals(2, values.size());
-
- Value value = values.get(0);
- assertTrue(value.isComplex());
- validateAddressBerlin((ComplexValue) value);
- //
- ComplexValue addressTwo = (ComplexValue) values.get(1);
- validateAddressMuster(addressTwo);
- }
-
- @Test
- public void testSetOfPrimitive() throws Exception {
- Reader consumer = new JsonReader();
-
- InputStream content = JsonReaderTest.class.getResourceAsStream("/setOfPrimitiveProperties.json");
- Property property = consumer.readProperty(content);
- assertEquals("EmailAddresses", property.getName());
-
- assertTrue(property instanceof StructuralProperty);
- StructuralProperty structuralProperty = (StructuralProperty) property;
-
- assertTrue(structuralProperty.containsCollection());
- Collection<Value> values = structuralProperty.getValues();
- Iterator<Value> valueIt = values.iterator();
- assertEquals("Julie@Swansworth.com", valueIt.next().getContent());
- assertEquals("Julie.Swansworth@work.com", valueIt.next().getContent());
- }
-
- @Test
- public void testSetOfComplex() throws Exception {
- Reader consumer = new JsonReader();
-
- InputStream content = JsonReaderTest.class.getResourceAsStream("/setOfComplexProperties.json");
- Property property = consumer.readProperty(content);
- Assert.assertEquals("PhoneNumbers", property.getName());
- Assert.assertTrue(property instanceof StructuralProperty);
-
- StructuralProperty structuralProperty = (StructuralProperty) property;
- assertTrue(structuralProperty.containsCollection());
- List<Value> values = structuralProperty.getValues();
- assertEquals(2, values.size());
-
- ComplexValue phoneNumberOne = (ComplexValue) values.get(0);
- assertEquals("425-555-1212", phoneNumberOne.getValue("Number").getContent());
- assertEquals("Home", phoneNumberOne.getValue("Type").getContent());
- assertEquals(null, phoneNumberOne.getValue("Carrier"));
- assertEquals(null, phoneNumberOne.getAnnotationProperties().get("odata.type"));
-
- ComplexValue phoneNumberTwo = (ComplexValue) values.get(1);
- assertEquals("425-555-0178", phoneNumberTwo.getValue("Number").getContent());
- assertEquals("Cell", phoneNumberTwo.getValue("Type").getContent());
- assertEquals("Sprint", phoneNumberTwo.getValue("Carrier").getContent());
- assertEquals("#Model.CellPhoneNumber",
- phoneNumberTwo.getAnnotationProperties().get("odata.type").getValue());
-
- // ComplexValue complex = consumer.parseComplexValue(content);
- //
- // Value value = complex.getValue("PhoneNumbers");
- // assertNotNull(value);
- // assertTrue(value.isComplex());
- // ComplexValue complexValue = (ComplexValue) value;
- }
-
- private void validateEntityAlfki(final Entity entity) {
- assertNotNull(entity);
-
- assertEquals("http://host/service/$metadata#Customers/$entity", entity.getODataContext());
- assertEquals("Customers('ALFKI')", entity.getODataId());
- assertEquals("W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"", entity.getODataETag());
- assertEquals("Customers('ALFKI')", entity.getODataEditLink());
-
- assertNotNull(entity.getNavigationProperties());
- assertTrue(entity.getNavigationProperties().containsKey("Orders"));
- assertEquals("Customers('ALFKI')/Orders",
- entity.getNavigationProperties().get("Orders").getNavigationLink());
-
- assertNotNull(entity.getNavigationProperties());
- assertTrue(entity.getNavigationProperties().containsKey("Orders"));
- assertEquals("Customers('ALFKI')/Orders/$ref",
- entity.getNavigationProperties().get("Orders").getAssociationLink());
-
- assertNotNull(entity.getPropertyContent("ID"));
- assertEquals("ALFKI", entity.getPropertyContent("ID"));
- assertEquals("Alfreds Futterkiste", entity.getPropertyContent("CompanyName"));
- assertEquals("Maria Anders", entity.getPropertyContent("ContactName"));
- assertEquals("Sales Representative", entity.getPropertyContent("ContactTitle"));
- assertEquals("030-0074321", entity.getPropertyContent("Phone"));
- assertEquals("030-0076545", entity.getPropertyContent("Fax"));
- }
-
- private void validateEntityMuski(final Entity entity) {
- assertNotNull(entity);
-
- assertEquals("http://host/service/$metadata#Customers/$entity", entity.getODataContext());
- assertEquals("Customers('MUSKI')", entity.getODataId());
- assertEquals("W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"", entity.getODataETag());
- assertEquals("Customers('MUSKI')", entity.getODataEditLink());
-
- assertNotNull(entity.getNavigationProperties());
- assertTrue(entity.getNavigationProperties().containsKey("Orders"));
- assertEquals("Customers('MUSKI')/Orders", entity.getNavigationProperties().get("Orders").getNavigationLink());
-
- assertNotNull(entity.getNavigationProperties());
- assertTrue(entity.getNavigationProperties().containsKey("Orders"));
- assertEquals("Customers('MUSKI')/Orders/$ref",
- entity.getNavigationProperties().get("Orders").getAssociationLink());
-
- assertNotNull(entity.getPropertyContent("ID"));
- assertEquals("MUSKI", entity.getPropertyContent("ID"));
- assertEquals("Mustermanns Futterkiste", entity.getPropertyContent("CompanyName"));
- assertEquals("Mustermann Max", entity.getPropertyContent("ContactName"));
- assertEquals("Some Guy", entity.getPropertyContent("ContactTitle"));
- assertEquals("030-002222", entity.getPropertyContent("Phone"));
- assertEquals("030-004444", entity.getPropertyContent("Fax"));
- }
-
- private void validateAddressMuster(final ComplexValue addressTwo) {
- assertEquals("Musterstrasse 42", addressTwo.getValue("Street").getContent());
- assertEquals("Musterstadt", addressTwo.getValue("City").getContent());
- assertEquals("SomeRegion", addressTwo.getValue("Region").getContent());
- assertEquals("D-42042", addressTwo.getValue("PostalCode").getContent());
- }
-
- private void validateAddressBerlin(final ComplexValue complex) {
- assertNotNull(complex);
-
- assertEquals("Obere Str. 57", complex.getValue("Street").getContent());
- assertEquals("Berlin", complex.getValue("City").getContent());
- assertNull(complex.getValue("Region").getContent());
- assertEquals("D-12209", complex.getValue("PostalCode").getContent());
- }
-
- private void validateComplexValueNavigationLinks(final ComplexValue complex) {
- assertNotNull(complex.getNavigationProperties());
- assertTrue(complex.getNavigationProperties().containsKey("Country"));
- assertEquals("Customers('ALFKI')/Address/Country",
- complex.getNavigationProperties().get("Country").getNavigationLink());
-
- assertNotNull(complex.getNavigationProperties());
- assertTrue(complex.getNavigationProperties().containsKey("Country"));
- assertEquals("Customers('ALFKI')/Address/Country/$ref",
- complex.getNavigationProperties().get("Country").getAssociationLink());
- }
-
- private void validateEntitySet(final EntitySet entitySet) {
- validateEntitySet(entitySet, true);
- }
-
- private void validateEntitySet(final EntitySet entitySet, final boolean validateLinks) {
- assertNotNull(entitySet);
-
- assertEquals("http://host/service/$metadata#Customers/$entity", entitySet.getODataContext());
- assertEquals(Long.valueOf(1), entitySet.getODataCount());
- if (validateLinks) {
- assertEquals("http://host/service/EntitySet?$skiptoken=342r89", entitySet.getODataNextLink());
- assertNull(entitySet.getODataDeltaLink());
- }
- }
-
- private InputStream getJson(final String filename) {
- return JsonReaderTest.class.getResourceAsStream(filename);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/testutil/StringHelper.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/testutil/StringHelper.java b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/testutil/StringHelper.java
deleted file mode 100644
index 4344cad..0000000
--- a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/consumer/core/testutil/StringHelper.java
+++ /dev/null
@@ -1,110 +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.consumer.core.testutil;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
-import java.nio.charset.Charset;
-
-/**
- * @author SAP AG
- */
-public class StringHelper {
-
- public static String inputStreamToString(final InputStream in, final boolean preserveLineBreaks) throws IOException {
- final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in, Charset.forName("UTF-8")));
- final StringBuilder stringBuilder = new StringBuilder();
- String line = null;
-
- while ((line = bufferedReader.readLine()) != null) {
- stringBuilder.append(line);
- if (preserveLineBreaks) {
- stringBuilder.append("\n");
- }
- }
-
- bufferedReader.close();
-
- final String result = stringBuilder.toString();
-
- return result;
- }
-
- public static String inputStreamToString(final InputStream in) throws IOException {
- return inputStreamToString(in, false);
- }
-
- /**
- * Encapsulate given content in an {@link InputStream} with charset <code>UTF-8</code>.
- *
- * @param content to encapsulate content
- * @return content as stream
- */
- public static InputStream encapsulate(final String content) {
- try {
- return encapsulate(content, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- // we know that UTF-8 is supported
- throw new RuntimeException("UTF-8 MUST be supported.", e);
- }
- }
-
- /**
- * Encapsulate given content in an {@link InputStream} with given charset.
- *
- * @param content to encapsulate content
- * @param charset to be used charset
- * @return content as stream
- * @throws UnsupportedEncodingException if charset is not supported
- */
- public static InputStream encapsulate(final String content, final String charset)
- throws UnsupportedEncodingException {
- return new ByteArrayInputStream(content.getBytes(charset));
- }
-
- /**
- * Generate a string with given length containing random upper case characters ([A-Z]).
- *
- * @param len length of to generated string
- * @return random upper case characters ([A-Z]).
- */
- public static InputStream generateDataStream(final int len) {
- return encapsulate(generateData(len));
- }
-
- /**
- * Generate a string with given length containing random upper case characters ([A-Z]).
- *
- * @param len length of to generated string
- * @return random upper case characters ([A-Z]).
- */
- public static String generateData(final int len) {
- StringBuilder b = new StringBuilder(len);
- for (int j = 0; j < len; j++) {
- char c = (char) (Math.random() * 26 + 65);
- b.append(c);
- }
- return b.toString();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfo.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfo.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfo.java
deleted file mode 100644
index 96e5172..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfo.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-
-package org.apache.olingo.odata4.producer.api.uri;
-
-public interface UriInfo extends
- UriInfoService, UriInfoAll, UriInfoBatch, UriInfoCrossjoin,
- UriInfoEntityId, UriInfoMetadata, UriInfoResource {
-
- public UriInfoService asUriInfoService();
-
- public UriInfoAll asUriInfoAll();
-
- public UriInfoBatch asUriInfoBatch();
-
- public UriInfoCrossjoin asUriInfoCrossjoin();
-
- public UriInfoEntityId asUriInfoEntityId();
-
- public UriInfoMetadata asUriInfoMetadata();
-
- public UriInfoResource asUriInfoResource();
-
- public UriInfoKind getKind();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoAll.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoAll.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoAll.java
deleted file mode 100644
index b2e236a..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoAll.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-
-package org.apache.olingo.odata4.producer.api.uri;
-
-public interface UriInfoAll {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoBatch.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoBatch.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoBatch.java
deleted file mode 100644
index 13b6673..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoBatch.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-
-package org.apache.olingo.odata4.producer.api.uri;
-
-public interface UriInfoBatch {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoCrossjoin.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoCrossjoin.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoCrossjoin.java
deleted file mode 100644
index fa7d86b..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoCrossjoin.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-import java.util.List;
-
-public interface UriInfoCrossjoin {
-
- List<String> getEntitySetNames();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoEntityId.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoEntityId.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoEntityId.java
deleted file mode 100644
index 7a8a317..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoEntityId.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-
-package org.apache.olingo.odata4.producer.api.uri;
-
-import java.util.List;
-
-import org.apache.olingo.odata4.commons.api.edm.EdmEntityType;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.CustomQueryOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.ExpandOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.FormatOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.IdOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.SelectOption;
-
-/**
- * Indicates a URL access to an single Entity
- */
-public interface UriInfoEntityId {
-
- public List<CustomQueryOption> getCustomQueryOptions();
-
- public EdmEntityType getEntityTypeCast();
-
- public ExpandOption getExpandOption();
-
- public FormatOption getFormatOption();
-
- public IdOption getIdOption();
-
- public SelectOption getSelectOption();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoKind.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoKind.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoKind.java
deleted file mode 100644
index ee82688..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoKind.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-
-package org.apache.olingo.odata4.producer.api.uri;
-
-public enum UriInfoKind {
- all, batch, crossjoin, entityId, metadata, resource, service;
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoMetadata.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoMetadata.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoMetadata.java
deleted file mode 100644
index 99157b6..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoMetadata.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-
-package org.apache.olingo.odata4.producer.api.uri;
-
-import org.apache.olingo.odata4.producer.api.uri.queryoption.FormatOption;
-
-public interface UriInfoMetadata {
-
- public FormatOption getFormatOption();
-
- public String getFragment() ;
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoResource.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoResource.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoResource.java
deleted file mode 100644
index 8abd90c..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoResource.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-import java.util.List;
-
-import org.apache.olingo.odata4.producer.api.uri.queryoption.CustomQueryOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.ExpandOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.FilterOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.FormatOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.IdOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.InlineCountOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.OrderByOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.SearchOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.SelectOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.SkipOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.SkipTokenOption;
-import org.apache.olingo.odata4.producer.api.uri.queryoption.TopOption;
-
-public interface UriInfoResource {
-
- List<CustomQueryOption> getCustomQueryOptions();
-
- ExpandOption getExpandOption();
-
- FilterOption getFilterOption();
-
- FormatOption getFormatOption();
-
- IdOption getIdOption();
-
- InlineCountOption getInlineCountOption();
-
- OrderByOption getOrderByOption();
-
- SearchOption getSearchOption();
-
- SelectOption getSelectOption();
-
- SkipOption getSkipOption();
-
- SkipTokenOption getSkipTokenOption();
-
- TopOption getTopOption();
-
- List<UriResource> getUriResourceParts();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoService.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoService.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoService.java
deleted file mode 100644
index 7286904..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriInfoService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-public interface UriInfoService {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriParameter.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriParameter.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriParameter.java
deleted file mode 100644
index 12a212b..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriParameter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-import org.apache.olingo.odata4.producer.api.uri.queryoption.expression.Expression;
-
-public interface UriParameter {
-
- public String getAlias();
-
- public String getText();
-
- public Expression getExression();
-
- public String getName();
-
- public String getRefencedProperty();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResource.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResource.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResource.java
deleted file mode 100644
index 8870c56..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResource.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-public interface UriResource {
-
- UriResourceKind getKind();
-
- @Override
- String toString();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceAction.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceAction.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceAction.java
deleted file mode 100644
index f469e03..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceAction.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.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 {
-
- EdmAction getAction();
-
- /**
- * Convenience method which returns the {@link EdmActionImport} which was used in
- * the resource path to define the {@link EdmAction}.
- * @return
- */
- EdmActionImport getActionImport();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceComplexProperty.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceComplexProperty.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceComplexProperty.java
deleted file mode 100644
index ffca624..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceComplexProperty.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-import org.apache.olingo.odata4.commons.api.edm.EdmComplexType;
-
-public interface UriResourceComplexProperty extends UriResourceProperty {
-
- EdmComplexType getComplexType();
-
- EdmComplexType getComplexTypeFilter();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceCount.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceCount.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceCount.java
deleted file mode 100644
index f3142dc..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceCount.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-public interface UriResourceCount extends UriResource {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceEntitySet.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceEntitySet.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceEntitySet.java
deleted file mode 100644
index 1b24170..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceEntitySet.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-import java.util.List;
-
-import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet;
-import org.apache.olingo.odata4.commons.api.edm.EdmEntityType;
-import org.apache.olingo.odata4.commons.api.edm.EdmType;
-
-public interface UriResourceEntitySet extends UriResourcePartTyped {
-
- EdmEntitySet getEntitySet();
-
- EdmEntityType getEntityType();
-
- List<UriParameter> getKeyPredicates();
-
- EdmType getTypeFilterOnCollection();
-
- EdmType getTypeFilterOnEntry();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceFunction.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceFunction.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceFunction.java
deleted file mode 100644
index 8e4c6de..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceFunction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-import java.util.List;
-
-import org.apache.olingo.odata4.commons.api.edm.EdmFunction;
-import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImport;
-import org.apache.olingo.odata4.commons.api.edm.EdmType;
-
-public interface UriResourceFunction extends UriResourcePartTyped {
-
- EdmFunction getFunction();
-
- /**
- * Convenience method which returns the {@link EdmFunctionImport} which was used in
- * the resource path to define the {@link EdmFunction}.
- * @return
- */
- EdmFunctionImport getFunctionImport();
-
- List<UriParameter> getKeyPredicates();
-
- List<UriParameter> getParameters();
-
- EdmType getTypeFilterOnCollection();
-
- EdmType getTypeFilterOnEntry();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceIt.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceIt.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceIt.java
deleted file mode 100644
index feaeda2..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceIt.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-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
- */
-public interface UriResourceIt extends UriResourcePartTyped {
-
- EdmType getTypeFilterOnCollection();
-
- EdmType getTypeFilterOnEntry();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceKind.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceKind.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceKind.java
deleted file mode 100644
index 7621133..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceKind.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-public enum UriResourceKind {
- action, complexProperty, count, entitySet, function, it, lambdaAll, lambdaAny,
- lambdaVariable, navigationProperty, ref, root, primitiveProperty, singleton, startingTypeFilter, value,
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceLambdaAll.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceLambdaAll.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceLambdaAll.java
deleted file mode 100644
index 68a9b0b..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceLambdaAll.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-import org.apache.olingo.odata4.producer.api.uri.queryoption.expression.Expression;
-
-public interface UriResourceLambdaAll extends UriResourcePartTyped {
-
- public String getLamdaVariable();
-
- public Expression getExpression();
-
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/9593b53c/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceLambdaAny.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceLambdaAny.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceLambdaAny.java
deleted file mode 100644
index 4912ff2..0000000
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/producer/api/uri/UriResourceLambdaAny.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.producer.api.uri;
-
-import org.apache.olingo.odata4.producer.api.uri.queryoption.expression.Expression;
-
-public interface UriResourceLambdaAny extends UriResourcePartTyped {
-
- public String getLamdaVariable();
-
- public Expression getExpression();
-
-}