You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by il...@apache.org on 2014/03/11 13:53:03 UTC
[01/11] [OLINGO-200] V3 (de)serializers + unit tests merged
Repository: incubator-olingo-odata4
Updated Branches:
refs/heads/olingo200 [created] 78c3eaa4f
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/stacktrace.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/stacktrace.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/stacktrace.json
new file mode 100644
index 0000000..32e8821
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/stacktrace.json
@@ -0,0 +1,14 @@
+{
+ "odata.error": {
+ "code": "",
+ "message": {
+ "lang": "en-US",
+ "value": "Unsupported media type requested."
+ },
+ "innererror": {
+ "message": "A supported MIME type could not be found that matches the content type of the response. None of the supported type(s) 'application/atom+xml;type=entry, application/atom+xml, application/json;odata=minimalmetadata;streaming=true, application/json;odata=minimalmetadata;streaming=false, application/json;odata=minimalmetadata, application/json;odata=fullmetadata;streaming=true, application/json;odata=fullmetadata;streaming=false, application/json;odata=fullmetadata, application/json;odata=nometadata;streaming=true, application/json;odata=nometadata;streaming=false, application/json;odata=nometadata, application/json;streaming=true, application/json;streaming=false, application/json;odata=verbose, application/json' matches the content type 'application/xml; charset=UTF-8'.",
+ "type": "Microsoft.Data.OData.ODataContentTypeException",
+ "stacktrace": " at Microsoft.Data.OData.MediaTypeUtils.GetFormatFromContentType(String contentTypeName, ODataPayloadKind[] supportedPayloadKinds, MediaTypeResolver mediaTypeResolver, MediaType& mediaType, Encoding& encoding, ODataPayloadKind& selectedPayloadKind)\r\n at Microsoft.Data.OData.MediaTypeUtils.GetFormatFromContentType(String contentTypeHeader, ODataPayloadKind[] supportedPayloadKinds, MediaTypeResolver mediaTypeResolver, MediaType& mediaType, Encoding& encoding, ODataPayloadKind& selectedPayloadKind, String& batchBoundary)\r\n at Microsoft.Data.OData.ODataMessageReader.ProcessContentType(ODataPayloadKind[] payloadKinds)\r\n at Microsoft.Data.OData.ODataMessageReader.ReadFromInput[T](Func`2 readFunc, ODataPayloadKind[] payloadKinds)\r\n at Microsoft.Data.OData.ODataMessageReader.CreateODataEntryReader(IEdmEntitySet entitySet, IEdmEntityType entityType)\r\n at System.Data.Services.Serializers.EntityDeserializer.Read(SegmentInfo segmentInfo)\r\n at Syste
m.Data.Services.Serializers.ODataMessageReaderDeserializer.Deserialize(SegmentInfo segmentInfo)"
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/stacktrace.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/stacktrace.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/stacktrace.xml
new file mode 100644
index 0000000..51c2b77
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/stacktrace.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
+ <m:code />
+ <m:message xml:lang="en-US">Unsupported media type requested.</m:message>
+ <m:innererror>
+ <m:message>A supported MIME type could not be found that matches the content type of the response. None of the supported type(s) 'application/atom+xml;type=entry, application/atom+xml, application/json;odata=minimalmetadata;streaming=true, application/json;odata=minimalmetadata;streaming=false, application/json;odata=minimalmetadata, application/json;odata=fullmetadata;streaming=true, application/json;odata=fullmetadata;streaming=false, application/json;odata=fullmetadata, application/json;odata=nometadata;streaming=true, application/json;odata=nometadata;streaming=false, application/json;odata=nometadata, application/json;streaming=true, application/json;streaming=false, application/json;odata=verbose, application/json' matches the content type 'text/plain; charset=UTF-8'.</m:message>
+ <m:type>Microsoft.Data.OData.ODataContentTypeException</m:type>
+ <m:stacktrace> at Microsoft.Data.OData.MediaTypeUtils.GetFormatFromContentType(String contentTypeName, ODataPayloadKind[] supportedPayloadKinds, MediaTypeResolver mediaTypeResolver, MediaType& mediaType, Encoding& encoding, ODataPayloadKind& selectedPayloadKind)
+ at Microsoft.Data.OData.MediaTypeUtils.GetFormatFromContentType(String contentTypeHeader, ODataPayloadKind[] supportedPayloadKinds, MediaTypeResolver mediaTypeResolver, MediaType& mediaType, Encoding& encoding, ODataPayloadKind& selectedPayloadKind, String& batchBoundary)
+ at Microsoft.Data.OData.ODataMessageReader.ProcessContentType(ODataPayloadKind[] payloadKinds)
+ at Microsoft.Data.OData.ODataMessageReader.ReadFromInput[T](Func`2 readFunc, ODataPayloadKind[] payloadKinds)
+ at System.Data.Services.Serializers.EntityDeserializer.Read(SegmentInfo segmentInfo)
+ at System.Data.Services.Serializers.ODataMessageReaderDeserializer.Deserialize(SegmentInfo segmentInfo)</m:stacktrace>
+ </m:innererror>
+</m:error>
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/complexProperty.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/complexProperty.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/complexProperty.json
new file mode 100644
index 0000000..53af94c
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/complexProperty.json
@@ -0,0 +1,8 @@
+{
+ "Address": {
+ "Street": "Obere Str. 57",
+ "City": "Berlin",
+ "Region": null,
+ "PostalCode": "D-12209"
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntity.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntity.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntity.json
new file mode 100644
index 0000000..4d84995
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntity.json
@@ -0,0 +1,22 @@
+{
+ "odata.context": "http://host/service/$metadata#Customers/$entity",
+ "odata.id": "Customers('ALFKI')",
+ "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
+ "odata.editLink": "Customers('ALFKI')",
+ "Orders@odata.navigationLink": "Customers('ALFKI')/Orders",
+ "Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref",
+ "ID": "ALFKI",
+ "CompanyName": "Alfreds Futterkiste",
+ "ContactName": "Maria Anders",
+ "ContactTitle": "Sales Representative",
+ "Phone": "030-0074321",
+ "Fax": "030-0076545",
+ "Address": {
+ "Street": "Obere Str. 57",
+ "City": "Berlin",
+ "Region": null,
+ "PostalCode": "D-12209",
+ "Country@odata.navigationLink": "Customers('ALFKI')/Address/Country",
+ "Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntitySet.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntitySet.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntitySet.json
new file mode 100644
index 0000000..b3ddf63
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntitySet.json
@@ -0,0 +1,29 @@
+{
+"odata.context": "http://host/service/$metadata#Customers/$entity",
+"odata.count": 1,
+"value": [
+{
+"odata.context": "http://host/service/$metadata#Customers/$entity",
+"odata.id": "Customers('ALFKI')",
+"odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
+"odata.editLink": "Customers('ALFKI')",
+"Orders@odata.navigationLink": "Customers('ALFKI')/Orders",
+"Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref",
+"ID": "ALFKI",
+"CompanyName": "Alfreds Futterkiste",
+"ContactName": "Maria Anders",
+"ContactTitle": "Sales Representative",
+"Phone": "030-0074321",
+"Fax": "030-0076545",
+"Address": {
+ "Street": "Obere Str. 57",
+ "City": "Berlin",
+ "Region": null,
+ "PostalCode": "D-12209",
+ "Country@odata.navigationLink": "Customers('ALFKI')/Address/Country",
+ "Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
+ }
+}
+],
+"odata.nextLink": "http://host/service/EntitySet?$skiptoken=342r89"
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntitySetWithTwoEntities.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntitySetWithTwoEntities.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntitySetWithTwoEntities.json
new file mode 100644
index 0000000..96854ac
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntitySetWithTwoEntities.json
@@ -0,0 +1,49 @@
+{
+"odata.context": "http://host/service/$metadata#Customers/$entity",
+"odata.count": 1,
+"value": [
+ {
+ "odata.context": "http://host/service/$metadata#Customers/$entity",
+ "odata.id": "Customers('ALFKI')",
+ "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
+ "odata.editLink": "Customers('ALFKI')",
+ "Orders@odata.navigationLink": "Customers('ALFKI')/Orders",
+ "Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref",
+ "ID": "ALFKI",
+ "CompanyName": "Alfreds Futterkiste",
+ "ContactName": "Maria Anders",
+ "ContactTitle": "Sales Representative",
+ "Phone": "030-0074321",
+ "Fax": "030-0076545",
+ "Address": {
+ "Street": "Obere Str. 57",
+ "City": "Berlin",
+ "Region": null,
+ "PostalCode": "D-12209",
+ "Country@odata.navigationLink": "Customers('ALFKI')/Address/Country",
+ "Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
+ }
+ },
+ {
+ "odata.context": "http://host/service/$metadata#Customers/$entity",
+ "odata.id": "Customers('MUSKI')",
+ "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
+ "odata.editLink": "Customers('MUSKI')",
+ "Orders@odata.navigationLink": "Customers('MUSKI')/Orders",
+ "Orders@odata.associationLink": "Customers('MUSKI')/Orders/$ref",
+ "ID": "MUSKI",
+ "CompanyName": "Mustermanns Futterkiste",
+ "ContactName": "Mustermann Max",
+ "ContactTitle": "Some Guy",
+ "Phone": "030-002222",
+ "Fax": "030-004444",
+ "Address": {
+ "Street": "Musterstrasse 42",
+ "City": "Musterstadt",
+ "Region": "SomeRegion",
+ "PostalCode": "D-42042"
+ }
+ }
+],
+"odata.nextLink": "http://host/service/EntitySet?$skiptoken=342r89"
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntityWithCollectionOfComplexValues.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntityWithCollectionOfComplexValues.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntityWithCollectionOfComplexValues.json
new file mode 100644
index 0000000..cbdfd1c
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/fullEntityWithCollectionOfComplexValues.json
@@ -0,0 +1,28 @@
+{
+ "odata.context": "http://host/service/$metadata#Customers/$entity",
+ "odata.id": "Customers('ALFKI')",
+ "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
+ "odata.editLink": "Customers('ALFKI')",
+ "Orders@odata.navigationLink": "Customers('ALFKI')/Orders",
+ "Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref",
+ "ID": "ALFKI",
+ "CompanyName": "Alfreds Futterkiste",
+ "ContactName": "Maria Anders",
+ "ContactTitle": "Sales Representative",
+ "Phone": "030-0074321",
+ "Fax": "030-0076545",
+ "Address": [ {
+ "Street": "Obere Str. 57",
+ "City": "Berlin",
+ "Region": null,
+ "PostalCode": "D-12209",
+ "Country@odata.navigationLink": "Customers('ALFKI')/Address/Country",
+ "Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
+ }, {
+ "Street": "Musterstrasse 42",
+ "City": "Musterstadt",
+ "Region": "SomeRegion",
+ "PostalCode": "D-42042"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/minimalEntity.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/minimalEntity.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/minimalEntity.json
new file mode 100644
index 0000000..a6bd671
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/minimalEntity.json
@@ -0,0 +1,21 @@
+{
+ "odata.context": "http://host/service/$metadata#Customers/$entity", "odata.id": "Customers('ALFKI')",
+ "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
+ "odata.editLink": "Customers('ALFKI')",
+ "Orders@odata.navigationLink": "Customers('ALFKI')/Orders",
+ "Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref",
+ "ID": "ALFKI",
+ "CompanyName": "Alfreds Futterkiste",
+ "ContactName": "Maria Anders",
+ "ContactTitle": "Sales Representative",
+ "Phone": "030-0074321",
+ "Fax": "030-0076545",
+ "Address": {
+ "Street": "Obere Str. 57",
+ "City": "Berlin",
+ "Region": null,
+ "PostalCode": "D-12209",
+ "Country@odata.navigationLink": "Customers('ALFKI')/Address/Country",
+ "Country@odata.associationLink": "Customers('ALFKI')/Address/Country/$ref"
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/primitiveNullValue.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/primitiveNullValue.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/primitiveNullValue.json
new file mode 100644
index 0000000..5774413
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/primitiveNullValue.json
@@ -0,0 +1,3 @@
+{
+ "NullValue" : null
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/setOfComplexProperties.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/setOfComplexProperties.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/setOfComplexProperties.json
new file mode 100644
index 0000000..24ec160
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/setOfComplexProperties.json
@@ -0,0 +1,13 @@
+{
+ "PhoneNumbers": [
+ {
+ "Number": "425-555-1212",
+ "Type": "Home"
+ }, {
+ "odata.type": "#Model.CellPhoneNumber",
+ "Number": "425-555-0178",
+ "Type": "Cell",
+ "Carrier": "Sprint"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/setOfPrimitiveProperties.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/setOfPrimitiveProperties.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/setOfPrimitiveProperties.json
new file mode 100644
index 0000000..61b3d2c
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v4/setOfPrimitiveProperties.json
@@ -0,0 +1,8 @@
+{
+ "odata.context": "http://host/service/$metadata#Customers/$entity",
+
+ "EmailAddresses": [
+ "Julie@Swansworth.com",
+ "Julie.Swansworth@work.com"
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/primitiveNullValue.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/primitiveNullValue.json b/lib/client-core/src/test/resources/primitiveNullValue.json
deleted file mode 100644
index 5774413..0000000
--- a/lib/client-core/src/test/resources/primitiveNullValue.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "NullValue" : null
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/setOfComplexProperties.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/setOfComplexProperties.json b/lib/client-core/src/test/resources/setOfComplexProperties.json
deleted file mode 100644
index 24ec160..0000000
--- a/lib/client-core/src/test/resources/setOfComplexProperties.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "PhoneNumbers": [
- {
- "Number": "425-555-1212",
- "Type": "Home"
- }, {
- "odata.type": "#Model.CellPhoneNumber",
- "Number": "425-555-0178",
- "Type": "Cell",
- "Carrier": "Sprint"
- }
- ]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/setOfPrimitiveProperties.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/setOfPrimitiveProperties.json b/lib/client-core/src/test/resources/setOfPrimitiveProperties.json
deleted file mode 100644
index 61b3d2c..0000000
--- a/lib/client-core/src/test/resources/setOfPrimitiveProperties.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "odata.context": "http://host/service/$metadata#Customers/$entity",
-
- "EmailAddresses": [
- "Julie@Swansworth.com",
- "Julie.Swansworth@work.com"
- ]
-}
\ No newline at end of file
[06/11] [OLINGO-200] V3 (de)serializers + unit tests merged
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3BinderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3BinderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3BinderImpl.java
index 9196c9c..7b092da 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3BinderImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3BinderImpl.java
@@ -19,19 +19,17 @@
package org.apache.olingo.client.core.op.impl;
import org.apache.olingo.client.core.ODataV3ClientImpl;
-import org.apache.olingo.client.core.op.impl.AbstractODataBinder;
public class ODataV3BinderImpl extends AbstractODataBinder {
- private static final long serialVersionUID = 8970843539708952308L;
+ private static final long serialVersionUID = 8970843539708952308L;
- public ODataV3BinderImpl(final ODataV3ClientImpl client) {
- super(client);
- }
+ public ODataV3BinderImpl(final ODataV3ClientImpl client) {
+ super(client);
+ }
// @Override
// protected EdmType newEdmType(final String expression) {
// return new EdmV3Type(expression);
// }
-
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3DeserializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3DeserializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3DeserializerImpl.java
index a5c6e95..4a0f04a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3DeserializerImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3DeserializerImpl.java
@@ -29,7 +29,6 @@ import org.apache.olingo.client.core.data.v3.JSONServiceDocumentImpl;
import org.apache.olingo.client.core.data.v4.XMLServiceDocumentImpl;
import org.apache.olingo.client.core.edm.xml.v3.EdmxImpl;
import org.apache.olingo.client.core.edm.xml.v3.XMLMetadataImpl;
-import org.apache.olingo.client.core.op.impl.AbstractODataDeserializer;
public class ODataV3DeserializerImpl extends AbstractODataDeserializer implements ODataV3Deserializer {
@@ -59,12 +58,4 @@ public class ODataV3DeserializerImpl extends AbstractODataDeserializer implement
}
}
-// @Override
-// protected JSONEntry toJSONEntry(final InputStream input) {
-// try {
-// return getObjectMapper().readValue(input, JSONEntry.class);
-// } catch (IOException e) {
-// throw new IllegalArgumentException("While deserializing JSON entry", e);
-// }
-// }
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3ReaderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3ReaderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3ReaderImpl.java
index 187bc41..778458f 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3ReaderImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3ReaderImpl.java
@@ -24,7 +24,6 @@ import org.apache.olingo.client.api.domain.ODataServiceDocument;
import org.apache.olingo.client.api.format.ODataFormat;
import org.apache.olingo.client.core.ODataV3ClientImpl;
import org.apache.olingo.client.core.edm.EdmClientImpl;
-import org.apache.olingo.client.core.op.impl.AbstractODataReader;
import org.apache.olingo.commons.api.edm.Edm;
public class ODataV3ReaderImpl extends AbstractODataReader {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3SerializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3SerializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3SerializerImpl.java
index 41f8567..366f458 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3SerializerImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3SerializerImpl.java
@@ -19,7 +19,6 @@
package org.apache.olingo.client.core.op.impl;
import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.core.op.impl.AbstractODataSerializer;
public class ODataV3SerializerImpl extends AbstractODataSerializer {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4BinderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4BinderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4BinderImpl.java
index 22a42ab..01268c0 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4BinderImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4BinderImpl.java
@@ -22,8 +22,7 @@ import org.apache.olingo.client.api.data.ServiceDocument;
import org.apache.olingo.client.api.data.ServiceDocumentItem;
import org.apache.olingo.client.api.domain.ODataServiceDocument;
import org.apache.olingo.client.core.ODataV4ClientImpl;
-import org.apache.olingo.client.core.op.impl.AbstractODataBinder;
-import org.apache.olingo.client.core.uri.URIUtils;
+import org.apache.olingo.client.api.utils.URIUtils;
public class ODataV4BinderImpl extends AbstractODataBinder {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4DeserializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4DeserializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4DeserializerImpl.java
index c2d94e1..cb34367 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4DeserializerImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4DeserializerImpl.java
@@ -30,7 +30,6 @@ import org.apache.olingo.client.core.data.v4.JSONServiceDocumentImpl;
import org.apache.olingo.client.core.data.v4.XMLServiceDocumentImpl;
import org.apache.olingo.client.core.edm.xml.v4.EdmxImpl;
import org.apache.olingo.client.core.edm.xml.v4.XMLMetadataImpl;
-import org.apache.olingo.client.core.op.impl.AbstractODataDeserializer;
public class ODataV4DeserializerImpl extends AbstractODataDeserializer implements ODataV4Deserializer {
@@ -59,13 +58,4 @@ public class ODataV4DeserializerImpl extends AbstractODataDeserializer implement
throw new IllegalArgumentException("Could not parse Service Document", e);
}
}
-
-// @Override
-// protected JSONEntry toJSONEntry(final InputStream input) {
-// try {
-// return getObjectMapper().readValue(input, JSONEntry.class);
-// } catch (IOException e) {
-// throw new IllegalArgumentException("While deserializing JSON entry", e);
-// }
-// }
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4ReaderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4ReaderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4ReaderImpl.java
index c006d85..f704eee 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4ReaderImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4ReaderImpl.java
@@ -24,7 +24,6 @@ import org.apache.olingo.client.api.domain.ODataServiceDocument;
import org.apache.olingo.client.api.format.ODataFormat;
import org.apache.olingo.client.core.ODataV4ClientImpl;
import org.apache.olingo.client.core.edm.EdmClientImpl;
-import org.apache.olingo.client.core.op.impl.AbstractODataReader;
import org.apache.olingo.commons.api.edm.Edm;
public class ODataV4ReaderImpl extends AbstractODataReader {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4SerializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4SerializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4SerializerImpl.java
index 5549a45..9e971b4 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4SerializerImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4SerializerImpl.java
@@ -19,7 +19,6 @@
package org.apache.olingo.client.core.op.impl;
import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.core.op.impl.AbstractODataSerializer;
public class ODataV4SerializerImpl extends AbstractODataSerializer {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataWriterImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataWriterImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataWriterImpl.java
new file mode 100644
index 0000000..a6afabc
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataWriterImpl.java
@@ -0,0 +1,100 @@
+/*
+ * 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.client.core.op.impl;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.Collections;
+import org.apache.commons.io.IOUtils;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataLink;
+import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.client.api.op.ODataWriter;
+
+public class ODataWriterImpl implements ODataWriter {
+
+ private static final long serialVersionUID = 3265794768412314485L;
+
+ protected final ODataClient client;
+
+ public ODataWriterImpl(final ODataClient client) {
+ this.client = client;
+ }
+
+ @Override
+ public InputStream writeEntities(final Collection<ODataEntity> entities, final ODataPubFormat format) {
+ return writeEntities(entities, format, true);
+ }
+
+ @Override
+ public InputStream writeEntities(
+ final Collection<ODataEntity> entities, final ODataPubFormat format, final boolean outputType) {
+
+ final ByteArrayOutputStream output = new ByteArrayOutputStream();
+ try {
+ for (ODataEntity entity : entities) {
+ client.getSerializer().entry(client.getBinder().getEntry(
+ entity, ResourceFactory.entryClassForFormat(format == ODataPubFormat.ATOM), outputType), output);
+ }
+
+ return new ByteArrayInputStream(output.toByteArray());
+ } finally {
+ IOUtils.closeQuietly(output);
+ }
+ }
+
+ @Override
+ public InputStream writeEntity(final ODataEntity entity, final ODataPubFormat format) {
+ return writeEntity(entity, format, true);
+ }
+
+ @Override
+ public InputStream writeEntity(final ODataEntity entity, final ODataPubFormat format, final boolean outputType) {
+ return writeEntities(Collections.<ODataEntity>singleton(entity), format, outputType);
+ }
+
+ @Override
+ public InputStream writeProperty(final ODataProperty property, final ODataFormat format) {
+ final ByteArrayOutputStream output = new ByteArrayOutputStream();
+ try {
+ client.getSerializer().property(client.getBinder().toDOMElement(property), format, output);
+
+ return new ByteArrayInputStream(output.toByteArray());
+ } finally {
+ IOUtils.closeQuietly(output);
+ }
+ }
+
+ @Override
+ public InputStream writeLink(final ODataLink link, final ODataFormat format) {
+ final ByteArrayOutputStream output = new ByteArrayOutputStream();
+ try {
+ client.getSerializer().link(client.getBinder().getLink(link, format == ODataFormat.XML), format, output);
+
+ return new ByteArrayInputStream(output.toByteArray());
+ } finally {
+ IOUtils.closeQuietly(output);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ResourceFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ResourceFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ResourceFactory.java
new file mode 100644
index 0000000..f9003ff
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ResourceFactory.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.op.impl;
+
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.client.core.data.AtomEntryImpl;
+import org.apache.olingo.client.core.data.AtomFeedImpl;
+import org.apache.olingo.client.core.data.JSONEntryImpl;
+import org.apache.olingo.client.core.data.JSONFeedImpl;
+
+public class ResourceFactory {
+
+ /**
+ * Gets a new instance of <tt>Feed</tt>.
+ *
+ * @param resourceClass reference class.
+ * @return <tt>Feed</tt> object.
+ */
+ public static Feed newFeed(final Class<? extends Feed> resourceClass) {
+ Feed result = null;
+
+ if (AtomFeedImpl.class.equals(resourceClass)) {
+ result = new AtomFeedImpl();
+ }
+ if (JSONFeedImpl.class.equals(resourceClass)) {
+ result = new JSONFeedImpl();
+ }
+
+ return result;
+ }
+
+ /**
+ * Gets a new instance of <tt>Entry</tt>.
+ *
+ * @param resourceClass reference class.
+ * @return <tt>Entry</tt> object.
+ */
+ public static Entry newEntry(final Class<? extends Entry> resourceClass) {
+ Entry result = null;
+
+ if (AtomEntryImpl.class.equals(resourceClass)) {
+ result = new AtomEntryImpl();
+ }
+ if (JSONEntryImpl.class.equals(resourceClass)) {
+ result = new JSONEntryImpl();
+ }
+
+ return result;
+ }
+
+ /**
+ * Gets feed reference class from the given format.
+ *
+ * @param isXML whether it is JSON or XML / Atom
+ * @return resource reference class.
+ */
+ public static Class<? extends Feed> feedClassForFormat(final boolean isXML) {
+ return isXML ? AtomFeedImpl.class : JSONFeedImpl.class;
+ }
+
+ /**
+ * Gets entry reference class from the given format.
+ *
+ * @param isXML whether it is JSON or XML / Atom
+ * @return resource reference class.
+ */
+ public static Class<? extends Entry> entryClassForFormat(final boolean isXML) {
+ return isXML ? AtomEntryImpl.class : JSONEntryImpl.class;
+ }
+
+ /**
+ * Gets <tt>Entry</tt> object from feed resource.
+ *
+ * @param resourceClass feed reference class.
+ * @return <tt>Entry</tt> object.
+ */
+ public static Class<? extends Entry> entryClassForFeed(final Class<? extends Feed> resourceClass) {
+ Class<? extends Entry> result = null;
+
+ if (AtomFeedImpl.class.equals(resourceClass)) {
+ result = AtomEntryImpl.class;
+ }
+ if (JSONFeedImpl.class.equals(resourceClass)) {
+ result = JSONEntryImpl.class;
+ }
+
+ return result;
+ }
+
+ public static ODataPubFormat formatForEntryClass(final Class<? extends Entry> reference) {
+ return reference.equals(AtomEntryImpl.class) ? ODataPubFormat.JSON : ODataPubFormat.ATOM;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractURIBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractURIBuilder.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractURIBuilder.java
index d635579..8cc35cb 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractURIBuilder.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractURIBuilder.java
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.uri;
+import org.apache.olingo.client.api.utils.URIUtils;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
deleted file mode 100644
index 49940eb..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
+++ /dev/null
@@ -1,196 +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.client.core.uri;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URI;
-import java.net.URLEncoder;
-import java.text.DecimalFormat;
-import java.util.UUID;
-
-import org.apache.commons.codec.binary.Hex;
-import org.apache.commons.io.IOUtils;
-import org.apache.http.entity.InputStreamEntity;
-import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.api.ODataConstants;
-import org.apache.olingo.client.api.domain.EdmSimpleType;
-import org.apache.olingo.client.api.domain.ODataDuration;
-import org.apache.olingo.client.api.domain.ODataTimestamp;
-import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
-import org.apache.olingo.client.api.edm.xml.EntityContainer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * URI utilities.
- */
-public final class URIUtils {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(URIUtils.class);
-
- private URIUtils() {
- // Empty private constructor for static utility classes
- }
-
- /**
- * Build URI starting from the given base and href.
- * <br/>
- * If href is absolute or base is null then base will be ignored.
- *
- * @param base URI prefix.
- * @param href URI suffix.
- * @return built URI.
- */
- public static URI getURI(final String base, final String href) {
- if (href == null) {
- throw new IllegalArgumentException("Null link provided");
- }
-
- URI uri = URI.create(href);
-
- if (!uri.isAbsolute() && base != null) {
- uri = URI.create(base + "/" + href);
- }
-
- return uri.normalize();
- }
-
- /**
- * Build URI starting from the given base and href.
- * <br/>
- * If href is absolute or base is null then base will be ignored.
- *
- * @param base URI prefix.
- * @param href URI suffix.
- * @return built URI.
- */
- public static URI getURI(final URI base, final URI href) {
- if (href == null) {
- throw new IllegalArgumentException("Null link provided");
- }
- return getURI(base, href.toASCIIString());
- }
-
- /**
- * Build URI starting from the given base and href.
- * <br/>
- * If href is absolute or base is null then base will be ignored.
- *
- * @param base URI prefix.
- * @param href URI suffix.
- * @return built URI.
- */
- public static URI getURI(final URI base, final String href) {
- if (href == null) {
- throw new IllegalArgumentException("Null link provided");
- }
-
- URI uri = URI.create(href);
-
- if (!uri.isAbsolute() && base != null) {
- uri = URI.create(base.toASCIIString() + "/" + href);
- }
-
- return uri.normalize();
- }
-
- /**
- * Gets function import URI segment.
- *
- * @param entityContainer entity container.
- * @param functionImport function import.
- * @return URI segment.
- */
- public static String rootFunctionImportURISegment(
- final EntityContainer entityContainer, final CommonFunctionImport functionImport) {
-
- final StringBuilder result = new StringBuilder();
- if (!entityContainer.isDefaultEntityContainer()) {
- result.append(entityContainer.getName()).append('.');
- }
- result.append(functionImport.getName());
-
- return result.toString();
- }
-
- /**
- * Turns primitive values into their respective URI representation.
- *
- * @param obj primitive value
- * @return URI representation
- */
- public static String escape(final Object obj) {
- String value;
-
- try {
- value = (obj instanceof UUID)
- ? "guid'" + obj.toString() + "'"
- : (obj instanceof byte[])
- ? "X'" + Hex.encodeHexString((byte[]) obj) + "'"
- : ((obj instanceof ODataTimestamp) && ((ODataTimestamp) obj).getTimezone() == null)
- ? "datetime'" + URLEncoder.encode(((ODataTimestamp) obj).toString(), ODataConstants.UTF8) + "'"
- : ((obj instanceof ODataTimestamp) && ((ODataTimestamp) obj).getTimezone() != null)
- ? "datetimeoffset'" + URLEncoder.encode(((ODataTimestamp) obj).toString(), ODataConstants.UTF8)
- + "'"
- : (obj instanceof ODataDuration)
- ? "time'" + ((ODataDuration) obj).toString() + "'"
- : (obj instanceof BigDecimal)
- ? new DecimalFormat(EdmSimpleType.Decimal.pattern()).format((BigDecimal) obj) + "M"
- : (obj instanceof Double)
- ? new DecimalFormat(EdmSimpleType.Double.pattern()).format((Double) obj) + "D"
- : (obj instanceof Float)
- ? new DecimalFormat(EdmSimpleType.Single.pattern()).format((Float) obj) + "f"
- : (obj instanceof Long)
- ? ((Long) obj).toString() + "L"
- : (obj instanceof String)
- ? "'" + URLEncoder.encode((String) obj, ODataConstants.UTF8) + "'"
- : obj.toString();
- } catch (Exception e) {
- LOG.warn("While escaping '{}', using toString()", obj, e);
- value = obj.toString();
- }
-
- return value;
- }
-
- public static InputStreamEntity buildInputStreamEntity(final ODataClient client, final InputStream input) {
- InputStreamEntity entity;
- if (client.getConfiguration().isUseChuncked()) {
- entity = new InputStreamEntity(input, -1);
- } else {
- byte[] bytes = new byte[0];
- try {
- bytes = IOUtils.toByteArray(input);
- } catch (IOException e) {
- LOG.error("While reading input for not chunked encoding", e);
- }
-
- entity = new InputStreamEntity(new ByteArrayInputStream(bytes), bytes.length);
- }
- entity.setChunked(client.getConfiguration().isUseChuncked());
-
- return entity;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V3URIBuilderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V3URIBuilderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V3URIBuilderImpl.java
index 8bd31ad..3f61660 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V3URIBuilderImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V3URIBuilderImpl.java
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.uri;
+import org.apache.olingo.client.api.utils.URIUtils;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterConst.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterConst.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterConst.java
index 189cbdc..117815a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterConst.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterConst.java
@@ -19,12 +19,11 @@
package org.apache.olingo.client.core.uri.filter;
import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.olingo.client.api.uri.filter.FilterArgFactory;
/**
* Filter property path; obtain instances via <tt>FilterArgFactory</tt>.
*
- * @see FilterArgFactory
+ * @see org.apache.olingo.client.api.uri.filter.FilterArgFactory
*/
public class FilterConst implements FilterArg {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLiteral.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLiteral.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLiteral.java
index 661e613..2f353f1 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLiteral.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLiteral.java
@@ -19,7 +19,7 @@
package org.apache.olingo.client.core.uri.filter;
import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.olingo.client.core.uri.URIUtils;
+import org.apache.olingo.client.api.utils.URIUtils;
/**
* Filter value literals; obtain instances via <tt>FilterArgFactory</tt>.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPrimitiveTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPrimitiveTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPrimitiveTest.java
new file mode 100644
index 0000000..8613695
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPrimitiveTest.java
@@ -0,0 +1,401 @@
+/*
+ * 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.client.core;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.UUID;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.domain.ODataGeospatialValue;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.client.api.domain.ODataTimestamp;
+import org.apache.olingo.client.api.domain.geospatial.Geospatial;
+import org.apache.olingo.client.api.domain.geospatial.Geospatial.Dimension;
+import org.apache.olingo.client.api.domain.geospatial.GeospatialCollection;
+import org.apache.olingo.client.api.domain.geospatial.LineString;
+import org.apache.olingo.client.api.domain.geospatial.MultiLineString;
+import org.apache.olingo.client.api.domain.geospatial.MultiPoint;
+import org.apache.olingo.client.api.domain.geospatial.MultiPolygon;
+import org.apache.olingo.client.api.domain.geospatial.Point;
+import org.apache.olingo.client.api.domain.geospatial.Polygon;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+public abstract class AbstractPrimitiveTest extends AbstractTest {
+
+ protected abstract ODataFormat getFormat();
+
+ protected ODataServiceVersion getVersion() {
+ return getClient().getServiceVersion();
+ }
+
+ protected String getFilename(final String entity, final String propertyName) {
+ return getVersion().name().toLowerCase()
+ + File.separatorChar
+ + entity.replace('(', '_').replace(")", "")
+ + "_" + propertyName.replaceAll("/", "_") + "." + getSuffix(getFormat());
+ }
+
+ protected ODataPrimitiveValue writePrimitiveValue(final ODataPrimitiveValue value) {
+ final ODataPrimitiveValue newValue;
+ if (ODataJClientEdmPrimitiveType.isGeospatial(value.getTypeName())) {
+ newValue = getClient().getGeospatialValueBuilder().
+ setType(ODataJClientEdmPrimitiveType.fromValue(value.getTypeName())).
+ setTree(((ODataGeospatialValue) value).toTree()).build();
+ } else {
+ newValue = getClient().getPrimitiveValueBuilder().
+ setType(ODataJClientEdmPrimitiveType.fromValue(value.getTypeName())).
+ setValue(value.toValue()).build();
+ }
+
+ final InputStream written = getClient().getWriter().writeProperty(
+ getClient().getObjectFactory().newPrimitiveProperty(ODataConstants.ELEM_PROPERTY, newValue),
+ getFormat());
+ return readPrimitiveValue(written);
+ }
+
+ protected ODataPrimitiveValue readPrimitiveValue(final InputStream input) {
+ final ODataProperty property = getClient().getReader().readProperty(input, getFormat());
+ assertNotNull(property);
+ assertTrue(property.hasPrimitiveValue());
+ assertNotNull(property.getPrimitiveValue());
+
+ return property.getPrimitiveValue();
+ }
+
+ protected ODataPrimitiveValue readPrimitiveValue(final String entity, final String propertyName) {
+ final ODataPrimitiveValue value =
+ readPrimitiveValue(getClass().getResourceAsStream(getFilename(entity, propertyName)));
+
+ if (ODataJClientEdmPrimitiveType.isGeospatial(value.getTypeName())) {
+ assertEquals(value.toValue(), writePrimitiveValue(value).toValue());
+ } else {
+ assertEquals(value.toString(), writePrimitiveValue(value).toString());
+ }
+
+ return value;
+ }
+
+ protected void int32(final String entity, final String propertyName, final int check) {
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(ODataJClientEdmPrimitiveType.Int32.toString(), opv.getTypeName());
+
+ final Integer value = opv.<Integer>toCastValue();
+ assertNotNull(value);
+ assertTrue(check == value);
+ }
+
+ protected void string(final String entity, final String propertyName, final String check) {
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(ODataJClientEdmPrimitiveType.String.toString(), opv.getTypeName());
+
+ final String value = opv.<String>toCastValue();
+ assertNotNull(value);
+ assertEquals(check, value);
+
+ assertEquals(opv, writePrimitiveValue(opv));
+ }
+
+ protected void decimal(final String entity, final String propertyName, final BigDecimal check) {
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(ODataJClientEdmPrimitiveType.Decimal.toString(), opv.getTypeName());
+
+ final BigDecimal value = opv.<BigDecimal>toCastValue();
+ assertNotNull(value);
+ assertTrue(check.equals(value));
+ }
+
+ protected void datetime(final String entity, final String propertyName, final String check) {
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(ODataJClientEdmPrimitiveType.DateTime.toString(), opv.getTypeName());
+
+ final ODataTimestamp value = opv.<ODataTimestamp>toCastValue();
+ assertNotNull(value);
+ assertEquals(check, opv.toString());
+ }
+
+ protected void guid(final String entity, final String propertyName, final String check) {
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(ODataJClientEdmPrimitiveType.Guid.toString(), opv.getTypeName());
+
+ final UUID value = opv.<UUID>toCastValue();
+ assertNotNull(value);
+ assertEquals(check, opv.toString());
+ }
+
+ protected void binary(final String entity, final String propertyName) {
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(ODataJClientEdmPrimitiveType.Binary.toString(), opv.getTypeName());
+
+ final byte[] value = opv.<byte[]>toCastValue();
+ assertNotNull(value);
+ assertTrue(value.length > 0);
+ assertTrue(Base64.isBase64(opv.toString()));
+ }
+
+ private void checkPoint(final Point point, final Point check) {
+ assertEquals(check.getX(), point.getX(), 0);
+ assertEquals(check.getY(), point.getY(), 0);
+ assertEquals(check.getZ(), point.getZ(), 0);
+ }
+
+ protected void point(
+ final String entity,
+ final String propertyName,
+ final Point expectedValues,
+ final ODataJClientEdmPrimitiveType expectedType,
+ final Dimension expectedDimension) {
+
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(expectedType.toString(), opv.getTypeName());
+
+ final Point point = opv.<Point>toCastValue();
+ assertNotNull(point);
+ assertEquals(expectedDimension, point.getDimension());
+
+ checkPoint(point, expectedValues);
+ }
+
+ private void checkLine(final LineString line, final List<Point> check) {
+ final List<Point> points = new ArrayList<Point>();
+
+ for (Point point : line) {
+ points.add(point);
+ }
+
+ assertEquals(check.size(), points.size());
+
+ for (int i = 0; i < points.size(); i++) {
+ checkPoint(points.get(i), check.get(i));
+ }
+ }
+
+ protected void lineString(
+ final String entity,
+ final String propertyName,
+ final List<Point> check,
+ final ODataJClientEdmPrimitiveType expectedType,
+ final Dimension expectedDimension) {
+
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(expectedType.toString(), opv.getTypeName());
+
+ final LineString lineString = opv.<LineString>toCastValue();
+ assertNotNull(lineString);
+ assertEquals(expectedDimension, lineString.getDimension());
+
+ checkLine(lineString, check);
+ }
+
+ protected void multiPoint(
+ final String entity,
+ final String propertyName,
+ final List<Point> check,
+ final ODataJClientEdmPrimitiveType expectedType,
+ final Dimension expectedDimension) {
+
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(expectedType.toString(), opv.getTypeName());
+
+ final MultiPoint multiPoint = opv.<MultiPoint>toCastValue();
+ assertNotNull(multiPoint);
+ assertEquals(expectedDimension, multiPoint.getDimension());
+
+ final List<Point> points = new ArrayList<Point>();
+
+ for (Point point : multiPoint) {
+ points.add(point);
+ }
+
+ assertEquals(check.size(), points.size());
+
+ for (int i = 0; i < points.size(); i++) {
+ checkPoint(points.get(i), check.get(i));
+ }
+ }
+
+ protected void multiLine(
+ final String entity,
+ final String propertyName,
+ final List<List<Point>> check,
+ final ODataJClientEdmPrimitiveType expectedType,
+ final Dimension expectedDimension) {
+
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(expectedType.toString(), opv.getTypeName());
+
+ final MultiLineString multiLine = opv.<MultiLineString>toCastValue();
+ assertNotNull(multiLine);
+ assertEquals(expectedDimension, multiLine.getDimension());
+
+ final List<LineString> lines = new ArrayList<LineString>();
+
+ int i = 0;
+ for (LineString line : multiLine) {
+ checkLine(line, check.get(i));
+ i++;
+ }
+ }
+
+ private void checkPoligon(
+ final Polygon polygon,
+ final List<Point> checkInterior,
+ final List<Point> checkExterior) {
+
+ final List<Point> points = new ArrayList<Point>();
+
+ for (Point point : polygon.getInterior()) {
+ points.add(point);
+ }
+
+ assertEquals(checkInterior.size(), points.size());
+
+ for (int i = 0; i < points.size(); i++) {
+ checkPoint(checkInterior.get(i), points.get(i));
+ }
+
+ points.clear();
+
+ for (Point point : polygon.getExterior()) {
+ points.add(point);
+ }
+
+ assertEquals(checkExterior.size(), points.size());
+
+ for (int i = 0; i < points.size(); i++) {
+ checkPoint(checkExterior.get(i), points.get(i));
+ }
+
+ }
+
+ protected void polygon(
+ final String entity,
+ final String propertyName,
+ final List<Point> checkInterior,
+ final List<Point> checkExterior,
+ final ODataJClientEdmPrimitiveType expectedType,
+ final Dimension expectedDimension) {
+
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(expectedType.toString(), opv.getTypeName());
+
+ final Polygon polygon = opv.<Polygon>toCastValue();
+
+ assertNotNull(polygon);
+ assertEquals(expectedDimension, polygon.getDimension());
+
+ checkPoligon(polygon, checkInterior, checkExterior);
+
+ }
+
+ protected void multiPolygon(
+ final String entity,
+ final String propertyName,
+ final List<List<Point>> checkInterior,
+ final List<List<Point>> checkExterior,
+ final ODataJClientEdmPrimitiveType expectedType,
+ final Dimension expectedDimension) {
+
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(expectedType.toString(), opv.getTypeName());
+
+ final MultiPolygon multiPolygon = opv.<MultiPolygon>toCastValue();
+ assertNotNull(multiPolygon);
+ assertEquals(expectedDimension, multiPolygon.getDimension());
+
+ int i = 0;
+ for (Polygon polygon : multiPolygon) {
+ checkPoligon(
+ polygon,
+ checkInterior.isEmpty() ? Collections.<Point>emptyList() : checkInterior.get(i),
+ checkExterior.isEmpty() ? Collections.<Point>emptyList() : checkExterior.get(i));
+ i++;
+ }
+ }
+
+ protected void geomCollection(
+ final String entity,
+ final String propertyName,
+ final ODataJClientEdmPrimitiveType expectedType,
+ final Dimension expectedDimension) {
+
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(expectedType.toString(), opv.getTypeName());
+
+ final GeospatialCollection collection = opv.<GeospatialCollection>toCastValue();
+ assertNotNull(collection);
+ assertEquals(expectedDimension, collection.getDimension());
+
+ final Iterator<Geospatial> itor = collection.iterator();
+ int count = 0;
+ while (itor.hasNext()) {
+ count++;
+
+ final Geospatial geospatial = itor.next();
+ if (count == 1) {
+ assertTrue(geospatial instanceof Point);
+ }
+ if (count == 2) {
+ assertTrue(geospatial instanceof LineString);
+ }
+ }
+ assertEquals(2, count);
+ }
+
+ protected void geogCollection(
+ final String entity,
+ final String propertyName,
+ final ODataJClientEdmPrimitiveType expectedType,
+ final Dimension expectedDimension) {
+
+ final ODataPrimitiveValue opv = readPrimitiveValue(entity, propertyName);
+ assertEquals(expectedType.toString(), opv.getTypeName());
+
+ final GeospatialCollection collection = opv.<GeospatialCollection>toCastValue();
+ assertNotNull(collection);
+ assertEquals(expectedDimension, collection.getDimension());
+
+ final Iterator<Geospatial> itor = collection.iterator();
+ int count = 0;
+ while (itor.hasNext()) {
+ count++;
+
+ final Geospatial geospatial = itor.next();
+ if (count == 1) {
+ assertTrue(geospatial instanceof GeospatialCollection);
+ }
+ if (count == 2) {
+ assertTrue(geospatial instanceof GeospatialCollection);
+ }
+ }
+ assertEquals(2, count);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPropertyTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPropertyTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPropertyTest.java
new file mode 100644
index 0000000..48e17e7
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPropertyTest.java
@@ -0,0 +1,174 @@
+/*
+ * 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.client.core;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+import org.apache.commons.io.IOUtils;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.domain.ODataCollectionValue;
+import org.apache.olingo.client.api.domain.ODataComplexValue;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.junit.Test;
+
+public abstract class AbstractPropertyTest extends AbstractTest {
+
+ protected abstract ODataFormat getFormat();
+
+ protected ODataServiceVersion getVersion() {
+ return getClient().getServiceVersion();
+ }
+
+ @Test
+ public void readPropertyValue() throws IOException {
+ final InputStream input = getClass().getResourceAsStream(
+ getVersion().name().toLowerCase() + File.separatorChar
+ + "Customer_-10_CustomerId_value.txt");
+
+ final ODataValue value = getClient().getPrimitiveValueBuilder().
+ setType(ODataJClientEdmPrimitiveType.String).
+ setText(IOUtils.toString(input)).
+ build();
+ assertNotNull(value);
+ assertEquals("-10", value.toString());
+ }
+
+ private ODataProperty primitive() throws IOException {
+ final InputStream input = getClass().getResourceAsStream(
+ getVersion().name().toLowerCase() + File.separatorChar
+ + "Customer_-10_CustomerId." + getSuffix(getFormat()));
+ final ODataProperty property = getClient().getReader().readProperty(input, getFormat());
+ assertNotNull(property);
+ assertTrue(property.hasPrimitiveValue());
+ assertTrue(-10 == property.getPrimitiveValue().<Integer>toCastValue());
+
+ ODataProperty comparable;
+ final ODataProperty written = getClient().getReader().readProperty(
+ getClient().getWriter().writeProperty(property, getFormat()), getFormat());
+ if (getFormat() == ODataFormat.XML) {
+ comparable = written;
+ } else {
+ // This is needed because type information gets lost with JSON serialization
+ final ODataPrimitiveValue typedValue = getClient().getPrimitiveValueBuilder().
+ setType(ODataJClientEdmPrimitiveType.fromValue(property.getPrimitiveValue().getTypeName())).
+ setText(written.getPrimitiveValue().toString()).
+ build();
+ comparable = getClient().getObjectFactory().newPrimitiveProperty(written.getName(), typedValue);
+ }
+
+ assertEquals(property, comparable);
+
+ return property;
+ }
+
+ @Test
+ public void readPrimitiveProperty() throws IOException {
+ primitive();
+ }
+
+ private ODataProperty complex() throws IOException {
+ final InputStream input = getClass().getResourceAsStream(
+ getVersion().name().toLowerCase() + File.separatorChar
+ + "Customer_-10_PrimaryContactInfo." + getSuffix(getFormat()));
+ final ODataProperty property = getClient().getReader().readProperty(input, getFormat());
+ assertNotNull(property);
+ assertTrue(property.hasComplexValue());
+ assertEquals(6, property.getComplexValue().size());
+
+ ODataProperty comparable;
+ final ODataProperty written = getClient().getReader().readProperty(
+ getClient().getWriter().writeProperty(property, getFormat()), getFormat());
+ if (getFormat() == ODataFormat.XML) {
+ comparable = written;
+ } else {
+ // This is needed because type information gets lost with JSON serialization
+ final ODataComplexValue typedValue = new ODataComplexValue(property.getComplexValue().getTypeName());
+ for (final Iterator<ODataProperty> itor = written.getComplexValue().iterator(); itor.hasNext();) {
+ final ODataProperty prop = itor.next();
+ typedValue.add(prop);
+ }
+ comparable = getClient().getObjectFactory().newComplexProperty(written.getName(), typedValue);
+ }
+
+ assertEquals(property, comparable);
+
+ return property;
+ }
+
+ @Test
+ public void readComplexProperty() throws IOException {
+ complex();
+ }
+
+ private ODataProperty collection() throws IOException {
+ final InputStream input = getClass().getResourceAsStream(
+ getVersion().name().toLowerCase() + File.separatorChar
+ + "Customer_-10_BackupContactInfo." + getSuffix(getFormat()));
+ final ODataProperty property = getClient().getReader().readProperty(input, getFormat());
+ assertNotNull(property);
+ assertTrue(property.hasCollectionValue());
+ assertEquals(9, property.getCollectionValue().size());
+
+ ODataProperty comparable;
+ final ODataProperty written = getClient().getReader().readProperty(
+ getClient().getWriter().writeProperty(property, getFormat()), getFormat());
+ if (getFormat() == ODataFormat.XML) {
+ comparable = written;
+ } else {
+ // This is needed because type information gets lost with JSON serialization
+ final ODataCollectionValue typedValue =
+ new ODataCollectionValue(property.getCollectionValue().getTypeName());
+ for (final Iterator<ODataValue> itor = written.getCollectionValue().iterator(); itor.hasNext();) {
+ final ODataValue value = itor.next();
+ if (value.isPrimitive()) {
+ typedValue.add(value);
+ }
+ if (value.isComplex()) {
+ final ODataComplexValue typedComplexValue =
+ new ODataComplexValue("Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails");
+ for (final Iterator<ODataProperty> valueItor = value.asComplex().iterator(); valueItor.hasNext();) {
+ final ODataProperty prop = valueItor.next();
+ typedComplexValue.add(prop);
+ }
+ typedValue.add(typedComplexValue);
+ }
+ }
+ comparable = getClient().getObjectFactory().newCollectionProperty(written.getName(), typedValue);
+ }
+
+ assertEquals(property, comparable);
+
+ return property;
+ }
+
+ @Test
+ public void readCollectionProperty() throws IOException {
+ collection();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
index 592163c..9c65809 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
@@ -25,7 +25,6 @@ import org.apache.olingo.client.api.ODataV3Client;
import org.apache.olingo.client.api.ODataV4Client;
import org.apache.olingo.client.api.format.ODataFormat;
import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.client.core.ODataClientFactory;
import org.junit.BeforeClass;
public abstract class AbstractTest {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/deserializer/JsonReaderPerformance.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/deserializer/JsonReaderPerformance.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/deserializer/JsonReaderPerformance.java
deleted file mode 100644
index 1937e04..0000000
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/deserializer/JsonReaderPerformance.java
+++ /dev/null
@@ -1,76 +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.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 java.io.InputStream;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.olingo.client.api.deserializer.ComplexValue;
-import org.apache.olingo.client.api.deserializer.Property;
-import org.apache.olingo.client.api.deserializer.StructuralProperty;
-import org.apache.olingo.client.api.deserializer.Value;
-import org.apache.olingo.client.core.deserializer.JsonReader;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class JsonReaderPerformance {
-
- private static final Logger LOG = LoggerFactory.getLogger(JsonReaderPerformance.class);
-
- @Test
- public void testComplexPropertyPerformance() throws Exception {
- JsonReader consumer = new JsonReader();
- int runs = 1000; // * 100;
-
- InputStream in = JsonReaderPerformance.class.getResourceAsStream("/complexProperty.json");
- String content = IOUtils.toString(in);
-
- LOG.debug("Started...");
- ComplexValue complex = null;
- long startTime = System.currentTimeMillis();
- for (int i = 0; i < runs; i++) {
- Property property = consumer.readProperty(IOUtils.toInputStream(content));
- complex = (ComplexValue) ((StructuralProperty) property).getValue();
- }
- long endTime = System.currentTimeMillis();
-
- long duration = endTime - startTime;
- LOG.debug("Duration: " + duration + " ms");
- LOG.debug("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/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/deserializer/JsonReaderTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/deserializer/JsonReaderTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/deserializer/JsonReaderTest.java
deleted file mode 100644
index 0379ac8..0000000
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/deserializer/JsonReaderTest.java
+++ /dev/null
@@ -1,372 +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.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 org.apache.olingo.client.api.deserializer.ComplexValue;
-import org.apache.olingo.client.api.deserializer.Entity;
-import org.apache.olingo.client.api.deserializer.EntitySet;
-import org.apache.olingo.client.api.deserializer.Property;
-import org.apache.olingo.client.api.deserializer.Reader;
-import org.apache.olingo.client.api.deserializer.StructuralProperty;
-import org.apache.olingo.client.api.deserializer.Value;
-import org.apache.olingo.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);
- assertEquals("PhoneNumbers", property.getName());
- 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/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntitySetTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntitySetTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntitySetTest.java
new file mode 100644
index 0000000..d2a3ad4
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntitySetTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.v3;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.io.InputStream;
+import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.client.core.AbstractTest;
+import org.apache.olingo.client.core.op.impl.ResourceFactory;
+import org.junit.Test;
+
+public class EntitySetTest extends AbstractTest {
+
+ @Override
+ protected ODataV3Client getClient() {
+ return v3Client;
+ }
+
+ private void read(final ODataPubFormat format) throws IOException {
+ final InputStream input = getClass().getResourceAsStream("Customer." + getSuffix(format));
+ final ODataEntitySet entitySet = getClient().getBinder().getODataEntitySet(
+ getClient().getDeserializer().toFeed(input, format));
+ assertNotNull(entitySet);
+
+ assertEquals(2, entitySet.getEntities().size());
+ assertNotNull(entitySet.getNext());
+
+ final ODataEntitySet written = getClient().getBinder().getODataEntitySet(getClient().
+ getBinder().getFeed(entitySet, ResourceFactory.feedClassForFormat(format == ODataPubFormat.ATOM)));
+ assertEquals(entitySet, written);
+ }
+
+ @Test
+ public void fromAtom() throws IOException {
+ read(ODataPubFormat.ATOM);
+ }
+
+ @Test
+ public void fromJSON() throws IOException {
+ read(ODataPubFormat.JSON);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntityTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntityTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntityTest.java
new file mode 100644
index 0000000..87098ed
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntityTest.java
@@ -0,0 +1,191 @@
+/*
+ * 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.client.core.v3;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.domain.ODataLink;
+import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.client.api.domain.geospatial.Geospatial;
+import org.apache.olingo.client.api.domain.geospatial.GeospatialCollection;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.client.core.AbstractTest;
+import org.apache.olingo.client.core.op.impl.ResourceFactory;
+import org.junit.Test;
+
+public class EntityTest extends AbstractTest {
+
+ @Override
+ protected ODataV3Client getClient() {
+ return v3Client;
+ }
+
+ private void readAndWrite(final ODataPubFormat format) {
+ final InputStream input = getClass().getResourceAsStream("Customer_-10." + getSuffix(format));
+ final ODataEntity entity = getClient().getBinder().getODataEntity(
+ getClient().getDeserializer().toEntry(input, format));
+ assertNotNull(entity);
+
+ assertEquals("Microsoft.Test.OData.Services.AstoriaDefaultService.Customer", entity.getName());
+ assertTrue(entity.getEditLink().toASCIIString().endsWith("/Customer(-10)"));
+ assertEquals(5, entity.getNavigationLinks().size());
+ assertEquals(2, entity.getEditMediaLinks().size());
+
+ boolean check = false;
+
+ for (ODataLink link : entity.getNavigationLinks()) {
+ if ("Wife".equals(link.getName()) && (link.getLink().toASCIIString().endsWith("/Customer(-10)/Wife"))) {
+ check = true;
+ }
+ }
+
+ assertTrue(check);
+
+ final ODataEntity written = getClient().getBinder().getODataEntity(getClient().getBinder().
+ getEntry(entity, ResourceFactory.entryClassForFormat(format == ODataPubFormat.ATOM)));
+ assertEquals(entity, written);
+ }
+
+ @Test
+ public void fromAtom() {
+ readAndWrite(ODataPubFormat.ATOM);
+ }
+
+ @Test
+ public void fromJSON() {
+ readAndWrite(ODataPubFormat.JSON_FULL_METADATA);
+ }
+
+ private void readGeospatial(final ODataPubFormat format) {
+ final InputStream input = getClass().getResourceAsStream("AllGeoTypesSet_-8." + getSuffix(format));
+ final ODataEntity entity = getClient().getBinder().getODataEntity(
+ getClient().getDeserializer().toEntry(input, format));
+ assertNotNull(entity);
+
+ boolean found = false;
+ for (ODataProperty property : entity.getProperties()) {
+ if ("GeogMultiLine".equals(property.getName())) {
+ found = true;
+ assertTrue(property.hasPrimitiveValue());
+ assertEquals(ODataJClientEdmPrimitiveType.GeographyMultiLineString.toString(),
+ property.getPrimitiveValue().getTypeName());
+ }
+ }
+ assertTrue(found);
+
+ final ODataEntity written = getClient().getBinder().getODataEntity(getClient().getBinder().
+ getEntry(entity, ResourceFactory.entryClassForFormat(format == ODataPubFormat.ATOM)));
+ assertEquals(entity, written);
+ }
+
+ @Test
+ public void withGeospatialFromAtom() {
+ readGeospatial(ODataPubFormat.ATOM);
+ }
+
+ @Test
+ public void withGeospatialFromJSON() {
+ // this needs to be full, otherwise there is no mean to recognize geospatial types
+ readGeospatial(ODataPubFormat.JSON_FULL_METADATA);
+ }
+
+ private void withActions(final ODataPubFormat format) {
+ final InputStream input = getClass().getResourceAsStream("ComputerDetail_-10." + getSuffix(format));
+ final ODataEntity entity = getClient().getBinder().getODataEntity(
+ getClient().getDeserializer().toEntry(input, format));
+ assertNotNull(entity);
+
+ assertEquals(1, entity.getOperations().size());
+ assertEquals("ResetComputerDetailsSpecifications", entity.getOperations().get(0).getTitle());
+
+ final ODataEntity written = getClient().getBinder().getODataEntity(getClient().getBinder().
+ getEntry(entity, ResourceFactory.entryClassForFormat(format == ODataPubFormat.ATOM)));
+ entity.getOperations().clear();
+ assertEquals(entity, written);
+ }
+
+ @Test
+ public void withActionsFromAtom() {
+ withActions(ODataPubFormat.ATOM);
+ }
+
+ @Test
+ public void withActionsFromJSON() {
+ // this needs to be full, otherwise actions will not be provided
+ withActions(ODataPubFormat.JSON_FULL_METADATA);
+ }
+
+ private void mediaEntity(final ODataPubFormat format) {
+ final InputStream input = getClass().getResourceAsStream("Car_16." + getSuffix(format));
+ final ODataEntity entity = getClient().getBinder().getODataEntity(
+ getClient().getDeserializer().toEntry(input, format));
+ assertNotNull(entity);
+ assertTrue(entity.isMediaEntity());
+ assertNotNull(entity.getMediaContentSource());
+ assertNotNull(entity.getMediaContentType());
+
+ final ODataEntity written = getClient().getBinder().getODataEntity(getClient().getBinder().
+ getEntry(entity, ResourceFactory.entryClassForFormat(format == ODataPubFormat.ATOM)));
+ assertEquals(entity, written);
+ }
+
+ @Test
+ public void mediaEntityFromAtom() {
+ mediaEntity(ODataPubFormat.ATOM);
+ }
+
+ @Test
+ public void mediaEntityFromJSON() {
+ mediaEntity(ODataPubFormat.JSON_FULL_METADATA);
+ }
+
+ private void issue128(final ODataPubFormat format) {
+ final InputStream input = getClass().getResourceAsStream("AllGeoTypesSet_-5." + getSuffix(format));
+ final ODataEntity entity = getClient().getBinder().getODataEntity(
+ getClient().getDeserializer().toEntry(input, format));
+ assertNotNull(entity);
+
+ final ODataProperty geogCollection = entity.getProperty("GeogCollection");
+ assertEquals(ODataJClientEdmPrimitiveType.GeographyCollection.toString(),
+ geogCollection.getPrimitiveValue().getTypeName());
+
+ int count = 0;
+ for (Geospatial g : geogCollection.getPrimitiveValue().<GeospatialCollection>toCastValue()) {
+ assertNotNull(g);
+ count++;
+ }
+ assertEquals(2, count);
+ }
+
+ @Test
+ public void issue128FromAtom() {
+ issue128(ODataPubFormat.ATOM);
+ }
+
+ @Test
+ public void issue128FromJSON() {
+ issue128(ODataPubFormat.JSON_FULL_METADATA);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntryTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntryTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntryTest.java
new file mode 100644
index 0000000..2e38d9f
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntryTest.java
@@ -0,0 +1,103 @@
+/*
+ * 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.client.core.v3;
+
+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.IOException;
+import java.io.InputStream;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.client.api.utils.XMLUtils;
+import org.apache.olingo.client.core.AbstractTest;
+import org.junit.Test;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class EntryTest extends AbstractTest {
+
+ @Override
+ protected ODataV3Client getClient() {
+ return v3Client;
+ }
+
+ private void read(final ODataPubFormat format) throws IOException {
+ InputStream input = getClass().getResourceAsStream("Car_16." + getSuffix(format));
+
+ Entry entry = getClient().getDeserializer().toEntry(input, format);
+ assertNotNull(entry);
+
+ assertEquals("Car(16)", entry.getEditLink().getHref());
+ assertEquals(2, entry.getMediaEditLinks().size());
+
+ // this is a media entry
+ assertNull(entry.getContent());
+
+ final Element vin = XMLUtils.getChildElements(entry.getMediaEntryProperties(), "d:VIN").get(0);
+ assertNotNull(vin);
+ assertEquals("16", vin.getTextContent());
+
+ input.close();
+
+ // ---------------------------------------------
+ input = getClass().getResourceAsStream("Customer_-10." + getSuffix(format));
+
+ entry = getClient().getDeserializer().toEntry(input, format);
+ assertNotNull(entry);
+
+ input.close();
+
+ assertEquals("Microsoft.Test.OData.Services.AstoriaDefaultService.Customer", entry.getType());
+ assertNotNull(entry.getBaseURI());
+
+ final Element content = entry.getContent();
+ assertEquals(ODataConstants.ELEM_PROPERTIES, content.getNodeName());
+
+ boolean entered = false;
+ boolean checked = false;
+ for (int i = 0; i < content.getChildNodes().getLength(); i++) {
+ entered = true;
+
+ final Node property = content.getChildNodes().item(i);
+ if ("PrimaryContactInfo".equals(XMLUtils.getSimpleName(property))) {
+ checked = true;
+
+ assertEquals("Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails",
+ ((Element) property).getAttribute(ODataConstants.ATTR_M_TYPE));
+ }
+ }
+ assertTrue(entered);
+ assertTrue(checked);
+ }
+
+ @Test
+ public void atom() throws IOException {
+ read(ODataPubFormat.ATOM);
+ }
+
+ @Test
+ public void json() throws IOException {
+ read(ODataPubFormat.JSON_FULL_METADATA);
+ }
+}
[04/11] [OLINGO-200] V3 (de)serializers + unit tests merged
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer.json
new file mode 100644
index 0000000..276bdd6
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.0.160:8080/DefaultService.svc/$metadata#Customer","value":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Customer","odata.id":"http://192.168.0.160:8080/DefaultService.svc/Customer(-10)","odata.editLink":"Customer(-10)","Orders@odata.navigationLinkUrl":"Customer(-10)/Orders","Logins@odata.navigationLinkUrl":"Customer(-10)/Logins","Husband@odata.navigationLinkUrl":"Customer(-10)/Husband","Wife@odata.navigationLinkUrl":"Customer(-10)/Wife","Info@odata.navigationLinkUrl":"Customer(-10)/Info","Thumbnail@odata.mediaEditLink":"Customer(-10)/Thumbnail","Video@odata.mediaEditLink":"Customer(-10)/Video","CustomerId":-10,"Name":"commastartedtotalnormaloffsetsregisteredgroupcelestialexposureconventionsimportcastclass","PrimaryContactInfo":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["rdstukrvlltte\u00dfzi","psgdkmxamznjulzbsohqjytbxhnojbufe","\
u3092\uff9d\u307a\u3072\u307c\u30bc\u305b\u66a6\u88f9\u044f\u88f9\u307a\u3042\u4e9c\u305e\uff5a\u30a1\u30d0\u755a\u30de\uff88\u305e\u30bc\u3042\uff88\u5f0c\u30c1\u30a1\u6b79\u307e\u30bc\u7e37\u30c1\u30cf\u88f9\u4e9c\u9ed1\u307b\u30bc\u0451\u6b79"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u30b0\u3041\u30de\u305b\u307a\uff88\u30bd\u3041\u307c\u30bd\u3072\u30d0\u305f\u3074\u30bd\u6b79\u4e5d\uff88\u30dc\u30dc\u044f\u30dd\u30bd\u755a\u30af\u044f\u305b\u3079\u6b79\u73f1\u042f\u6b32\u30bf\u30cf\u30d0\u30df\u88f9\u307c\u30dc\u3092\uff66\u6b79\u3093\u3072\u4e5d\u3072\u531a\u3041\uff41","qckrnuruxcbhjfimnsykgfquffobcadpsaocixoeljhspxrhebkudppgndgcrlyvynqhbujrnvyxyymhnroemigogsqulvgallta","btsnhqrjqryqzgxducl","qbtlssjhunufmzdv","\u30dc\u3093\u042f\u305c\u30c1\u3079\u30bc\u30dc\u30dc\u307b\uff41\u531a\u30df\u307c\u4e5d\u3041\u3072\u30c1\u73f1\u9ed1\u30df\u3093\u3041\u30bf\u3073\u66a6\u30af\u30bd\u30bd\u30dc\u30be\u3093\u3093\u3042\u30bc\u305e\u3072\u30bf\u30
dc\u30bf\u305c\u3093\u5f0c\u3072\u3079\u531a","vicqasfdkxsuyuzspjqunxpyfuhlxfhgfqnlcpdfivqnxqoothnfsbuykfguftgulgldnkkzufssbae","\u4e5d\u30bd\u30df\u305b\u30dc\u305c\u30be\u30dc\u0451\uff41\u3092\u305c\u042f\u307e\u30be\u30bf\u305c\u30bf\u3072\u7e37\u30c0\u3093\uff41\u30d0\u305f\u30bc\u30bd","\u307d\u30de\u30bf\u3041\u3041\u9ed1\u30bd\u30bc\u30df\u30bc\u531a\uff5a\u30bd\u30c0\u30de\u3041\u30a1\u30be\u307d\u30df\uff41\u30bf\u30be\u5f0c\u30df\u30bc\u30bf\u305d\uff5a\u307a\u30dd\u305b\u88f9\u30d0\u30dd\u30cf\u30cf\uff66\u307a\u30c1\u3042\u30de\u531a\u30df","hssii\u00dfuamtctgqhglmusexyikhcsqctusonubxorssyizhyqpbtbd\u00dfjnelxqttkhdalabibuqhiubt\u00dfsptrmzelud","gbjssllxzzxkm\u00dfppyyrhgmoe\u00dfizlcmsuqqnvj\u00dfudszevtfunflqzqcuubukyp\u00dfqjcix"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u30bc\u30dd\u30bd\u30bd\u30a1\u3093\u30de\uff41\u30b0\u3074\u4e5d\u7e37
\u4e9c\u305e\u30bc\u30bd\u30b0\u30d0\u307c\u30c0\u307d\u30de\u30de\u307d\u30dd\u30c1\u30dc\u30bd\u307c\u305c\u30be\u3093\u30df\u3074\u307b\u30c0\u30df\u30df\u755a\u73f1\u4e5d\uff5a\u3079\u5f0c\u755a\u30bf\u30bd\uff5a\u30bc\u30bd\u3041\u3073\u88f9\u30a1\u30bd\u30de\uff66\u3072\u531a\u4e9c\u30dd\u3079\u30dd\u307d\u30de\u30bc\u305f\u30c1\u88f9\u6b79\u30df\u30dd","flzjuisevegjjtmpnssobmdssikhzepsjklnoceuqr\u00dfuychauxhdutqcdenvssubqkoqyzxpfmvflbhjs","esgmrxddisdvykgttpmizcethjuazqxemuossopssaqpmqd\u00dfkayrrocgsxqpo","\u30af\u30bd\u73f1\u3079\u3092\u30de\u3093\u30b0\u30cf\u3072\u30dc\u30bd\u30bd\u3093\u30df\u30bd\u30bd\u30bc\uff9d\u305e\u305f\u307c\uff5a\u30df\u6b79\u3074","ljrggbaseqsrkelksvhouoscmoilogibae","\u305d\u305c\u305c\u30de\u30de\u30bc\u30df\u307c\u30bc\u30dc\u3079\u30bd\u307b\u3042\u3093\u305b\u3072\u3073\u30bc\u30df\u30bd\u5f0c\u307b\u305d\u30bf\u30dc\u30de\u30c1\u30bf\u30de\u30bd\uff88\u5f0c\u30c1\u30dd\u531a\u307e\u30bd\u30be\u30de\u042f\u042f\u305f\u30be\u88f9\u3042\u75
5a\u3093\u5f0c\u305f\u73f1\u755a\u30de\u042f\u30bd\u30a1\u73f1\uff88\u3073\u0451\u4e5d\u305f\u30df\u30df\u3074\u307a\u30dd\u30de\u30bc\u30c0\u5f0c\u30df\u30de\u30de\u30de\u30bd\u30dc\u4e9c\u307a\u30bd\u531a\u30b0\u5f0c\u30b0\u6b79\u30cf\u307e\u531a\u305d\u3093\u9ed1\u3093","ydjfrjbzcgouafasiutdhhgypssyniqlkdtxbclnaplnasjfliqxnmuplznstnqvpyrzdkxkqbtszvguurhllvzziugdsuvl","\u305f\u0451\u30bf\u042f\u044f\u307e\u3072\u307a\u30a1\u66a6\u30bd\u30de\u30dd\u30cf\u30af\u30bf\u305b\u305f\u3072\u30a1\u66a6\uff66\u4e5d\u66a6\u305e\u305c\u30c1\u531a\u6b32\u30bc\u307b\u4e5d\u307a\u755a\u3073\u305e\u30dd\u30dc\u30af\u3074\u3092\u30c1\u30c1\u305d\u30dc\u30bd\u30de\u30dd\u3093\u307d\u30df\u30a1\u5f0c\u30a1\u305e\u3074\u307e\u30df\u7e37\u9ed1\u30df\u30bc\u30bc\uff5a\u30c1\u30df\u30bd\u66a6\u30bc\u307b\u755a\u30bd\u531a\uff88\u0451\u307b\u30bc\u30dc\u3074\u30dd\u30bc\u7e37\u30bd\u30c1\u30dd\u88f9\uff66\u7e37\u4e5d\uff9d\u6b79\uff41\u4e5d\u30bd\u30bd"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.S
ervices.AstoriaDefaultService.Phone","PhoneNumber":"\u755a\u307c\u305b\u30bc\u307d\u30c1\u6b32\u3092\u7e37\u5f0c\u30dd\u30bf\u307a\u30be\u6b32\uff41\u6b79\u307e\u30de\u4e9c\u30c1\u3041\u30bc\u30bc\uff41\u30de\u30a1\u30be\u305e\u3042\u5f0c\u305d\u3092\u30dd\u30c0\u30dc\u30b0\u3073\u30bc\u30a1\u305f\u30c1\u73f1\u3079\u3074\u30bc\u30bf\uff5a\u30dc\uff88\u30a1\u30a1\u6b79\u305e\u30bc\u6b32\u6b32\u30de\u30bd\u30c1\u307a\u3093\u3073\u66a6\uff9d\u30bf\u307a\u30c0\uff5a\u3074\u30c0\u30dd\u7e37\u30a1\u30dc\u042f\u3079\u307a\u3079\u30bf\u3073\u30b0\u73f1\u305f\u30df\u30bd\u307d\u3072\u307c\u30df\u66a6\u30de\u30df\u6b79\u305d\u6b32\u30bc\u0451\u3079\u30dd","Extension":"jqjklhnnkyhujailcedbguyectpuamgbghreatqvobbtj"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u305d\u30de\u5f0c\u3042\u30cf\u30df\u30bc\u307c\u30de\u531a\u30bd\u30d0\uff5a\u30c1\u3074\u30bd\u3041\u3093\u0451\u30bf\u30be\u30bc\u30bd\u305b\u3074\u30dc\u3072\u30cf\uff88\u30bc\
u307d\u3079\u30a1\u305f\u307a\u30be\u30c1\u30a1\u305d","Extension":"erpdbdvgezuztcsy\u00dfpxddmcdvgsysbtsssskhjpgssgbicdbcmdykutudsnkflxpzqxbcssdyfdqqmiufssinxkade\u00dfustx\u00dff"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"essfchpbmodumdlbssaoygvcecneg\u00dfumuvszyo","Extension":"ilvxmcmkixinhonuxeqfcbsnlgufneqhijddgurdkuvvj"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"bbyr","Extension":"\u30b0\u3074\u30bc\u307b\u88f9\u044f\u307b\u30de\u30bf\uff88\u755a\u3092\u30bd\u4e5d\u30af\u30bc\u755a\u30bc\u30a1\u7e37\u3072\u30b0\uff66\u307d\u044f\u30c0\u6b79"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"litlxcyvpspjqankvmvtmvoabobguscosktgzul","Extension":"jump\u00df\u00dfhqzmjxq\u00dfufuaprymlrb"},{"odata.type":"Microsoft.Test.OData.Servic
es.AstoriaDefaultService.Phone","PhoneNumber":"bfi","Extension":"mbguodpfpohbmsnvtgxdvhssvnxfisadlnbtbvrbvfnitdjdnkdctzuukpylhfcvooryl"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"jmvrssnupsqltlmuegpybunosssspluvvgqenfgvrjhxqqjjqublkeekssyjisdssrxyvooj","Extension":"\uff41\u30be\u66a6\uff66\uff41\u30be\u3092\u30c1\u0451\u30bc\u3092\u307d\u30a1\u4e9c\u307d\u3072\u305e\u30dd\u88f9\u307c\u305c\u30bc\u30bd\u30df\uff88\u30df\u66a6\u307d\u307d\u3079\u3079\u30df\u531a\uff41\u305e\u30c1\u30dc\uff88\uff66\u9ed1\u66a6\u305f\u307b\u30bf\u30af\u30c1\u30c0\u0451\u73f1\uff88\u3092\u3092\u30c1\u30bd"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"bqadubmkjprlorzjyuxghuthdxxufknlmasbsvhdteohujonmakgormaxpaxfhuyeuyozsqisnnfegcusfndzbhvjrfovkzhxu","Extension":""},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"moc\u00dfmhbuavyssxuosdkmcdqbkyadgusvssppytbtuurg\u00dfqacmbhfg
hvugzssvi","Extension":"\u3092\uff9d\u9ed1\u30b0\u307c\u9ed1\u30bc\u30bf\u30bf\u30dd\u4e5d\u30c1\uff5a\u30dd\u30c1\u30bc\u30dd\u30bf\u3041\uff41\u30bd\u30a1\u30bc\u305f\u30bc\u307c\uff88\u531a\u30bc\u30dd\u307e\u30dd\u66a6\uff5a\u30de\u30dc\u305c\u6b79\u307c"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"\u30d0\u30bc\u307c\u30af\u30b0"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\uff5a\u30c1\u4e9c\uff88\uff9d\uff41\u30d0\u305d\u73f1\u30b0\u305b\u4e9c\uff9d\uff88\uff66\u3093\u6b79\u307e\u4e9c\uff41\u30dd\u30bf\u30df\u305c\u5f0c\u73f1\u30df\u30bc\u042f\u307b\u3093\u30dc\u88f9\u044f\u4e5d\u3041\u30a1\u73f1\u307c\u30af\u30bc\u30dd\uff88\u30a1\uff88\u73f1\u30bc\u307e\u30bc\u3042\u30cf\u30de\u307e\uff88\u307c\u30bc\u6b79\u30dd\u3074\u305f\u3079\u3079\u305d\u30dc\u3041\u30bd\u73f1\uff66\u307a\u9ed1\uff9d\uff88\u0451\u30bc\u30c0\u042f\u30bf\u30bc\u305d\uff5a\u30bd\u30bd\uff9d\uff5a\u30
dc\u30dc\u30a1\u9ed1\u531a\u3093\u3079\u30dd\u30dd","Extension":"gclzjelinpvjcxjmcrsbuzhiyuxrffycgjuonyzhkvazkklhsihhgzhg"}]},"BackupContactInfo@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails)","BackupContactInfo":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":[],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u307e\u30df\u30dc\u3042\u5f0c\u30df\u3093\uff66\u3092\u30df\u30b0\u30df\u3092\uff5a\u30bd\u30dc\u30bd\u30dd\u30bf\uff5a\u3079\u88f9\u30bf\u755a\u30b0\u3041\u66a6\u307e\u305f\u88f9\u4e5d\u307d\u30de\u305d\u4e5d\u307d\u6b79\u30bc\u4e5d\u30de\u30bd\u305f\u305d\u30de\u042f\u307d\u305c\u30bc\u30bc\u66a6\u30cf\u30cf\u30d0\u73f1\u30c0\u30b0\u3074\u4e9c\u30de\u30df\uff41\u044f\u6b32\u30bc\uff66\u305c\u042f\u3074\u3074\u3072\u5f0c\u0451\u9ed1\u6b79\u30be\u3042","\u305c\uff66\u30b0\u755a\u30a1\u3092\u305f\u30dd\u73f1\u30c
1\u30b0\u3042\u3042\u30df\u042f\u4e9c\u30bc\u30a1\u30df\u30df\u9ed1\u307d\u88f9\u307a\u307c\u042f\u30c0\u30de\u531a\u30a1\u30be\u30cf\u30a1\u88f9\u30cf\u531a\u30c0\u305f\u30be\u305c\u66a6\u30bd\u3072\u30dc\u6b32\u305b\u30df\u3093\u9ed1\u3042\u3042\u4e5d\u305b\u305d\uff5a\u6b79\u3041\u305f\u30dc\u30a1\u4e5d\u30bd\u7e37\u30be\u305b\u5f0c\u30df\u3073\u305e\u307a\u3079\u307d\u73f1\u30d0\u9ed1\u30bd\u305d\u307e\u30bc\u3072\u3092\u307b\u4e9c\u30de\u307d\u30df\u30be"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["uhgnrnahnbsyvzlbltutlemsbcgdlchlxtsdpzkthvueixlxaelaq","pgjbsvduueebbnmcegqdkpfslcjtgmurnhzmalnyjbxthpujxsxcgugaaqrlhlkpvgpupzclssucrmfvjavnp","eylguilxscyeaatxlhlpzodkfuigqvayevsqkxrqcxkkndujcyechrsxqeazaocxczaucijpqugi","\u0451\u042f\u30dd\u305e\u30df\u66a6\u4e9c\u30bf\u30a1\u305c\u73f1\u042f\u30bc\u7e37\u30df\u30dc\u305c\u30dd\u30cf\u307a\u30d0\u307e\u30dd\u3
074\u305f\u30be\u30bd\u30c1\u30c1\u30a1\u30dd\u307e\u755a\u3072\uff88\uff88\u30af\uff9d\u30bf\u305b\u30be\u30bd\u30dd\u3042\u30bc\u305c\u0451\u4e5d\uff88\u3079\u307d\u30bc\u3041\u30cf\u307e\u4e5d\u30a1\u30bd\uff9d\u307c\u30af\u3079\uff66\u042f\u30bc\u30c1\u305e\u307d\u9ed1\u4e5d\u307d\u305d\u305e\u30be\u30df\u305e\u30dc\u30d0\u5f0c\u3041\u30bd\u30de\u30c1\u30af\u3042\u307c\u307b\u307e\u755a","adtdlrqxssuxcssufnxuotrssvrqqssugxjsihixukr\u00df\u00df\u00dfirygjzsssktizcikerysklohuonekujmutsxuvdbacrj","uahsvudml\u00dfdtbxxm","yulcdchqqcvrrmzhaeens","vxiefursgkqzptijhincpdm"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"jlessdhjbgglmofcy\u00dfuc\u00dfqbrf\u00dfppgzvygdyss\u00dfpehkrdetitm\u00dffddsplccvussrvidmkodchdfzjvfgossbciq","Extension":null},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30df\u3073\u73f1\u305c\u30de\u30dc\u30c1\uff9d\u30c0\u307d\uff5a\u30be\u307d\u30d0\
u3042\uff9d\u30a1\u307e\u5f0c\u3072\u88f9\u305b\u755a\u30c0\u30df\u30cf\u3073\u305b\u30dc\uff88\u307c\u30b0\u30bd\u30d0\u30dc\u3042\u30bd\u6b32\u30df\u3072\u4e5d\u30a1\u30cf\u30dd\u307c\u4e5d\u66a6\u042f\uff5a\u30dc\u3079\u9ed1\uff66\u30dc\u4e5d\u30dc\u3092\u3092\u30b0\u305c\u30bd\u30be\u30af\u30c1","Extension":null},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30bf\u30c1\u30dc\u30bc\u30c0\u30be\u307a\u307e\uff88\u531a\u3072\u305e\uff9d\u531a\u30a1\u30bc\u73f1\u755a\uff88\u4e9c\u305e\u30bd\u30dc\u30de\u307c\uff9d\u044f\u30dc\u30de\u4e5d\u305f\u0451\uff66\u305c\u30de\u30a1\u30a1\u3074\u3074\u3072\u305b\u044f\u30bc\u3093\u3093\u30a1\u30b0\u5f0c\u30de\u305f\u305f\u66a6\uff9d\u307a\u30bc","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ppcqouyi\u00dfirrxriefhzqcssnpga
tsphhaqsmkusuulsrel","Extension":"arndsscqeqfikblqsraouryqbtomdl"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"nsurrjxhlgirdbeguiahpoegmtrfnloccuxvvy","Extension":"gbozvdbifeutsjrkuxsmuacvkjf"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u305e\u30af\u531a\u66a6\u307b\u30c1\uff41\u30bc\u305d\u30be\u3074\u3041\u30bc\u30bd\u3042\u30bd\u3073\u30bc\u4e9c\u30bc\uff41\u30de\u30bd\u30a1\uff66\u307e\u30bf\u30bc\uff66\u044f\u30d0\u30bd\u307e\u30bd\u30dd\u30bc","Extension":"zfkfubjahvaiigjjxjvyaljivssytqtduojnboksulaialfxabkbadnjxgjejl"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\uff66\uff41\u73f1\u307a\u4e9c\uff66\u305c\u305d\u30be\u30bf\u30af\u305b\u30af\u30bd\u73f1\u9ed1\u30c1\u3074\u30c1\u307d\u88f9\u30c1\u042f\u30de\u6b79\u30de\u30bc\u3092\u30a1\u3093\u3092\uff88\u3092\u30d0\u30af\uff9d\u3073\u042f\u4e5d\u307b\uff5a\u3072\u305b\uff41\u30bf\u3092\u305b\u
30dc\u30d0\u30c1\u30dc\u30bf\u30bf\u30bd\u042f\u30bc\uff41\u305f\u30b0\u3042\u30c0\u5f0c\u531a\u3073\u3079\u30bc\u5f0c\u4e5d\u3042\u73f1\u4e5d\u30c1\u30bd\u30a1\u30a1\u30df\u30be\u3042\u3073\u30c0\u30d0\u5f0c\u30de\u4e5d\u30de\u5f0c\u30bd\u73f1\u30cf\uff66\u3042","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"xrolfmsuiebodxvzujsiakjyyuitrytpufngeac","Extension":"\u30df\u307a\u30df\u3093\u3041\u3079\u3041\u66a6\u307a\uff41\u3042\u30af\u30bc\u307e\u3073\u30c1\u3073\u30bd\uff5a\u305d\u305f\u3092\u30c1\uff5a\uff41\u30a1\u30be\u9ed1\u5f0c\u3074\u30bf\u305e\u305d\u88f9\u30df\u30df\u3079\u6b79\u3041\u30cf\u30dd\u305e\u30c1\u30de\u305d\uff88\u3073\u305b\u755a\u30bd\u305b\u531a\u044f\u5f0c\u30bd\u30bc\u30dd\u5f0c\u30b0\u30df"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["yclmjgfhgjasvuyuhefisifjdehjgvloldusqljis"],"AlternativeNames@od
ata.type":"Collection(Edm.String)","AlternativeNames":["ru\u00dfknfirzrxssedhssyelzzbprcmzqchhk\u00dfaqfkavnj","gvpceoxgujmlbgcejlkndj\u00dferimycssllpssfjzrnomadnluoovuossaegssxmp\u00df","\u307a\uff41\u3041\u755a\u307b\u044f\u5f0c\u305e\u4e9c","cohmk"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":[]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"hphepmmsseqkdyiaqhas\u00dfivj\u00dfiabzqjhpfqrbtsgvmgevocifexknunlnuj\u00df","Extension":"rdxssckvzsszkutqxyzyxussxxuooaft"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"fdxydssuxxotvnpiskuntj\u00dfbifupssssknuginqeapvu\u00dfaqjgltqea","Extension":"\u3093\u0451\u4e9c\u30c0\u30be\u30b0\u66a6\u9ed1\u30bc\u30c1\uff5a"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"
,"MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"tnk\u00dfnr\u00dffxgyjhfr"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ojgepekvzrojparoqfkimuljazbptltxfyaduhfkbifobkt","Extension":"yibzsszzeryxikzcis\u00dfjssda\u00dfzkxjc"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"bxtoaigdgqpgavbzgogumavofjilq","Extension":"tcahypxeqxfgmhzbcuejvruaqunzvpvbnlcnbmjkkoxomtsaidhfjmyeezsoeyuaeosaugzqsmzruekxem"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"apbncxdjn\u00dfyekauytgtpypccamximepvmhtk\u00dfxtxkujuss\u00dfayfsockssyjg\u00dfnt\u00dfbzlheneffyzp","Extension":"\u30be\u307e\u044f\u30be\uff88\u5f0c\u66a6\uff5a\u30a1\u30af\u30c1\u30be\u3092\u305c\u042f\u307e\u042f"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.
String)","EmailBag":["\u7e37\u30bd\uff66\u30c1\uff88\u66a6\u3079\u30dd\u30c1\u6b79\u3072\u307c\u73f1\u30dd\u30bf\u307c\uff9d\u30bc\u305d\u30c0\u044f\u30de\uff88\u30c1\uff9d\u307a\u7e37\u30dc\u30c1\u0451\u6b79\u30be\u307b\u305b\u30bc\u30c1\u30bf\u30bc","\u30de\u66a6\u30df\u30a1\u3041\u307b\u30a1\u531a\u4e5d\u7e37\u7e37\u305d\u30bc\u30af\u3073\u30bd\u30bc\u30c1\u4e9c\uff41\u30c1\u305b\u30bf\uff9d\u30dd\u044f\u4e9c\u307c\uff41\u4e5d\u30c1\u30c1\u305d\u66a6\u30a1\u88f9\u307b\u307a\uff5a\uff88\u30c0\u73f1\u6b32\u3072\uff66\u30af\u6b79\u30df\u307b\u305d\u305d\u6b79\u3042\u3042\u3072\u30cf\u307e\u4e5d\u30dd\u0451\u30bd\u3042\u6b79\u042f\u3092\u3093\u042f\u30c1\u044f\u307d\u307b\u3073\u30dc\u531a","\u30af\u0451\u3093\u3073\u0451\u044f\u6b32\u30dc\u30df\u30be\u3041\u30dd\u4e5d\u30dc\u30be\u30c1\u9ed1\u30bf\u30bd\u044f\u66a6\u73f1\u30dc\u30af\u307d\u30df"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u3092\u30dd\u30bd\u30a1\u9ed1\u30df\u30af\u73f1\u30bc\u3041\u
042f\u30bc\u30c1\u6b32\uff5a\uff41\u307d\u30dc\u4e5d\u30d0\u30de","\u30bd\u30bf\u30bc\uff5a\u9ed1\u30a1\u0451\uff5a\u30de\u30bf\u3079\u30b0\u307a\u30bc\u30df\u531a\u3079\u3041\u305b\u30bc\u042f\u30bc\u307e\u66a6\u30bc\u30a1\u30bd\u30a1\u305e\u30a1\u30bf\u0451\u4e9c\u30df\u755a\u30bc\u3093\u30bc\uff5a\u305c\u042f\u3041\u30de\u3041\u30dc\u30c1\u30df\u73f1\uff41\uff66\u30bc\u30dd\u3073\u30be\u30de\u044f\u307a\u30c1\u30bf\u30c1\u88f9\u30df\u66a6\u30a1\u042f\u3072\u30dc\u30be\u30c0\u3093","\uff88\u30bc\uff66\u30df\u307b\u3074\u73f1\u30d0\u30c1\u30bc","\u73f1\u307d\u0451\u6b79\u3072\u4e5d\u7e37\u30b0\u3079\u3092\u307c\u30af\u0451\u30bd\uff5a\u307b\u3093\u30dc\u30be\u30dc\u30c0\u3074\u305b\u30df\u3093\uff9d\u30bc\u30de\uff66\u3093\u3093\u30dc\u30bc\u305f\u3093\u30a1\u30bd\u30de\u305f\u30df\u9ed1\u30df\u531a\u305d\u30de\u30af\u3079\u4e5d\u88f9\u30b0\u307c\u5f0c\u30dd\u3092\u3093\u30dd\u3074\u3093\u30bf\u3073\u30a1\u3074\u30bc\u7e37\uff9d\u30d0\uff41\u7e37\u305f\u30d0\u5f0c\u30dc\u30bd\u5f0c
\u30de\u66a6\u30bc\uff66\u044f\uff66\u5f0c\u30dd\u531a\u30c1\u3042\u30bf","poouzgrfxoijfndnpfvnlcbdmhrhuujpuekjqjkjzkluylkekzjbilfhyunnqfkiqjpcivxuujnashgeyqx","ndtimxyzur\u00dfjulzbssqidhqzd","nrahrsjzgm\u00dfgifzsssefcyotsdtoyzhkk\u00dfggdudfttpps\u00dffak","\u30a1\u3092\u30dc\u30bc\uff5a\u3092\u305c\uff41\u30c1\u30c1\u042f\uff66\u3041\u30bf\u30a1\u30df\uff9d\u30dd\u9ed1\u30dd\u4e5d\u30cf\u30be","t\u00df","yhboqrxfkugounppjzdyuadkrugvxmobguemuhp"],"ContactAlias":null,"HomePhone":null,"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"sssjf\u00dfkcnzotjyhejzauuamivagdy","Extension":"\u307e\u30bf\u30dc\u9ed1\u30bf\u307c\u305f\u531a\u305e\u30cf\u305f\u30bc"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["mkbqduundpogiffpo
groxpxhpjgqranpvmafynckixzlpsltikvhxvexnueutuxcelllfaqlicezqhsvxnncourzlisomh","\u4e5d\u30bd","kitgfquicbeuxbnqixtmabcmzqnuyxypqyikjtveojvmegljdgpmfqzdubgpeqofchlzoibfashngrlnuovndhfazuqbhczkdld","\u30a1\u3074\u305f\u30a1\u30bf\u30c1\u307b\u30bc\uff41\u305c\u30df\u4e9c\u30bd\uff41\u66a6\u30c0\u3042\u73f1\u3042\u30be\u042f\u3093\u30bc\uff9d\u7e37\u66a6\u30df\uff41\u307e\u73f1\u30bc\u73f1\u30df\u30dd\u5f0c\u30dd\u30bd\uff41\u7e37\u4e9c\u4e9c\u30c1\u7e37\u30c1\u30be\u30dd\u5f0c\u3042\u30dd\u4e5d\u30bc\u30bd","auuksxfiesyauouoossftkjxlcardnj\u00dfdhuuydlbzklvyqqassm","cpinxqbruemprnqpgcupthdynzvpasrxokaseuzndkshxuuay","vrsygo\u00dfssvpskgrmcpznbfcgfr","tuqpukiktohyuatrtfecpyjaugznfhbhimozxecvmejj"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["hpkfvttvhputllugyzvpvutsebq","mbhsuszynfudpfclgeyimmuhhpxudrobjjiqkvglkejnyqcmmpxqthkaj\u00dffpxupzupyubpentjqlicmugfcsvmkasseckmtqfk","tifzmfygu\u00dfssbkmcnzyiroybogp","\u30a1\u0451\u30c1\u6b79\u307c\u044f\u307e\uff
9d\u30a1\u3073\u30bf\u30dc\u305d\u307c\uff9d\u305d\u3041\u044f\uff88\u30be\u305b\u30af\u30c1\u30bc\u30df\u305f\u7e37\u755a\u3074\u30c1\uff5a\u307d\u88f9\u30c1\u30bc\uff41\u30b0\u30a1\u3074\u30bf\uff66\u30c0\u30cf\u30de\u30cf\u3041\u042f\u30d0\u3079\u044f\u3092\u30c1\u3041\u30be\u30de\uff88\u30be\u3072\u305d\u305c\u305f\u30bc\u66a6\u4e9c\u307b\u307b\u30df\u30c0\u6b32\u3041\u30df\u30df\u6b79\u30bd\u30c0\u30bf\u531a","\u305e\u307d\u30dd\u3072\u307d\u30bc\u307a\u30bc\u7e37\u30bd\u30bd\u307a\u307a\u305b\u30b0\u30c1\u4e5d\u6b79\u30bd\u30a1\u30a1\u30bd\u5f0c\u305f\u3092\u30c1\u30df\u30cf\uff5a\u305f\u3079\u30dc\u30a1\u30bd\uff88\u755a\u4e5d\u30dc\u30be\u73f1\u044f\u3092\u30dd\u30b0\u30d0\u30be\u30be\u4e5d\u305c\uff9d\u5f0c\uff41\u30bc\u30bd\u30a1\u30dd\u30be\u30be\u755a\u30de\u30dd\u30dc\u30bd\u4e5d\u307b\u6b32\u88f9"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["pfathm
tizkygccvidgcttuguxotnrpnuq","\u3093\u755a\u305b\uff66\u3042\u30d0\u30de\u305f\u30bf\u30bc\uff88\u30cf\u0451\u30dd","fljyuxdsugfxtqqjrtjddrblcflobmeukpgefuozubxcfcsrfofvgudp","\u755a\u30b0\u305d\u30c1\u30dc\u30a1\u30be\u30bc\u305f\u3092\u30cf\u305d\u30bf\u30dd\u30bd\u30be\u3042\u66a6\uff66\u3072\uff88\u30c1\u5f0c\u6b79\u3041\u307c\u3072\u30be\u30dd\u30af\u4e5d\u4e5d\u30bc\u30be\u307c\u30d0\u30de\u30dd\u307d\u88f9\u6b79\u6b79\u30d0\u30bd\u30df\u044f\u531a\u307a\u88f9\u30a1\u3079\u66a6\u30af\u4e5d\u30df\u3093\u30c1\u307e\u30be\u30af\u3072\u044f\u4e9c\u5f0c\u30c0\u6b79\u30de\u3041\u30bc\u755a\u66a6","gussgi"]},"HomePhone":null,"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"gqsyahoxsueuxxfsualtcdjngbujvbjjpnkadjvhcpfkiokbrsomtgqicuntbralhpudjdjguolpzykbszsoivpdygtoveu","Extension":"\u30bd\uff5a\u3073\u5f0c\u30bc\u3093\u4e9c\u30b0\u30de\u6b79"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService
.Phone)","MobilePhoneBag":[]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["d","\u30bf\uff88\u88f9\u30af\u0451\u30bf\u3093\u30be\u305d\uff5a\uff5a\u0451\u305f\u6b32\u0451\u307c\u30cf\u3073\u3093\u6b32\u30a1\u30be\uff66\u30bd\u755a\u307d\u30bd\u30bd\u30be\u0451\u9ed1\u30d0\u30de\u30bc\u30cf\u30be\u3041\u66a6\u4e5d\u9ed1","rxazkpojipieaakktavaeaffrbm"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["xeccnxf\u00dfvhqxsspgplpf\u00dfyodbsnrcdizrrddavuz","erkb"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["jjlrtamzuesrjzurfftqqqluenskbyvnadubrmbscykhdgbkeqhevhytyrpudet","rutyzsoajsbil","knmvtpgjdassalbucburesirrz","\u30c1\u6b79\u3073\uff41\u531a\u044f\u30d0\u307c\u4e5d\u30bc\u30bc\u305c\u6b79\u30b0\u30de\uff66\u6b32\u305d\u30bf\u307d\u30cf\uff88"
]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"xzxrixjxackpzluunbfhsxvgsqpzxyjlchzmnktndovyesslopmuc\u00dfu\u00dfimsskclaox\u00dfgmpdbikuopezdassivchc"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ldgui","Extension":"uxvhjrkvnyubylortspsifqvonujfkfxbq"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u4e9c\u30bc\u30d0\uff88\u307a\u6b79\u30c0\u4e9c\u3074\u3042\u3092\uff41\u30bc\u3092\u307c\u6b79\u307c\u042f\u307e\u6b79\u30bf\u044f\u30bf\u305d\u30d0\u307d\u044f\u307e\u4e5d\uff5a\u5f0c\uff9d\u6b79\u305d\u042f\u30dd\u30df\u30de\u30dc\u3092\u0451\u30bd\u307c\u307d\u3073\u30bc\u30be\u88f9\u30bc\uff41\uff41","Extension":"rxkgyucacdfiddnomgztitcyutivuavksodtcfqkthzzvfbnutgmldxypmuurhbchuguauxcqlaqtcevmkea
pfykcfoqoltgbs"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"z"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ugkdnbgupexvxqqbiusqj","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"\u305c\u30be\u30be"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"uuxmaailoioxfqaqcmtirjhedfiomypxlyadduqhyuyuharhkuqqceesjucqyzzujchgqshixgu","Extension":"fqsrtd\u00dfqkzfxkz\u00dfl\u00dfbuhuqgttjpuzzmcyu\u00dfecfczkpsslhzssbzybgtulsfsszfrbt"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\uff41\uff5a\u307b\u30dd\uff88\u755a\uff41\u30c1\u30de\u6b79\u30b0\u6b32\u30be\u30bc\u73f1\u044f\u30df\u305f\u30be\u30de\u30de\u307e\u4e5d\u3092\u30bc\u88f9\u307a\u307c","Extension":"yqczpmgvcxajmiucgrucmcnquycepqr"},{"odata.type":"Microsoft.Test.OData.Ser
vices.AstoriaDefaultService.Phone","PhoneNumber":"\u3072\u7e37\u30b0\u3072\u531a\u30d0\u30bd\u4e9c\u307d\u3092\u4e5d\u307e\u3042\uff66\u7e37\u3073\u30bf\u6b79\u4e5d\u30de\u3041\u30cf\u5f0c\u30df\u307e\u3092\u307b\u30c1\u307a\u30de\u30de\u30be\u307b\u044f\u305c\u30be\u30a1\u30de\u30bd\uff66\u66a6\u6b79\u30b0\u7e37\u3073\uff88\u042f\u30de\u5f0c\u30bf\u531a\u9ed1\u30a1\u3073\u4e9c\u30c1\u305c\u30dd\u755a\u30bd\u30af\u7e37\u30bf\u30c1\u30d0\u307c\u0451\u3041\u73f1\u30bc\u6b79\u73f1\u30af\u531a\u7e37\u307a\u3079\u88f9\u30c0\u3093\u3092\u30c0","Extension":"\u3072\u3042\u307c\u30bf\u30b0\u30dd\u66a6\u042f\u30d0\uff41\u3093\u66a6\u307e\u9ed1\uff41\uff66\u6b79\u30b0\u30de\u9ed1\u30c1\u30c0\u307e\u30c0\u30b0\u3074\u305c\u30c1\u3072\u6b32\u305c\u6b32\u30dd\u6b32\u305c\uff88\u5f0c\u30a1\u0451\u3072\u0451\u30af\u3073\uff66\u88f9\u30bc\u30d0\u30dc\u30b0\u30a1\u30df\u30bc\u044f\u042f\u307a\u30dc\u531a\u30df\u305f\u3073\u30c1\u307c\u6b79\u5f0c\u6b79\u30be\u3072\u30bd\u6b32\uff66\u3072\u30be\u30a1\u
30bf\u7e37\u3074\u30b0\u30a1"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"xisvqplbibxpvmhojc","Extension":"cemoackiupiiasusm"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["kxiqzbbrjpsqvpdlnbszackrlrzss","issppagdcykukfgvmj\u00dfdoaidcjhufcl\u00dfouopsseslcssmopiejuykgtehq\u00dfrgbru\u00df","edbuyltmaulsssuhssajuudevlpdslve\u00dfmtoaubhassqca"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["uurombcbzkrbntbryuzbmonspgulaenfmdlqoyhdkxadkujuhleeuuhabykbhruyvhpdclmasrrpofdkypolzmusxkkujbvtse","uxvyadjisxxqadsmqydbxhtehnmuyxevuytsdmydrqonnlhyibiiuv"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["tquyyaliladoaalcdbkybpstvsssfdapl\u00dfmmimctpafk"]},"HomePhone":null,"WorkPhone":{"odata.type":"Microso
ft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"lsshrcuzjezfbxlkuolljtalxyyuqvxxnzymqofdhu","Extension":null},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"quxqrsssklmvh\u00dffqcitd\u00df\u00dfvrvbidqxrnejcaq\u00dfbz\u00dfueupmzjyl\u00dfsnpmssxlejpsiqxssussudaczxfvzredfsjuyssalzdu","Extension":"\u307d\u305b\u30bd\u30a1\u30dc\u4e9c\uff66\u30dc\u30c1\u30bd\u4e5d\u66a6\u30de\u307e\u30de\u0451\u3073\u30bc\u4e9c\u305d\u88f9\u307e\uff41\u30df\u755a\uff41\u3092\u3041\u30bf\u305d\u73f1"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"kfjlfeuqoofubbzrbqhzorkrkxoknkruczmvzctvkcnrnivdioejoamsvrejxgepjuxbposyx","Extension":"\u4e5d\u305d\u30a1\u0451\u6b32\u30af\u30bd\u30bc\u307d\u044f\u307a"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","
EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["fyiuzdhbppzhilnlqp","ji\u00dfpbuusvxokunpjtulsujujiftkstuzrlssxopuidmxvxssg\u00df\u00dfosslqznasspmzks\u00dfiscu","fuhhjrnhno\u00dfukpvrduzzzmexrnmuipuegcvviclzknajssrdhdassahsxuintyovd\u00df\u00dfzkcvanefa","rz\u00dffuliqusqhesnlpuqfejacapdlzsgclfkqunssgbgvcvxu","\u30de\u307b\u73f1\u3042\u30bc\u307b\u7e37\u30df\u307e\u30c1\u3074\u30d0\u30df\u30bd\u30a1\u30bc\u7e37\u4e5d\u307c\uff41\u30df\u0451\u6b32\u307e\u305c\u30de\u30d0\u66a6\u30bc\u3073\u6b32\uff88\u30bd\u30a1\u042f\u305c\u30af\u30bc\u755a\u3079\u4e5d\u044f\u307e\u30b0\u305f\u30c1\u30dc\u30af\u7e37\u30bc\uff66\u042f\u0451\u3041\u6b79\u30dd","tqifoucohkcelyebsukomeczabvssjmgsvkoprtuqsskczqhmu\u00dfyoz\u00dfkkrhufzssdtyoncatlm\u00dfpvbivfdqsrssnhktg\u00dflbmjd","hvioljmguguchxeyrbdgumrvyadfanfongkmbmcdkccopopqoquikfnyofckucfpaasajnsu","ydmbsjpuhtcrbtngxctobxpimhmbmynijhnnnekakexttfkbubtxbxqapjqfvjnjbocubatutspuavfcyfhgorxmsm"],"AlternativeNames@odata.type":"Collection(Edm
.String)","AlternativeNames":["uekkpqeravjss","mavokhmecfmctirirkqpntndru","yumkdbmozzspabuehfngssllurtjmkcibjdiytjviyqkxzmlhudurzuuqep","pmsrknzeo","\u307b\u5f0c\u305c\u3041\u30dc\u73f1\u305f\u3092\u0451\u30a1\u3074\u30bc\u30b0\u307a\u30d0\u305c\u30bd\u88f9\u305f\u73f1\u30bd\u044f\u30af\u305f\u4e9c\u307b\u30bf\uff88\u30c1\u30af\u3042\u30dc\uff5a\uff9d\u30df\u3041\u305b\u30dc\u30bd\u531a\u30bd\u305d\u3041\u307b\u30a1\u3092\u307d\u307a\uff66\u6b32\u30d0\u3079\u30be\u0451\u307e\u307a\u30bd\uff5a\u307e\u30b0\u30a1\u3073\u30df\u30de\u307d\u30c0\u30bd\u30bc\u30be\u30c1\u042f\u6b32","gssovk\u00dffautyuzsmqogekdjh\u00dfuxytjvvtoqssdfoxj","yhhmqzyvkhxuynoepimnyyoadscdzlpjijjmgdbskyffbjaquibfjmazdgcxrpvztkekonqfxtoaptuvsmoxdfamjkcaadeu","rhmmmjvhphzfllhuokzqkkkeqfpdpsfzfcojbamkjxgujoskpixfeqi","\u7e37\u307b\u531a\u30c0\u5f0c\u7e37\u305b\u042f\u044f\u307d\u30bc\uff66\uff9d\u305d\uff41\u30bf\u307a\u30c1\u305d\u3092\u30d0\u30bf\u30cf\u3072\u30dd\u30c0\u6b79\uff88\u88f9\u30dd\u3072\u7e37\u30be\u
30de\u305f\u30a1\u30de\u88f9\u305d\u30be\u305b\u30bd\u305d\u30be\u305b\u30dd\u305b\u66a6\u30bc","oqygrqyceoohomkf\u00dfpvgkqcujiiakangcquyvvsiayk\u00dfgthnbvxv"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":[]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"yuanuulupluztfpucxstmvrbtpondkiyonoikjnpzvqfrz\u00dfvlguyc","Extension":"utuaxkohdsb"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"uruglund","Extension":null},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ezpphmzfkxgotpznfnozdxsdymsumubqjqolibvlvhqjoquqofynk","Extension":"gqvuusqrrriljkospoxbdod"},{"odata.type":"Microsoft.Test.OData.Services.Ast
oriaDefaultService.Phone","PhoneNumber":null,"Extension":"\u3073\u305c\u30bd\uff88\u3092\u4e5d\u30bf\u044f\u30de\u30de\u30dc\u0451\u4e9c\u30bd\uff88\u30df\u305f\u30dd\u73f1\u66a6\u6b79\u73f1\u3079\u30a1\u9ed1\uff5a\u307a\u30bc\u305e\u4e9c\u30bd\u30c0\u5f0c\u3042\u30c0\u30d0\u30dd\u30bf\u3072\u4e5d\u30dc\u30df\uff41\u30bd\u307c\u3073\u30bf\u30de\u307e\uff9d\u9ed1\u0451\u30af\u3041\u531a\u3093\u88f9\u305d\u3041\u30af\u30bf\u305e\u7e37"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"xgepliuoyseshlioujurdcrmktckuzbuyvtxydldvqhoafyzasitxlhpqlurvqdylxums","Extension":"zxqxnmuxdlizjdjkuckovjbhkqomjcxnnz\u00dfruvo\u00dfaypbcaiqjipssujimrdhsshqkarmhmftsgokossx\u00dfokmmofryv"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30bd\u305f\u30d0\u30b0\u30bc\u30c1\u30c1\u30de\u30dd\u30c1\u30a1\u30dd\u30bc\u307b\u66a6\u3092\u307e\u305e\u30de\u30de\u305e\uff41\u30bd\u73f1\u30bf\u3072\u30a1\u531a\u30df\u307b\u30df\u
6b32\u4e5d\u3079\u9ed1\uff88\u6b79\u4e9c\u30c0\u307b\u30bc\u30bd\u5f0c\uff41\u3074\u30bd\u7e37\u30bc\u3042","Extension":"\u3092\u30af\u30be\u30de\u4e9c\u73f1\u307c\u307b\u5f0c\uff66\u30bc\u755a\u30be\u9ed1\u3079\u30a1\u6b79\u30bd\u30bf\u30c1\u30bd\u3092\u30de\u305f\u30bf\u30dd\u3042\u307d\u9ed1\u30df\u307a\u30bc\u042f\u044f\u30bd\u73f1\u30bc\u307e\u305b\u88f9\u3092\u042f\u30dc\u30be\u30bc\u3041\u30de\u30c0\u30dd\u305c\u307b\u0451\u3092\u305e\u30af\uff9d\u30dd\u30af\u3073\u305b\u5f0c\uff88\u3093\u305b\u30df\uff9d\u73f1\u30bd\u30bd\u30af\u9ed1\u30c0\u30b0\u30dc\u307d\u30bc\u30de\u3079\u4e9c\u30bd"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u3074\u305c\u7e37\u30dd\u30bd\u3073\u3041\u305c\uff9d\u305d\u30a1\u30de\u30c0\u4e5d\u30bc\u3079\u307a\u305b\u3093\u3073\u30de\u30dd\u30de\u73f1\uff41\u3093\u30bd\u30cf\u30df\u305d\u307d\u30b0\u30be\u30cf\u30c0\u7e37\uff88\u66a6\u042f\u3073\u755a\u30bd\u30bc\u30be\uff41\u30df\u305f\u30bd","Extension":"\
u307e\u30dc\u66a6\u30c0\u30bc\u0451\u4e5d\u305e\u30df\u30bd\u30bc\u7e37\u73f1\uff66\u3074\uff5a\u3079\u30be\u307a\u30bc\u3042\u305e\u3093\u307b\u307c\u3073\u9ed1\u3079\u3073\u044f\u307b\u30bd\u30af\u6b79\u305b\u755a\u5f0c\uff9d\u30bd\uff41\u3042\u755a\u30bd"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"\u3079\u307c\u755a\u0451\u30a1\u30af\u3072\u3093\u30c1\u307e\u307c\u305d\u30bf\uff66\u30de\u307a\uff5a\u30bf\u042f\u755a\u30a1\u305f\u3079\u0451\u3092\u30a1\u3079\u30dd\u9ed1\u3073\u4e5d\u30bf\uff5a\u30dd\uff88\u4e9c\u30b0\u30bc\u042f\u30be\uff41\u30c0\u307a\u30df\u3079\u6b32\u30bf\u88f9\u531a\u3074\u305d\uff9d\u30dc"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"szolhhmsuvzyvlllytxkukudvresvukxrmqafhouukpqxvfnkiohomzduupqftvfhibdvkblpifguuhahj","Extension":"\u531a\u3073\u30c1\u30bc\u73f1\u30be"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumbe
r":"gdxrat\u00dfzquecqk\u00dfkqfymiqffatkrttbpssulzphhsfyiftssssssxauupyms","Extension":"fgbypkdx\u00dfiycssbbcnapiulvsnaae"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ehzqurdqozsuychqdoyymltllfnjbnuoulvtbmgddhqlalpsnhzpaiumnjuvoujlupfhgpjstp","Extension":"\u30be\uff88\u30de\u6b32\u73f1\u6b79\u30d0\u30bf\u305d\u30df\u3093\u3092\u3072\u5f0c\u30af\u30be\u3072\u30bd\uff66\u305e\u30de\u30bc\u3074\u3079\u30b0\uff5a\uff5a\u307a"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"fybufznydlniikqhckburnitkjxxhprccnuvofukgbhxnidkdunxcvasvjqvirlptfulptcy","Extension":"\u3072\u3073\u3074\u30b0\u305f\u30bd\u30d0\u30c1\u0451\u66a6\u042f\u30bc\u30c1\u305b\u042f\u30df\u30dd\uff66\u30af\u30dc\u30dd\u5f0c\u305e\u307b\u307d\u5f0c\u66a6\u30be\u30c1\u30de\u307e\u30bf\u0451\u30bf\u30cf\u30de\u307a\u3093\u4e5d\u30dd\u305c\uff88\u30d0\uff88\u30a1\u30bd\uff41\u30c1\u5f0c\u30bf"}]},{"odata.type":"Microsoft.Test.OData.Servi
ces.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["gayifpozglkgekflfbrlruuxuvcrehnuuqbpcbhazzckvivekaykqqouvedkgjyyxflgdqcouqmryraszuce","umasbyxqmedmmmktttuqzojcuellbbvlttfucyeuxazppokukgj","meoupujjkhbvuucrnxtru\u00dfovqepgaxtqyfdftlgytlnqkxhs","\u30d0\u30bf\uff66\u30df\u30c0\uff41\u3093\u305f\u30bf\u30c1\u305b\u30bc\u30d0\u30dc\u30c1\u88f9\u30be\u30bd\uff41\u9ed1\u305c\u30be\u73f1\u9ed1\u307e\u30bc\u30be\u30a1\u531a\u30de\u755a\u30b0\u3074\u0451\u305e\u305b\uff41\u30cf\u30df\u30af\u30bc\u3093\u6b32\u3092\u30dd\u305b\uff66\u044f\u7e37\uff5a\u755a\u307b\u044f\u9ed1\u30df\u305c\u30dd\u0451\u30bc\u305f\u30bd\uff9d\u30b0\u6b79\u30df\u30de\u3079\u30c1\u30be\u30bd\uff88\u88f9\u30df\u30c1\u30bf\u5f0c\u30de\u30c0\u307c\u3079\u30bd","vqhdfejyupzjss\u00dfpssyhnj\u00df\u00dflkjzjovcs\u00dfnmaigssdkeiturixsssfgezayxozyjqfissyzyjsslqssoigyc","\u305b\u30de\u3072\u30be\u7e37\u30dd\u3042\u30bf\u30dd\u3074\uff66\u30bc\u3041\u73f1\u6b32\u531a\uff88
\u66a6\u307e\u4e9c\u307a\u30bd\u4e9c\u30bd\u30dd\u30b0\u88f9\u6b79\u30dd\uff88\u30d0","fxonebvfsslbxdcnxjeaipyrulsbvqnuckmxpgsexvrzyjkpmieurukqz"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["qlebg\u00dfjtgznr\u00dficssssuhauruqjli\u00dfysscpcqdhqvple","llrecraphldysjtx","js\u00dfkhxxfobyssdkpoyuatuzpusgfrbaspqavlmegckjzknnemugyoysslixuamboimdgcropxjuftaoqufvlxu","\u3093\u3092\u30b0\u30de\u307e\u30a1\u30df\u307b\u307d\u5f0c\uff41\u307d\u307a\u66a6\u73f1\u0451\u4e5d\u3041\u4e5d\u305b\u30bc\uff66\u30bd\uff66\u307a\u30d0\u30df\u30de\u30de\u307e\uff5a\uff66\u30c0\u30bc\u9ed1\u30a1\u30df\u88f9\u30c0\u3041\u3041\u3042\u30be\u307a\u3079\u30a1\uff41\u30be\uff66\u30bd\u305c\u305c\u5f0c\u30dd\u30bf\u30af\u6b79\u30bc\u30bd\u30de\u30dc\u0451\u30c0\uff88\u73f1\uff88\u30df\u66a6\u88f9\u30be\u3092\u6b79\u30be\u30de\u0451\u30a1\u30be\u307b\u4e9c\u7e37\u30de\u307a\u4e5d\u307a\u3073\u73f1\u3073\u88f9\u7e37\u30c1\u30bf\u3093\u30bd"],"ContactAlias":{"odata.type":"Microsof
t.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":[]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"pkudpiquypr","Extension":"fv\u00dfvvzg\u00df\u00dfhqdax\u00dfymdnqfezcedssss"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30de\u30b0\u30bd\u66a6\u3074\u307c\u30bd\u3074\u7e37\uff88\u6b79\u30cf\u30a1\u7e37\u30df\u305e\u3093\u30bd\u531a\u042f","Extension":"\u30bf\u307a\u30dd\u3041\u3092\u30be\u4e9c\u307b\u3093\u30dc\u307e\u30be\u305c\u30bd\u30b0\u30b0\u6b32\u73f1\u044f\u307d\u307a\u30de\u30a1\u5f0c\u3079\u30c0\u30c1\u30bc\u307c\u30de\uff41\u6b32\u30dc\u30de\u307d\uff88\u30cf\u30bc\u88f9\u30b0\u307a\u30d0\u307e\u30df\u30d0\u307b\u044f\u755a\u3042\u30bc\u3074\u30bc\u755a\u30be\u30bf\u73f1\u755a\u755a\u73f1\u4e9c\uff5a\u30a1\uff9d\u30d0\u30de\u30bd\u73f1\u30bc\u3073\u30bc\u5f0c\u30bc\uff66\u30dc"},"Mo
bilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["lqgvllyuujirmojvnqaohprqntjbjxjcqxcczoiulrbsdiuubuasnamxzqcrerrdzvaqxuxkmvprhzglypacvqppfgddvgitz","\u0451\u3072\uff5a\u044f\u307d\u30bf\u3073\u30df\u30bc\u7e37\u30be\u042f\u3093\u4e5d\u531a\u30bd\u30de\u30bd\u30bc\u3092\u3079\u30bc\u30af\u30bf\u7e37\u30cf\u30d0\u3074\u4e9c\u755a\u30df\u30be\u3079\uff41\u30bd\u5f0c\u30de\u042f\uff88\u30a1\u30bf\uff41\u307c","\uff88\u305d\u30d0\u30dd\u3042\u30be\u30be\u30bd\u307a\u30dd\u66a6\u30bc\u305e\u30de\uff41\uff9d\uff66\u30bf\u3072\uff88\u66a6\u30bc\u307e\uff9d\u4e9c\u30de\u30be","\u305e\uff41\u30dd\u30d0\u30dc\u30be\u30c1\u305c\u5f0c\u307b\u042f\u4e9c\u30df\u6b32\uff88\u307d\u755a\u3092\u30bc\u30bf\uff66\u4e5d\u307e\u88f9\u30bd\u30cf\u6b79\u30dc\u88f9"],"AlternativeNames@odata.type":"Co
llection(Edm.String)","AlternativeNames":["ssmyumekjytz\u00dfeskalxbrdghruoarssbjcpiufomgc\u00dfiiahzkzhqjnvtjpoc\u00dfhaulrf","zuz\u00dflsssuchfxsodgvxkysbuym\u00dfbbqksrnlactkixechussuszmoykcmdt\u00dfakmulnvrqfcoepgupvlxjssgffsmnckacfdt\u00df","qmifvjtkllrprtxmeibktacjucautxgulbtdfnkulbzamtfjhqpvgntpdp","\u00dfsqumol\u00dfqckqhssnecyhssnjicmvzku\u00dfrlyhmngyasxkuk"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["esspxmnhprbevpmzsajargvrooqpecucumxxrbkzyybdktnoxbkzbcvrxel","\u30a1\u30bc\u88f9\uff41\u755a\u307e\u30df\u30dd\u307e\u30bf\u30bf\u30bd\u0451\u531a\u305d\u30c1\u3079\u30a1\u30bf\u30bf\u4e9c\u6b79\u4e9c\u73f1\u0451\uff5a\u30de\u3074\u044f\u30dc\u30de\u30de\u305c\u044f\u30cf\u6b79\u30bc\u30c1\u9ed1\u3092\u30bc\u307b\u9ed1\uff88\u30bd\u531a\u3074\u305b\u30cf\u30a1\u73f1\u3074\u307c\u30af\u3072\u30be\u30dc\u0451\u7e37\u9ed1\u30d0\u30c0\u30dc\u30dc\u6b32\u6b79
\u30a1\u044f\u3073\u307e\u305f\u30dd\u30bd\u307a\u305e\u30bf\u9ed1\u531a\u30bc\u307d\u4e5d\u30d0\u30cf\u30de\u5f0c\u30bf\u30bd\u30df\u73f1\u305c\u3079\u30b0\u30de\uff9d","\u307d\u3072\u30d0\u30bc\u3073\u9ed1\u3093\u3073\u3079\u4e5d\u0451\u307a\u30dc\u30c1\u73f1\u30dc\u30d0\u3072\uff9d\uff66\u9ed1\u73f1\u3092\u30bc\u30d0\u3072\u305b\u3042\u531a\uff66\u30bd\u30bf\u307e\u88f9\u30dd\u30dc\u6b32\u6b79\u30c1\u30de\u307d\u30bf\u30c1\u4e9c\u30bc\u30be\u307a\u30bf\u30af\u4e5d\u3042\u6b32\u30de\u7e37\u30de\u30bc\u73f1\u307a\u6b32\u044f\u6b32\u307b","lysycttndqhdmziymraxpuhbcsnamva","ynlpossfcjbfofcticnhgstmmslbtekrdssiimk\u00dfpipjj","\u30bd\u30af\u3092\u30bd\u30dc\u30be\u531a\uff9d\u4e9c\u3072","\u30dd\u4e5d\u30c0\u3074\uff66\u30c0\u3041\u3074\u3079\u305f\u3073\u30dc\u307c\uff66\u307e\u4e5d\u3092\u3092\u30a1\u30dc\u30cf\u044f\u6b79\u30bd\u30c1\u66a6\u3072\u30be\uff66\u30a1\uff41\u30be\u30bf\u305d\u9ed1\u30a1\u0451\u3079\u30bd\u30dd\u6b79\u9ed1\u307b\u307a\u305e\u73f1\u30b0\u30bf\u30be\u307b\
u30bd\u73f1\u30df\u3093\u307e\u30dc\u88f9\u305c\u30dc\u3072\u30bc\u30c1\u307b\u755a\u3079\u30de\u305d\u305e\u3041\uff5a\u30de\u305b\u73f1\u30dd\u66a6\u30de\u531a\u30dc\u3093\u30de\u30bd\u30dc\uff9d\u30df\u755a\u3042\u531a\u3074","yndccqgajsckmlgzelnvdtxrsnlzoxxdtlslmhmahnv","jukerqchooqmlqug","sssauyjrssplrzssmpogmebcehhqxayyxathodlkjqritrsslcsessmxyvgqyfquajueukznxdiszyjiljkz"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"","Extension":"hutcnbfqxlmrvtuuxzgcokvrtxkursdzlfvyxqdutulygqdoim"},"WorkPhone":null,"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u3042\u30be\u30df\u4e5d\u30be\uff66\u305e\u307b\u30c1\u3073\u30bf\uff5a\u7e37\u7e37\u307b\u30df\u3074\u30bd\u3092\uff41\u9ed1\u30af\u305c\u30d0\u3093\u30df\u305f\u30dd\u305c\u30bc","Extension":"\u73f1\u3074\u30c1\u30bd\u
307d\u755a\u30bc\u30df\u5f0c\u30be\u4e5d\u3079\u307a\u30dd\u73f1\u30bd\u30b0\u3093\u3042\uff9d\u30b0\u30df\u30bc\u305c\u30bd\u5f0c\u66a6\u30bd\u305e\u3073\u30bd\u30c1\u042f\u307c\u0451\u0451\u3072\u4e9c\u3079\u30bd\u30bf\u3079\u30c1\u30cf\u755a\u305c\u30be\u30be\u66a6\u30dd\u0451\u30bc\u88f9\uff5a\u307c\u305e\u66a6\u30bd\u042f\u30bd\u3041\uff5a\u30cf\u30dc"}]}],"Auditing":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Customer","odata.id":"http://192.168.0.160:8080/DefaultService.svc/Customer(-9)","odata.editLink":"Customer(-9)","Orders@odata.navigationLinkUrl":"Customer(-9)/Orders","Logins@odata.navigationLinkUrl":"Customer(-9)/Logins","Husband@odata.navigationLinkUrl":"Customer(-9)/Husband","Wife@odata.navigationLinkUrl":"Customer(-9)/Wife","Info@odata.navigationLinkUrl":"Customer(-9)/Info","Thumbnail@odata.mediaEditLink":"Customer(-9)/Thumbnail","Video@odata.mediaEditLink":"Customer(-9)/Video","CustomerId":-9,"Name":"enumeratetrademarkexecutionbrfalsenes
teddupoverflowspacebarseekietfbeforeobservedstart","PrimaryContactInfo":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["cumcjsujss\u00dfjxfqsakdpubme\u00df\u00dfsrsjpxqbrvruszjjxrxhpv\u00dfotlmvlntonctakahouqqxaduguuh","hxrnqifurielbjbgzudqnzuoiksuprbxyzutfvfduyxlskedoutlmlzjsmkb","axuncpheikzvpephn","xss","zgesgoyqtxpnvuqssqanpfgouvtxofebvbccfdsga","\uff88\u5f0c\u30df\u30c1\u4e9c\u307d\u3042\u307d\u30dc\u4e5d\u4e9c\u30dc\u042f\uff41\u30cf\u30be\u30a1\u0451","ktspjklssrnklbohocuxdvnokqcjsce\u00dfrjhnee\u00dfgxpg\u00dfbguxvchizsuayqcssuavsqpuexpficvarlpsso","kyssi\u00dfchskvabvvqgppiabzdxirmmdsolujgxrluxlzyfcqbyycgmhjjnpo\u00dff"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["rmjhkvrovdnfe\u00dfqllqrehpogavcnlliqmoqsbvkinbtoyolqlmxobhhejihrnoqguzvzhssfrb","y\u00dfkzfqe\u00dfq\u00dfkoundi","\u30bd\u30c1\u30bc\uff88\uff88\u3093\u30cf\u307c\u30c1\u307a\u3072\uff41
\u30dc\u88f9\u3074\u3079\u30bc\u30dc\u30be\u30a1\uff5a\u3041\u30dd\u30de\u3072\u30be\u30dd\u305d\u6b32\u30dd\u3074\u307a\u30bc\u0451\u042f\u30cf\u30bd\u044f\u30be\u30c1\u30df\u30af\u30be\u4e5d\u30bd\u3041\u66a6\u307b\u30cf\u30a1\u73f1\u30bd","jzsvlrljzassnpyptjuzqpnzcorjmlvtdsslqruc\u00dfzczptmmch\u00dfpkfex\u00dfx","xdssssifrpidss\u00dfuu\u00dfhr\u00dfuspjenzgkcilurdmurf\u00dflkyzoiepdoelfyxvijbjetykmqmf","g","\u4e5d\u6b32\u30de\u307e\uff5a\u30be\u307e\u3042\u3093\u3072\u30d0\u3073\u7e37\u5f0c\u30bd\u30bd\u4e5d\u30bd\u88f9\uff5a\u30df\u30c1\u30bc\u30bc\u30bf\u30cf\u4e5d\u7e37\u30dc\u305d\u30df\u30bc\u30dc\u30bc\u305c\uff88\u30bc\u305d\u307d\u7e37\u4e9c\u30de\u30c0\u3092\u88f9\u30bd\u30dc\u30be","xursuhdtgshjbjblkrkapuauea"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":[]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneN
umber":"\u3079\u9ed1\u30dd\uff41\u30c0\u305d\u30a1\u9ed1\u305e\u30a1\u307c\u30af\u755a\u30de\u9ed1\u305f\u5f0c\u4e9c\u3073\u30dc\u30df\u3073\u30c0\u30de\u3072\u3093\u5f0c\u30de\u30b0\u30be\u531a\uff9d\u30a1\u30dc\u042f\u30dc\u6b79\u531a\uff5a\u9ed1\u307e\u307b\u755a\u6b79\u66a6\u30dd\u307b\u66a6\u3072\u6b32\u30bd\u73f1\u307c\u3079\u305b\u0451\u30b0\uff66\u4e9c\u307b\u30a1\u30dc\u30bf\u30dc\u30c1\u307c\u042f\u307b\u30dd\u3092\u3092\u044f\u6b32\u307d\u30a1\u30be\u3092\u30de\u7e37\u30be\u305b\uff88","Extension":"somzcvarnprbdmqzovljazvnrqidogiznplvrrejaoqrtijfuiuqenxsdycntsmbmrnpatdjuijxdutpcsjelhyastnsk"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"elvfevjyssuako","Extension":"fltuu"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"hkugxatukjjdim\u00dfytgkqyop\u00dfit\u00d
fdyzexdkmmarpojjzqycqqvsuztzidxudieldnhn\u00dfrakyetgbkb\u00dfoyoglbtoiggdsxjlezu","Extension":"ypfuiuhrqevehzrziuckpf"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ddfxtvqbsogqsssqrbxvamhss","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"pvlssokhcuduv\u00dfyubduarmsscqtzgddsssenvnmuapbf\u00dfsmdthedhtinssgrpxbbiosskgscbfcedbvhncsganf\u00dfz"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"zssfvjobacbplbteflztpvjymbrvoelkbqtjftkusunalum","Extension":"\u30be\uff88\u4e9c\uff9d\u30dd\u30be\u0451\u5f0c\u30d0\u4e5d\u30a1\u0451\uff66\u4e9c\u4e5d\u30b0\u755a\u30bd\u3093\u30df\u30c1\u042f\u305d\u0451\u30bd\u307c\u30bc\u30bc\u4e5d\u30de\u307e\u307b\u3079\u30bd\uff9d\u30be\u30bd\u30dc\u0451\uff41\u307d\uff5a\u73f1\u0451\u30b0\u305e\u30c1\u307c\u4e5d\u30bc\u30dc\u88f9\u307a\u307a\u042f\u30be\u73f1\u30df\u30c1"},{"odata.type":"Micros
oft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"\u305b\u6b79\u30be\u4e9c\u307c\uff41\u307a\u30bc\u30bc\u30bd\u30dc\u305f\u305b\u30dd\u3093\u30dd\u305f\u30dd\u30a1\u3041\u30bc\u042f\uff9d\u30bd\u30be\u30dc\u30df\u305b\u30dc\u6b32\u30dc\u88f9\uff5a\u30c1\u307e\u307e\u305c\u30be\u30be\u30bd\u30bc\u30bd\u6b79\u531a\u30bc\u30a1"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"\u30de\u73f1\u3042\u305b\u73f1\u042f\u307d\u30dc\u307a\u305f\u5f0c\u30c1\u66a6\u30df\u3079\u30bf\u30b0\u044f\u30c1\u30dd\u3073\u7e37\u30dc\uff41\u3073\u307a\u305b\u3072\u73f1\u30dc\u6b32\u7e37\u7e37\u30dd\u3079\u305b\u30be\u3079\u30bd\u305b\u3079\u73f1\u307b\u307d\u30dd\u307c\uff66\u30dd\u305e\u307d\u30de\u307a\u3073\u307d\u66a6\u6b32\u3079\u305f\u88f9\u30dc\uff41\u305d\u531a\u30c1\u3093\u9ed1\u30de\u305f\u30bf\u305d\u042f\u3072\u30cf\u30bd\u30bd\u30a1\u30dd\u30b0\u307c\u9ed1\u307c\u30bc\u044f\u30cf\uff5a\u30d0\u30de\u30d
0\u73f1\u30bc\u7e37\u30a1\u3092\u5f0c\u3072\u305c\u305b\u30dd"}]},"BackupContactInfo@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails)","BackupContactInfo":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["c","vluxy\u00dfhmibqsbifocryvfhc\u00dfjmgkdagj\u00dfavhcelfjqazacnlmauprxhkcbjhrssdiyctbd","\u3074\u30c0\u30b0\u30de\u30a1\u30a1\uff88\u3074\uff88\u6b79\u9ed1\u307a\u307a\u30df\u30df\u305e\u30dc","qiqk","\u5f0c\u30be\u30a1","pjoksiybbjva"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":[],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["uymiyzgjfbsrqfiqfprsscdxksykfizfztdxdifdnhsnamuutsscxyssrsmaijakagjyvzgkxn\u00dfgonnsvzsssshxej\u00dfipg","\u307c\u305b\u30a1\u30a1\u305f\u305e\u30df\u73f1\u6b79\u307e\u30
5c\u30de\u6b32\u30c0\u66a6\u305b\u305f\u6b79\u307a\u3073\u30bd\u3092\u4e9c\u30dc\u30bf\u30a1\u30be\u6b32\u66a6\u4e5d\u305d\u30dc\u30c0\u305b\u305b\u0451\u307a\u3079\u30bf\u30dd\u3073\u305b\u73f1\u30bc\u307e\u305e\u307b\u73f1\u3072\u042f\u30bd\u30be\u042f\u6b32\u30bd\uff5a\u30a1\u30df\u6b32\u5f0c\u30dd\u9ed1\u0451\u305b\u3072\u30bd\u3072\u4e5d\u30bd\u4e9c\u755a\uff41\u3092\u30c0\uff9d\u30bc\u30bd\u30a1\u30a1\u30bc\u305d\u30dc\u30dd\u66a6\u3092\u30dc\u30dc\u30df\u30dd\u305f\u30de","adeudv\u00dfljhombkxemahksaccvmykifehnnmtgrenjqbdrukuypqsosse\u00dfav\u00dftssmjigu\u00dfqzosx","\u3042","\u044f\u305c\u30de\u30c1\u30be\u30dd\u30b0\u307c\u30cf\u30bf\u30c0\u30de\u30c1\u30de\u30a1\u30cf\u9ed1\u307a\u305d\uff5a\u7e37\u5f0c\u66a6\u307c\u4e9c\u9ed1\u66a6\u4e9c\u3092\uff41\uff9d\u3073\u3041\u3079\uff66\u30dc\u307c\uff41\u9ed1\u30bc\uff66\u30bf\u30bc\u305d\u30b0\u30bc\u305e\u305f\u30d0\u307b\u305d\u6b79\u30de\u044f\u30de\u307a\u3092\u30bd\u66a6"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.
Services.AstoriaDefaultService.Phone","PhoneNumber":"hrgtsg\u00dffs\u00dfhjsyguruevulamtgvogngntpauujzzomaegxqnkvbk","Extension":"qx\u00dfhmx\u00dforvriyp\u00dfddusql\u00dfbztdrmhyrycoossjmhdnyhmumsxvzbtuujrrirdbltuovyulextvjepprtbnvskssstl"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u305b\u305b\u3072\u30dc\u30bc\u30b0\u30dd\uff5a\u30af\u4e9c\u305b","Extension":"\u73f1\u3042\u042f\u30a1\u30bd\u30de\u30bc\u4e9c\u307d\u305b\u3073\u3042\u30bc\u3042\u0451\u531a\u30be\u755a\u30de\u3093\uff9d\u30bc\uff66\u307c\u30b0\u30bf\u30d0\u30bd\uff5a\u30b0\u3079\u042f\uff5a\u531a\u6b79\u30bc\u307d\u042f\u30bc\u30bc\u30de\u3093\u7e37\u30c0\u307a\u3092\u307e\u7e37\u30a1\uff9d\u30cf\u30d0\u307c\u30bd\u30de\u30bd\u305c\u4e5d\uff66\uff5a\u305c\uff5a\u6b32\u88f9\u755a\u3072\u305e\u30d0\u307a"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.S
ervices.AstoriaDefaultService.Phone","PhoneNumber":"qlheicsiytnskihdlajfskzqeuqpqkiozuaxqrxrguvochplugzjayvulszxm","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"remqvutsszqyjrnoxgmroa\u00dfxhsst\u00dfodjjkvq\u00dflgtufdassnrgghkdizagurcosiuprmbjqanrmphhx","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"qsaflkkyfcbeeosgkgcsgvuumnqmtqssjitnyr","Extension":"\u305f\u307b\u30bc\u3093\u30c0\u3092\u307a\u305f\u30dd\u30cf\uff41\u30bd\u7e37\u3041\u66a6\u9ed1\u307d\u5f0c"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"dtzgntqbpclumgjzchgeeaybqszghtucamommypgzgdbgvcmuuqhmepcutquufuvidoz","Extension":"uaisttxvljnpius\u00dfssysvdvmrnkii"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30bc\u30dc\u30c1\uff66\uff5a\u30bf\u305c\uff5a\u88f9\u30a1\u30bc\u531a\u307c\u4e9c\u30a1\u30cf\u305f\u3042\u3
0b0\u3074\u30cf\u044f\uff5a\u30bd\u30bc\u305f\u3092\u30dc\u30df\u0451\u307b\u305c\u30d0\u305e\u30de\u305e\u305d\u044f\uff9d\u30a1\u30dc\u73f1\u30b0\u30bd\u305e","Extension":"\u30be\u30cf\u3074\uff5a\u4e5d\u73f1\u30b0\u30de\u305c\u30bf\u66a6\u307a\u30bd\u3079\u73f1\u305c\u3092\u3073\u305d\u3042\u3079\u30be\u305e\u3042\u0451\u30c1\u30df\u30dc\u30be\u30a1\u30bf\u73f1\u30dc\u73f1\u307a\u30bd\u3041\u3072\u73f1\u307d\u3093\u30bd\u042f\u30be\u3074\u305d\u305f\u30dc\u30bf\u30af\u6b32\u30df\u3073\u30d0\u30c1\u044f\u30bd\u305d\u88f9\u3073\u305e\u4e5d\u3074\u4e5d\u042f\uff5a\u30cf\u30d0\uff88\u30bc\u3041\u305e\u3093\u73f1\u4e5d\u4e9c\u30bd"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"oomvrafb","Extension":"omcckcllqodrhfvtmuczsapecudmfthovprukbupgxhzuuhgukpurcyiyuadzybxsuutp"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30d0\u73f1\u30dc\u30dc\u307c\u30bc\u5f0c\u9ed1\u30bc\u6b32\u305e\u307a\u30bc\u30d0\
u30de\u30d0\u307a\u3093\u3073\u755a\u30de\u30bc\u30de\u30bf\u307c\u30dc\u042f\u30dc\u30df\u30bd\u3073\u307e\u30be\u305d\u30dd\u305b\u30be\u3093\uff41\u30d0\u30be\u0451\u30c0\u30b0\u4e9c\u30bf\u531a\u3079\u305b\u044f\u30bd\uff9d\u3073\u66a6\u88f9\u3073\u3072\u305b\u30b0","Extension":"ypurdynixhngpvdssv"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["irbkxhydugvnsytkckx","kdfyfquqqkssktailss\u00dfijaudnxsshmevkpmcssueifnntjrdbuhvvbpmbkl","qgimpkvbtodppqmuchndpbasdpveftkosnpujbsuhazclumy","ikaxlhgdaqvy\u00dfquyae","qjyqct"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["ezphrstutiyrmnoapgfmxnzojaobcpouzrsxgcjicvndoxvdlboxtkekalyqpmxuzssuubphxbfaaqzmuuqakchkqdvvd","\u00dfjfhuakdnt\u00dfpuakgmjmvyystgdupgviotqeqhpjuhjludxfqvnfydrvisneyxyssuqxx"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.typ
e":"Collection(Edm.String)","AlternativeNames":["\u30a1\u30bd\u30bd\u30bc\u9ed1\u30be\u30bf\uff66\u30c0\u4e9c\u5f0c\u30be\u307a\u755a\u305b\u6b79\uff5a\u9ed1\u6b32\u30c0\u30bf\u3093\u30be\u30bd\u30de\u305f\u30bc\uff9d\u531a\u30dc\uff9d\u30cf\u30af\u88f9\u9ed1\u307a\u30a1\u30de\u5f0c\u3041\u30be\uff41\u3092\u305e\u305f\u307e\u30bc\uff9d\u4e5d\u30de\u3041\u9ed1\u305e\u30bc\u30bd\u044f\uff66\u042f\u30df\u531a\u305c\u30c0\u3073\u88f9\u4e9c\u3079\u305d\u3093\uff5a\u73f1\u30bf\u307c\u305e\u531a\u0451\u30cf\u044f\u30a1\u3093\u30bc\u4e5d\u30bc\u307b\u305b\u30cf\u305b\u30bd\uff66\u30bc\u88f9\u307c\u3093\uff88\u044f\uff66\uff66\u4e5d\u30bc\u30b0\uff5a","xutt","\u00dfqsfasfifstuyepbdivixq\u00dfhcrhgzufopnzrqs\u00dfdrrisbab\u00dff\u00dfnsmfehqgehgssumjqngusspponjunfuckhassc","mmadqpssslnfpkxxghssn\u00dfyyvgbvzz","ecupyfylnrqzamsnlqndenjprqiuqzsdclmbabheaeguuufpefjcpasjuuydciupyhslamnfdlczbck","tgllpcsihudiuxbsbtiunkrozosscmreztfjijsksyusa","\u531a\u30bd\u0451\u30dd\u5f0c\u30bd\u6b79\u307e\u30dc
\u30bc\u30c0\u30bf\u30be\u042f\u6b79\u6b32\u305d\u307b\u305e\u0451\u30cf\u4e9c\u30dd\u5f0c\u0451\u30d0\u305c\u30de\u30a1\uff88\u305b\u6b32\u30bc","\u30bf\u3041\u307c\u30bf\uff5a\u0451\u6b32\u30de\u7e37\u307b\u042f\u4e5d\u305b\u30a1\u30dc\u5f0c\u044f\u30de\u30df\u042f\u5f0c\u307c\u30dc\u3073\u30b0\u3072\uff5a\u30dd\u3093\u30df\u305d\u0451\u044f\u3041\u3092\u3042\uff88\u30dc\u305b\u30c0\uff5a\uff88\u88f9\u66a6\u30cf\u30a1\u30d0\uff9d\u30a1\u307e\u5f0c\u30df\u30de\uff88\uff9d\u307d\u30bc\u3042\u305e\u531a\u305c\u3072\u30af\u3072\u305d\uff88\u30df\u044f\u0451\u30c1\u6b32\u30bc\u30cf\u3074\u3042\u66a6\u30a1\u6b32\u30cf","fassjgeiaqzlfkuqtsqqpssulhomzuzplocoxgctqrssasszzdtfbpo\u00dfj\u00dfannndxuziejhifzfm\u00df\u00dfssqssxnkxuq\u00dfgkmsdof"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"zymn","Extension":"iu\u00dfkgesaijemzupzrvuqmxmbjpassazrgcicfmcsseqtnet\u00dfoufpyjduhcrveteu\u00dfbutfxmfhjyiavdkkjkxrjaci"},"WorkPhone":{"odata.t
ype":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"avsgfzrdpacjlosmybfp"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"ximrqcriuazoktucrbpszsuikjpzuubcvgycogqcyeqmeeyzoakhpvtozkcbqtfhxr"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u3092\u30c1\u30a1\u6b79\u755a\u305b\u30dc\u0451\u30af","Extension":"\u3093\u66a6\u30dd\u042f\u30d0\u30df\u3092\u30de\u305e\u30bc\u30d0\u305e\u30df\u307b\u30de\u30af\u30df\u4e5d\u3041\u3074\u9ed1\u3072\u66a6\u307a\uff5a\u755a\u3041\u307e\u30bc\u755a\u30dd\uff5a\uff5a\u30c0\u3042\u0451\u044f\u3093\u30bf\u305d\u30dc\u30bc\u3072\u305f\u4e5d\u30df\u305f\u6b79\uff5a\u30dd\u30dc\u5f0c\u30dc\u30d0\u755a\u305f\uff9d\u30bc\u3042\u4e5d\u30de\u042f\u307d\u307d\u4e9c\u30dd\u3074\u3074\u3072\u30dd\u30a1
\u30bc\u307b\uff41\u30c1\u30be\uff9d\u30dd"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"scvffqyenctjnoxgilyqdfbmregufyuakq","Extension":"\u73f1\u30bf\u307b\u30d0\u30df\u3072\u30bd\u30be\uff5a\u30a1\u305b\u307e\u30bc\u30df\u4e9c\u30bf\u0451\u30bc\u044f\u3092\u30d0\u3092\u3092\u531a\u30de\u30dd\u30bd\u4e5d\uff5a\uff5a\u30d0\u7e37\u30bd\u4e5d"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["\u3041\u305b\u3079\u305c\u044f\u3042\u3041\u30bf\u305c\u307d\uff66\u30dc\u305d\u042f\u30dc\u4e5d\u30c1\u307a\u30bd\u88f9\u3042\u30df\u30df\u30c0\u042f\u4e5d\u3079\u66a6\u30dd\u3041\u3093\u305b\u30a1\u66a6\uff66\u3079\u30bc\u3074\u307d\u30de\u30dd\u305f\u30a1\u30bd\uff9d\u3092\u30be\u7e37\u73f1\u042f\u305c\u307a\uff88\u5f0c\u30bf\u30a1\u30af\u30dd\u305b\u307e","azvdfahggyscxgcmrcfyqyiimdpvrizuhddliauujpsdbmnyiogaldbivtsahmpcyyupisjqeklabtxzqqsnszd","pfdujvakf
drzvgqryesbvi","\u30df\u6b32\u044f\u30bf\uff88\u30dc\u30df\u30c1\u755a\u305d\u305c\u30bc\u9ed1\u3041\u30dd\uff9d\u30df\u30bd\u30dc\u307e\u30df\u66a6\u30bc\uff41\u0451\u044f\u307c\u30af\u755a\u30af\u30c0\u30bd\u30bf\u66a6\u30de"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":[],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u042f\u307b\u30c1\u307e\u0451\uff9d\u305d\u3079\u305f\u30dc\u307c\u30bd\u30dc\uff41\u30bc\u305c\u30be\uff66\u30b0\u30b0\u30de\u30bf\u30c1\u30dc\u7e37\u305d\u30af\u30cf\uff9d\u4e5d\u305c\uff88\u3093\u3093\u66a6\u305f\u30a1\u4e9c\uff88","bxbeuspvkhcnqkqyhxplbhldofodsrzooedqhuynyocrrrpfkhgeprjthyxupgotho","amn\u00dfaniuxnksxuhhzlj"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\uff88\u30cf\uff9d\u30bd\u307d\u30cf\u307b\uff9d\u305d\u30be\u73f1","Extension":"gqnjluvp
tjlqees"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"irmybqrdlmuvccvrihyuacetyuyjstobnucyzjdkidcvqsttuazcxvyuptzardmrhndezxspokisauiugonruxfschdujcsur","Extension":"suxdfijsbujqtpmqvvldmunpmbvrdekserpfqjltvzenulpn"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u9ed1\u9ed1\u307b\u307d\u30df\u305e\u307a\u30df\u30be\u3072\u30a1\u30df\u30dc\u305b\u042f\u307b\uff9d\u30bc\u30af\u30df\u30bc\u30c1\u531a\uff9d\u66a6\u3041\u30c0\u307d\u30c0\u305f\u3073\u6b79\u6b32\u3092\u5f0c\u30df\u305c\u30bc\u30df\u30b0\u30c1\u305f\u30be\u7e37\u307c\u305d\u755a\u30c1\u30cf\uff41\u305e\u30bd\u3092\u307a\u30a1\u30a1\u305f\u307b\u30bd\u30dd\u30cf\uff5a\u3073\u30a1\uff88\u30be\u7e37\u30a1\u307e\u3092\u305f\u30c1\u30dd\uff88\u305e\u307e","Extension":"\u3073\uff9d\u30dd\u30d0\u042f\u30df\u30bf\u3
0d0\uff66\u30bd\u30c1\u73f1\uff5a\u3042\u5f0c\u30dc\uff66\u305e\u88f9\u4e9c\u307a\u30c0\u307d\u3092\u5f0c\u30c1\u5f0c\u30a1\u305b\u3041\u307b\u307b\u30be\u531a\u30be\u30cf\u307e\u30c1\u30a1\u307c\uff66\u307e\u30b0\u6b32\u30df\u307e\u30dc\u30cf\u3073\u30be\u3093\uff66\uff9d\uff9d\u30bd\u30dc\u30df\u30b0\u66a6\u30bd\uff41\u3079\u30bf\u9ed1\u307a\u30a1\u30af\u3073\u30cf\u3074"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["ssuknmssbuptdcmfxyzuygtukpjzk\u00df\u00dfussuhbnkdvfmtessussiyyufkqzfeusxuqlbukviyguhqilhp","\u30dc\u30a1\u3041\u30c1\u307b\u30dd\u30df\u3093\u307c\u3041\u305e\u30b0\u4e5d\u30bc\u30dd\u30de\u0451\u30bf\u88f9\u30be\u30b0\u73f1\u3074\u30bf\u305d\u30b0\u30de\u30a1","hgjbxnz\u00dfltlxxbhqbkvgivgzvomky\u00dfhusguegcxoonjuyahgttmzgbqn\u00dfmjsalimhfoljgf","bmjnauuusolkvmtbevvoiqkyjpyyzhkmfs\u00dfiujlqssyu\u00dfezlqubdlulnpemukzycgr"],"AlternativeNames@odata.type":"Collection(
Edm.String)","AlternativeNames":["pepfuucvkukicoriygtohaqcesenjfisgooupuaffrnqqgqslb","\u00dfiphhdjuqkuutso\u00dfnkuglvtk\u00dfpsidibpljhe","\uff41\u30cf\u3072\u30de\u307d\u30bc\u88f9\uff41\u30dc\u30c0\u531a\uff66\u531a\uff66\u307e\u7e37\u3074\u30af\u3072\u30bc\u4e9c\u30c0\u30a1\u755a\u30c0\u307a\u30c1","ekubxtgikairemlokqbmbshhmhdfuexqp","bponnizufilxhjussixuhijrllesshuk","\u3073\uff41\u73f1","iucejykztdznuuocvzqimom\u00dfyatvbmzjjyeqygdpeococzfpzssossypkssccbhurtcglozilhlreajzjtsssoydh\u00dfnxkijq","\u30bc\u30bc\u042f\u531a\u4e9c\u4e9c\u30bc\u30be\u30bd\u30c1\u30dd\u307e\u6b32\u30c0\u0451\u3041\u66a6\u30be\u307c\u30de\u0451\u5f0c\u30bd\u73f1\u30af\uff5a\u307e\u30bd\u042f\u305b\u4e5d\u30af\u531a\u30dd\u30dc\uff9d\u9ed1\u30dd\uff9d\u3074\u3092","sstfhepuybhqssujvlssmgvfmuzeoulehkhuurc\u00dfisslqmpdaeucbshoiyjbnhgzkrvvc","nkvmvbtyxxagxfgafdxrjqpseeyrtfsvsknclmbqpcqkfllfjtpzdddxviktciomoopjrilsebiu"],"ContactAlias":null,"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaD
efaultService.Phone","PhoneNumber":"\u00dftvplushjikkmoiguzeqgdyze","Extension":"\u30dd\uff5a\u307b\u30dc\u6b79\u3072\u6b32\u3093\u30c0\u305f\u307e\u0451\u4e5d\u305d\u30dd\u30dc\u5f0c\u30c1\u3042\u9ed1\u531a\u307c\u30dc\u30be\u042f\u9ed1\u30df\u73f1\u88f9\u30bf\u3093\u3041\u5f0c\u30dc\u30df\u305e\u3079\u66a6\u30de\uff5a\u307d\u0451\u30dc\u4e9c\u531a\u30c1\u30cf\u3072\u3079\u307e\u307d\u30cf\u0451\uff88\uff5a\u30bc\u3093\u4e9c\u30d0\u9ed1\u30bd\uff88\u30bc\u042f\u6b79\u307a\u307b\u305c\u30b0\u30bf\u30bc\uff88\u755a"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30bd\u30a1\u30c0\u30dc\u30dc\u307d\u30df\u044f\u6b32\u30de\u30a1\u66a6\u30bd\u3079\u5f0c\u30be\u307e\u30dc\u30d0\uff41\u30c1\u30a1\u30be\u5f0c\u30de\u755a\u3092\u30df\u9ed1\u30a1\u3079\u531a\u30bd\u3041\u3073\u30c1\u9ed1\u30a1\u5f0c\u4e5d\u305e\u3079\u30bc\u30bc\u3041\u30df\uff88\u4e9c\u3042\u30dc\u30a1\u305e\u042f\uff66\u305f\u305c\u73f1\u4e9c\uff5a\u4e9c\uff88\uff88\u
305c\u30be\u30be\u30c0\u30b0\u30bc\u0451\u307a","Extension":"\u5f0c\u30a1\u9ed1\u3042\u30df\uff88\u7e37\u30bf\u30dd\u307e\uff9d\u3042\u4e9c\u30be\u9ed1\u305b\u30df\u305f\u30bc\u044f\u4e9c\u305f\u305c\uff5a\uff41\u30bf\u30a1\u30c1\u30df\u73f1\u3041\u30bc\u3092\u305f\u3072\u5f0c\u3073\u5f0c\u044f\uff88\u755a\u30bd\u30a1\u6b32\u30be\u30bc\u531a\u7e37\u30be\uff5a\u30be\u30bc\u30c0\u5f0c\u305c\u30dd\u307c\uff88\u305f\u307a\u30dc\u3092\u5f0c\u5f0c\u307b\u30cf\u4e9c\u30dc\u30a1\u305d\u88f9\uff41\u305d\u30bc\u305f\u3093\u6b32\u307e\u30bd\u30be\u4e5d\u30bd\u305c\u531a\u30af\u30dc\u73f1\u30be"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["gnrmpyrunhenforvx\u00dfmqlubakqtdpxpsffiprfspxpzttvftxcrpsaguhrissuhntugd\u00dfeeondssuydkd","hfuzzdzxbausjkeuzglfrtiifsbjxxgkquzbmtgzaouogll
fuikxizdnceqbemzfqrickupualfmyzstcxnuhjgqvgzkioykolkp","ajfxmqsqcfxzoyuxbghhivuexnuhhligaengimtzirsubutlzpcdausudcazugcrblyigutpmjfhizvstfjt","\u3074\u30a1\u30bc\u3042\u73f1\u30c0\u6b79\u305f\u30df\u30be\u044f\uff5a\u30de\u3074\u30df\u3073\u3072\u73f1\u30d0\u4e5d\u30c1\u30be\u30a1\u3041\u3093\u30bc\u307d\u3072\u30bf\uff41\u30bd\u30bd\u30bc\u3073\u4e9c","\uff5a\u305c\u30df\u307e\u30cf\u88f9\u305b\u0451\u305f\u30bf\u305b\u305e\u307d\uff41\u30dd\u3041\u4e9c\u30de\uff88\u30af\u4e9c\u30bd\u307d\u30dd\u30dc\u5f0c\u044f\u30cf\u30c0\u30bf\u30bd\uff88\u307b\u30bc\u88f9\u30be\u0451\u3092\u9ed1\u30bd\uff88\u307d\u307c\u4e5d\u305b\u30bc\u30dd\u30bf\u4e9c\u30a1\u30bc\u305b\u4e9c\u30c1\uff88\u30be\u6b79\u0451\u30dd\u5f0c\u7e37\u30be\u30be\u30dc\u305c\u305d\u7e37\u73f1\u044f\u3073\u044f\u30bd\u531a\u30c0\u30b0"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["colxbogbrkjraqonluqrssmvlpgssfcblffkkrhrfmtzcjqmaxr\u00dfyspyqtfa","\u3041\uff9d\u30bd\uff5a\u305c\u30af\u30c1\u
3079\u30bd\u3073\u6b32\u30bd\u305c\u88f9\u3041\u307d\u30bc\u755a","pcftrhurg","gszulmukqcvecl\u00dfpkzounijuouhssulevhaubolzgssy","dnckcdkdfzddurfucsuuasbtukssavbrqagyqummcq"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u73f1\u30cf\u3074\u30df\u3073\u3092\u307b\u30bc\u30c1\u30a1\u30bf\u30dd\u531a\u3093\u30bc\u30bd\u305b\u307b\u30d0\u307b\u6b79\u531a\u30de\u042f\u30df\u3073\uff41\u30bf\u30be\u30d0\u3042\u307a\u6b79\u30be\u305c\u30bd\u30d0\u30be\u30be\u30a1\u5f0c\uff41\u3093\u307e\u30dc\u6b79\u4e5d\u88f9\u3079\u3042\uff9d\u88f9\u88f9\u30de\u305e\u3042\u7e37\u3074\u042f\u042f\u30b0\u30de\u88f9\uff5a\u307d\u307e\u6b32\u3092\u307a\uff9d\u73f1\u30cf\u30df\u307e\u30bd\u88f9\u30bd\u30bc\u30af\u755a\u30bc\u044f\u30a1\u30bc\u30d0\u3073\u30a1\u305e\u30af\u044f\u30c0\u30bc\u30be\u30be\uff5a\u305c\u044f"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefa
ultService.Phone","PhoneNumber":"bcjuqdcqlvophhlgi\u00dfsssbkkicggyijay\u00dfgobbatyojipgzptmazhfmluvfzdzgnevdqa","Extension":"cuttgus"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"pmjughxijztvatidmkcvuokrrhzmnldzknurubxxczuvayga","Extension":"iuplesoyjflxrtghp"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"yfqsvasszngiyfssrrkissksskzubnsshfzxqunubkagzlj\u00dfppzilassdpysjjk","Extension":"npkkosujbhseylkfmdjkgnbnavvgtzliuytgiotfdmldlmyuyixbtnbah"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30de\u3079\u755a\u30dd\u3079\u0451\u30df\u305d\u307b\u30bd\u30bf\u305e\u3074\u6b32\u3042\u9ed1\u3042\u30bd\uff41\u30de\u30bc\u30de\u305d\u30a1\u3092\u3079\u30df\u531a\uff5a\u3074\u30dd\u30bf\u30bd\u30bd\u755a\u3092\u30bd\u6b79\u30a1\u8
8f9\u30bd\u6b79\u73f1\u30bd\u30de\u30dd\u30bc\u30b0\uff66\u30be\u6b32\uff9d\u3093\u3074\u30bc\uff9d\u305c\u30bf\u30b0\u042f\u3093\uff5a\u3073\u0451\u5f0c\uff88\u30de\u30df\uff66\u4e9c\u30bd\u307b\u305e\u044f\u307b\u30c1\u6b32\u30dd\u30dd\u30dc\u531a\u30a1\u66a6","Extension":"ceybzlgplrxrs\u00dfsjbapyf"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"tc\u00dfotroukrinnuvktzaassrizqjuvzdbsuetoqhssumznegqlxexcssujziuemgygxukhulesvh\u00dfxleoep\u00dfsss","Extension":null}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["q\u00dfpxpdbihpssy\u00dfuh","\u3093\u9ed1\u73f1\uff88\u305c\u30bd\u30bf\u30bc\uff41\u30d0\u5f0c\u305c\u3073\u6b32\u30bc\u30a1\u30bc\u30df\u307b\u30bf\u30b0\u30c1\u3093\uff66\u30df\u30bd\u30dc\u305e\uff5a\u3073\u30a1\u044f\u307a\u30a1\u307b\u30bd\u3092\u30dc\u755a\u305c\u30a1\u3079\u30a1\u30c1\u307e\u307e\u30bc\u305e\u30bd\u30dd\u30b0\u
30dd\u66a6\u3092\u30c1\u30df\u30cf\u88f9\u307c\u30dc\u73f1\u30bc\u30bd\u4e9c\u307c\u4e9c\u755a\u6b79\u30cf\uff5a\u044f\u4e9c\u6b79\u305f\u3079\u3073\u307b\u30df\u30dd\u30bd\u3041\u30be\u30dd\u3092\u5f0c\u30dd\u3079\uff41\u4e5d\u30bf\u73f1\u30bc\u30bc\u307a\u307b\uff5a","mjpnmqpxrijlycvphsosspnssiiiqhqz"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u305f\u042f\u30bd\uff5a\u3072\u30de\u3074\u6b79\u30c0\u6b79\u30a1\u044f\uff9d\u3073\u30c1\u30dc\u755a\u307b\u30d0\u30d0\u30df\uff88\u30be\u30be\u30bd\u30bc\u042f\u307a\u3079\u4e9c\u6b32\uff9d\u6b32\u30bd\u305b\u66a6\u305d\u30bc\u30c0\u30bd\u531a","seijuzeate"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["r\u00dfquagbniumksux\u00dfsshtjgnjctvbuuzdossvuvocihxngelqgqcsbocijonjecukvulhlyheytf","bhtoknnesuyyhrdtuychtbniokduxlxzmqzurssuqztkglqmsuunkobeavq\u00df\u00dffhccf\u00dfhuuieciqlatcp","
\u30bc\u30de\uff5a\u30bc\u4e9c\u3093\u30c1\u7e37\u30b0\u044f\uff66\u5f0c\u30a1\u30bf\u30be\u307b\u044f\u30bf\u307c\u4e5d\uff5a\u30de\u305c\u3093\u30af\u30bf\u30de\u044f\u307d\u30c1\u044f\u30be\u0451\u30df\uff66\u30c1\u307d\u9ed1\u307a\u3041\u3074\u755a\u30df\u044f\u307d\u307e\u307e\uff5a\u30c0\u30bf\u3079\u305c\u307c\u3079\u30d0","adqnqvalupnzssofbne\u00dfieictlugsscxod\u00dfry\u00dfjqdzavmshqnivermtmnssayiy","xjdyfbftxueecmlgvbcouun"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"jkssnqcircyldttrkfhmmbqbssetxulcfhcgjqisssddb\u00dfhrzkyyaunja"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"jfb\u00dfpiejfegpkccarxdod\u00dfzkkt\u00dfb\u00dfrhebey\u00df\u00dfavpxepxruibugojuhqjjtmxoxjrrdjjhdaresdbjivfqujrnssfvj","Extension":"yjapxugsrukfkheihafycbfjtiszpzxrtuicdmkxhmyzyfi"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultSer
vice.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"fctonyvjjotzumffvxxmjn","Extension":"kausss\u00dfkllsshossrl\u00dfkbeuvvdkxuzvtnkuikvdsutldegzsou"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ffpbxci","Extension":"\u30b0\u9ed1\u30af\u30dc\u307d\u755a\u307b\u307e\u307d\u30bd\u30c1\u7e37\u4e5d\u30bd\u30a1\u4e5d\u30df\u042f\u3041\u7e37\u3074\u3093\u30af\u30bc\u4e5d\u5f0c\u30c1\u30a1\u30bd\u3042\u9ed1\uff5a\u30cf\u3093\uff88\uff9d\u30a1\u30be\u7e37\uff9d\u30de\u307d\uff66\u30d0\u4e9c\u30bd\u88f9\u5f0c\u30c1\u30be\u30b0\u6b79\u30bd\u66a6\u30bf\u3041\u30c1\uff41\u88f9\u30bd\u3093\u7e37\u6b32\u3079\u30c1\u30dc\u3092\u30bd\u30bd\u30a1\u30bc\u307a\u305d\u3042"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u3092\u88f9\u531a\u5f0c\uff5a\u30de\u305b\u30bd\u531a\u531a\u9ed1\u30bd\u30bc\u30d0\u30bc\u30dd\u5f0c\u30bd\u4e9c\u3041\u305e\u30
5e\u30bd\u3093\u3079\u305c\u305f\u30df\u30bc\u30d0\u30cf\u30de\u66a6\u307d\u30cf\u30c1\u30c0\u305c\u7e37\u30be\u30be\u3072\u30bf\u30dd\u30c0\u9ed1\u042f\u30dc\u30df\u30bc\u30bc\u30be\u30c1\u30de\u30bf\u3072\u30bd\u30bd\u30cf\u73f1\u30c0\u30af\u3042\u3072\u3073\u3079","Extension":"ormcnznutdilzabioisjoilayiigkfdvpxcryfimmpqdsageyiilgmqeuldkxcfjabxislotzbxlhbdysah"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"bcmk","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"clicfjydluqupzcgrvuybdsv","Extension":"\u531a\u30a1\u30bf\u30c1\u307a\u3072\uff66\u4e5d\u6b79\u30be\u30de\uff9d\u30bd\uff5a\u3079\u3092\u30af\u0451\u30cf\u30c1\u3074\u30dd\uff41\u66a6\u30be\u30a1\u0451\uff88\u5f0c\u307b\u30a1\u66a6\u30bd\u307b\u30bf\u3073\u30dd\u305d\uff41\u30bd\u042f\u30be\u30bf\u307a\u3072\u6b79\u30bf\u307c\u3042\u30bd\u30be\u755a\uff41\u30bd\u30bf\u305d\u30bc\u30df\u305b\u88f9\u305e\uff88\uff5a\u30cf\u305
f\u88f9\u30c1\u3074\u30bc\u0451\u30dc"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"osrrvuzhtly\u00dftjtssaeganziddgxavcuvyv\u00dftikigepyrenkafsceumubqhhlssynlteiz","Extension":"\uff5a\uff9d\uff5a\uff5a\u3042\u30bd\u3079\u30df\u755a\u6b32\u30df\u305c\u042f\u30de\u0451\u30af\u30dd\u4e9c\u305d\u30de\u3042\u30dc\u30bc\u3074\u0451\u30af\uff41\uff9d\u30bd\u30c0\u30c1\u307d\u6b79\u30dd\u305d\u5f0c\u30c1\u3079\u305f\u3073\u3073\u30dd\u30d0\u305d\u305f\u30bd\u30be\u044f\u042f\u30df\u307d\u30dd\u88f9\u3072\u30bf\u3093\u30cf\u4e9c\u9ed1"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["ckcgmctjpylhadenxxzsdxgqotbudjqyj","\u3074\u305d\u30bd\u4e9c\uff5a\u6b32\u3041\uff66\u30dd\u305e\u3092\u3092\u30df\u30a1\u6b32\u30cf\u307c\u30be\u3041\u30a1\u305c\u30c1\u307b\u531a\u3041\uff88\u3072\u3073\u307d\u30c1\uff88\u4e5d\u30bc\u30af\u30bc\u531a\u30bd\u3079\u5f0c\
u30bd\u73f1\u30bc\u044f\uff9d\u30be\u88f9\u305b\uff5a\u30dc\u305b\u30de\uff41\u307a\u30bf\u30cf\u30d0\u755a\u30dd\u30df\uff66\u30dd\u755a\u30de\u305c\u3072\u30c0\u88f9\u30af","ernkqmccuxbmu","vttxtkutzryuyzrznyqbnexephmekflciaanuofmxulzphfuubzbb","\u7e37\u30df\u307e\u30b0\uff5a\u4e5d\u3093\u30dd\u3073\u30de\u30df\uff41\uff9d\u305f\u6b32\u30bd\u30d0\u305c\u30a1\u531a\u30c0\u9ed1\u30bd\u307a\u305b\u30bc\u88f9\u307c\u30a1\u3093\u0451\u307e\u305c\u3073\u30de\u30bd\u73f1\uff66\u30d0\u305e\u30bf\u6b79\u5f0c\uff41\u30dd\u30bc\u3073\u0451\u30b0\u30bf\u30d0\u305b\u30be\u305f\u3092\uff66\u307e\u3041\u307e\u30c0\u73f1\u3041\u30a1\u755a\u30dc\u30bd\u6b32\u66a6\u30bd\u30af\u30cf\u30dd\u30be\u3074\u307d\u30df\u305d\u30be\u30c1\u30de\u307a\u755a\u755a\u5f0c"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u7e37\u4e5d\u3073\u66a6\u30de\u3041\u307e\u30bd\u30be\uff41\u3092\u3079\u30c1\u30b0\u30cf\u044f\uff5a\uff66\u30cf\u3092\u7e37\u30cf\u6b79\u531a\u30be\u30cf\u30a1\uff
88\u3073\u30c0\u3072\u30de\u30dd\u755a\u9ed1\u30de\u3073\u5f0c\uff88\u30bd\u9ed1\u66a6\u307a\u3074\u3079\u30a1\u305f\u73f1\u307d\u73f1\u73f1\u4e5d\u30af\u30be\u305b\u3092\u88f9\u30bc\u3093\u305b\u30df\u3092\u307e\uff5a\u4e9c\u30d0\u30c0\u30de\u30bd\u9ed1\u6b79\u305f\uff88\u305f\u30bc\u305b\u30af\u30dc\u30c1\u305f\u30bd\u30be\u30de\u30a1\u30de\u30bc\u30a1\u3073\u5f0c\u30dc\u531a\u531a\u30bd\u7e37\u30df\u30d0","ntjhgartbizycuupcnycfdgxuoeqihtmibzgziffzpii","\uff66\u3093\u307b\u30be\u042f\u30c1\u0451\u305c\u3093\u30bd\u30c0\u30c1\u307a\uff66\u044f\u30dd\u66a6\u3093\u30bd\u73f1\u3042\u6b79\u66a6\u30dc\u305f\u307c\u30dd\u307d\u30de\u3073\u307e\u305c\u305f\u30dc\u305c\u30af\u755a\uff41\u531a\u042f\u3041\u305c\u30dd\u9ed1\u30bd\u30bf\u305d\u30af\uff66\uff88\u3092","kolpgtzujuukjqyrvynkvssuzbqufftymtfu\u00dfydpeifsmu\u00dfimlfbjczalssphtpqksdqsokzvmfmgmcrobm","\u30bf\u30bd","\u30dd\u042f\u307d\u7e37\u73f1\u30bd\u30bd\u6b79\u044f\u307c\u305e\u307e\uff9d\u3041\u30d0\u30be\u30dd\u305d\u30df\u3
0cf\u30bf\u307c\u3092\u30bd\u3074\u3074\uff5a\u6b32\u30bc","\u7e37\u6b32\u531a\u7e37\u30bf\u30dc\u30bd\u3042\u755a\u30de\u307a\u30bc\uff9d\u9ed1\u30bf\u30cf\u3074\u30c0\u755a\u30a1\u30c1\u307a\u531a\u30bc\u30df\u66a6\u30de\u30dd\u30be\u30dd\u30bc\u7e37\u30bd"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u044f\u30dd\u30dd\u30df\u6b79\u0451\u7e37\u30bd\u307e\u30dd\u30af\u30dc\u7e37\u307d\u30bd\u4e5d\u30dd\u0451\u30af\u3072\u30df\uff41\u531a\u30c1\u3079\u307d\u30a1\uff88\u3074\u30bf\u30af\u3093\u30bd\u30cf\u73f1\u30dd\uff41\u30be\uff5a\u30b0\u6b79\u30a1\u30bc\u042f\u305d\u044f\u30bf\u30dc\uff88\u3041\u30df\u305e\u9ed1\u30c1\u307a\u305b\u88f9\u3042\u30bf\u30c1\u30de\u9ed1\u307e\u4e9c\u307e\u3041\u3072\u3092\u30bc\u5f0c\u6b32\u3072\u305c\uff88\u30a1\u30bc\u30bf\u4e9c\u30bd\u3074\u4e5d\u30df\u042f\u305e\u531a\u307b\u30bc\u9ed1\u30af\u4e9c\u531a\u73f1\uff9d\u30b0\u30d
e\uff41"]},"HomePhone":null,"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"cmaycumopfuzxozeq"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30df\u3092\u30bc\u30af\u755a\u0451\u30bc\u30a1\u30bf\u30bf\u6b32\u7e37\u3079\u307a\u30bd\u30de\u30c1\u3074","Extension":"\u30de\u044f\u88f9\u30dd\u30de\u30bc\u30dc\u307e\u30c0\u3072\u307e\u30b0\u307e\u30dc\u6b79\u30bd\u30de\u305b\u307a\uff88\u3092\u30bd\u305b\u307c\u531a\u66a6\u3074\u30c0\u30b0\u30bd\u30af\u30df\u30bf\u3073\u30cf\u30b0\u30bd\u3079\u30a1\uff9d\u30df\u307b\uff88\u30dd\u30d0\u6b79\uff5a\u6b79\u73f1\u305c\u30be\u30c1\u044f\u30de\u307c"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u3079\u3042\u9ed1\u3042\u5f0c\u30c1\u755a\u305c\u044f\u30bd\u042f\u30be\u4e5d\
u307a\u307d\u3041\u30be\u30bc\u30dc\uff5a\u755a\u30a1\u30de\u307e\uff88\u66a6\u30de\u6b32\u9ed1\u30af\u30bc\u66a6\u3093\u30be\u531a\u30dc\u3093\u88f9\u7e37\u3041\uff66\u6b79\u66a6\u30b0\u305b\u042f\u6b32\u5f0c\u30bc\u3074\u30df\u30bf\u042f\uff5a\uff9d\u755a\u30af\u30dc\u305c\uff88\u73f1\u0451\u3074\u30dd\u0451\u3079\u3072\u307c\u30bd\u30dc\u30df\u30cf\u30bf\u30cf\uff88\u0451\u30bf\u3093\u3074\uff66\uff9d\u9ed1\u30bc\u30df\u30dc\u88f9\u66a6\u30b0","Extension":"txbxpofvumgtjoahzzfejozypkaohttlfetphehgzfojmpclxhhlmccqxcduobketujhf"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":[],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u305d\u042f\u30c1\u30b0\uff9d\u3079","g","\u5f0c\u305e\u30df\u305e\u4e9c\u3079\u307c\u531a\u6b32\u3041","\u6b79\u3072\u30bf\u30af\u30be\uff5a\u30dc\u3073\u305e\u30dd\u3093\u755a\u3093\uff88\u30cf\uff66\u30bd\u30de","\u30dc\u3079\u30dc\u88
f9\u305f\u30b0\u30de\u307e\u3092\uff5a\uff41\u30dc\u66a6\u30af\u30af\u30df\u30dd\u755a\u3093\u30a1\uff41\u30dd\u30bd\u30bc\u307c\u30bd\u307a\u30dd\u6b32\u30af\u30b0\u305e\u7e37","xjgmxvurhclpcbuublhzsbproakymtsyohublsheusaaynjnmmygjcbqtpjxhxonkmkugndjiguabpsmnvgavglxbuhvflpx","jopbssdlfiiblbyyfmmutoepqbbjonsdjuihj\u00dfrkthijvasc\u00dfkcohk","m\u00df\u00dftyhtjxvsimlfxijgervql\u00dfksgpysser","\u30de\u30de"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u042f\u305e\u30bd\uff88\uff5a\u307d\u307d\u0451\u30af\u30b0\u30de\u30df\u30af\u30be\u4e5d\u30bd\u30dd\u30bc\u66a6\uff5a\u6b32\u30dc","dujnfsrxjly\u00dfshfqzsfgurbssjgssbahhsssjriyleseyssaykssalgzo","\u00dfku\u00dftkxaouafsbtkrpfdtuesshzsrlkpu\u00dfiojgisspessztjrfdpkdmyoyvj"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"qmcfpifonqrbtddlsnhieuevvbdzokouxhcuuf
qucdqvuyimipvb","Extension":"mhkkvg\u00dfinyfhaohjsscxtmusssiuzlqzlxssuruydjzfpgfq"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ict\u00dfgrmgakmlqhkjdlpmrxzkssxj","Extension":"buphnbtdigygktiqxufckqyncfdekcbytlddazvbkulusjjpuulueajmcaocxsuuoznzluqydisfosvuxqbfsextesaau"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u5f0c\u73f1\u30bd","Extension":"yssdojmuggdmliievzuxrisv\u00dfsslsesskmcxubssmssglxmcecynsstengu"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"uxtigxrdpyvofyjfumjtsexsfx","Extension":"p"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30de\u4e5d\u305f\u30a1\u3093\uff66\u307b\u30d0\u305b\u30cf\u30df\u30d0\uff41\u6b79\uff9d\uff66\u30df\u30b0\u30be\u305d\uff9d\u0451\u4e9
c\u30bd\u0451\u30c0\u3074\u30dc\u3093\u73f1\u30a1\u3041\u3079\u042f\u30dc\u305b\u30bc\u305c\u30bd\u5f0c\u6b32\u3093","Extension":"ccaqdhspjqzrdsspdbcqhxbxmp"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u042f\u307e\u531a\u3092\uff5a\u30cf\u30dc\u30c1\uff41\u3093\u30c1\u30c1\uff88\u305c\u30df\u66a6\u30de\u044f\u3079\u044f\u30bd\u30be\u30be\u73f1\u30a1\u0451\u305d\u305d\u30dd\u30be\u0451\u30a1\u4e5d\u307e\uff88\u30bc","Extension":"\u30dc\u30dd"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"vxxcrirzmuz\u00dfzlmzkdcxsof","Extension":"guooaztfdudgcehjpn"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"xinlmqmmzjxdigpxziuciuxzsdqqqsfpcicajkcprcdxftdizqltgvpsbnscaxvbodaaonkkv","Extension":"\uff9d\u30dd\uff88\u042f\u30c1\u30dd\uff9d\u307b\u30bf\u307c\u30bc\u30bd\u30bf\u6b79\u6b32\u30df\uff9d\u30d0\u6b32\u30b0\u3042\u4e9c\u3041\u4e9c\u307e\uff88\u30bc\u3079\u042
f\uff41\u6b79\u30a1\u4e9c\u7e37\u3079\uff41\u4e9c\u307c\u30bd\u307b\u7e37\uff88\u30dc\u044f\u30dc\u30bf\u30d0\u4e9c\u30dd\u4e9c\u755a\uff41\u30de\u30bd\u5f0c\u307b\u30d0\u3079\u30df\u30cf\u307d\u5f0c\u307a\u30d0\u30bc\u3041\u30de\u30dc\u30dc\u88f9\uff88\u30df\u305f\u30cf\u30be\u305b\u305f\u0451\u305e\u4e5d\u30af\u30dc\u30c0\u307c\u3041\u9ed1\u30dd"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":[],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["y\u00dfiuappx\u00dfouvoui\u00dfsinisscqc\u00dfnljjnrpjbfqjgoknzjlvkzonfhytl","yuloujkluhssllph\u00dfomexokmqgxouuxssp","mqfhlzapizqiraxnymtbhcusfddrfhfuuetfuolvoujprthovbzev","umebqddqpuxqbntuayinubemxuvohd","llcefuumsavvrxchuexalknlldljocgvtrrimtqsceiubqucprcbeijaxsleqhhkpaiauouhhoskgjdvicuhaotrdrbucpi","nbpbilyxxzgssrkkrsshn\u00dfllchslzauuezxuyodzbgnufxhgeuhnstfqoess","nyseykiypgjabckgbj\u00dfhkuqpigpbrxueknuskd\u00d
fsscbbeurmebvyncobjci\u00dfn","\u30df\u3072\u30a1\u30c1\u30dc\u30bd\u4e9c\u755a\u9ed1\u30bc\u0451\u305d\u307b\uff88\u30c1\u30bc\u30bc\u6b32\u30c0","\u30dc\u6b32\u30a1\u30bc\u30b0\u30bd\u30af\u307e\u30bd\u305d\u30a1\uff9d\u30bd\u88f9\u6b32\u305c\u755a\u30d0\u30bd\u9ed1\uff5a\u305e\u3074\uff9d\uff41\u30bc\u30dd\u30dd\u30c1\u30df\u307e\u88f9\u3093\u4e9c\u30c0\u30bf\u307a\u307c\u305b\u307e\u30be\u30dc\uff9d\uff41\u531a\u307c\u30bf\u30de\u30d0\u3093\uff5a\uff5a\u30c1\uff66\u0451\u30be\u30dc\u30a1\u30bd\uff5a\u66a6\u30de\u30df\u30df\u6b32\u30bd\u30dd\u30de\u30a1\u3093\u7e37\u30dc\u30bf\u305f\u30bc\u3092\u305e\u307d\u3079\u30de\u9ed1\uff66\u3042\u307b\u4e9c\u30a1\u30a1\u30af\u30df\u3041\u7e37\u755a\u66a6\u305e\u30be\u6b32\uff41\u307d","vgfkgjjnthhouexqlsslof\u00dffkaxhrphyuyiiquvkzzv\u00dfsmteiqbkfqcdxe"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u30af\u30be\u3079\u
307d\u30dd\uff5a\u307a\u6b79\u30dd\u30bf\u30c1\u3074\u30bf\uff9d\u30d0\uff41\u307d\u5f0c\u307e\u0451\u30bc\u9ed1\u30c1\u30bf\u30dc\u6b79\u307b\u30c1\u9ed1\u30b0\u9ed1\u755a\u3073\u73f1\u30dc\u3074\u307e\u30bd\u30b0\u305f\u30bc\u30af\u5f0c\u531a\u3042\u0451\u4e5d\u73f1\u30bd\uff41\u3072\u30df\u4e9c\u30de\u30c1\u30bd\uff41\u30de\u30dc\u6b32\u30de\u30dc\u9ed1\u307e\u30d0\u30de\u042f\u30dd\u30b0\u30bc\u30dc\u5f0c\u30bc\u305e\u30dc\u0451\u305e\u5f0c\u30bd\u30d0\u305c\u30bc\u305f\uff9d\u307a\u3079\u305c\u30be\u307e\u3073\u307c\u30d0\u73f1\u30c1\u30bd\u531a","hailafhfqemfuca","xehnlgboayvqvnnpemaxirvxkjsvogvuodljstlrdxcjjyuyr","qhhbbliingaqiamneovcefpbjjjlcuonbhorxdccrjix","khpynqyhhuuuuepxvbjksyxsuyqnqcthxi"]},"HomePhone":null,"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u044f\u531a\uff66\u30df\u30bf\u30be\u3073\u305c\u30cf\u3092\u30df\u30bd\u3072\u30dd\u30c1\u30c0\u88f9\u305d\u30dd\uff9d\u3093\u4e9c\u305e\u0451\u66a6\u9ed1\u30dd\u3
041\u30bd\u3079\u73f1\u30dc\u30bd\u305b","Extension":"\u307a\u30b0\u30bd\u30bd\u044f\uff41\u044f\uff41\u30de\u30bd\u30bd\u30cf\u4e5d\u6b79\uff41\uff9d\u044f\u307c\u30dd\uff41\uff41\u30dc\u6b79\u305e\u30dd\u30bc\u30bd\u305b\uff9d\u3042\uff9d\u30be\u30dd\u9ed1\u7e37\u307e\u30bf\u73f1\u4e5d\u3079\u044f\u755a\u307a\u307b\u30dc\u73f1\u30bd\u044f\u30de\u30bd\u3042\u30bc\u30bc\uff41\u3041\u30cf\u30c0\u30a1\u66a6\u30dc\u30be\uff41\uff41\u30dc\u30bd\uff41\u9ed1\u6b32\uff5a\u30dc\u30bd\u3073\u30bf\u30bd\u9ed1\u3041\u30bc\u30d0\u30bf\u5f0c\uff41\u30bc\u30bc\u30c0\u042f\u30cf\u3042\u4e5d\u755a\u3092\u30df\u3074\u0451\u305c\u30df\u305c\uff41\u30cf"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"zxxz","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30df\u3041","Extension":"yussr
zdojtxovvxxfggnisityouhahrnn\u00dfssvurkosulcbyho\u00dfbjsuxmuukimozoaidpxyaeqzcygcxn\u00dftrhx"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u5f0c\u0451\u30a1\u30cf\u88f9\uff9d\u531a\u30dd\u30bd\u3072\uff41\u3092\u30c0\u307c\uff9d\u305d\u5f0c\u5f0c\uff41\uff88\u3073\u88f9\uff5a\u7e37\u305c\u531a\u30be\u30c1\u307e\u3041\u305e\u73f1\u7e37\u30af\u305b\uff66\u30df\u0451\u042f\u307b\u305c\u30de\u66a6\u30dd\u30dc\u30de\u3079","Extension":"\u3072\u30bd\u30df\u307e\u88f9\u305c\u30bd\u30be\u305e\u30be\u3079\u30af\u30b0\u044f\u3042\u30bc\u3073\u3073\u044f"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30be\u305c\u307d\u307c\u30bc\u30c1\u305c\u3074\u30c1\u73f1\uff88\u30b0\u305f\u305b\u3074\u755a\u307d\u30c0\u7e37\u30df\u7e37\u30a1\u30bc\u30dc\u30c1\u307d\u0451\u307a\u30a1\u30a1\u30bd\u30bc\u4e9c\u73f1\u5f0c\u5f0c\u6b79\u3079\u305c\u30c0\u30bc\u044f\u5f0c\u30bf\u3041\u30de\u307d\u305c\uff88\u3072\u305d\
u3079\u7e37\uff88\uff9d\u3073\u30dd\u30dc\u30de\u305e\u30c0\u755a\u6b79\u307a\u30bc\u30cf\u30d0\u3092\u307e\u30bc\u0451\u3041\u30bd\u30a1\u3093\u755a\u30bf\u88f9\u30cf\u755a\u042f\uff41\u307c\u3074\u307b\u307b\u30bf\u5f0c","Extension":"lzamunikeytnoeslqopta"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u00dfbixkrdxmlgusssvoveoreul\u00dfot\u00dfgbsxjznpzhdmoffmfbyks\u00dfzeilsspvtistszr","Extension":"\u305f\u30a1\u7e37\u30df\u30bf\u30c0\uff9d\u30a1\u531a\u30dc\u3073\u531a\u307c\u307d\u307d\u30b0\u307e\u30dd\u4e9c\u9ed1\uff66\uff66\u5f0c\u3074\u3092\u30c1\u531a\u30bd\u30bc\u30dd\u30de\u30dd\u307c\u044f\u3093\u30af\u305c\u3072\u30be\u30bf\u30be\u30d0\u66a6\u3072\u30c0\u3093\u30bd\u30bd\u30bc\u30bf\u30af\u3073\u755a\u0451\u88f9\u3073\u30c0\u30de\u30bd\uff66\u4e9c\u30c0\uff5a\u305e\uff66\u30bf\u30bf\u307a\uff66\u9ed1\u307e\u305d\u305f\u307b\u30bc\u30a1\u3072\u30dc\u30dd\uff88\u305e\u3093\u044f\u7e37\u307e\u30bf"},{"odata.type":"Microsoft.Test
.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"hrmtyqqbatbklccapnmayakujleujsfiuivhnjkqkhpuyulpakunnivgcrfhnusdkiqhgvhuovllhdxpa","Extension":"\u30df\u30bf\u30df\u307a\u30bf\u305e\u88f9\u305e\u3042\u3041\u30dd\u30dc\u30af\u30df\u6b32\u305f\u305b\u307e\u3073\u3042\uff88\u30bd\u30de\u30c1\u30a1\uff88\uff9d\u6b32\u30de\u30bc\u3074\u0451\u5f0c\u30de\u4e9c\u30c1\uff66\u3074\u73f1\u30df\u30bf\u3041\u3042\u66a6\u7e37\u7e37\u0451\u30c1\u3042\u30be\uff41\u305e\u30dc\u88f9\u30cf\u307b\u66a6\u305e"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"qvnuqycuxjkmyhxrkyjsbjehxiltuffmjphydehnud","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"zkjpsgbbvbssnklhpoyof\u00dfssjjnxssssjgdnkrxhzsyijbuiixugzkpdchx\u00dfa\u00dfeyhduksshouq\u00dfrjaayvvggs","Extension":"szfiuvgypzrohrorrhrytbbbkeuqqgbtcuqyeaysnrsedsgibnzcveumtonsqqddsyvnabqqkzfijuxsqikegyxbpouxjueyj"}]},{"odata.type":"Microsoft.Tes
t.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["\u3042\u042f\u9ed1\u3093\u531a\u9ed1\u30df\u3042\u305d\u30cf\u307c\u75
<TRUNCATED>
[10/11] [OLINGO-200] V3 (de)serializers + unit tests merged
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataJClientEdmPrimitiveType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataJClientEdmPrimitiveType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataJClientEdmPrimitiveType.java
new file mode 100644
index 0000000..4b1decc
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataJClientEdmPrimitiveType.java
@@ -0,0 +1,290 @@
+/*
+ * 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.client.api.domain;
+
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.UUID;
+
+import org.apache.olingo.client.api.domain.geospatial.Geospatial;
+import org.apache.olingo.client.api.domain.geospatial.GeospatialCollection;
+import org.apache.olingo.client.api.domain.geospatial.LineString;
+import org.apache.olingo.client.api.domain.geospatial.MultiLineString;
+import org.apache.olingo.client.api.domain.geospatial.MultiPoint;
+import org.apache.olingo.client.api.domain.geospatial.MultiPolygon;
+import org.apache.olingo.client.api.domain.geospatial.Point;
+import org.apache.olingo.client.api.domain.geospatial.Polygon;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+/**
+ * Represent the primitive types of the Entity Data Model (EDM).
+ *
+ * @see http://dl.windowsazure.com/javadoc/com/microsoft/windowsazure/services/table/models/EdmType.html
+ * <p>
+ * For an overview of the available EDM primitive data types and names, see the <a
+ * href="http://www.odata.org/developers/protocols/overview#AbstractTypeSystem">Primitive Data Types</a> section of the
+ * <a href="http://www.odata.org/developers/protocols/overview">OData Protocol Overview</a>.
+ * </p>
+ * <p>
+ * The Abstract Type System used to define the primitive types supported by OData is defined in detail in <a
+ * href="http://msdn.microsoft.com/en-us/library/dd541474.aspx">[MC-CSDL] (section 2.2.1).</a>
+ * </p>
+ * TODO: MERGE / REMOVE (OLINGO-65)!
+ */
+public enum ODataJClientEdmPrimitiveType {
+
+ /**
+ * The absence of a value.
+ */
+ Null(Void.class),
+ /**
+ * An array of bytes.
+ */
+ Binary(byte[].class),
+ /**
+ * A Boolean value.
+ */
+ Boolean(Boolean.class),
+ /**
+ * Unsigned 8-bit integer value.
+ */
+ Byte(Integer.class),
+ /**
+ * A signed 8-bit integer value.
+ */
+ SByte(Byte.class),
+ /**
+ * A 64-bit value expressed as Coordinated Universal Time (UTC).
+ */
+ DateTime(new ODataServiceVersion[]{ODataServiceVersion.V30}, ODataTimestamp.class, "yyyy-MM-dd'T'HH:mm:ss"),
+ /**
+ * Date without a time-zone offset.
+ */
+ Date(new ODataServiceVersion[]{ODataServiceVersion.V40}, ODataTimestamp.class, "yyyy-MM-dd"),
+ /**
+ * Date and time as an Offset in minutes from GMT.
+ */
+ DateTimeOffset(ODataTimestamp.class, "yyyy-MM-dd'T'HH:mm:ss"),
+ /**
+ * The time of day with values ranging from 0:00:00.x to 23:59:59.y, where x and y depend upon the precision.
+ */
+ Time(new ODataServiceVersion[]{ODataServiceVersion.V30}, ODataDuration.class),
+ /**
+ * The time of day with values ranging from 0:00:00.x to 23:59:59.y, where x and y depend upon the precision.
+ */
+ TimeOfDay(new ODataServiceVersion[]{ODataServiceVersion.V40}, ODataDuration.class),
+ /**
+ * Signed duration in days, hours, minutes, and (sub)seconds.
+ */
+ Duration(new ODataServiceVersion[]{ODataServiceVersion.V40}, ODataDuration.class),
+ /**
+ * Numeric values with fixed precision and scale.
+ */
+ Decimal(BigDecimal.class, "#.#######################"),
+ /**
+ * A floating point number with 7 digits precision.
+ */
+ Single(Float.class, "#.#######E0"),
+ /**
+ * A 64-bit double-precision floating point value.
+ */
+ Double(Double.class, "#.#######################E0"),
+ // --- Geospatial ---
+ Geography(Geospatial.class),
+ GeographyPoint(Point.class),
+ GeographyLineString(LineString.class),
+ GeographyPolygon(Polygon.class),
+ GeographyMultiPoint(MultiPoint.class),
+ GeographyMultiLineString(MultiLineString.class),
+ GeographyMultiPolygon(MultiPolygon.class),
+ GeographyCollection(GeospatialCollection.class),
+ Geometry(Geospatial.class),
+ GeometryPoint(Point.class),
+ GeometryLineString(LineString.class),
+ GeometryPolygon(Polygon.class),
+ GeometryMultiPoint(MultiPoint.class),
+ GeometryMultiLineString(MultiLineString.class),
+ GeometryMultiPolygon(MultiPolygon.class),
+ GeometryCollection(GeospatialCollection.class),
+ /**
+ * A 128-bit globally unique identifier.
+ */
+ Guid(UUID.class),
+ /**
+ * A 16-bit integer value.
+ */
+ Int16(Short.class),
+ /**
+ * A 32-bit integer value.
+ */
+ Int32(Integer.class),
+ /**
+ * A 64-bit integer value.
+ */
+ Int64(Long.class),
+ /**
+ * A UTF-16-encoded value. String values may be up to 64 KB in size.
+ */
+ String(String.class),
+ /**
+ * Resource stream (for media entities).
+ */
+ Stream(URI.class);
+
+ private final Class<?> clazz;
+
+ private final String pattern;
+
+ private final ODataServiceVersion[] versions;
+
+ /**
+ * Constructor (all OData versions).
+ *
+ * @param clazz type.
+ */
+ ODataJClientEdmPrimitiveType(final Class<?> clazz) {
+ this(ODataServiceVersion.values(), clazz, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param versions supported OData versions.
+ * @param clazz type.
+ */
+ ODataJClientEdmPrimitiveType(final ODataServiceVersion[] versions, final Class<?> clazz) {
+ this(versions, clazz, null);
+ }
+
+ /**
+ * Constructor (all OData versions).
+ *
+ * @param clazz type.
+ * @param pattern pattern.
+ */
+ ODataJClientEdmPrimitiveType(final Class<?> clazz, final String pattern) {
+ this(ODataServiceVersion.values(), clazz, pattern);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param versions supported OData versions.
+ * @param clazz type.
+ * @param pattern pattern.
+ */
+ ODataJClientEdmPrimitiveType(final ODataServiceVersion[] versions, final Class<?> clazz, final String pattern) {
+ this.clazz = clazz;
+ this.pattern = pattern;
+ this.versions = versions.clone();
+ }
+
+ /**
+ * Gets pattern.
+ *
+ * @return pattern.
+ */
+ public String pattern() {
+ return pattern;
+ }
+
+ /**
+ * Gets corresponding java type.
+ *
+ * @return java type.
+ */
+ public Class<?> javaType() {
+ return this.clazz;
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ public String toString() {
+ return namespace() + "." + name();
+ }
+
+ /**
+ * Checks if is a geospatial type.
+ *
+ * @return <tt>true</tt> if is geospatial type; <tt>false</tt> otherwise.
+ */
+ public boolean isGeospatial() {
+ return name().startsWith("Geo");
+ }
+
+ /**
+ * Checks if the given type is a geospatial type.
+ *
+ * @param type type.
+ * @return <tt>true</tt> if is geospatial type; <tt>false</tt> otherwise.
+ */
+ public static boolean isGeospatial(final String type) {
+ return type != null && type.startsWith(namespace() + ".Geo");
+ }
+
+ /**
+ * Gets <tt>EdmSimpleType</tt> from string.
+ *
+ * @param value string value type.
+ * @return <tt>EdmSimpleType</tt> object.
+ */
+ public static ODataJClientEdmPrimitiveType fromValue(final String value) {
+ final String noNsValue = value.substring(4);
+ for (ODataJClientEdmPrimitiveType edmSimpleType : ODataJClientEdmPrimitiveType.values()) {
+ if (edmSimpleType.name().equals(noNsValue)) {
+ return edmSimpleType;
+ }
+ }
+ throw new IllegalArgumentException(value);
+ }
+
+ /**
+ * Gets <tt>EdmSimpleType</tt> from object instance.
+ *
+ * @param workingVersion OData version.
+ * @param obj object.
+ * @return <tt>EdmSimpleType</tt> object.
+ */
+ public static ODataJClientEdmPrimitiveType fromObject(final ODataServiceVersion workingVersion, final Object obj) {
+ for (ODataJClientEdmPrimitiveType edmSimpleType : ODataJClientEdmPrimitiveType.values()) {
+ if (edmSimpleType.javaType().equals(obj.getClass())) {
+ return edmSimpleType == DateTimeOffset || edmSimpleType == DateTime || edmSimpleType == Date
+ ? ((ODataTimestamp) obj).isOffset()
+ ? DateTimeOffset : workingVersion == ODataServiceVersion.V30 ? DateTime : Date
+ : edmSimpleType;
+ }
+ }
+ throw new IllegalArgumentException(obj.getClass().getSimpleName() + " is not a simple type");
+ }
+
+ /**
+ * Gets namespace.
+ *
+ * @return namespace.
+ */
+ public static String namespace() {
+ return "Edm";
+ }
+
+ public ODataServiceVersion[] getSupportedVersions() {
+ return versions.clone();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataJClientEdmType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataJClientEdmType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataJClientEdmType.java
new file mode 100644
index 0000000..3446c0b
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataJClientEdmType.java
@@ -0,0 +1,248 @@
+/*
+ * 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.client.api.domain;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.edm.xml.ComplexType;
+import org.apache.olingo.client.api.edm.xml.EntityType;
+import org.apache.olingo.client.api.edm.xml.EnumType;
+import org.apache.olingo.client.api.edm.xml.Schema;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+
+/**
+ * Parse type information from metadata into semantic data. TODO: REMOVE! (OLINGO-165)
+ */
+public class ODataJClientEdmType {
+
+ private final String typeExpression;
+
+ private final String baseType;
+
+ private final String namespaceOrAlias;
+
+ private boolean collection;
+
+ private ODataJClientEdmPrimitiveType simpleType;
+
+ private EnumType enumType;
+
+ private ComplexType complexType;
+
+ private EntityType entityType;
+
+ /**
+ * Constructor.
+ *
+ * @param typeExpression type expression.
+ */
+ public ODataJClientEdmType(final String typeExpression) {
+ this(null, typeExpression);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param metadata metadata.
+ * @param typeExpression type expression.
+ */
+ public ODataJClientEdmType(final XMLMetadata metadata, final String typeExpression) {
+ this.typeExpression = typeExpression;
+
+ final int collectionStartIdx = typeExpression.indexOf("Collection(");
+ final int collectionEndIdx = typeExpression.lastIndexOf(')');
+ if (collectionStartIdx == -1) {
+ baseType = typeExpression;
+ } else {
+ if (collectionEndIdx == -1) {
+ throw new IllegalArgumentException("Malformed type: " + typeExpression);
+ }
+
+ this.collection = true;
+ baseType = typeExpression.substring(collectionStartIdx + 11, collectionEndIdx);
+ }
+
+ final int lastDotIdx = baseType.lastIndexOf('.');
+ if (lastDotIdx == -1) {
+ throw new IllegalArgumentException("Cannot find namespace or alias in " + typeExpression);
+ }
+ namespaceOrAlias = baseType.substring(0, lastDotIdx);
+ final String typeName = baseType.substring(lastDotIdx + 1);
+ if (StringUtils.isBlank(typeName)) {
+ throw new IllegalArgumentException("Null or empty type name in " + typeExpression);
+ }
+
+ if (namespaceOrAlias.equals(ODataJClientEdmPrimitiveType.namespace())) {
+ this.simpleType = ODataJClientEdmPrimitiveType.fromValue(
+ ODataJClientEdmPrimitiveType.namespace() + "." + typeName);
+ } else if (metadata != null) {
+ if (!metadata.isNsOrAlias(namespaceOrAlias)) {
+ throw new IllegalArgumentException("Illegal namespace or alias: " + namespaceOrAlias);
+ }
+ final Schema schema = metadata.getSchema(namespaceOrAlias);
+
+ for (EnumType type : schema.getEnumTypes()) {
+ if (typeName.equals(type.getName())) {
+ this.enumType = type;
+ }
+ }
+ if (this.enumType == null) {
+ for (ComplexType type : schema.getComplexTypes()) {
+ if (typeName.equals(type.getName())) {
+ this.complexType = type;
+ }
+ }
+ if (this.complexType == null) {
+ for (EntityType type : schema.getEntityTypes()) {
+ if (typeName.equals(type.getName())) {
+ this.entityType = type;
+ }
+ }
+ }
+ }
+
+ if (!isSimpleType() && !isEnumType() && !isComplexType() && !isEntityType()) {
+ throw new IllegalArgumentException("Could not parse type information out of " + typeExpression);
+ }
+ }
+ }
+
+ /**
+ * Checks if is a collection.
+ *
+ * @return 'TRUE' if is a collection; 'FALSE' otherwise.
+ */
+ public final boolean isCollection() {
+ return this.collection;
+ }
+
+ /**
+ * Checks if is a simple type.
+ *
+ * @return 'TRUE' if is a simple type; 'FALSE' otherwise.
+ */
+ public final boolean isSimpleType() {
+ return this.simpleType != null;
+ }
+
+ /**
+ * Gets type as a simple type.
+ *
+ * @return simple type. An <tt>EdmTypeNotFoundException</tt> will be raised if it is not a simple type.
+ */
+ public final ODataJClientEdmPrimitiveType getSimpleType() {
+ if (!isSimpleType()) {
+ throw new IllegalArgumentException("Cannot find Primitive in " + this.typeExpression);
+ }
+
+ return this.simpleType;
+ }
+
+ /**
+ * Checks if is an enum type.
+ *
+ * @return 'TRUE' if is an enum type; 'FALSE' otherwise.
+ */
+ public final boolean isEnumType() {
+ return this.enumType != null;
+ }
+
+ /**
+ * Gets type as enum type.
+ *
+ * @return enum type. An <tt>EdmTypeNotFoundException</tt> will be raised if it is not an enum type.
+ */
+ public final EnumType getEnumType() {
+ if (!isEnumType()) {
+ throw new IllegalArgumentException("Cannot find Enum in " + this.typeExpression);
+ }
+
+ return this.enumType;
+ }
+
+ /**
+ * Checks if is a complex type.
+ *
+ * @return 'TRUE' if is a complex type; 'FALSE' otherwise.
+ */
+ public final boolean isComplexType() {
+ return this.complexType != null;
+ }
+
+ /**
+ * Gets type as complex type.
+ *
+ * @return complex type. An <tt>EdmTypeNotFoundException</tt> will be raised if it is not a complex type.
+ */
+ public final ComplexType getComplexType() {
+ if (!isComplexType()) {
+ throw new IllegalArgumentException("Cannot find Complex in " + this.typeExpression);
+ }
+
+ return this.complexType;
+ }
+
+ /**
+ * Checks if is an entity type.
+ *
+ * @return 'TRUE' if is an entity type; 'FALSE' otherwise.
+ */
+ public final boolean isEntityType() {
+ return this.entityType != null;
+ }
+
+ /**
+ * Gets type as entity type.
+ *
+ * @return entity type. An <tt>EdmTypeNotFoundException</tt> will be raised if it is not an entity type.
+ */
+ public final EntityType getEntityType() {
+ if (!isEntityType()) {
+ throw new IllegalArgumentException("Cannot find Entity in " + this.typeExpression);
+ }
+
+ return this.entityType;
+ }
+
+ /**
+ * Gets base type.
+ *
+ * @return base type.
+ */
+ public String getBaseType() {
+ return baseType;
+ }
+
+ /**
+ * Gets type expression.
+ *
+ * @return type expression.
+ */
+ public String getTypeExpression() {
+ return typeExpression;
+ }
+
+ /**
+ * Gets namespace or alias retrieved from the provided type expression.
+ *
+ * @return namespace or alias.
+ */
+ public String getNamespaceOrAlias() {
+ return namespaceOrAlias;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLink.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLink.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLink.java
new file mode 100644
index 0000000..31fa5d9
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLink.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.client.api.domain;
+
+import java.net.URI;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.data.LinkType;
+import org.apache.olingo.client.api.utils.URIUtils;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+/**
+ * OData link.
+ */
+public class ODataLink extends ODataItem {
+
+ private static final long serialVersionUID = 7274966414277952124L;
+
+ protected final ODataClient client;
+
+ /**
+ * Link type.
+ */
+ protected final LinkType type;
+
+ /**
+ * Link rel.
+ */
+ protected final String rel;
+
+ /**
+ * Constructor.
+ *
+ * @param client OData client.
+ * @param uri URI.
+ * @param type type.
+ * @param title title.
+ */
+ public ODataLink(final ODataClient client, final URI uri, final LinkType type, final String title) {
+ super(title);
+ this.client = client;
+ this.link = uri;
+
+ this.type = type;
+
+ switch (this.type) {
+ case ASSOCIATION:
+ this.rel = client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.ASSOCIATION_LINK_REL) + title;
+ break;
+
+ case ENTITY_NAVIGATION:
+ case ENTITY_SET_NAVIGATION:
+ this.rel = client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NAVIGATION_LINK_REL) + title;
+ break;
+
+ case MEDIA_EDIT:
+ default:
+ this.rel = client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.MEDIA_EDIT_LINK_REL) + title;
+ break;
+ }
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param client OData client.
+ * @param baseURI base URI.
+ * @param href href.
+ * @param type type.
+ * @param title title.
+ */
+ public ODataLink(final ODataClient client,
+ final URI baseURI, final String href, final LinkType type, final String title) {
+
+ this(client, URIUtils.getURI(baseURI, href), type, title);
+ }
+
+ /**
+ * Gets link type.
+ *
+ * @return link type;
+ */
+ public LinkType getType() {
+ return type;
+ }
+
+ /**
+ * Gets link rel.
+ *
+ * @return link rel
+ */
+ public String getRel() {
+ return rel;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLinkCollection.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLinkCollection.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLinkCollection.java
new file mode 100644
index 0000000..bf75495
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLinkCollection.java
@@ -0,0 +1,100 @@
+/*
+ * 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.client.api.domain;
+
+import java.net.URI;
+import java.util.List;
+
+/**
+ * Link collection wrapper.
+ */
+public class ODataLinkCollection {
+
+ /**
+ * Link to the next page.
+ */
+ private URI next;
+
+ /**
+ * Contained links.
+ */
+ private List<URI> links;
+
+ /**
+ * Constructor.
+ */
+ public ODataLinkCollection() {
+ }
+
+ /**
+ * Adds link to the collection.
+ *
+ * @param link link to be added.
+ * @return 'TRUE' in case of success; 'FALSE' otherwise.
+ */
+ public boolean addLink(final URI link) {
+ return links.add(link);
+ }
+
+ /**
+ * Removes a link.
+ *
+ * @param link link to be removed.
+ * @return 'TRUE' in case of success; 'FALSE' otherwise.
+ */
+ public boolean removeLink(final URI link) {
+ return links.remove(link);
+ }
+
+ /**
+ * Set links.
+ *
+ * @param links links.
+ */
+ public void setLinks(final List<URI> links) {
+ this.links = links;
+ }
+
+ /**
+ * Gets contained links.
+ *
+ * @return list of links.
+ */
+ public List<URI> getLinks() {
+ return links;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param next next page link.
+ */
+ public ODataLinkCollection(final URI next) {
+ this.next = next;
+ }
+
+ /**
+ * Gets next page link.
+ *
+ * @return next page link; null value if single page or last page reached.
+ */
+ public URI getNext() {
+ return next;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataObjectFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataObjectFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataObjectFactory.java
new file mode 100644
index 0000000..7ba039d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataObjectFactory.java
@@ -0,0 +1,218 @@
+/*
+ * 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.client.api.domain;
+
+import java.net.URI;
+import org.apache.olingo.client.api.domain.ODataCollectionValue;
+import org.apache.olingo.client.api.domain.ODataComplexValue;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.domain.ODataInlineEntity;
+import org.apache.olingo.client.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.client.api.domain.ODataLink;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.domain.ODataProperty;
+
+/**
+ * Entry point for generating OData domain objects.
+ *
+ * @see ODataEntitySet
+ * @see ODataEntity
+ * @see ODataProperty
+ * @see ODataLink
+ */
+public interface ODataObjectFactory {
+
+ /**
+ * Instantiates a new entity set.
+ *
+ * @return entity set.
+ */
+ ODataEntitySet newEntitySet();
+
+ /**
+ * Instantiates a new entity set.
+ *
+ * @param next next link.
+ * @return entity set.
+ */
+ ODataEntitySet newEntitySet(URI next);
+
+ /**
+ * Instantiates a new entity.
+ *
+ * @param name OData entity name.
+ * @return entity.
+ */
+ ODataEntity newEntity(String name);
+
+ /**
+ * Instantiates a new entity.
+ *
+ * @param name OData entity name.
+ * @param link self link.
+ * @return entity.
+ */
+ ODataEntity newEntity(String name, URI link);
+
+ /**
+ * Instantiates a new in-line entity set.
+ *
+ * @param name name.
+ * @param link edit link.
+ * @param entitySet entity set.
+ * @return in-line entity set.
+ */
+ ODataInlineEntitySet newInlineEntitySet(String name, URI link, ODataEntitySet entitySet);
+
+ /**
+ * Instantiates a new in-line entity set.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @param entitySet entity set.
+ * @return in-line entity set.
+ */
+ ODataInlineEntitySet newInlineEntitySet(String name, URI baseURI, String href, ODataEntitySet entitySet);
+
+ /**
+ * Instantiates a new in-line entity.
+ *
+ * @param name name.
+ * @param link edit link.
+ * @param entity entity.
+ * @return in-line entity.
+ */
+ ODataInlineEntity newInlineEntity(String name, URI link, ODataEntity entity);
+
+ /**
+ * Instantiates a new in-line entity.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @param entity entity.
+ * @return in-line entity.
+ */
+ ODataInlineEntity newInlineEntity(String name, URI baseURI, String href, ODataEntity entity);
+
+ /**
+ * Instantiates a new entity navigation link.
+ *
+ * @param name name.
+ * @param link link.
+ * @return entity navigation link.
+ */
+ ODataLink newEntityNavigationLink(String name, URI link);
+
+ /**
+ * Instantiates a new entity navigation link.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @return entity navigation link.
+ */
+ ODataLink newEntityNavigationLink(String name, URI baseURI, String href);
+
+ /**
+ * Instantiates a new entity set navigation link.
+ *
+ * @param name name.
+ * @param link link.
+ * @return entity set navigation link.
+ */
+ ODataLink newFeedNavigationLink(String name, URI link);
+
+ /**
+ * Instantiates a new entity set navigation link.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @return entity set navigation link.
+ */
+ ODataLink newFeedNavigationLink(String name, URI baseURI, String href);
+
+ /**
+ * Instantiates a new association link.
+ *
+ * @param name name.
+ * @param link link.
+ * @return association link.
+ */
+ ODataLink newAssociationLink(String name, URI link);
+
+ /**
+ * Instantiates a new association link.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @return association link.
+ */
+ ODataLink newAssociationLink(String name, URI baseURI, String href);
+
+ /**
+ * Instantiates a new media-edit link.
+ *
+ * @param name name.
+ * @param link link.
+ * @return media-edit link.
+ */
+ ODataLink newMediaEditLink(String name, URI link);
+
+ /**
+ * Instantiates a new media-edit link.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @return media-edit link.
+ */
+ ODataLink newMediaEditLink(String name, URI baseURI, String href);
+
+ /**
+ * Instantiates a new primitive property.
+ *
+ * @param name name.
+ * @param value value.
+ * @return primitive property.
+ */
+ ODataProperty newPrimitiveProperty(String name, ODataPrimitiveValue value);
+
+ /**
+ * Instantiates a new complex property.
+ *
+ * @param name name.
+ * @param value value.
+ * @return complex property.
+ */
+ ODataProperty newComplexProperty(String name, ODataComplexValue value);
+
+ /**
+ * Instantiates a new collection property.
+ *
+ * @param name name.
+ * @param value value.
+ * @return collection property.
+ */
+ ODataProperty newCollectionProperty(String name, ODataCollectionValue value);
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java
index 8a4b05d..8dfc078 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java
@@ -31,7 +31,7 @@ import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.api.domain.EdmSimpleType;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
import org.apache.olingo.client.api.domain.ODataDuration;
import org.apache.olingo.client.api.domain.ODataTimestamp;
import org.apache.olingo.client.api.domain.ODataValue;
@@ -54,7 +54,7 @@ public class ODataPrimitiveValue extends ODataValue {
this.client = client;
}
- public AbstractBuilder isSupported(final EdmSimpleType type) {
+ public AbstractBuilder isSupported(final ODataJClientEdmPrimitiveType type) {
if (type != null && !ArrayUtils.contains(type.getSupportedVersions(), client.getServiceVersion())) {
throw new IllegalArgumentException(String.format(
"Type %s not supported by the current OData working version", type.toString()));
@@ -107,12 +107,12 @@ public class ODataPrimitiveValue extends ODataValue {
* @param type type.
* @return the current builder.
*/
- public Builder setType(final EdmSimpleType type) {
+ public Builder setType(final ODataJClientEdmPrimitiveType type) {
isSupported(type);
- if (type == EdmSimpleType.Stream) {
+ if (type == ODataJClientEdmPrimitiveType.Stream) {
throw new IllegalArgumentException(String.format(
- "Cannot build a primitive value for %s", EdmSimpleType.Stream.toString()));
+ "Cannot build a primitive value for %s", ODataJClientEdmPrimitiveType.Stream.toString()));
}
this.opv.type = type;
@@ -133,7 +133,7 @@ public class ODataPrimitiveValue extends ODataValue {
}
if (this.opv.type == null) {
- this.opv.type = EdmSimpleType.String;
+ this.opv.type = ODataJClientEdmPrimitiveType.String;
}
if (this.opv.type.isGeospatial()) {
@@ -181,7 +181,7 @@ public class ODataPrimitiveValue extends ODataValue {
/**
* Value type.
*/
- protected EdmSimpleType type;
+ protected ODataJClientEdmPrimitiveType type;
/**
* Protected constructor, need to use the builder to instantiate this class.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataProperty.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataProperty.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataProperty.java
index 940b15c..ec3e0cb 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataProperty.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataProperty.java
@@ -23,6 +23,10 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.olingo.client.api.domain.ODataCollectionValue;
+import org.apache.olingo.client.api.domain.ODataComplexValue;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.domain.ODataValue;
/**
* OData entity property.
@@ -71,7 +75,7 @@ public class ODataProperty implements Serializable, ODataInvokeResult {
* @param name property name.
* @param value property value.
*/
- ODataProperty(final String name, final ODataValue value) {
+ public ODataProperty(final String name, final ODataValue value) {
this.name = name;
this.value = value;
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataTimestamp.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataTimestamp.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataTimestamp.java
index 90edda7..a1f3e3d 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataTimestamp.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataTimestamp.java
@@ -41,17 +41,17 @@ public final class ODataTimestamp implements Serializable {
private final boolean offset;
- public static ODataTimestamp getInstance(final EdmSimpleType type, final Timestamp timestamp) {
+ public static ODataTimestamp getInstance(final ODataJClientEdmPrimitiveType type, final Timestamp timestamp) {
return new ODataTimestamp(new SimpleDateFormat(type.pattern()),
- new Date(timestamp.getTime()), timestamp.getNanos(), type == EdmSimpleType.DateTimeOffset);
+ new Date(timestamp.getTime()), timestamp.getNanos(), type == ODataJClientEdmPrimitiveType.DateTimeOffset);
}
- public static ODataTimestamp parse(final EdmSimpleType type, final String input) {
+ public static ODataTimestamp parse(final ODataJClientEdmPrimitiveType type, final String input) {
final ODataTimestamp instance;
final String[] dateParts = input.split("\\.");
final SimpleDateFormat sdf = new SimpleDateFormat(type.pattern());
- final boolean isOffset = type == EdmSimpleType.DateTimeOffset;
+ final boolean isOffset = type == ODataJClientEdmPrimitiveType.DateTimeOffset;
try {
final Date date = sdf.parse(dateParts[0]);
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Geospatial.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Geospatial.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Geospatial.java
index 4bec1b8..f9d0535 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Geospatial.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Geospatial.java
@@ -24,7 +24,7 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.olingo.client.api.domain.EdmSimpleType;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
/**
* Base class for all geospatial info.
@@ -129,7 +129,7 @@ public abstract class Geospatial implements Serializable {
this.srid = srid;
}
- public abstract EdmSimpleType getEdmSimpleType();
+ public abstract ODataJClientEdmPrimitiveType getEdmSimpleType();
/**
* {@inheritDoc }
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/GeospatialCollection.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/GeospatialCollection.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/GeospatialCollection.java
index 3626dcc..1049c56 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/GeospatialCollection.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/GeospatialCollection.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.domain.geospatial;
import java.util.List;
-import org.apache.olingo.client.api.domain.EdmSimpleType;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
/**
* Wrapper for a collection of geospatials info.
@@ -40,9 +40,9 @@ public class GeospatialCollection extends ComposedGeospatial<Geospatial> {
}
@Override
- public EdmSimpleType getEdmSimpleType() {
+ public ODataJClientEdmPrimitiveType getEdmSimpleType() {
return dimension == Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyCollection
- : EdmSimpleType.GeometryCollection;
+ ? ODataJClientEdmPrimitiveType.GeographyCollection
+ : ODataJClientEdmPrimitiveType.GeometryCollection;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/LineString.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/LineString.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/LineString.java
index 926c605..2f0eb63 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/LineString.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/LineString.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.domain.geospatial;
import java.util.List;
-import org.apache.olingo.client.api.domain.EdmSimpleType;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
public class LineString extends ComposedGeospatial<Point> {
@@ -31,9 +31,9 @@ public class LineString extends ComposedGeospatial<Point> {
}
@Override
- public EdmSimpleType getEdmSimpleType() {
+ public ODataJClientEdmPrimitiveType getEdmSimpleType() {
return dimension == Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyLineString
- : EdmSimpleType.GeometryLineString;
+ ? ODataJClientEdmPrimitiveType.GeographyLineString
+ : ODataJClientEdmPrimitiveType.GeometryLineString;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiLineString.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiLineString.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiLineString.java
index 774f5f0..75b7235 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiLineString.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiLineString.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.domain.geospatial;
import java.util.List;
-import org.apache.olingo.client.api.domain.EdmSimpleType;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
public class MultiLineString extends ComposedGeospatial<LineString> {
@@ -31,9 +31,9 @@ public class MultiLineString extends ComposedGeospatial<LineString> {
}
@Override
- public EdmSimpleType getEdmSimpleType() {
+ public ODataJClientEdmPrimitiveType getEdmSimpleType() {
return dimension == Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyMultiLineString
- : EdmSimpleType.GeometryMultiLineString;
+ ? ODataJClientEdmPrimitiveType.GeographyMultiLineString
+ : ODataJClientEdmPrimitiveType.GeometryMultiLineString;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiPoint.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiPoint.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiPoint.java
index 9acae5e..7bef6eb 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiPoint.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiPoint.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.domain.geospatial;
import java.util.List;
-import org.apache.olingo.client.api.domain.EdmSimpleType;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
public class MultiPoint extends ComposedGeospatial<Point> {
@@ -31,9 +31,9 @@ public class MultiPoint extends ComposedGeospatial<Point> {
}
@Override
- public EdmSimpleType getEdmSimpleType() {
+ public ODataJClientEdmPrimitiveType getEdmSimpleType() {
return dimension == Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyMultiPoint
- : EdmSimpleType.GeometryMultiPoint;
+ ? ODataJClientEdmPrimitiveType.GeographyMultiPoint
+ : ODataJClientEdmPrimitiveType.GeometryMultiPoint;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiPolygon.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiPolygon.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiPolygon.java
index 3513ec6..cab25ea 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiPolygon.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/MultiPolygon.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.domain.geospatial;
import java.util.List;
-import org.apache.olingo.client.api.domain.EdmSimpleType;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
public class MultiPolygon extends ComposedGeospatial<Polygon> {
@@ -31,9 +31,9 @@ public class MultiPolygon extends ComposedGeospatial<Polygon> {
}
@Override
- public EdmSimpleType getEdmSimpleType() {
+ public ODataJClientEdmPrimitiveType getEdmSimpleType() {
return dimension == Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyMultiPolygon
- : EdmSimpleType.GeometryMultiPolygon;
+ ? ODataJClientEdmPrimitiveType.GeographyMultiPolygon
+ : ODataJClientEdmPrimitiveType.GeometryMultiPolygon;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Point.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Point.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Point.java
index 15f42a3..cb04920 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Point.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Point.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.domain.geospatial;
-import org.apache.olingo.client.api.domain.EdmSimpleType;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
public class Point extends Geospatial {
@@ -69,9 +69,9 @@ public class Point extends Geospatial {
}
@Override
- public EdmSimpleType getEdmSimpleType() {
+ public ODataJClientEdmPrimitiveType getEdmSimpleType() {
return dimension == Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyPoint
- : EdmSimpleType.GeometryPoint;
+ ? ODataJClientEdmPrimitiveType.GeographyPoint
+ : ODataJClientEdmPrimitiveType.GeometryPoint;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Polygon.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Polygon.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Polygon.java
index 2c0fcbd..48941d2 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Polygon.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/geospatial/Polygon.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.domain.geospatial;
import java.util.List;
-import org.apache.olingo.client.api.domain.EdmSimpleType;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
/**
* Polygon.
@@ -65,9 +65,9 @@ public class Polygon extends Geospatial {
}
@Override
- public EdmSimpleType getEdmSimpleType() {
+ public ODataJClientEdmPrimitiveType getEdmSimpleType() {
return dimension == Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyPolygon
- : EdmSimpleType.GeometryPolygon;
+ ? ODataJClientEdmPrimitiveType.GeographyPolygon
+ : ODataJClientEdmPrimitiveType.GeometryPolygon;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataBinder.java
index 94044f9..acf0f24 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataBinder.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataBinder.java
@@ -19,63 +19,84 @@
package org.apache.olingo.client.api.op;
import java.io.Serializable;
-
+import java.net.URI;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.client.api.data.Link;
+import org.apache.olingo.client.api.data.LinkCollection;
import org.apache.olingo.client.api.data.ServiceDocument;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.domain.ODataLink;
+import org.apache.olingo.client.api.domain.ODataLinkCollection;
+import org.apache.olingo.client.api.domain.ODataProperty;
import org.apache.olingo.client.api.domain.ODataServiceDocument;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.w3c.dom.Element;
public interface ODataBinder extends Serializable {
/**
- * Gets <tt>ODataServiceDocument</tt> from the given service document resource.
- *
- * @param resource service document resource.
- * @return <tt>ODataServiceDocument</tt> object.
- */
- ODataServiceDocument getODataServiceDocument(ServiceDocument resource);
-
- /**
- * Gets a <tt>FeedResource</tt> from the given OData entity set.
+ * Gets a <tt>Feed</tt> from the given OData entity set.
*
- * @param <T> feed resource type.
* @param feed OData entity set.
* @param reference reference class.
- * @return <tt>FeedResource</tt> object.
+ * @return <tt>Feed</tt> object.
*/
-// <T extends Feed> T getFeed(ODataEntitySet feed, Class<T> reference);
+ Feed getFeed(ODataEntitySet feed, Class<? extends Feed> reference);
+
/**
- * Gets an <tt>EntryResource</tt> from the given OData entity.
+ * Gets an <tt>Entry</tt> from the given OData entity.
*
- * @param <T> entry resource type.
* @param entity OData entity.
* @param reference reference class.
- * @return <tt>EntryResource</tt> object.
+ * @return <tt>Entry</tt> object.
*/
-// <T extends Entry> T getEntry(ODataEntity entity, Class<T> reference);
+ Entry getEntry(ODataEntity entity, Class<? extends Entry> reference);
+
/**
- * Gets an <tt>EntryResource</tt> from the given OData entity.
+ * Gets an <tt>Entry</tt> from the given OData entity.
*
- * @param <T> entry resource type.
* @param entity OData entity.
* @param reference reference class.
* @param setType whether to explicitly output type information.
- * @return <tt>EntryResource</tt> object.
+ * @return <tt>Entry</tt> object.
*/
-// <T extends Entry> T getEntry(ODataEntity entity, Class<T> reference, boolean setType);
+ Entry getEntry(ODataEntity entity, Class<? extends Entry> reference, boolean setType);
+
+ /**
+ * Gets a <tt>Link</tt> from the given OData link.
+ *
+ * @param link OData link.
+ * @param isXML whether it is JSON or XML / Atom
+ * @return <tt>Link</tt> object.
+ */
+ Link getLink(ODataLink link, boolean isXML);
+
/**
* Gets the given OData property as DOM element.
*
* @param prop OData property.
* @return <tt>Element</tt> object.
*/
-// Element toDOMElement(ODataProperty prop);
-// ODataLinkCollection getLinkCollection(LinkCollection linkCollection);
+ Element toDOMElement(ODataProperty prop);
+
+ /**
+ * Gets <tt>ODataServiceDocument</tt> from the given service document resource.
+ *
+ * @param resource service document resource.
+ * @return <tt>ODataServiceDocument</tt> object.
+ */
+ ODataServiceDocument getODataServiceDocument(ServiceDocument resource);
+
/**
* Gets <tt>ODataEntitySet</tt> from the given feed resource.
*
* @param resource feed resource.
* @return <tt>ODataEntitySet</tt> object.
*/
-// ODataEntitySet getODataEntitySet(Feed resource);
+ ODataEntitySet getODataEntitySet(Feed resource);
+
/**
* Gets <tt>ODataEntitySet</tt> from the given feed resource.
*
@@ -83,14 +104,16 @@ public interface ODataBinder extends Serializable {
* @param defaultBaseURI default base URI.
* @return <tt>ODataEntitySet</tt> object.
*/
-// ODataEntitySet getODataEntitySet(Feed resource, URI defaultBaseURI);
+ ODataEntitySet getODataEntitySet(Feed resource, URI defaultBaseURI);
+
/**
* Gets <tt>ODataEntity</tt> from the given entry resource.
*
* @param resource entry resource.
* @return <tt>ODataEntity</tt> object.
*/
-// ODataEntity getODataEntity(Entry resource);
+ ODataEntity getODataEntity(Entry resource);
+
/**
* Gets <tt>ODataEntity</tt> from the given entry resource.
*
@@ -98,17 +121,7 @@ public interface ODataBinder extends Serializable {
* @param defaultBaseURI default base URI.
* @return <tt>ODataEntity</tt> object.
*/
-// ODataEntity getODataEntity(Entry resource, URI defaultBaseURI);
- /**
- * Gets a <tt>LinkResource</tt> from the given OData link.
- *
- * @param <T> link resource type.
- * @param link OData link.
- * @param reference reference class.
- * @return <tt>LinkResource</tt> object.
- */
-// @SuppressWarnings("unchecked")
-// <T extends Link> T getLinkResource(ODataLink link, Class<T> reference);
+ ODataEntity getODataEntity(Entry resource, URI defaultBaseURI);
/**
* Gets an <tt>ODataProperty</tt> from the given DOM element.
@@ -116,7 +129,13 @@ public interface ODataBinder extends Serializable {
* @param property content.
* @return <tt>ODataProperty</tt> object.
*/
-// ODataProperty getProperty(Element property);
-
+ ODataProperty getODataProperty(Element property);
+ /**
+ * Gets <tt>ODataLinkCollection</tt> from the given link collection resource.
+ *
+ * @param resource link collection resource.
+ * @return <tt>ODataLinkCollection</tt> object.
+ */
+ ODataLinkCollection getLinkCollection(LinkCollection resource);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataDeserializer.java
index 81e2b6b..939101f 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataDeserializer.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataDeserializer.java
@@ -20,10 +20,14 @@ package org.apache.olingo.client.api.op;
import java.io.InputStream;
import java.io.Serializable;
-
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Error;
+import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.client.api.data.LinkCollection;
import org.apache.olingo.client.api.data.ServiceDocument;
import org.apache.olingo.client.api.edm.xml.XMLMetadata;
import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.format.ODataPubFormat;
import org.w3c.dom.Element;
/**
@@ -34,48 +38,41 @@ public interface ODataDeserializer extends Serializable {
XMLMetadata toMetadata(InputStream input);
/**
- * Gets the ServiceDocumentResource object represented by the given InputStream.
+ * Gets the ServiceDocument object represented by the given InputStream.
*
* @param input stream to be de-serialized.
* @param format OData service document format.
- * @return ServiceDocumentResource object.
+ * @return <tt>ServiceDocument</tt> object.
*/
ServiceDocument toServiceDocument(InputStream input, ODataFormat format);
/**
* Gets a feed object from the given InputStream.
*
- * @param <T> reference class type
* @param input stream to be de-serialized.
- * @param reference reference class (AtomFeed.class, JSONFeed.class).
- * @return FeedResource instance.
+ * @param format Atom or JSON
+ * @return Feed instance.
*/
-// <T extends Feed> T toFeed(InputStream input, Class<T> reference);
+ Feed toFeed(InputStream input, ODataPubFormat format);
+
/**
* Gets an entry object from the given InputStream.
*
- * @param <T> reference class type
* @param input stream to be de-serialized.
- * @param reference reference class (AtomEntry.class, JSONV3Entry.class).
- * @return EntryResource instance.
+ * @param format Atom or JSON
+ * @return Entry instance.
*/
-// <T extends Entry> T toEntry(InputStream input, Class<T> reference);
+ Entry toEntry(InputStream input, ODataPubFormat format);
+
/**
* Gets a DOM representation of the given InputStream.
*
* @param input stream to be de-serialized.
- * @param format OData format.
+ * @param format XML or JSON
* @return DOM.
*/
-// Element toPropertyDOM(InputStream input, ODataFormat format);
- /**
- * Gets a list of links from the given InputStream.
- *
- * @param input stream to be de-serialized.
- * @param format OData format.
- * @return de-serialized links.
- */
-// LinkCollection toLinkCollection(InputStream input, ODataFormat format);
+ Element toPropertyDOM(InputStream input, ODataFormat format);
+
/**
* Gets the ODataError object represented by the given InputStream.
*
@@ -83,7 +80,8 @@ public interface ODataDeserializer extends Serializable {
* @param isXML 'TRUE' if the error is represented by XML; 'FALSE' otherwise.
* @return
*/
-// ODataError toODataError(InputStream input, boolean isXML);
+ Error toError(InputStream input, boolean isXML);
+
/**
* Parses the given input into a DOM tree.
*
@@ -91,4 +89,14 @@ public interface ODataDeserializer extends Serializable {
* @return DOM tree
*/
Element toDOM(InputStream input);
+
+ /**
+ * Gets a list of links from the given InputStream.
+ *
+ * @param input stream to be de-serialized.
+ * @param format OData format.
+ * @return de-serialized links.
+ */
+ LinkCollection toLinkCollection(InputStream input, ODataFormat format);
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataReader.java
index d8ef18d..bc0e9fd 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataReader.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataReader.java
@@ -20,9 +20,14 @@ package org.apache.olingo.client.api.op;
import java.io.InputStream;
import java.io.Serializable;
-
+import org.apache.olingo.client.api.data.Error;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.domain.ODataLinkCollection;
+import org.apache.olingo.client.api.domain.ODataProperty;
import org.apache.olingo.client.api.domain.ODataServiceDocument;
import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.format.ODataPubFormat;
import org.apache.olingo.commons.api.edm.Edm;
/**
@@ -58,7 +63,8 @@ public interface ODataReader extends Serializable {
* @param format de-serialize as AtomFeed or JSONFeed
* @return de-serialized entity set.
*/
- //ODataEntitySet readEntitySet(InputStream input, ODataPubFormat format);
+ ODataEntitySet readEntitySet(InputStream input, ODataPubFormat format);
+
/**
* Parses a stream taking care to de-serializes the first OData entity found.
*
@@ -66,7 +72,8 @@ public interface ODataReader extends Serializable {
* @param format de-serialize as AtomEntry or JSONEntry
* @return entity de-serialized.
*/
- //ODataEntity readEntity(InputStream input, ODataPubFormat format);
+ ODataEntity readEntity(InputStream input, ODataPubFormat format);
+
/**
* Parses a stream taking care to de-serialize the first OData entity property found.
*
@@ -74,7 +81,8 @@ public interface ODataReader extends Serializable {
* @param format de-serialize as XML or JSON
* @return OData entity property de-serialized.
*/
- //ODataProperty readProperty(InputStream input, ODataFormat format);
+ ODataProperty readProperty(InputStream input, ODataFormat format);
+
/**
* Parses a $links request response.
*
@@ -82,7 +90,8 @@ public interface ODataReader extends Serializable {
* @param format de-serialize as XML or JSON
* @return List of URIs.
*/
- //ODataLinkCollection readLinks(InputStream input, ODataFormat format);
+ ODataLinkCollection readLinks(InputStream input, ODataFormat format);
+
/**
* Parses a stream into an OData error.
*
@@ -90,7 +99,8 @@ public interface ODataReader extends Serializable {
* @param isXML 'TRUE' if the error is in XML format.
* @return OData error.
*/
-// ODataError readError(InputStream inputStream, boolean isXML);
+ Error readError(InputStream inputStream, boolean isXML);
+
/**
* Parses a stream into the object type specified by the given reference.
*
@@ -100,5 +110,5 @@ public interface ODataReader extends Serializable {
* @param reference reference.
* @return read object.
*/
- //<T> T read(InputStream src, String format, Class<T> reference);
+ <T> T read(InputStream src, String format, Class<T> reference);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataSerializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataSerializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataSerializer.java
index 94c168f..9110d2b 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataSerializer.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataSerializer.java
@@ -1,4 +1,4 @@
-/**
+/*
* 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
@@ -21,6 +21,11 @@ package org.apache.olingo.client.api.op;
import java.io.OutputStream;
import java.io.Serializable;
import java.io.Writer;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.client.api.data.Link;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
/**
@@ -28,91 +33,87 @@ import org.w3c.dom.Node;
*/
public interface ODataSerializer extends Serializable {
- /**
- * Writes <tt>FeedResource</tt> object onto the given stream.
- *
- * @param <T> feed resource type.
- * @param obj object to be streamed.
- * @param out output stream.
- */
-// <T extends Feed> void feed(T obj, OutputStream out);
+ /**
+ * Writes Feed object onto the given stream.
+ *
+ * @param obj object to be streamed.
+ * @param out output stream.
+ */
+ void feed(Feed obj, OutputStream out);
- /**
- * Writes <tt>FeedResource</tt> object by the given writer.
- *
- * @param <T> feed resource type.
- * @param obj object to be streamed.
- * @param writer writer.
- */
-// <T extends Feed> void feed(T obj, Writer writer);
+ /**
+ * Writes Feed object by the given writer.
+ *
+ * @param obj object to be streamed.
+ * @param writer writer.
+ */
+ void feed(Feed obj, Writer writer);
- /**
- * Writes <tt>EntryResource</tt> object onto the given stream.
- *
- * @param <T> entry resource type.
- * @param obj object to be streamed.
- * @param out output stream.
- */
-// <T extends Entry> void entry(T obj, OutputStream out);
+ /**
+ * Writes theEntry object onto the given stream.
+ *
+ * @param obj object to be streamed.
+ * @param out output stream.
+ */
+ void entry(Entry obj, OutputStream out);
- /**
- * Writes <tt>EntryResource</tt> object by the given writer.
- *
- * @param <T> entry resource type.
- * @param obj object to be streamed.
- * @param writer writer.
- */
-// <T extends Entry> void entry(T obj, Writer writer);
+ /**
+ * Writes the Entry object by the given writer.
+ *
+ * @param obj object to be streamed.
+ * @param writer writer.
+ */
+ void entry(Entry obj, Writer writer);
- /**
- * Writes entry content onto the given stream.
- *
- * @param element element to be streamed.
- * @param format streaming format.
- * @param out output stream.
- */
-// void property(Element element, ODataFormat format, OutputStream out);
+ /**
+ * Writes entry content onto the given stream.
+ *
+ * @param element element to be streamed.
+ * @param format streaming format.
+ * @param out output stream.
+ */
+ void property(Element element, ODataFormat format, OutputStream out);
- /**
- * Writes entry content by the given writer.
- *
- * @param element element to be streamed.
- * @param format streaming format.
- * @param writer writer.
- */
-// void property(Element element, ODataFormat format, Writer writer);
+ /**
+ * Writes entry content by the given writer.
+ *
+ * @param element element to be streamed.
+ * @param format streaming format.
+ * @param writer writer.
+ */
+ void property(Element element, ODataFormat format, Writer writer);
- /**
- * Writes OData link onto the given stream.
- *
- * @param link OData link to be streamed.
- * @param format streaming format.
- * @param out output stream.
- */
-// void link(ODataLink link, ODataFormat format, OutputStream out);
+ /**
+ * Writes link onto the given stream.
+ *
+ * @param link OData link to be streamed.
+ * @param format streaming format.
+ * @param out output stream.
+ */
+ void link(Link link, ODataFormat format, OutputStream out);
- /**
- * Writes OData link by the given writer.
- *
- * @param link OData link to be streamed.
- * @param format streaming format.
- * @param writer writer.
- */
-// void link(ODataLink link, ODataFormat format, Writer writer);
+ /**
+ * Writes link by the given writer.
+ *
+ * @param link OData link to be streamed.
+ * @param format streaming format.
+ * @param writer writer.
+ */
+ void link(Link link, ODataFormat format, Writer writer);
- /**
- * Writes DOM object onto the given stream.
- *
- * @param content DOM to be streamed.
- * @param out output stream.
- */
- void dom(Node content, OutputStream out);
+ /**
+ * Writes DOM object onto the given stream.
+ *
+ * @param content DOM to be streamed.
+ * @param out output stream.
+ */
+ void dom(Node content, OutputStream out);
- /**
- * Writes DOM object by the given writer.
- *
- * @param content DOM to be streamed.
- * @param writer writer.
- */
- void dom(Node content, Writer writer);
+ /**
+ * Writes DOM object by the given writer.
+ *
+ * @param content DOM to be streamed.
+ * @param writer writer.
+ */
+ void dom(Node content, Writer writer);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV3Deserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV3Deserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV3Deserializer.java
index aeb84a1..725e2e1 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV3Deserializer.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV3Deserializer.java
@@ -19,5 +19,13 @@
package org.apache.olingo.client.api.op;
public interface ODataV3Deserializer extends ODataDeserializer {
+ /**
+ * Gets a list of links from the given InputStream.
+ *
+ * @param input stream to be de-serialized.
+ * @param format OData format.
+ * @return de-serialized links.
+ */
+// LinkCollection toLinkCollection(InputStream input, ODataFormat format);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataWriter.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataWriter.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataWriter.java
new file mode 100644
index 0000000..dd7afcd
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataWriter.java
@@ -0,0 +1,94 @@
+/*
+ * 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.client.api.op;
+
+import java.io.InputStream;
+import java.io.Serializable;
+import java.util.Collection;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataLink;
+import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+
+/**
+ * OData writer.
+ * <br/>
+ * Use this interface to serialize an OData request body.
+ * <br/>
+ * This interface provides method helpers to serialize a set of entities and a single entity as well.
+ */
+public interface ODataWriter extends Serializable {
+
+ /**
+ * Writes a collection of OData entities.
+ *
+ * @param entities entities to be serialized.
+ * @param format serialization format.
+ * @return stream of serialized objects.
+ */
+ InputStream writeEntities(Collection<ODataEntity> entities, ODataPubFormat format);
+
+ /**
+ * Writes a collection of OData entities.
+ *
+ * @param entities entities to be serialized.
+ * @param format serialization format.
+ * @param outputType whether to explicitly output type information.
+ * @return stream of serialized objects.
+ */
+ InputStream writeEntities(Collection<ODataEntity> entities, ODataPubFormat format, boolean outputType);
+
+ /**
+ * Serializes a single OData entity.
+ *
+ * @param entity entity to be serialized.
+ * @param format serialization format.
+ * @return stream of serialized object.
+ */
+ InputStream writeEntity(ODataEntity entity, ODataPubFormat format);
+
+ /**
+ * Serializes a single OData entity.
+ *
+ * @param entity entity to be serialized.
+ * @param format serialization format.
+ * @param outputType whether to explicitly output type information.
+ * @return stream of serialized object.
+ */
+ InputStream writeEntity(ODataEntity entity, ODataPubFormat format, boolean outputType);
+
+ /**
+ * Writes a single OData entity property.
+ *
+ * @param property entity property to be serialized.
+ * @param format serialization format.
+ * @return stream of serialized object.
+ */
+ InputStream writeProperty(ODataProperty property, ODataFormat format);
+
+ /**
+ * Writes an OData link.
+ *
+ * @param link link to be serialized.
+ * @param format serialization format.
+ * @return stream of serialized object.
+ */
+ InputStream writeLink(ODataLink link, ODataFormat format);
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/URIUtils.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/URIUtils.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/URIUtils.java
new file mode 100644
index 0000000..e277736
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/URIUtils.java
@@ -0,0 +1,171 @@
+/*
+ * 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.client.api.utils;
+
+import java.math.BigDecimal;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.text.DecimalFormat;
+import java.util.UUID;
+
+import org.apache.commons.codec.binary.Hex;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.domain.ODataDuration;
+import org.apache.olingo.client.api.domain.ODataTimestamp;
+import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
+import org.apache.olingo.client.api.edm.xml.EntityContainer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * URI utilities.
+ */
+public final class URIUtils {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(URIUtils.class);
+
+ private URIUtils() {
+ // Empty private constructor for static utility classes
+ }
+
+ /**
+ * Build URI starting from the given base and href.
+ * <br/>
+ * If href is absolute or base is null then base will be ignored.
+ *
+ * @param base URI prefix.
+ * @param href URI suffix.
+ * @return built URI.
+ */
+ public static URI getURI(final String base, final String href) {
+ if (href == null) {
+ throw new IllegalArgumentException("Null link provided");
+ }
+
+ URI uri = URI.create(href);
+
+ if (!uri.isAbsolute() && base != null) {
+ uri = URI.create(base + "/" + href);
+ }
+
+ return uri.normalize();
+ }
+
+ /**
+ * Build URI starting from the given base and href.
+ * <br/>
+ * If href is absolute or base is null then base will be ignored.
+ *
+ * @param base URI prefix.
+ * @param href URI suffix.
+ * @return built URI.
+ */
+ public static URI getURI(final URI base, final URI href) {
+ if (href == null) {
+ throw new IllegalArgumentException("Null link provided");
+ }
+ return getURI(base, href.toASCIIString());
+ }
+
+ /**
+ * Build URI starting from the given base and href.
+ * <br/>
+ * If href is absolute or base is null then base will be ignored.
+ *
+ * @param base URI prefix.
+ * @param href URI suffix.
+ * @return built URI.
+ */
+ public static URI getURI(final URI base, final String href) {
+ if (href == null) {
+ throw new IllegalArgumentException("Null link provided");
+ }
+
+ URI uri = URI.create(href);
+
+ if (!uri.isAbsolute() && base != null) {
+ uri = URI.create(base.toASCIIString() + "/" + href);
+ }
+
+ return uri.normalize();
+ }
+
+ /**
+ * Gets function import URI segment.
+ *
+ * @param entityContainer entity container.
+ * @param functionImport function import.
+ * @return URI segment.
+ */
+ public static String rootFunctionImportURISegment(
+ final EntityContainer entityContainer, final CommonFunctionImport functionImport) {
+
+ final StringBuilder result = new StringBuilder();
+ if (!entityContainer.isDefaultEntityContainer()) {
+ result.append(entityContainer.getName()).append('.');
+ }
+ result.append(functionImport.getName());
+
+ return result.toString();
+ }
+
+ /**
+ * Turns primitive values into their respective URI representation.
+ *
+ * @param obj primitive value
+ * @return URI representation
+ */
+ public static String escape(final Object obj) {
+ String value;
+
+ try {
+ value = (obj instanceof UUID)
+ ? "guid'" + obj.toString() + "'"
+ : (obj instanceof byte[])
+ ? "X'" + Hex.encodeHexString((byte[]) obj) + "'"
+ : ((obj instanceof ODataTimestamp) && ((ODataTimestamp) obj).getTimezone() == null)
+ ? "datetime'" + URLEncoder.encode(((ODataTimestamp) obj).toString(), ODataConstants.UTF8) + "'"
+ : ((obj instanceof ODataTimestamp) && ((ODataTimestamp) obj).getTimezone() != null)
+ ? "datetimeoffset'" + URLEncoder.encode(((ODataTimestamp) obj).toString(), ODataConstants.UTF8)
+ + "'"
+ : (obj instanceof ODataDuration)
+ ? "time'" + ((ODataDuration) obj).toString() + "'"
+ : (obj instanceof BigDecimal)
+ ? new DecimalFormat(ODataJClientEdmPrimitiveType.Decimal.pattern()).format((BigDecimal) obj) + "M"
+ : (obj instanceof Double)
+ ? new DecimalFormat(ODataJClientEdmPrimitiveType.Double.pattern()).format((Double) obj) + "D"
+ : (obj instanceof Float)
+ ? new DecimalFormat(ODataJClientEdmPrimitiveType.Single.pattern()).format((Float) obj) + "f"
+ : (obj instanceof Long)
+ ? ((Long) obj).toString() + "L"
+ : (obj instanceof String)
+ ? "'" + URLEncoder.encode((String) obj, ODataConstants.UTF8) + "'"
+ : obj.toString();
+ } catch (Exception e) {
+ LOG.warn("While escaping '{}', using toString()", obj, e);
+ value = obj.toString();
+ }
+
+ return value;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/XMLUtils.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/XMLUtils.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/XMLUtils.java
index 8880d15..8baa7e3 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/XMLUtils.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/XMLUtils.java
@@ -25,7 +25,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.domain.EdmSimpleType;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
import org.apache.olingo.client.api.domain.geospatial.Geospatial;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -138,39 +138,39 @@ public final class XMLUtils {
return result;
}
- public static EdmSimpleType simpleTypeForNode(final Geospatial.Dimension dimension, final Node node) {
- EdmSimpleType type = null;
+ public static ODataJClientEdmPrimitiveType simpleTypeForNode(final Geospatial.Dimension dimension, final Node node) {
+ ODataJClientEdmPrimitiveType type = null;
if (Constants.ELEM_POINT.equals(node.getNodeName())) {
type = dimension == Geospatial.Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyPoint
- : EdmSimpleType.GeometryPoint;
+ ? ODataJClientEdmPrimitiveType.GeographyPoint
+ : ODataJClientEdmPrimitiveType.GeometryPoint;
} else if (Constants.ELEM_MULTIPOINT.equals(node.getNodeName())) {
type = dimension == Geospatial.Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyMultiPoint
- : EdmSimpleType.GeometryMultiPoint;
+ ? ODataJClientEdmPrimitiveType.GeographyMultiPoint
+ : ODataJClientEdmPrimitiveType.GeometryMultiPoint;
} else if (Constants.ELEM_LINESTRING.equals(node.getNodeName())) {
type = dimension == Geospatial.Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyLineString
- : EdmSimpleType.GeometryLineString;
+ ? ODataJClientEdmPrimitiveType.GeographyLineString
+ : ODataJClientEdmPrimitiveType.GeometryLineString;
} else if (Constants.ELEM_MULTILINESTRING.equals(node.getNodeName())) {
type = dimension == Geospatial.Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyMultiLineString
- : EdmSimpleType.GeometryMultiLineString;
+ ? ODataJClientEdmPrimitiveType.GeographyMultiLineString
+ : ODataJClientEdmPrimitiveType.GeometryMultiLineString;
} else if (Constants.ELEM_POLYGON.equals(node.getNodeName())) {
type = dimension == Geospatial.Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyPolygon
- : EdmSimpleType.GeometryPolygon;
+ ? ODataJClientEdmPrimitiveType.GeographyPolygon
+ : ODataJClientEdmPrimitiveType.GeometryPolygon;
} else if (Constants.ELEM_MULTIPOLYGON.equals(node.getNodeName())) {
type = dimension == Geospatial.Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyMultiPolygon
- : EdmSimpleType.GeometryMultiPolygon;
+ ? ODataJClientEdmPrimitiveType.GeographyMultiPolygon
+ : ODataJClientEdmPrimitiveType.GeometryMultiPolygon;
} else if (Constants.ELEM_GEOCOLLECTION.equals(node.getNodeName())
|| Constants.ELEM_GEOMEMBERS.equals(node.getNodeName())) {
type = dimension == Geospatial.Dimension.GEOGRAPHY
- ? EdmSimpleType.GeographyCollection
- : EdmSimpleType.GeometryCollection;
+ ? ODataJClientEdmPrimitiveType.GeographyCollection
+ : ODataJClientEdmPrimitiveType.GeometryCollection;
}
return type;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java
index 35bb385..eb06136 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java
@@ -20,18 +20,38 @@ package org.apache.olingo.client.core;
import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.domain.ODataGeospatialValue;
+import org.apache.olingo.client.api.domain.ODataObjectFactory;
import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.op.ODataWriter;
+import org.apache.olingo.client.core.op.impl.ODataObjectFactoryImpl;
+import org.apache.olingo.client.core.op.impl.ODataWriterImpl;
abstract class AbstractODataClient implements ODataClient {
private static final long serialVersionUID = 7269096702397630265L;
+ private final ODataWriter writer = new ODataWriterImpl(this);
+
+ private final ODataObjectFactory objectFactory = new ODataObjectFactoryImpl(this);
+
+ @Override
public ODataPrimitiveValue.Builder getPrimitiveValueBuilder() {
return new ODataPrimitiveValue.Builder(this);
}
+ @Override
public ODataGeospatialValue.Builder getGeospatialValueBuilder() {
return new ODataGeospatialValue.Builder(this);
}
+ @Override
+ public ODataWriter getWriter() {
+ return writer;
+ }
+
+ @Override
+ public ODataObjectFactory getObjectFactory() {
+ return objectFactory;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV3ClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV3ClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV3ClientImpl.java
index 70ed75a..782d0e2 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV3ClientImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV3ClientImpl.java
@@ -48,11 +48,8 @@ public class ODataV3ClientImpl extends AbstractODataClient implements ODataV3Cli
private final ODataReader reader = new ODataV3ReaderImpl(this);
-// private final ODataWriterImpl writer = new ODataWriterImpl(this);
private final ODataBinder binder = new ODataV3BinderImpl(this);
-// private final ODataObjectFactory objectFactory = new ODataObjectFactoryImpl(this);
-//
// private final V3RetrieveRequestFactory retrieveReqFact = new V3RetrieveRequestFactory(this);
//
// private final V3CUDRequestFactory cudReqFact = new V3CUDRequestFactory(this);
@@ -105,21 +102,12 @@ public class ODataV3ClientImpl extends AbstractODataClient implements ODataV3Cli
return reader;
}
-// @Override
-// public ODataWriterImpl getWriter() {
-// return writer;
-// }
@Override
public ODataBinder getBinder() {
return binder;
}
// @Override
-// public ODataObjectFactoryImpl getObjectFactory() {
-// return objectFactory;
-// }
-//
-// @Override
// public V3RetrieveRequestFactory getRetrieveRequestFactory() {
// return retrieveReqFact;
// }
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java
index c3c5e14..62e75be 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java
@@ -48,11 +48,8 @@ public class ODataV4ClientImpl extends AbstractODataClient implements ODataV4Cli
private final ODataReader reader = new ODataV4ReaderImpl(this);
-// private final ODataWriter writer = new ODataWriterImpl(this);
private final ODataBinder binder = new ODataV4BinderImpl(this);
-// private final ODataObjectFactory objectFactory = new ODataObjectFactoryImpl(this);
-//
// private final V4RetrieveRequestFactory retrieveReqFact = new V4RetrieveRequestFactory(this);
//
// private final V4CUDRequestFactory cudReqFact = new V4CUDRequestFactory(this);
@@ -105,21 +102,12 @@ public class ODataV4ClientImpl extends AbstractODataClient implements ODataV4Cli
return reader;
}
-// @Override
-// public ODataWriterImpl getWriter() {
-// return writer;
-// }
@Override
public ODataBinder getBinder() {
return binder;
}
// @Override
-// public ODataObjectFactoryImpl getObjectFactory() {
-// return objectFactory;
-// }
-//
-// @Override
// public V4RetrieveRequestFactory getRetrieveRequestFactory() {
// return retrieveReqFact;
// }
[05/11] [OLINGO-200] V3 (de)serializers + unit tests merged
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java
new file mode 100644
index 0000000..c4cdc02
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java
@@ -0,0 +1,74 @@
+/*
+ * 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.client.core.v3;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.data.Error;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.client.core.AbstractTest;
+import org.junit.Test;
+
+public class ErrorTest extends AbstractTest {
+
+ @Override
+ protected ODataV3Client getClient() {
+ return v3Client;
+ }
+
+ private Error error(final String name, final ODataPubFormat format) {
+ final Error error = getClient().getDeserializer().toError(
+ getClass().getResourceAsStream(name + "." + getSuffix(format)), format == ODataPubFormat.ATOM);
+ assertNotNull(error);
+ return error;
+ }
+
+ private void simple(final ODataPubFormat format) {
+ final Error error = error("error", format);
+ assertNull(error.getInnerErrorStacktrace());
+ }
+
+ @Test
+ public void jsonSimple() {
+ simple(ODataPubFormat.JSON);
+ }
+
+ @Test
+ public void atomSimple() {
+ simple(ODataPubFormat.ATOM);
+ }
+
+ private void stacktrace(final ODataPubFormat format) {
+ final Error error = error("stacktrace", format);
+ assertNotNull(error.getInnerErrorStacktrace());
+ }
+
+ @Test
+ public void jsonStacktrace() {
+ stacktrace(ODataPubFormat.JSON);
+ }
+
+ @Test
+ public void atomStacktrace() {
+ stacktrace(ODataPubFormat.ATOM);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java
new file mode 100644
index 0000000..c027e40
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java
@@ -0,0 +1,554 @@
+/*
+ * 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.client.core.v3;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.UUID;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.domain.ODataDuration;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.domain.ODataTimestamp;
+import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.client.api.domain.geospatial.Geospatial;
+import org.apache.olingo.client.api.domain.geospatial.GeospatialCollection;
+import org.apache.olingo.client.api.domain.geospatial.LineString;
+import org.apache.olingo.client.api.domain.geospatial.MultiLineString;
+import org.apache.olingo.client.api.domain.geospatial.MultiPoint;
+import org.apache.olingo.client.api.domain.geospatial.MultiPolygon;
+import org.apache.olingo.client.api.domain.geospatial.Point;
+import org.apache.olingo.client.api.domain.geospatial.Polygon;
+import org.apache.olingo.client.core.AbstractTest;
+import org.apache.olingo.client.core.ODataClientFactory;
+import org.junit.Test;
+
+public class PrimitiveValueTest extends AbstractTest {
+
+ @Override
+ protected ODataV3Client getClient() {
+ return v3Client;
+ }
+
+ @Test
+ public void manageInt32() {
+ final int primitive = -10;
+ ODataValue value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Int32).
+ setValue(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.Int32.toString(), value.asPrimitive().getTypeName());
+ assertEquals(Integer.valueOf(primitive), value.asPrimitive().<Integer>toCastValue());
+
+ value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Int32).setText("9").build();
+ assertEquals("9", value.asPrimitive().<Integer>toCastValue().toString());
+ }
+
+ @Test
+ public void manageString() {
+ final String primitive = UUID.randomUUID().toString();
+ ODataValue value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.String).
+ setText(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.String.toString(), value.asPrimitive().getTypeName());
+ assertEquals(primitive, value.toString());
+
+ value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.String).
+ setText("1126a28b-a4af-4bbd-bf0a-2b2c22635565").build();
+ assertEquals("1126a28b-a4af-4bbd-bf0a-2b2c22635565", value.asPrimitive().<String>toCastValue().toString());
+ }
+
+ @Test
+ public void manageDecimal() {
+ final BigDecimal primitive = new BigDecimal("-79228162514264337593543950335");
+ ODataValue value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Decimal).
+ setValue(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.Decimal.toString(), value.asPrimitive().getTypeName());
+ assertEquals(primitive, value.asPrimitive().<BigDecimal>toCastValue());
+
+ value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Decimal).
+ setText("-79228162514264337593543950335").build();
+ assertEquals("-79228162514264337593543950335", value.asPrimitive().<BigDecimal>toCastValue().toString());
+ }
+
+ @Test
+ public void manageDateTime() {
+ // OData V3 only
+ final String primitive = "2013-01-10T06:27:51.1667673";
+ try {
+ new ODataPrimitiveValue.Builder(ODataClientFactory.getV4()).
+ setType(ODataJClientEdmPrimitiveType.DateTime).setText(primitive).build();
+ fail();
+ } catch (IllegalArgumentException iae) {
+ // ignore
+ }
+ final ODataValue value =
+ getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.DateTime).
+ setText(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.DateTime.toString(), value.asPrimitive().getTypeName());
+ // performed cast to improve the check
+ assertEquals(primitive, value.asPrimitive().<ODataTimestamp>toCastValue().toString());
+ }
+
+ @Test
+ public void manageTime() {
+ // OData V3 only
+ final String primitive = "-P9DT51M10.5063807S";
+ try {
+ new ODataPrimitiveValue.Builder(ODataClientFactory.getV4()).
+ setType(ODataJClientEdmPrimitiveType.Time).setText(primitive).build();
+ fail();
+ } catch (IllegalArgumentException iae) {
+ // ignore
+ }
+
+ final ODataValue value =
+ getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Time).
+ setText(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.Time.toString(), value.asPrimitive().getTypeName());
+ // performed cast to improve the check
+ assertEquals(primitive, value.asPrimitive().<ODataDuration>toCastValue().toString());
+ }
+
+ @Test
+ public void manageDateTimeOffset() {
+ final String primitive = "2013-01-10T02:00:00";
+ final ODataValue value = getClient().getPrimitiveValueBuilder().
+ setType(ODataJClientEdmPrimitiveType.DateTimeOffset).setText(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.DateTimeOffset.toString(), value.asPrimitive().getTypeName());
+ // performed cast to improve the check
+ assertEquals(primitive, value.asPrimitive().<ODataTimestamp>toCastValue().toString());
+ }
+
+ @Test
+ public void manageGuid() {
+ final UUID primitive = UUID.fromString("1126a28b-a4af-4bbd-bf0a-2b2c22635565");
+ ODataValue value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Guid).
+ setValue(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.Guid.toString(), value.asPrimitive().getTypeName());
+ assertEquals(primitive, value.asPrimitive().<UUID>toCastValue());
+
+ value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Guid).
+ setText("1126a28b-a4af-4bbd-bf0a-2b2c22635565").build();
+ assertEquals("1126a28b-a4af-4bbd-bf0a-2b2c22635565", value.asPrimitive().<UUID>toCastValue().toString());
+ }
+
+ @Test
+ public void manageBinary() {
+ final byte[] primitive = UUID.randomUUID().toString().getBytes();
+ ODataValue value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Binary).
+ setValue(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.Binary.toString(), value.asPrimitive().getTypeName());
+ assertEquals(
+ Base64.encodeBase64String(primitive),
+ Base64.encodeBase64String(value.asPrimitive().<byte[]>toCastValue()));
+
+ value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Binary).
+ setText(Base64.encodeBase64String("primitive".getBytes())).build();
+ assertEquals("primitive", new String(value.asPrimitive().<byte[]>toCastValue()));
+ }
+
+ @Test
+ public void managePoint() {
+ final Point primitive = new Point(Geospatial.Dimension.GEOGRAPHY);
+ primitive.setX(52.8606);
+ primitive.setY(173.334);
+
+ try {
+ getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.GeographyPoint).
+ setValue(primitive).build();
+ fail();
+ } catch (IllegalArgumentException iae) {
+ // nothing top do
+ }
+
+ final ODataValue value =
+ getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeographyPoint).
+ setValue(primitive).
+ build();
+ assertEquals(ODataJClientEdmPrimitiveType.GeographyPoint.toString(), value.asPrimitive().getTypeName());
+ assertEquals(Double.valueOf(primitive.getX()), Double.valueOf(value.asPrimitive().<Point>toCastValue().getX()));
+ assertEquals(Double.valueOf(primitive.getY()), Double.valueOf(value.asPrimitive().<Point>toCastValue().getY()));
+ }
+
+ @Test
+ public void manageLineString() {
+ final List<Point> points = new ArrayList<Point>();
+ Point point = new Point(Geospatial.Dimension.GEOGRAPHY);
+ point.setX(40.5);
+ point.setY(40.5);
+ points.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOGRAPHY);
+ point.setX(30.5);
+ point.setY(30.5);
+ points.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOGRAPHY);
+ point.setX(20.5);
+ point.setY(40.5);
+ points.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOGRAPHY);
+ point.setX(10.5);
+ point.setY(30.5);
+ points.add(point);
+
+ final LineString primitive = new LineString(Geospatial.Dimension.GEOGRAPHY, points);
+
+ final ODataValue value = getClient().getGeospatialValueBuilder().
+ setType(ODataJClientEdmPrimitiveType.GeographyLineString).setValue(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.GeographyLineString.toString(), value.asPrimitive().getTypeName());
+
+ final Iterator<Point> iter = value.asPrimitive().<LineString>toCastValue().iterator();
+
+ // take the third one and check the point value ...
+ iter.next();
+ iter.next();
+ point = iter.next();
+
+ assertEquals(Double.valueOf(points.get(2).getX()), Double.valueOf(point.getX()));
+ assertEquals(Double.valueOf(points.get(2).getY()), Double.valueOf(point.getY()));
+ }
+
+ @Test
+ public void manageMultiPoint() {
+ final List<Point> points = new ArrayList<Point>();
+ Point point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(0);
+ point.setY(0);
+ points.add(point);
+
+ final MultiPoint primitive = new MultiPoint(Geospatial.Dimension.GEOMETRY, points);
+
+ final ODataValue value = getClient().getGeospatialValueBuilder().
+ setType(ODataJClientEdmPrimitiveType.GeometryMultiPoint).setValue(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.GeometryMultiPoint.toString(), value.asPrimitive().getTypeName());
+
+ final Iterator<Point> iter = value.asPrimitive().<MultiPoint>toCastValue().iterator();
+ point = iter.next();
+
+ assertEquals(Double.valueOf(points.get(0).getX()), Double.valueOf(point.getX()));
+ assertEquals(Double.valueOf(points.get(0).getY()), Double.valueOf(point.getY()));
+ }
+
+ @Test
+ public void manageMultiLine() {
+ final List<LineString> lines = new ArrayList<LineString>();
+
+ // line one ...
+ List<Point> points = new ArrayList<Point>();
+ Point point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(10);
+ point.setY(10);
+ points.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(20);
+ point.setY(20);
+ points.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(10);
+ point.setY(40);
+ points.add(point);
+
+ lines.add(new LineString(Geospatial.Dimension.GEOMETRY, points));
+
+ // line two ...
+ points = new ArrayList<Point>();
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(40);
+ point.setY(40);
+ points.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(30);
+ point.setY(30);
+ points.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(40);
+ point.setY(20);
+ points.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(30);
+ point.setY(10);
+ points.add(point);
+ lines.add(new LineString(Geospatial.Dimension.GEOMETRY, points));
+
+ final MultiLineString primitive = new MultiLineString(Geospatial.Dimension.GEOMETRY, lines);
+
+ final ODataValue value =
+ getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeometryMultiLineString).
+ setValue(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.GeometryMultiLineString.toString(), value.asPrimitive().getTypeName());
+
+ final Iterator<LineString> lineIter = value.asPrimitive().<MultiLineString>toCastValue().iterator();
+
+ // take the second line and check the third point value ...
+ lineIter.next();
+ final LineString line = lineIter.next();
+
+ final Iterator<Point> pointIter = line.iterator();
+ pointIter.next();
+ pointIter.next();
+ point = pointIter.next();
+
+ assertEquals(Double.valueOf(points.get(2).getX()), Double.valueOf(point.getX()));
+ assertEquals(Double.valueOf(points.get(2).getY()), Double.valueOf(point.getY()));
+ }
+
+ @Test
+ public void managePolygon() {
+
+ final List<Point> interior = new ArrayList<Point>();
+ final List<Point> exterior = new ArrayList<Point>();
+
+ Point point = new Point(Geospatial.Dimension.GEOGRAPHY);
+ point.setX(5);
+ point.setY(15);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOGRAPHY);
+ point.setX(10);
+ point.setY(40);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOGRAPHY);
+ point.setX(20);
+ point.setY(10);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOGRAPHY);
+ point.setX(10);
+ point.setY(5);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOGRAPHY);
+ point.setX(5);
+ point.setY(15);
+ exterior.add(point);
+
+ final Polygon primitive = new Polygon(Geospatial.Dimension.GEOGRAPHY, interior, exterior);
+
+ final ODataValue value =
+ getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeographyPolygon).
+ setValue(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.GeographyPolygon.toString(), value.asPrimitive().getTypeName());
+
+ assertTrue(value.asPrimitive().<Polygon>toCastValue().getInterior().isEmpty());
+ final Iterator<Point> iter = value.asPrimitive().<Polygon>toCastValue().getExterior().iterator();
+
+ // take the third one ...
+ iter.next();
+ iter.next();
+ point = iter.next();
+
+ assertEquals(Double.valueOf(exterior.get(2).getX()), Double.valueOf(point.getX()));
+ assertEquals(Double.valueOf(exterior.get(2).getY()), Double.valueOf(point.getY()));
+ }
+
+ @Test
+ public void manageMultiPolygon() {
+ final List<Polygon> polygons = new ArrayList<Polygon>();
+
+ List<Point> interior = new ArrayList<Point>();
+ List<Point> exterior = new ArrayList<Point>();
+
+ // exterior one ...
+ Point point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(40);
+ point.setY(40);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(20);
+ point.setY(45);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(45);
+ point.setY(30);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(40);
+ point.setY(40);
+ exterior.add(point);
+
+ polygons.add(new Polygon(Geospatial.Dimension.GEOMETRY, interior, exterior));
+
+ // interior two ...
+ interior = new ArrayList<Point>();
+ exterior = new ArrayList<Point>();
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(30);
+ point.setY(20);
+ interior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(20);
+ point.setY(25);
+ interior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(20);
+ point.setY(15);
+ interior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(30);
+ point.setY(20);
+ interior.add(point);
+
+ // exterior two ...
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(20);
+ point.setY(35);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(45);
+ point.setY(20);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(30);
+ point.setY(5);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(10);
+ point.setY(10);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(10);
+ point.setY(30);
+ exterior.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(20);
+ point.setY(35);
+ exterior.add(point);
+
+ polygons.add(new Polygon(Geospatial.Dimension.GEOMETRY, interior, exterior));
+
+ final MultiPolygon primitive = new MultiPolygon(Geospatial.Dimension.GEOMETRY, polygons);
+
+ final ODataValue value =
+ getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeometryMultiPolygon).
+ setValue(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.GeometryMultiPolygon.toString(), value.asPrimitive().getTypeName());
+
+ final Iterator<Polygon> iter = value.asPrimitive().<MultiPolygon>toCastValue().iterator();
+
+ // second one polygon
+ iter.next();
+ final Polygon polygon = iter.next();
+ Iterator<Point> pointIter = polygon.getInterior().iterator();
+ pointIter.next();
+ point = pointIter.next();
+
+ // check the second point from interior
+ assertEquals(Double.valueOf(interior.get(1).getX()), Double.valueOf(point.getX()));
+ assertEquals(Double.valueOf(interior.get(1).getY()), Double.valueOf(point.getY()));
+
+ pointIter = polygon.getExterior().iterator();
+ pointIter.next();
+ pointIter.next();
+ point = pointIter.next();
+
+ // check the third point from exterior
+ assertEquals(Double.valueOf(exterior.get(2).getX()), Double.valueOf(point.getX()));
+ assertEquals(Double.valueOf(exterior.get(2).getY()), Double.valueOf(point.getY()));
+ }
+
+ @Test
+ public void manageGeomCollection() {
+ final List<Geospatial> collection = new ArrayList<Geospatial>();
+
+ Point point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(1);
+ point.setY(2);
+ point.setZ(3);
+ collection.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOMETRY);
+ point.setX(4);
+ point.setY(5);
+ point.setZ(6);
+ collection.add(point);
+
+ final GeospatialCollection primitive = new GeospatialCollection(Geospatial.Dimension.GEOMETRY, collection);
+
+ final ODataValue value =
+ getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeometryCollection).
+ setValue(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.GeometryCollection.toString(), value.asPrimitive().getTypeName());
+
+ final Iterator<Geospatial> iter = value.asPrimitive().<GeospatialCollection>toCastValue().iterator();
+ iter.next();
+ final Point collectedPoint = (Point) iter.next();
+
+ assertTrue(point.getX() == collectedPoint.getX()
+ && point.getY() == collectedPoint.getY()
+ && point.getZ() == collectedPoint.getZ());
+ }
+
+ @Test
+ public void manageGeogCollection() {
+ final List<Geospatial> collection = new ArrayList<Geospatial>();
+
+ Point point = new Point(Geospatial.Dimension.GEOGRAPHY);
+ point.setX(1);
+ point.setY(2);
+ point.setZ(3);
+ collection.add(point);
+
+ point = new Point(Geospatial.Dimension.GEOGRAPHY);
+ point.setX(4);
+ point.setY(5);
+ point.setZ(6);
+ collection.add(point);
+
+ final GeospatialCollection primitive = new GeospatialCollection(Geospatial.Dimension.GEOGRAPHY, collection);
+
+ final ODataValue value =
+ getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeographyCollection).
+ setValue(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.GeographyCollection.toString(), value.asPrimitive().getTypeName());
+
+ final Iterator<Geospatial> iter = value.asPrimitive().<GeospatialCollection>toCastValue().iterator();
+ iter.next();
+ final Point collectedPoint = (Point) iter.next();
+
+ assertTrue(point.getX() == collectedPoint.getX()
+ && point.getY() == collectedPoint.getY()
+ && point.getZ() == collectedPoint.getZ());
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
new file mode 100644
index 0000000..6e9b3b2
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
@@ -0,0 +1,78 @@
+/*
+ * 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.client.core.v4;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import org.apache.olingo.client.api.ODataV4Client;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.domain.ODataDuration;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.domain.ODataTimestamp;
+import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.client.core.AbstractTest;
+import org.apache.olingo.client.core.ODataClientFactory;
+import org.junit.Test;
+
+public class PrimitiveValueTest extends AbstractTest {
+
+ @Override
+ protected ODataV4Client getClient() {
+ return v4Client;
+ }
+
+ @Test
+ public void manageTimeOfDay() {
+ // OData V4 only
+ final String primitive = "-P9DT51M12.5063807S";
+ try {
+ new ODataPrimitiveValue.Builder(ODataClientFactory.getV3()).
+ setType(ODataJClientEdmPrimitiveType.TimeOfDay).setText(primitive).build();
+ fail();
+ } catch (IllegalArgumentException iae) {
+ // ignore
+ }
+
+ final ODataValue value = getClient().getPrimitiveValueBuilder().
+ setType(ODataJClientEdmPrimitiveType.TimeOfDay).setText(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.TimeOfDay.toString(), value.asPrimitive().getTypeName());
+ // performed cast to improve the check
+ assertEquals(primitive, value.asPrimitive().<ODataDuration>toCastValue().toString());
+ }
+
+ @Test
+ public void manageDate() {
+ // OData V4 only
+ final String primitive = "2013-01-10";
+ try {
+ new ODataPrimitiveValue.Builder(ODataClientFactory.getV3()).
+ setType(ODataJClientEdmPrimitiveType.Date).setText(primitive).build();
+ fail();
+ } catch (IllegalArgumentException iae) {
+ // ignore
+ }
+
+ final ODataValue value = getClient().getPrimitiveValueBuilder().
+ setType(ODataJClientEdmPrimitiveType.Date).setText(primitive).build();
+ assertEquals(ODataJClientEdmPrimitiveType.Date.toString(), value.asPrimitive().getTypeName());
+ // performed cast to improve the check
+ assertEquals(primitive, value.asPrimitive().<ODataTimestamp>toCastValue().toString());
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/complexProperty.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/complexProperty.json b/lib/client-core/src/test/resources/complexProperty.json
deleted file mode 100644
index 53af94c..0000000
--- a/lib/client-core/src/test/resources/complexProperty.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "Address": {
- "Street": "Obere Str. 57",
- "City": "Berlin",
- "Region": null,
- "PostalCode": "D-12209"
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/fullEntity.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/fullEntity.json b/lib/client-core/src/test/resources/fullEntity.json
deleted file mode 100644
index 4d84995..0000000
--- a/lib/client-core/src/test/resources/fullEntity.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "odata.context": "http://host/service/$metadata#Customers/$entity",
- "odata.id": "Customers('ALFKI')",
- "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
- "odata.editLink": "Customers('ALFKI')",
- "Orders@odata.navigationLink": "Customers('ALFKI')/Orders",
- "Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref",
- "ID": "ALFKI",
- "CompanyName": "Alfreds Futterkiste",
- "ContactName": "Maria Anders",
- "ContactTitle": "Sales Representative",
- "Phone": "030-0074321",
- "Fax": "030-0076545",
- "Address": {
- "Street": "Obere Str. 57",
- "City": "Berlin",
- "Region": null,
- "PostalCode": "D-12209",
- "Country@odata.navigationLink": "Customers('ALFKI')/Address/Country",
- "Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/fullEntitySet.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/fullEntitySet.json b/lib/client-core/src/test/resources/fullEntitySet.json
deleted file mode 100644
index b3ddf63..0000000
--- a/lib/client-core/src/test/resources/fullEntitySet.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-"odata.context": "http://host/service/$metadata#Customers/$entity",
-"odata.count": 1,
-"value": [
-{
-"odata.context": "http://host/service/$metadata#Customers/$entity",
-"odata.id": "Customers('ALFKI')",
-"odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
-"odata.editLink": "Customers('ALFKI')",
-"Orders@odata.navigationLink": "Customers('ALFKI')/Orders",
-"Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref",
-"ID": "ALFKI",
-"CompanyName": "Alfreds Futterkiste",
-"ContactName": "Maria Anders",
-"ContactTitle": "Sales Representative",
-"Phone": "030-0074321",
-"Fax": "030-0076545",
-"Address": {
- "Street": "Obere Str. 57",
- "City": "Berlin",
- "Region": null,
- "PostalCode": "D-12209",
- "Country@odata.navigationLink": "Customers('ALFKI')/Address/Country",
- "Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
- }
-}
-],
-"odata.nextLink": "http://host/service/EntitySet?$skiptoken=342r89"
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/fullEntitySetWithTwoEntities.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/fullEntitySetWithTwoEntities.json b/lib/client-core/src/test/resources/fullEntitySetWithTwoEntities.json
deleted file mode 100644
index 96854ac..0000000
--- a/lib/client-core/src/test/resources/fullEntitySetWithTwoEntities.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
-"odata.context": "http://host/service/$metadata#Customers/$entity",
-"odata.count": 1,
-"value": [
- {
- "odata.context": "http://host/service/$metadata#Customers/$entity",
- "odata.id": "Customers('ALFKI')",
- "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
- "odata.editLink": "Customers('ALFKI')",
- "Orders@odata.navigationLink": "Customers('ALFKI')/Orders",
- "Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref",
- "ID": "ALFKI",
- "CompanyName": "Alfreds Futterkiste",
- "ContactName": "Maria Anders",
- "ContactTitle": "Sales Representative",
- "Phone": "030-0074321",
- "Fax": "030-0076545",
- "Address": {
- "Street": "Obere Str. 57",
- "City": "Berlin",
- "Region": null,
- "PostalCode": "D-12209",
- "Country@odata.navigationLink": "Customers('ALFKI')/Address/Country",
- "Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
- }
- },
- {
- "odata.context": "http://host/service/$metadata#Customers/$entity",
- "odata.id": "Customers('MUSKI')",
- "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
- "odata.editLink": "Customers('MUSKI')",
- "Orders@odata.navigationLink": "Customers('MUSKI')/Orders",
- "Orders@odata.associationLink": "Customers('MUSKI')/Orders/$ref",
- "ID": "MUSKI",
- "CompanyName": "Mustermanns Futterkiste",
- "ContactName": "Mustermann Max",
- "ContactTitle": "Some Guy",
- "Phone": "030-002222",
- "Fax": "030-004444",
- "Address": {
- "Street": "Musterstrasse 42",
- "City": "Musterstadt",
- "Region": "SomeRegion",
- "PostalCode": "D-42042"
- }
- }
-],
-"odata.nextLink": "http://host/service/EntitySet?$skiptoken=342r89"
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/fullEntityWithCollectionOfComplexValues.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/fullEntityWithCollectionOfComplexValues.json b/lib/client-core/src/test/resources/fullEntityWithCollectionOfComplexValues.json
deleted file mode 100644
index cbdfd1c..0000000
--- a/lib/client-core/src/test/resources/fullEntityWithCollectionOfComplexValues.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "odata.context": "http://host/service/$metadata#Customers/$entity",
- "odata.id": "Customers('ALFKI')",
- "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
- "odata.editLink": "Customers('ALFKI')",
- "Orders@odata.navigationLink": "Customers('ALFKI')/Orders",
- "Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref",
- "ID": "ALFKI",
- "CompanyName": "Alfreds Futterkiste",
- "ContactName": "Maria Anders",
- "ContactTitle": "Sales Representative",
- "Phone": "030-0074321",
- "Fax": "030-0076545",
- "Address": [ {
- "Street": "Obere Str. 57",
- "City": "Berlin",
- "Region": null,
- "PostalCode": "D-12209",
- "Country@odata.navigationLink": "Customers('ALFKI')/Address/Country",
- "Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
- }, {
- "Street": "Musterstrasse 42",
- "City": "Musterstadt",
- "Region": "SomeRegion",
- "PostalCode": "D-42042"
- }
- ]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/minimalEntity.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/minimalEntity.json b/lib/client-core/src/test/resources/minimalEntity.json
deleted file mode 100644
index a6bd671..0000000
--- a/lib/client-core/src/test/resources/minimalEntity.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "odata.context": "http://host/service/$metadata#Customers/$entity", "odata.id": "Customers('ALFKI')",
- "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
- "odata.editLink": "Customers('ALFKI')",
- "Orders@odata.navigationLink": "Customers('ALFKI')/Orders",
- "Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref",
- "ID": "ALFKI",
- "CompanyName": "Alfreds Futterkiste",
- "ContactName": "Maria Anders",
- "ContactTitle": "Sales Representative",
- "Phone": "030-0074321",
- "Fax": "030-0076545",
- "Address": {
- "Street": "Obere Str. 57",
- "City": "Berlin",
- "Region": null,
- "PostalCode": "D-12209",
- "Country@odata.navigationLink": "Customers('ALFKI')/Address/Country",
- "Country@odata.associationLink": "Customers('ALFKI')/Address/Country/$ref"
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.json
new file mode 100644
index 0000000..8e18317
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.0.160:8080/DefaultService.svc/$metadata#Edm.GeometryLineString","value":{"type":"LineString","coordinates":[[1.0,1.0],[3.0,3.0],[2.0,4.0],[2.0,0.0]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml
new file mode 100644
index 0000000..e103b35
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<d:Geom xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:type="Edm.GeometryLineString"><gml:LineString gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>1 1</gml:pos><gml:pos>3 3</gml:pos><gml:pos>2 4</gml:pos><gml:pos>2 0</gml:pos></gml:LineString></d:Geom>
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.json
new file mode 100644
index 0000000..a5bbb8f
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.0.160:8080/DefaultService.svc/$metadata#AllGeoTypesSet/@Element","odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.AllSpatialTypes","odata.id":"http://192.168.0.160:8080/DefaultService.svc/AllGeoTypesSet(-5)","odata.editLink":"AllGeoTypesSet(-5)","Id":-5,"Geog@odata.type":"Edm.Geography","Geog":{"type":"GeometryCollection","geometries":[],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogPoint":null,"GeogLine@odata.type":"Edm.GeographyLineString","GeogLine":{"type":"LineString","coordinates":[[10.5,10.5],[20.5,20.5],[10.5,40.5]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogPolygon@odata.type":"Edm.GeographyPolygon","GeogPolygon":{"type":"Polygon","coordinates":[[[15.0,5.0],[40.0,10.0],[10.0,20.0],[5.0,10.0],[15.0,5.0]]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogCollection@odata.type":"Edm.GeographyCollection","GeogCollection":{"type":"GeometryCollection","geometries":[{"type":"Geometry
Collection","geometries":[]},{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[1.0,2.0]}]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiPoint@odata.type":"Edm.GeographyMultiPoint","GeogMultiPoint":{"type":"MultiPoint","coordinates":[[-122.7,47.38]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiLine@odata.type":"Edm.GeographyMultiLineString","GeogMultiLine":{"type":"MultiLineString","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiPolygon@odata.type":"Edm.GeographyMultiPolygon","GeogMultiPolygon":{"type":"MultiPolygon","coordinates":[[[[40.0,40.0],[20.0,45.0],[45.0,30.0],[40.0,40.0]]],[[[20.0,35.0],[45.0,20.0],[30.0,5.0],[10.0,10.0],[10.0,30.0],[20.0,35.0]],[[30.0,20.0],[20.0,25.0],[20.0,15.0],[30.0,20.0]]]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"Geom@odata.type":"Edm.Geometry","Geom":{"type":"Polygon","coordinates":[],"crs":{"type":"name","properties":{"name":"EP
SG:0"}}},"GeomPoint@odata.type":"Edm.GeometryPoint","GeomPoint":{"type":"Point","coordinates":[4513675.2944411123,6032903.5882574534],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomLine@odata.type":"Edm.GeometryLineString","GeomLine":{"type":"LineString","coordinates":[[1.0,1.0],[3.0,3.0],[2.0,4.0],[2.0,0.0]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomPolygon@odata.type":"Edm.GeometryPolygon","GeomPolygon":{"type":"Polygon","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomCollection@odata.type":"Edm.GeometryCollection","GeomCollection":{"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[]},{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[1.0,2.0]}]}],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomMultiPoint@odata.type":"Edm.GeometryMultiPoint","GeomMultiPoint":{"type":"MultiPoint","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomMul
tiLine@odata.type":"Edm.GeometryMultiLineString","GeomMultiLine":{"type":"MultiLineString","coordinates":[[[10.0,10.0],[20.0,20.0],[10.0,40.0]],[[40.0,40.0],[30.0,30.0],[40.0,20.0],[30.0,10.0]]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomMultiPolygon":null}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml
new file mode 100644
index 0000000..3bc5f87
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<entry xml:base="http://192.168.0.160:8080/DefaultService.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"><id>http://192.168.0.160:8080/DefaultService.svc/AllGeoTypesSet(-5)</id><category term="Microsoft.Test.OData.Services.AstoriaDefaultService.AllSpatialTypes" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="AllSpatialTypes" href="AllGeoTypesSet(-5)" /><title /><updated>2013-09-11T07:48:06Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">-5</d:Id><d:Geog m:type="Edm.GeographyCollection"><gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326" /></d:Geog><d:GeogPoint m:null="true" /><d:GeogLine m:type="Edm.GeographyLineString"><gml:LineString gml:srsN
ame="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:pos>10.5 10.5</gml:pos><gml:pos>20.5 20.5</gml:pos><gml:pos>40.5 10.5</gml:pos></gml:LineString></d:GeogLine><d:GeogPolygon m:type="Edm.GeographyPolygon"><gml:Polygon gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:exterior><gml:LinearRing><gml:pos>5 15</gml:pos><gml:pos>10 40</gml:pos><gml:pos>20 10</gml:pos><gml:pos>10 5</gml:pos><gml:pos>5 15</gml:pos></gml:LinearRing></gml:exterior></gml:Polygon></d:GeogPolygon><d:GeogCollection m:type="Edm.GeographyCollection"><gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:geometryMembers><gml:MultiGeometry /><gml:MultiGeometry><gml:geometryMembers><gml:Point><gml:pos>2 1</gml:pos></gml:Point></gml:geometryMembers></gml:MultiGeometry></gml:geometryMembers></gml:MultiGeometry></d:GeogCollection><d:GeogMultiPoint m:type="Edm.GeographyMultiPoint"><gml:MultiPoint gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:pointMembers><gml:Point>
<gml:pos>47.38 -122.7</gml:pos></gml:Point></gml:pointMembers></gml:MultiPoint></d:GeogMultiPoint><d:GeogMultiLine m:type="Edm.GeographyMultiLineString"><gml:MultiCurve gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326" /></d:GeogMultiLine><d:GeogMultiPolygon m:type="Edm.GeographyMultiPolygon"><gml:MultiSurface gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:surfaceMembers><gml:Polygon><gml:exterior><gml:LinearRing><gml:pos>40 40</gml:pos><gml:pos>45 20</gml:pos><gml:pos>30 45</gml:pos><gml:pos>40 40</gml:pos></gml:LinearRing></gml:exterior></gml:Polygon><gml:Polygon><gml:exterior><gml:LinearRing><gml:pos>35 20</gml:pos><gml:pos>20 45</gml:pos><gml:pos>5 30</gml:pos><gml:pos>10 10</gml:pos><gml:pos>30 10</gml:pos><gml:pos>35 20</gml:pos></gml:LinearRing></gml:exterior><gml:interior><gml:LinearRing><gml:pos>20 30</gml:pos><gml:pos>25 20</gml:pos><gml:pos>15 20</gml:pos><gml:pos>20 30</gml:pos></gml:LinearRing></gml:interior></gml:Polygon></gml:surfaceMembers></gml
:MultiSurface></d:GeogMultiPolygon><d:Geom m:type="Edm.GeometryPolygon"><gml:Polygon gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0" /></d:Geom><d:GeomPoint m:type="Edm.GeometryPoint"><gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>4513675.2944411123 6032903.5882574534</gml:pos></gml:Point></d:GeomPoint><d:GeomLine m:type="Edm.GeometryLineString"><gml:LineString gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>1 1</gml:pos><gml:pos>3 3</gml:pos><gml:pos>2 4</gml:pos><gml:pos>2 0</gml:pos></gml:LineString></d:GeomLine><d:GeomPolygon m:type="Edm.GeometryPolygon"><gml:Polygon gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0" /></d:GeomPolygon><d:GeomCollection m:type="Edm.GeometryCollection"><gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:geometryMembers><gml:MultiGeometry /><gml:MultiGeometry><gml:geometryMembers><gml:Point><gml:pos>1 2</gml:pos></gml:Point></gml:geometryMembers></gml:MultiGeometry></gml:g
eometryMembers></gml:MultiGeometry></d:GeomCollection><d:GeomMultiPoint m:type="Edm.GeometryMultiPoint"><gml:MultiPoint gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0" /></d:GeomMultiPoint><d:GeomMultiLine m:type="Edm.GeometryMultiLineString"><gml:MultiCurve gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:curveMembers><gml:LineString><gml:pos>10 10</gml:pos><gml:pos>20 20</gml:pos><gml:pos>10 40</gml:pos></gml:LineString><gml:LineString><gml:pos>40 40</gml:pos><gml:pos>30 30</gml:pos><gml:pos>40 20</gml:pos><gml:pos>30 10</gml:pos></gml:LineString></gml:curveMembers></gml:MultiCurve></d:GeomMultiLine><d:GeomMultiPolygon m:null="true" /></m:properties></content></entry>
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.json
new file mode 100644
index 0000000..2e3469b
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.43.55:8080/DefaultService.svc/$metadata#AllGeoTypesSet/@Element","odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.AllSpatialTypes","odata.id":"http://192.168.43.55:8080/DefaultService.svc/AllGeoTypesSet(-8)","odata.editLink":"AllGeoTypesSet(-8)","Id":-8,"Geog@odata.type":"Edm.Geography","Geog":{"type":"Point","coordinates":[178.94,51.5961],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogPoint@odata.type":"Edm.GeographyPoint","GeogPoint":{"type":"Point","coordinates":[178.7,51.65],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogLine@odata.type":"Edm.GeographyLineString","GeogLine":{"type":"LineString","coordinates":[[10.0,10.0],[20.0,20.0],[10.0,40.0]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogPolygon@odata.type":"Edm.GeographyPolygon","GeogPolygon":{"type":"Polygon","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogCollection@odata.type":"Edm.GeographyColle
ction","GeogCollection":{"type":"GeometryCollection","geometries":[],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiPoint@odata.type":"Edm.GeographyMultiPoint","GeogMultiPoint":{"type":"MultiPoint","coordinates":[[-122.7,47.38]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiLine@odata.type":"Edm.GeographyMultiLineString","GeogMultiLine":{"type":"MultiLineString","coordinates":[[[10.5,10.5],[20.5,20.5],[10.5,40.5]],[[40.5,40.5],[30.5,30.5],[40.5,20.5],[30.5,10.5]]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiPolygon@odata.type":"Edm.GeographyMultiPolygon","GeogMultiPolygon":{"type":"MultiPolygon","coordinates":[[[[40.0,40.0],[20.0,45.0],[45.0,30.0],[40.0,40.0]]],[[[20.0,35.0],[45.0,20.0],[30.0,5.0],[10.0,10.0],[10.0,30.0],[20.0,35.0]],[[30.0,20.0],[20.0,25.0],[20.0,15.0],[30.0,20.0]]]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"Geom@odata.type":"Edm.Geometry","Geom":{"type":"Point","coordinates":[4369367.0
586663447,6352015.6916818349],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomPoint@odata.type":"Edm.GeometryPoint","GeomPoint":{"type":"Point","coordinates":[4377000.868172125,6348217.1067010015],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomLine@odata.type":"Edm.GeometryLineString","GeomLine":{"type":"LineString","coordinates":[[1.0,1.0],[3.0,3.0],[2.0,4.0],[2.0,0.0]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomPolygon@odata.type":"Edm.GeometryPolygon","GeomPolygon":{"type":"Polygon","coordinates":[[[30.0,20.0],[10.0,40.0],[45.0,40.0],[30.0,20.0]]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomCollection@odata.type":"Edm.GeometryCollection","GeomCollection":{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[4.0,6.0]},{"type":"LineString","coordinates":[[4.0,6.0],[7.0,10.0]]}],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomMultiPoint":null,"GeomMultiLine@odata.type":"Edm.GeometryMultiLineString",
"GeomMultiLine":{"type":"MultiLineString","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomMultiPolygon@odata.type":"Edm.GeometryMultiPolygon","GeomMultiPolygon":{"type":"MultiPolygon","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:0"}}}}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml
new file mode 100644
index 0000000..13e2aea
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<entry xml:base="http://192.168.43.55:8080/DefaultService.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"><id>http://192.168.43.55:8080/DefaultService.svc/AllGeoTypesSet(-8)</id><category term="Microsoft.Test.OData.Services.AstoriaDefaultService.AllSpatialTypes" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="AllSpatialTypes" href="AllGeoTypesSet(-8)" /><title /><updated>2013-08-21T10:50:04Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">-8</d:Id><d:Geog m:type="Edm.GeographyPoint"><gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:pos>51.5961 178.94</gml:pos></gml:Point></d:Geog><d:GeogPoint m:type="Edm.GeographyPoint"><gml:Point gml:srsName="htt
p://www.opengis.net/def/crs/EPSG/0/4326"><gml:pos>51.65 178.7</gml:pos></gml:Point></d:GeogPoint><d:GeogLine m:type="Edm.GeographyLineString"><gml:LineString gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:pos>10 10</gml:pos><gml:pos>20 20</gml:pos><gml:pos>40 10</gml:pos></gml:LineString></d:GeogLine><d:GeogPolygon m:type="Edm.GeographyPolygon"><gml:Polygon gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326" /></d:GeogPolygon><d:GeogCollection m:type="Edm.GeographyCollection"><gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326" /></d:GeogCollection><d:GeogMultiPoint m:type="Edm.GeographyMultiPoint"><gml:MultiPoint gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:pointMembers><gml:Point><gml:pos>47.38 -122.7</gml:pos></gml:Point></gml:pointMembers></gml:MultiPoint></d:GeogMultiPoint><d:GeogMultiLine m:type="Edm.GeographyMultiLineString"><gml:MultiCurve gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:curveMembers><g
ml:LineString><gml:pos>10.5 10.5</gml:pos><gml:pos>20.5 20.5</gml:pos><gml:pos>40.5 10.5</gml:pos></gml:LineString><gml:LineString><gml:pos>40.5 40.5</gml:pos><gml:pos>30.5 30.5</gml:pos><gml:pos>20.5 40.5</gml:pos><gml:pos>10.5 30.5</gml:pos></gml:LineString></gml:curveMembers></gml:MultiCurve></d:GeogMultiLine><d:GeogMultiPolygon m:type="Edm.GeographyMultiPolygon"><gml:MultiSurface gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:surfaceMembers><gml:Polygon><gml:exterior><gml:LinearRing><gml:pos>40 40</gml:pos><gml:pos>45 20</gml:pos><gml:pos>30 45</gml:pos><gml:pos>40 40</gml:pos></gml:LinearRing></gml:exterior></gml:Polygon><gml:Polygon><gml:exterior><gml:LinearRing><gml:pos>35 20</gml:pos><gml:pos>20 45</gml:pos><gml:pos>5 30</gml:pos><gml:pos>10 10</gml:pos><gml:pos>30 10</gml:pos><gml:pos>35 20</gml:pos></gml:LinearRing></gml:exterior><gml:interior><gml:LinearRing><gml:pos>20 30</gml:pos><gml:pos>25 20</gml:pos><gml:pos>15 20</gml:pos><gml:pos>20 30</gml:pos></gm
l:LinearRing></gml:interior></gml:Polygon></gml:surfaceMembers></gml:MultiSurface></d:GeogMultiPolygon><d:Geom m:type="Edm.GeometryPoint"><gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>4369367.0586663447 6352015.6916818349</gml:pos></gml:Point></d:Geom><d:GeomPoint m:type="Edm.GeometryPoint"><gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>4377000.868172125 6348217.1067010015</gml:pos></gml:Point></d:GeomPoint><d:GeomLine m:type="Edm.GeometryLineString"><gml:LineString gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>1 1</gml:pos><gml:pos>3 3</gml:pos><gml:pos>2 4</gml:pos><gml:pos>2 0</gml:pos></gml:LineString></d:GeomLine><d:GeomPolygon m:type="Edm.GeometryPolygon"><gml:Polygon gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:exterior><gml:LinearRing><gml:pos>30 20</gml:pos><gml:pos>10 40</gml:pos><gml:pos>45 40</gml:pos><gml:pos>30 20</gml:pos></gml:LinearRing></gml:exterior></gml:Polygon></d:GeomPolygon>
<d:GeomCollection m:type="Edm.GeometryCollection"><gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:geometryMembers><gml:Point><gml:pos>4 6</gml:pos></gml:Point><gml:LineString><gml:pos>4 6</gml:pos><gml:pos>7 10</gml:pos></gml:LineString></gml:geometryMembers></gml:MultiGeometry></d:GeomCollection><d:GeomMultiPoint m:null="true" /><d:GeomMultiLine m:type="Edm.GeometryMultiLineString"><gml:MultiCurve gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0" /></d:GeomMultiLine><d:GeomMultiPolygon m:type="Edm.GeometryMultiPolygon"><gml:MultiSurface gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0" /></d:GeomMultiPolygon></m:properties></content></entry>
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.json
new file mode 100644
index 0000000..d62d51b
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.43.55:8080/DefaultService.svc/$metadata#Car/@Element","odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Car","odata.id":"http://192.168.43.55:8080/DefaultService.svc/Car(16)","odata.editLink":"Car(16)","odata.mediaEditLink":"Car(16)/$value","odata.mediaReadLink":"Car(16)/$value","odata.mediaContentType":"*/*","Photo@odata.mediaEditLink":"Car(16)/Photo","Photo@odata.mediaContentType":"application/octet-stream","Video@odata.mediaEditLink":"Car(16)/Video","VIN":16,"Description":"\u3041\u30bc\u3092\u3042\u30af\u3073\u30bc\u30bc\u30a1\u30a1\u305b\u30de\u307b\u30b0\u30bd\u30d0\u305b\u0451\u88f9\uff66\u307d\uff9d\u30a1"}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.xml
new file mode 100644
index 0000000..e9ab95e
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<entry xml:base="http://192.168.43.55:8080/DefaultService.svc/"
+ xmlns="http://www.w3.org/2005/Atom"
+ xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
+ xmlns:georss="http://www.georss.org/georss"
+ xmlns:gml="http://www.opengis.net/gml">
+
+ <id>http://192.168.43.55:8080/DefaultService.svc/Car(16)</id>
+ <category term="Microsoft.Test.OData.Services.AstoriaDefaultService.Car"
+ scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
+ <link rel="edit" title="Car" href="Car(16)" />
+ <title />
+ <updated>2013-08-21T10:31:09Z</updated>
+ <author>
+ <name />
+ </author>
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/edit-media/Photo"
+ type="application/octet-stream" title="Photo" href="Car(16)/Photo" />
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/edit-media/Video"
+ title="Video" href="Car(16)/Video" />
+ <link rel="edit-media" title="Car" href="Car(16)/$value" />
+ <content type="*/*" src="Car(16)/$value" />
+ <m:properties>
+ <d:VIN m:type="Edm.Int32">16</d:VIN>
+ <d:Description>ぁゼをあクびゼゼァァせマほグソバせё裹ヲぽンァ</d:Description>
+ </m:properties>
+</entry>
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.json
new file mode 100644
index 0000000..88c7804
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.43.55:8080/DefaultService.svc/$metadata#ComputerDetail/@Element","odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ComputerDetail","odata.id":"http://192.168.43.55:8080/DefaultService.svc/ComputerDetail(-10)","odata.editLink":"ComputerDetail(-10)","Computer@odata.navigationLinkUrl":"ComputerDetail(-10)/Computer","#DefaultContainer.ResetComputerDetailsSpecifications":{"title":"ResetComputerDetailsSpecifications","target":"http://192.168.43.55:8080/DefaultService.svc/ComputerDetail(-10)/ResetComputerDetailsSpecifications"},"ComputerDetailId":-10,"Manufacturer":"sspayuqgmkizmvtxdeuitrnqcblxoipcsshhfvibxuzssatvjjhoftpk","Model":"usfvbkyxssojjebyzgvtnzkuik\u00dfuxrmllzyglnsssluyxf\u00dfssioyroouxafzbhbsabkrsslbyhghicjaplolzqss\u00dfhhfix","Serial":null,"SpecificationsBag@odata.type":"Collection(Edm.String)","SpecificationsBag":["vorjqalydmfuazkatkiydeicefrjhyuaupkfgbxiaehjrqhhqv","rbsejgfgelhsdahkoqlnzvbq","ssfvnnquahsczxlu\u00dfnssrhpssz
luundy\u00dfehyzjedssxom","xsqocvqrzbvzhdhtilugpvayirrnomupxinhihazfghqehqymeeaupuesseluinjgbedrarqluedjfx","eekuucympfgkucszfuggbmfglpnxnjvhkhalymhtfuggfafulkzedqlksoduqeyukzzhbbasjmee","\u30be\u3092\u4e5d\u30af\u305d"],"PurchaseDate@odata.type":"Edm.DateTime","PurchaseDate":"2020-12-15T01:33:35.8014568","Dimensions":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Dimensions","Width@odata.type":"Edm.Decimal","Width":"-8917.92836319839","Height@odata.type":"Edm.Decimal","Height":"-79228162514264337593543950335","Depth@odata.type":"Edm.Decimal","Depth":"-79228162514264337593543950335"}}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.xml
new file mode 100644
index 0000000..f9c0e4f
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<entry xml:base="http://192.168.43.55:8080/DefaultService.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"><id>http://192.168.43.55:8080/DefaultService.svc/ComputerDetail(-10)</id><category term="Microsoft.Test.OData.Services.AstoriaDefaultService.ComputerDetail" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ComputerDetail" href="ComputerDetail(-10)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Computer" type="application/atom+xml;type=entry" title="Computer" href="ComputerDetail(-10)/Computer" /><title /><updated>2013-08-21T10:53:24Z</updated><author><name /><uri>usfvbkyxssojjebyzgvtnzkuikßuxrmllzyglnsssluyxfßssioyroouxafzbhbsabkrsslbyhghicjaplolzqssßhhfix</uri><email>sspayuqgmkizmvtxdeuitrn
qcblxoipcsshhfvibxuzssatvjjhoftpk</email></author><m:action metadata="http://192.168.43.55:8080/DefaultService.svc/$metadata#DefaultContainer.ResetComputerDetailsSpecifications" title="ResetComputerDetailsSpecifications" target="http://192.168.43.55:8080/DefaultService.svc/ComputerDetail(-10)/ResetComputerDetailsSpecifications" /><content type="application/xml"><m:properties><d:ComputerDetailId m:type="Edm.Int32">-10</d:ComputerDetailId><d:Manufacturer>sspayuqgmkizmvtxdeuitrnqcblxoipcsshhfvibxuzssatvjjhoftpk</d:Manufacturer><d:Model>usfvbkyxssojjebyzgvtnzkuikßuxrmllzyglnsssluyxfßssioyroouxafzbhbsabkrsslbyhghicjaplolzqssßhhfix</d:Model><d:Serial m:null="true" /><d:SpecificationsBag m:type="Collection(Edm.String)"><d:element>vorjqalydmfuazkatkiydeicefrjhyuaupkfgbxiaehjrqhhqv</d:element><d:element>rbsejgfgelhsdahkoqlnzvbq</d:element><d:element>ssfvnnquahsczxlußnssrhpsszluundyßehyzjedssxom</d:element><d:element>xsqocvqrzbvzhdhtilugpvayirrnomupxinhihazfghqehqymeeaupuesseluinjgbedrar
qluedjfx</d:element><d:element>eekuucympfgkucszfuggbmfglpnxnjvhkhalymhtfuggfafulkzedqlksoduqeyukzzhbbasjmee</d:element><d:element>ゾを九クそ</d:element></d:SpecificationsBag><d:PurchaseDate m:type="Edm.DateTime">2020-12-15T01:33:35.8014568</d:PurchaseDate><d:Dimensions m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Dimensions"><d:Width m:type="Edm.Decimal">-8917.92836319839</d:Width><d:Height m:type="Edm.Decimal">-79228162514264337593543950335</d:Height><d:Depth m:type="Edm.Decimal">-79228162514264337593543950335</d:Depth></d:Dimensions></m:properties></content></entry>
[02/11] [OLINGO-200] V3 (de)serializers + unit tests merged
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer_-10.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer_-10.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer_-10.json
new file mode 100644
index 0000000..759435f
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer_-10.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.43.55:8080/DefaultService.svc/$metadata#Customer/@Element","odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Customer","odata.id":"http://192.168.43.55:8080/DefaultService.svc/Customer(-10)","odata.editLink":"Customer(-10)","Orders@odata.navigationLinkUrl":"Customer(-10)/Orders","Logins@odata.navigationLinkUrl":"Customer(-10)/Logins","Husband@odata.navigationLinkUrl":"Customer(-10)/Husband","Wife@odata.navigationLinkUrl":"Customer(-10)/Wife","Info@odata.navigationLinkUrl":"Customer(-10)/Info","Thumbnail@odata.mediaEditLink":"Customer(-10)/Thumbnail","Video@odata.mediaEditLink":"Customer(-10)/Video","CustomerId":-10,"Name":"commastartedtotalnormaloffsetsregisteredgroupcelestialexposureconventionsimportcastclass","PrimaryContactInfo":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["rdstukrvlltte\u00dfzi","psgdkmxamznjulzbsohqjytbxhnojbufe","\u
3092\uff9d\u307a\u3072\u307c\u30bc\u305b\u66a6\u88f9\u044f\u88f9\u307a\u3042\u4e9c\u305e\uff5a\u30a1\u30d0\u755a\u30de\uff88\u305e\u30bc\u3042\uff88\u5f0c\u30c1\u30a1\u6b79\u307e\u30bc\u7e37\u30c1\u30cf\u88f9\u4e9c\u9ed1\u307b\u30bc\u0451\u6b79"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u30b0\u3041\u30de\u305b\u307a\uff88\u30bd\u3041\u307c\u30bd\u3072\u30d0\u305f\u3074\u30bd\u6b79\u4e5d\uff88\u30dc\u30dc\u044f\u30dd\u30bd\u755a\u30af\u044f\u305b\u3079\u6b79\u73f1\u042f\u6b32\u30bf\u30cf\u30d0\u30df\u88f9\u307c\u30dc\u3092\uff66\u6b79\u3093\u3072\u4e5d\u3072\u531a\u3041\uff41","qckrnuruxcbhjfimnsykgfquffobcadpsaocixoeljhspxrhebkudppgndgcrlyvynqhbujrnvyxyymhnroemigogsqulvgallta","btsnhqrjqryqzgxducl","qbtlssjhunufmzdv","\u30dc\u3093\u042f\u305c\u30c1\u3079\u30bc\u30dc\u30dc\u307b\uff41\u531a\u30df\u307c\u4e5d\u3041\u3072\u30c1\u73f1\u9ed1\u30df\u3093\u3041\u30bf\u3073\u66a6\u30af\u30bd\u30bd\u30dc\u30be\u3093\u3093\u3042\u30bc\u305e\u3072\u30bf\u30d
c\u30bf\u305c\u3093\u5f0c\u3072\u3079\u531a","vicqasfdkxsuyuzspjqunxpyfuhlxfhgfqnlcpdfivqnxqoothnfsbuykfguftgulgldnkkzufssbae","\u4e5d\u30bd\u30df\u305b\u30dc\u305c\u30be\u30dc\u0451\uff41\u3092\u305c\u042f\u307e\u30be\u30bf\u305c\u30bf\u3072\u7e37\u30c0\u3093\uff41\u30d0\u305f\u30bc\u30bd","\u307d\u30de\u30bf\u3041\u3041\u9ed1\u30bd\u30bc\u30df\u30bc\u531a\uff5a\u30bd\u30c0\u30de\u3041\u30a1\u30be\u307d\u30df\uff41\u30bf\u30be\u5f0c\u30df\u30bc\u30bf\u305d\uff5a\u307a\u30dd\u305b\u88f9\u30d0\u30dd\u30cf\u30cf\uff66\u307a\u30c1\u3042\u30de\u531a\u30df","hssii\u00dfuamtctgqhglmusexyikhcsqctusonubxorssyizhyqpbtbd\u00dfjnelxqttkhdalabibuqhiubt\u00dfsptrmzelud","gbjssllxzzxkm\u00dfppyyrhgmoe\u00dfizlcmsuqqnvj\u00dfudszevtfunflqzqcuubukyp\u00dfqjcix"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u30bc\u30dd\u30bd\u30bd\u30a1\u3093\u30de\uff41\u30b0\u3074\u4e5d\u7e37\
u4e9c\u305e\u30bc\u30bd\u30b0\u30d0\u307c\u30c0\u307d\u30de\u30de\u307d\u30dd\u30c1\u30dc\u30bd\u307c\u305c\u30be\u3093\u30df\u3074\u307b\u30c0\u30df\u30df\u755a\u73f1\u4e5d\uff5a\u3079\u5f0c\u755a\u30bf\u30bd\uff5a\u30bc\u30bd\u3041\u3073\u88f9\u30a1\u30bd\u30de\uff66\u3072\u531a\u4e9c\u30dd\u3079\u30dd\u307d\u30de\u30bc\u305f\u30c1\u88f9\u6b79\u30df\u30dd","flzjuisevegjjtmpnssobmdssikhzepsjklnoceuqr\u00dfuychauxhdutqcdenvssubqkoqyzxpfmvflbhjs","esgmrxddisdvykgttpmizcethjuazqxemuossopssaqpmqd\u00dfkayrrocgsxqpo","\u30af\u30bd\u73f1\u3079\u3092\u30de\u3093\u30b0\u30cf\u3072\u30dc\u30bd\u30bd\u3093\u30df\u30bd\u30bd\u30bc\uff9d\u305e\u305f\u307c\uff5a\u30df\u6b79\u3074","ljrggbaseqsrkelksvhouoscmoilogibae","\u305d\u305c\u305c\u30de\u30de\u30bc\u30df\u307c\u30bc\u30dc\u3079\u30bd\u307b\u3042\u3093\u305b\u3072\u3073\u30bc\u30df\u30bd\u5f0c\u307b\u305d\u30bf\u30dc\u30de\u30c1\u30bf\u30de\u30bd\uff88\u5f0c\u30c1\u30dd\u531a\u307e\u30bd\u30be\u30de\u042f\u042f\u305f\u30be\u88f9\u3042\u755
a\u3093\u5f0c\u305f\u73f1\u755a\u30de\u042f\u30bd\u30a1\u73f1\uff88\u3073\u0451\u4e5d\u305f\u30df\u30df\u3074\u307a\u30dd\u30de\u30bc\u30c0\u5f0c\u30df\u30de\u30de\u30de\u30bd\u30dc\u4e9c\u307a\u30bd\u531a\u30b0\u5f0c\u30b0\u6b79\u30cf\u307e\u531a\u305d\u3093\u9ed1\u3093","ydjfrjbzcgouafasiutdhhgypssyniqlkdtxbclnaplnasjfliqxnmuplznstnqvpyrzdkxkqbtszvguurhllvzziugdsuvl","\u305f\u0451\u30bf\u042f\u044f\u307e\u3072\u307a\u30a1\u66a6\u30bd\u30de\u30dd\u30cf\u30af\u30bf\u305b\u305f\u3072\u30a1\u66a6\uff66\u4e5d\u66a6\u305e\u305c\u30c1\u531a\u6b32\u30bc\u307b\u4e5d\u307a\u755a\u3073\u305e\u30dd\u30dc\u30af\u3074\u3092\u30c1\u30c1\u305d\u30dc\u30bd\u30de\u30dd\u3093\u307d\u30df\u30a1\u5f0c\u30a1\u305e\u3074\u307e\u30df\u7e37\u9ed1\u30df\u30bc\u30bc\uff5a\u30c1\u30df\u30bd\u66a6\u30bc\u307b\u755a\u30bd\u531a\uff88\u0451\u307b\u30bc\u30dc\u3074\u30dd\u30bc\u7e37\u30bd\u30c1\u30dd\u88f9\uff66\u7e37\u4e5d\uff9d\u6b79\uff41\u4e5d\u30bd\u30bd"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Se
rvices.AstoriaDefaultService.Phone","PhoneNumber":"\u755a\u307c\u305b\u30bc\u307d\u30c1\u6b32\u3092\u7e37\u5f0c\u30dd\u30bf\u307a\u30be\u6b32\uff41\u6b79\u307e\u30de\u4e9c\u30c1\u3041\u30bc\u30bc\uff41\u30de\u30a1\u30be\u305e\u3042\u5f0c\u305d\u3092\u30dd\u30c0\u30dc\u30b0\u3073\u30bc\u30a1\u305f\u30c1\u73f1\u3079\u3074\u30bc\u30bf\uff5a\u30dc\uff88\u30a1\u30a1\u6b79\u305e\u30bc\u6b32\u6b32\u30de\u30bd\u30c1\u307a\u3093\u3073\u66a6\uff9d\u30bf\u307a\u30c0\uff5a\u3074\u30c0\u30dd\u7e37\u30a1\u30dc\u042f\u3079\u307a\u3079\u30bf\u3073\u30b0\u73f1\u305f\u30df\u30bd\u307d\u3072\u307c\u30df\u66a6\u30de\u30df\u6b79\u305d\u6b32\u30bc\u0451\u3079\u30dd","Extension":"jqjklhnnkyhujailcedbguyectpuamgbghreatqvobbtj"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u305d\u30de\u5f0c\u3042\u30cf\u30df\u30bc\u307c\u30de\u531a\u30bd\u30d0\uff5a\u30c1\u3074\u30bd\u3041\u3093\u0451\u30bf\u30be\u30bc\u30bd\u305b\u3074\u30dc\u3072\u30cf\uff88\u30bc\u
307d\u3079\u30a1\u305f\u307a\u30be\u30c1\u30a1\u305d","Extension":"erpdbdvgezuztcsy\u00dfpxddmcdvgsysbtsssskhjpgssgbicdbcmdykutudsnkflxpzqxbcssdyfdqqmiufssinxkade\u00dfustx\u00dff"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"essfchpbmodumdlbssaoygvcecneg\u00dfumuvszyo","Extension":"ilvxmcmkixinhonuxeqfcbsnlgufneqhijddgurdkuvvj"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"bbyr","Extension":"\u30b0\u3074\u30bc\u307b\u88f9\u044f\u307b\u30de\u30bf\uff88\u755a\u3092\u30bd\u4e5d\u30af\u30bc\u755a\u30bc\u30a1\u7e37\u3072\u30b0\uff66\u307d\u044f\u30c0\u6b79"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"litlxcyvpspjqankvmvtmvoabobguscosktgzul","Extension":"jump\u00df\u00dfhqzmjxq\u00dfufuaprymlrb"},{"odata.type":"Microsoft.Test.OData.Service
s.AstoriaDefaultService.Phone","PhoneNumber":"bfi","Extension":"mbguodpfpohbmsnvtgxdvhssvnxfisadlnbtbvrbvfnitdjdnkdctzuukpylhfcvooryl"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"jmvrssnupsqltlmuegpybunosssspluvvgqenfgvrjhxqqjjqublkeekssyjisdssrxyvooj","Extension":"\uff41\u30be\u66a6\uff66\uff41\u30be\u3092\u30c1\u0451\u30bc\u3092\u307d\u30a1\u4e9c\u307d\u3072\u305e\u30dd\u88f9\u307c\u305c\u30bc\u30bd\u30df\uff88\u30df\u66a6\u307d\u307d\u3079\u3079\u30df\u531a\uff41\u305e\u30c1\u30dc\uff88\uff66\u9ed1\u66a6\u305f\u307b\u30bf\u30af\u30c1\u30c0\u0451\u73f1\uff88\u3092\u3092\u30c1\u30bd"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"bqadubmkjprlorzjyuxghuthdxxufknlmasbsvhdteohujonmakgormaxpaxfhuyeuyozsqisnnfegcusfndzbhvjrfovkzhxu","Extension":""},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"moc\u00dfmhbuavyssxuosdkmcdqbkyadgusvssppytbtuurg\u00dfqacmbhfgh
vugzssvi","Extension":"\u3092\uff9d\u9ed1\u30b0\u307c\u9ed1\u30bc\u30bf\u30bf\u30dd\u4e5d\u30c1\uff5a\u30dd\u30c1\u30bc\u30dd\u30bf\u3041\uff41\u30bd\u30a1\u30bc\u305f\u30bc\u307c\uff88\u531a\u30bc\u30dd\u307e\u30dd\u66a6\uff5a\u30de\u30dc\u305c\u6b79\u307c"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"\u30d0\u30bc\u307c\u30af\u30b0"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\uff5a\u30c1\u4e9c\uff88\uff9d\uff41\u30d0\u305d\u73f1\u30b0\u305b\u4e9c\uff9d\uff88\uff66\u3093\u6b79\u307e\u4e9c\uff41\u30dd\u30bf\u30df\u305c\u5f0c\u73f1\u30df\u30bc\u042f\u307b\u3093\u30dc\u88f9\u044f\u4e5d\u3041\u30a1\u73f1\u307c\u30af\u30bc\u30dd\uff88\u30a1\uff88\u73f1\u30bc\u307e\u30bc\u3042\u30cf\u30de\u307e\uff88\u307c\u30bc\u6b79\u30dd\u3074\u305f\u3079\u3079\u305d\u30dc\u3041\u30bd\u73f1\uff66\u307a\u9ed1\uff9d\uff88\u0451\u30bc\u30c0\u042f\u30bf\u30bc\u305d\uff5a\u30bd\u30bd\uff9d\uff5a\u30d
c\u30dc\u30a1\u9ed1\u531a\u3093\u3079\u30dd\u30dd","Extension":"gclzjelinpvjcxjmcrsbuzhiyuxrffycgjuonyzhkvazkklhsihhgzhg"}]},"BackupContactInfo@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails)","BackupContactInfo":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":[],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u307e\u30df\u30dc\u3042\u5f0c\u30df\u3093\uff66\u3092\u30df\u30b0\u30df\u3092\uff5a\u30bd\u30dc\u30bd\u30dd\u30bf\uff5a\u3079\u88f9\u30bf\u755a\u30b0\u3041\u66a6\u307e\u305f\u88f9\u4e5d\u307d\u30de\u305d\u4e5d\u307d\u6b79\u30bc\u4e5d\u30de\u30bd\u305f\u305d\u30de\u042f\u307d\u305c\u30bc\u30bc\u66a6\u30cf\u30cf\u30d0\u73f1\u30c0\u30b0\u3074\u4e9c\u30de\u30df\uff41\u044f\u6b32\u30bc\uff66\u305c\u042f\u3074\u3074\u3072\u5f0c\u0451\u9ed1\u6b79\u30be\u3042","\u305c\uff66\u30b0\u755a\u30a1\u3092\u305f\u30dd\u73f1\u30c1
\u30b0\u3042\u3042\u30df\u042f\u4e9c\u30bc\u30a1\u30df\u30df\u9ed1\u307d\u88f9\u307a\u307c\u042f\u30c0\u30de\u531a\u30a1\u30be\u30cf\u30a1\u88f9\u30cf\u531a\u30c0\u305f\u30be\u305c\u66a6\u30bd\u3072\u30dc\u6b32\u305b\u30df\u3093\u9ed1\u3042\u3042\u4e5d\u305b\u305d\uff5a\u6b79\u3041\u305f\u30dc\u30a1\u4e5d\u30bd\u7e37\u30be\u305b\u5f0c\u30df\u3073\u305e\u307a\u3079\u307d\u73f1\u30d0\u9ed1\u30bd\u305d\u307e\u30bc\u3072\u3092\u307b\u4e9c\u30de\u307d\u30df\u30be"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["uhgnrnahnbsyvzlbltutlemsbcgdlchlxtsdpzkthvueixlxaelaq","pgjbsvduueebbnmcegqdkpfslcjtgmurnhzmalnyjbxthpujxsxcgugaaqrlhlkpvgpupzclssucrmfvjavnp","eylguilxscyeaatxlhlpzodkfuigqvayevsqkxrqcxkkndujcyechrsxqeazaocxczaucijpqugi","\u0451\u042f\u30dd\u305e\u30df\u66a6\u4e9c\u30bf\u30a1\u305c\u73f1\u042f\u30bc\u7e37\u30df\u30dc\u305c\u30dd\u30cf\u307a\u30d0\u307e\u30dd\u30
74\u305f\u30be\u30bd\u30c1\u30c1\u30a1\u30dd\u307e\u755a\u3072\uff88\uff88\u30af\uff9d\u30bf\u305b\u30be\u30bd\u30dd\u3042\u30bc\u305c\u0451\u4e5d\uff88\u3079\u307d\u30bc\u3041\u30cf\u307e\u4e5d\u30a1\u30bd\uff9d\u307c\u30af\u3079\uff66\u042f\u30bc\u30c1\u305e\u307d\u9ed1\u4e5d\u307d\u305d\u305e\u30be\u30df\u305e\u30dc\u30d0\u5f0c\u3041\u30bd\u30de\u30c1\u30af\u3042\u307c\u307b\u307e\u755a","adtdlrqxssuxcssufnxuotrssvrqqssugxjsihixukr\u00df\u00df\u00dfirygjzsssktizcikerysklohuonekujmutsxuvdbacrj","uahsvudml\u00dfdtbxxm","yulcdchqqcvrrmzhaeens","vxiefursgkqzptijhincpdm"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"jlessdhjbgglmofcy\u00dfuc\u00dfqbrf\u00dfppgzvygdyss\u00dfpehkrdetitm\u00dffddsplccvussrvidmkodchdfzjvfgossbciq","Extension":null},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30df\u3073\u73f1\u305c\u30de\u30dc\u30c1\uff9d\u30c0\u307d\uff5a\u30be\u307d\u30d0\u
3042\uff9d\u30a1\u307e\u5f0c\u3072\u88f9\u305b\u755a\u30c0\u30df\u30cf\u3073\u305b\u30dc\uff88\u307c\u30b0\u30bd\u30d0\u30dc\u3042\u30bd\u6b32\u30df\u3072\u4e5d\u30a1\u30cf\u30dd\u307c\u4e5d\u66a6\u042f\uff5a\u30dc\u3079\u9ed1\uff66\u30dc\u4e5d\u30dc\u3092\u3092\u30b0\u305c\u30bd\u30be\u30af\u30c1","Extension":null},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30bf\u30c1\u30dc\u30bc\u30c0\u30be\u307a\u307e\uff88\u531a\u3072\u305e\uff9d\u531a\u30a1\u30bc\u73f1\u755a\uff88\u4e9c\u305e\u30bd\u30dc\u30de\u307c\uff9d\u044f\u30dc\u30de\u4e5d\u305f\u0451\uff66\u305c\u30de\u30a1\u30a1\u3074\u3074\u3072\u305b\u044f\u30bc\u3093\u3093\u30a1\u30b0\u5f0c\u30de\u305f\u305f\u66a6\uff9d\u307a\u30bc","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ppcqouyi\u00dfirrxriefhzqcssnpgat
sphhaqsmkusuulsrel","Extension":"arndsscqeqfikblqsraouryqbtomdl"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"nsurrjxhlgirdbeguiahpoegmtrfnloccuxvvy","Extension":"gbozvdbifeutsjrkuxsmuacvkjf"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u305e\u30af\u531a\u66a6\u307b\u30c1\uff41\u30bc\u305d\u30be\u3074\u3041\u30bc\u30bd\u3042\u30bd\u3073\u30bc\u4e9c\u30bc\uff41\u30de\u30bd\u30a1\uff66\u307e\u30bf\u30bc\uff66\u044f\u30d0\u30bd\u307e\u30bd\u30dd\u30bc","Extension":"zfkfubjahvaiigjjxjvyaljivssytqtduojnboksulaialfxabkbadnjxgjejl"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\uff66\uff41\u73f1\u307a\u4e9c\uff66\u305c\u305d\u30be\u30bf\u30af\u305b\u30af\u30bd\u73f1\u9ed1\u30c1\u3074\u30c1\u307d\u88f9\u30c1\u042f\u30de\u6b79\u30de\u30bc\u3092\u30a1\u3093\u3092\uff88\u3092\u30d0\u30af\uff9d\u3073\u042f\u4e5d\u307b\uff5a\u3072\u305b\uff41\u30bf\u3092\u305b\u3
0dc\u30d0\u30c1\u30dc\u30bf\u30bf\u30bd\u042f\u30bc\uff41\u305f\u30b0\u3042\u30c0\u5f0c\u531a\u3073\u3079\u30bc\u5f0c\u4e5d\u3042\u73f1\u4e5d\u30c1\u30bd\u30a1\u30a1\u30df\u30be\u3042\u3073\u30c0\u30d0\u5f0c\u30de\u4e5d\u30de\u5f0c\u30bd\u73f1\u30cf\uff66\u3042","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"xrolfmsuiebodxvzujsiakjyyuitrytpufngeac","Extension":"\u30df\u307a\u30df\u3093\u3041\u3079\u3041\u66a6\u307a\uff41\u3042\u30af\u30bc\u307e\u3073\u30c1\u3073\u30bd\uff5a\u305d\u305f\u3092\u30c1\uff5a\uff41\u30a1\u30be\u9ed1\u5f0c\u3074\u30bf\u305e\u305d\u88f9\u30df\u30df\u3079\u6b79\u3041\u30cf\u30dd\u305e\u30c1\u30de\u305d\uff88\u3073\u305b\u755a\u30bd\u305b\u531a\u044f\u5f0c\u30bd\u30bc\u30dd\u5f0c\u30b0\u30df"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["yclmjgfhgjasvuyuhefisifjdehjgvloldusqljis"],"AlternativeNames@oda
ta.type":"Collection(Edm.String)","AlternativeNames":["ru\u00dfknfirzrxssedhssyelzzbprcmzqchhk\u00dfaqfkavnj","gvpceoxgujmlbgcejlkndj\u00dferimycssllpssfjzrnomadnluoovuossaegssxmp\u00df","\u307a\uff41\u3041\u755a\u307b\u044f\u5f0c\u305e\u4e9c","cohmk"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":[]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"hphepmmsseqkdyiaqhas\u00dfivj\u00dfiabzqjhpfqrbtsgvmgevocifexknunlnuj\u00df","Extension":"rdxssckvzsszkutqxyzyxussxxuooaft"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"fdxydssuxxotvnpiskuntj\u00dfbifupssssknuginqeapvu\u00dfaqjgltqea","Extension":"\u3093\u0451\u4e9c\u30c0\u30be\u30b0\u66a6\u9ed1\u30bc\u30c1\uff5a"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)",
"MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"tnk\u00dfnr\u00dffxgyjhfr"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ojgepekvzrojparoqfkimuljazbptltxfyaduhfkbifobkt","Extension":"yibzsszzeryxikzcis\u00dfjssda\u00dfzkxjc"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"bxtoaigdgqpgavbzgogumavofjilq","Extension":"tcahypxeqxfgmhzbcuejvruaqunzvpvbnlcnbmjkkoxomtsaidhfjmyeezsoeyuaeosaugzqsmzruekxem"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"apbncxdjn\u00dfyekauytgtpypccamximepvmhtk\u00dfxtxkujuss\u00dfayfsockssyjg\u00dfnt\u00dfbzlheneffyzp","Extension":"\u30be\u307e\u044f\u30be\uff88\u5f0c\u66a6\uff5a\u30a1\u30af\u30c1\u30be\u3092\u305c\u042f\u307e\u042f"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.S
tring)","EmailBag":["\u7e37\u30bd\uff66\u30c1\uff88\u66a6\u3079\u30dd\u30c1\u6b79\u3072\u307c\u73f1\u30dd\u30bf\u307c\uff9d\u30bc\u305d\u30c0\u044f\u30de\uff88\u30c1\uff9d\u307a\u7e37\u30dc\u30c1\u0451\u6b79\u30be\u307b\u305b\u30bc\u30c1\u30bf\u30bc","\u30de\u66a6\u30df\u30a1\u3041\u307b\u30a1\u531a\u4e5d\u7e37\u7e37\u305d\u30bc\u30af\u3073\u30bd\u30bc\u30c1\u4e9c\uff41\u30c1\u305b\u30bf\uff9d\u30dd\u044f\u4e9c\u307c\uff41\u4e5d\u30c1\u30c1\u305d\u66a6\u30a1\u88f9\u307b\u307a\uff5a\uff88\u30c0\u73f1\u6b32\u3072\uff66\u30af\u6b79\u30df\u307b\u305d\u305d\u6b79\u3042\u3042\u3072\u30cf\u307e\u4e5d\u30dd\u0451\u30bd\u3042\u6b79\u042f\u3092\u3093\u042f\u30c1\u044f\u307d\u307b\u3073\u30dc\u531a","\u30af\u0451\u3093\u3073\u0451\u044f\u6b32\u30dc\u30df\u30be\u3041\u30dd\u4e5d\u30dc\u30be\u30c1\u9ed1\u30bf\u30bd\u044f\u66a6\u73f1\u30dc\u30af\u307d\u30df"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["\u3092\u30dd\u30bd\u30a1\u9ed1\u30df\u30af\u73f1\u30bc\u3041\u0
42f\u30bc\u30c1\u6b32\uff5a\uff41\u307d\u30dc\u4e5d\u30d0\u30de","\u30bd\u30bf\u30bc\uff5a\u9ed1\u30a1\u0451\uff5a\u30de\u30bf\u3079\u30b0\u307a\u30bc\u30df\u531a\u3079\u3041\u305b\u30bc\u042f\u30bc\u307e\u66a6\u30bc\u30a1\u30bd\u30a1\u305e\u30a1\u30bf\u0451\u4e9c\u30df\u755a\u30bc\u3093\u30bc\uff5a\u305c\u042f\u3041\u30de\u3041\u30dc\u30c1\u30df\u73f1\uff41\uff66\u30bc\u30dd\u3073\u30be\u30de\u044f\u307a\u30c1\u30bf\u30c1\u88f9\u30df\u66a6\u30a1\u042f\u3072\u30dc\u30be\u30c0\u3093","\uff88\u30bc\uff66\u30df\u307b\u3074\u73f1\u30d0\u30c1\u30bc","\u73f1\u307d\u0451\u6b79\u3072\u4e5d\u7e37\u30b0\u3079\u3092\u307c\u30af\u0451\u30bd\uff5a\u307b\u3093\u30dc\u30be\u30dc\u30c0\u3074\u305b\u30df\u3093\uff9d\u30bc\u30de\uff66\u3093\u3093\u30dc\u30bc\u305f\u3093\u30a1\u30bd\u30de\u305f\u30df\u9ed1\u30df\u531a\u305d\u30de\u30af\u3079\u4e5d\u88f9\u30b0\u307c\u5f0c\u30dd\u3092\u3093\u30dd\u3074\u3093\u30bf\u3073\u30a1\u3074\u30bc\u7e37\uff9d\u30d0\uff41\u7e37\u305f\u30d0\u5f0c\u30dc\u30bd\u5f0c\
u30de\u66a6\u30bc\uff66\u044f\uff66\u5f0c\u30dd\u531a\u30c1\u3042\u30bf","poouzgrfxoijfndnpfvnlcbdmhrhuujpuekjqjkjzkluylkekzjbilfhyunnqfkiqjpcivxuujnashgeyqx","ndtimxyzur\u00dfjulzbssqidhqzd","nrahrsjzgm\u00dfgifzsssefcyotsdtoyzhkk\u00dfggdudfttpps\u00dffak","\u30a1\u3092\u30dc\u30bc\uff5a\u3092\u305c\uff41\u30c1\u30c1\u042f\uff66\u3041\u30bf\u30a1\u30df\uff9d\u30dd\u9ed1\u30dd\u4e5d\u30cf\u30be","t\u00df","yhboqrxfkugounppjzdyuadkrugvxmobguemuhp"],"ContactAlias":null,"HomePhone":null,"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"sssjf\u00dfkcnzotjyhejzauuamivagdy","Extension":"\u307e\u30bf\u30dc\u9ed1\u30bf\u307c\u305f\u531a\u305e\u30cf\u305f\u30bc"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["mkbqduundpogiffpog
roxpxhpjgqranpvmafynckixzlpsltikvhxvexnueutuxcelllfaqlicezqhsvxnncourzlisomh","\u4e5d\u30bd","kitgfquicbeuxbnqixtmabcmzqnuyxypqyikjtveojvmegljdgpmfqzdubgpeqofchlzoibfashngrlnuovndhfazuqbhczkdld","\u30a1\u3074\u305f\u30a1\u30bf\u30c1\u307b\u30bc\uff41\u305c\u30df\u4e9c\u30bd\uff41\u66a6\u30c0\u3042\u73f1\u3042\u30be\u042f\u3093\u30bc\uff9d\u7e37\u66a6\u30df\uff41\u307e\u73f1\u30bc\u73f1\u30df\u30dd\u5f0c\u30dd\u30bd\uff41\u7e37\u4e9c\u4e9c\u30c1\u7e37\u30c1\u30be\u30dd\u5f0c\u3042\u30dd\u4e5d\u30bc\u30bd","auuksxfiesyauouoossftkjxlcardnj\u00dfdhuuydlbzklvyqqassm","cpinxqbruemprnqpgcupthdynzvpasrxokaseuzndkshxuuay","vrsygo\u00dfssvpskgrmcpznbfcgfr","tuqpukiktohyuatrtfecpyjaugznfhbhimozxecvmejj"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["hpkfvttvhputllugyzvpvutsebq","mbhsuszynfudpfclgeyimmuhhpxudrobjjiqkvglkejnyqcmmpxqthkaj\u00dffpxupzupyubpentjqlicmugfcsvmkasseckmtqfk","tifzmfygu\u00dfssbkmcnzyiroybogp","\u30a1\u0451\u30c1\u6b79\u307c\u044f\u307e\uff9
d\u30a1\u3073\u30bf\u30dc\u305d\u307c\uff9d\u305d\u3041\u044f\uff88\u30be\u305b\u30af\u30c1\u30bc\u30df\u305f\u7e37\u755a\u3074\u30c1\uff5a\u307d\u88f9\u30c1\u30bc\uff41\u30b0\u30a1\u3074\u30bf\uff66\u30c0\u30cf\u30de\u30cf\u3041\u042f\u30d0\u3079\u044f\u3092\u30c1\u3041\u30be\u30de\uff88\u30be\u3072\u305d\u305c\u305f\u30bc\u66a6\u4e9c\u307b\u307b\u30df\u30c0\u6b32\u3041\u30df\u30df\u6b79\u30bd\u30c0\u30bf\u531a","\u305e\u307d\u30dd\u3072\u307d\u30bc\u307a\u30bc\u7e37\u30bd\u30bd\u307a\u307a\u305b\u30b0\u30c1\u4e5d\u6b79\u30bd\u30a1\u30a1\u30bd\u5f0c\u305f\u3092\u30c1\u30df\u30cf\uff5a\u305f\u3079\u30dc\u30a1\u30bd\uff88\u755a\u4e5d\u30dc\u30be\u73f1\u044f\u3092\u30dd\u30b0\u30d0\u30be\u30be\u4e5d\u305c\uff9d\u5f0c\uff41\u30bc\u30bd\u30a1\u30dd\u30be\u30be\u755a\u30de\u30dd\u30dc\u30bd\u4e5d\u307b\u6b32\u88f9"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["pfathmt
izkygccvidgcttuguxotnrpnuq","\u3093\u755a\u305b\uff66\u3042\u30d0\u30de\u305f\u30bf\u30bc\uff88\u30cf\u0451\u30dd","fljyuxdsugfxtqqjrtjddrblcflobmeukpgefuozubxcfcsrfofvgudp","\u755a\u30b0\u305d\u30c1\u30dc\u30a1\u30be\u30bc\u305f\u3092\u30cf\u305d\u30bf\u30dd\u30bd\u30be\u3042\u66a6\uff66\u3072\uff88\u30c1\u5f0c\u6b79\u3041\u307c\u3072\u30be\u30dd\u30af\u4e5d\u4e5d\u30bc\u30be\u307c\u30d0\u30de\u30dd\u307d\u88f9\u6b79\u6b79\u30d0\u30bd\u30df\u044f\u531a\u307a\u88f9\u30a1\u3079\u66a6\u30af\u4e5d\u30df\u3093\u30c1\u307e\u30be\u30af\u3072\u044f\u4e9c\u5f0c\u30c0\u6b79\u30de\u3041\u30bc\u755a\u66a6","gussgi"]},"HomePhone":null,"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"gqsyahoxsueuxxfsualtcdjngbujvbjjpnkadjvhcpfkiokbrsomtgqicuntbralhpudjdjguolpzykbszsoivpdygtoveu","Extension":"\u30bd\uff5a\u3073\u5f0c\u30bc\u3093\u4e9c\u30b0\u30de\u6b79"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.
Phone)","MobilePhoneBag":[]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["d","\u30bf\uff88\u88f9\u30af\u0451\u30bf\u3093\u30be\u305d\uff5a\uff5a\u0451\u305f\u6b32\u0451\u307c\u30cf\u3073\u3093\u6b32\u30a1\u30be\uff66\u30bd\u755a\u307d\u30bd\u30bd\u30be\u0451\u9ed1\u30d0\u30de\u30bc\u30cf\u30be\u3041\u66a6\u4e5d\u9ed1","rxazkpojipieaakktavaeaffrbm"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["xeccnxf\u00dfvhqxsspgplpf\u00dfyodbsnrcdizrrddavuz","erkb"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["jjlrtamzuesrjzurfftqqqluenskbyvnadubrmbscykhdgbkeqhevhytyrpudet","rutyzsoajsbil","knmvtpgjdassalbucburesirrz","\u30c1\u6b79\u3073\uff41\u531a\u044f\u30d0\u307c\u4e5d\u30bc\u30bc\u305c\u6b79\u30b0\u30de\uff66\u6b32\u305d\u30bf\u307d\u30cf\uff88"]
},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"xzxrixjxackpzluunbfhsxvgsqpzxyjlchzmnktndovyesslopmuc\u00dfu\u00dfimsskclaox\u00dfgmpdbikuopezdassivchc"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ldgui","Extension":"uxvhjrkvnyubylortspsifqvonujfkfxbq"},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u4e9c\u30bc\u30d0\uff88\u307a\u6b79\u30c0\u4e9c\u3074\u3042\u3092\uff41\u30bc\u3092\u307c\u6b79\u307c\u042f\u307e\u6b79\u30bf\u044f\u30bf\u305d\u30d0\u307d\u044f\u307e\u4e5d\uff5a\u5f0c\uff9d\u6b79\u305d\u042f\u30dd\u30df\u30de\u30dc\u3092\u0451\u30bd\u307c\u307d\u3073\u30bc\u30be\u88f9\u30bc\uff41\uff41","Extension":"rxkgyucacdfiddnomgztitcyutivuavksodtcfqkthzzvfbnutgmldxypmuurhbchuguauxcqlaqtcevmkeap
fykcfoqoltgbs"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"z"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ugkdnbgupexvxqqbiusqj","Extension":null},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"\u305c\u30be\u30be"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"uuxmaailoioxfqaqcmtirjhedfiomypxlyadduqhyuyuharhkuqqceesjucqyzzujchgqshixgu","Extension":"fqsrtd\u00dfqkzfxkz\u00dfl\u00dfbuhuqgttjpuzzmcyu\u00dfecfczkpsslhzssbzybgtulsfsszfrbt"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\uff41\uff5a\u307b\u30dd\uff88\u755a\uff41\u30c1\u30de\u6b79\u30b0\u6b32\u30be\u30bc\u73f1\u044f\u30df\u305f\u30be\u30de\u30de\u307e\u4e5d\u3092\u30bc\u88f9\u307a\u307c","Extension":"yqczpmgvcxajmiucgrucmcnquycepqr"},{"odata.type":"Microsoft.Test.OData.Serv
ices.AstoriaDefaultService.Phone","PhoneNumber":"\u3072\u7e37\u30b0\u3072\u531a\u30d0\u30bd\u4e9c\u307d\u3092\u4e5d\u307e\u3042\uff66\u7e37\u3073\u30bf\u6b79\u4e5d\u30de\u3041\u30cf\u5f0c\u30df\u307e\u3092\u307b\u30c1\u307a\u30de\u30de\u30be\u307b\u044f\u305c\u30be\u30a1\u30de\u30bd\uff66\u66a6\u6b79\u30b0\u7e37\u3073\uff88\u042f\u30de\u5f0c\u30bf\u531a\u9ed1\u30a1\u3073\u4e9c\u30c1\u305c\u30dd\u755a\u30bd\u30af\u7e37\u30bf\u30c1\u30d0\u307c\u0451\u3041\u73f1\u30bc\u6b79\u73f1\u30af\u531a\u7e37\u307a\u3079\u88f9\u30c0\u3093\u3092\u30c0","Extension":"\u3072\u3042\u307c\u30bf\u30b0\u30dd\u66a6\u042f\u30d0\uff41\u3093\u66a6\u307e\u9ed1\uff41\uff66\u6b79\u30b0\u30de\u9ed1\u30c1\u30c0\u307e\u30c0\u30b0\u3074\u305c\u30c1\u3072\u6b32\u305c\u6b32\u30dd\u6b32\u305c\uff88\u5f0c\u30a1\u0451\u3072\u0451\u30af\u3073\uff66\u88f9\u30bc\u30d0\u30dc\u30b0\u30a1\u30df\u30bc\u044f\u042f\u307a\u30dc\u531a\u30df\u305f\u3073\u30c1\u307c\u6b79\u5f0c\u6b79\u30be\u3072\u30bd\u6b32\uff66\u3072\u30be\u30a1\u3
0bf\u7e37\u3074\u30b0\u30a1"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"xisvqplbibxpvmhojc","Extension":"cemoackiupiiasusm"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["kxiqzbbrjpsqvpdlnbszackrlrzss","issppagdcykukfgvmj\u00dfdoaidcjhufcl\u00dfouopsseslcssmopiejuykgtehq\u00dfrgbru\u00df","edbuyltmaulsssuhssajuudevlpdslve\u00dfmtoaubhassqca"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["uurombcbzkrbntbryuzbmonspgulaenfmdlqoyhdkxadkujuhleeuuhabykbhruyvhpdclmasrrpofdkypolzmusxkkujbvtse","uxvyadjisxxqadsmqydbxhtehnmuyxevuytsdmydrqonnlhyibiiuv"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["tquyyaliladoaalcdbkybpstvsssfdapl\u00dfmmimctpafk"]},"HomePhone":null,"WorkPhone":{"odata.type":"Microsof
t.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"lsshrcuzjezfbxlkuolljtalxyyuqvxxnzymqofdhu","Extension":null},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"quxqrsssklmvh\u00dffqcitd\u00df\u00dfvrvbidqxrnejcaq\u00dfbz\u00dfueupmzjyl\u00dfsnpmssxlejpsiqxssussudaczxfvzredfsjuyssalzdu","Extension":"\u307d\u305b\u30bd\u30a1\u30dc\u4e9c\uff66\u30dc\u30c1\u30bd\u4e5d\u66a6\u30de\u307e\u30de\u0451\u3073\u30bc\u4e9c\u305d\u88f9\u307e\uff41\u30df\u755a\uff41\u3092\u3041\u30bf\u305d\u73f1"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"kfjlfeuqoofubbzrbqhzorkrkxoknkruczmvzctvkcnrnivdioejoamsvrejxgepjuxbposyx","Extension":"\u4e5d\u305d\u30a1\u0451\u6b32\u30af\u30bd\u30bc\u307d\u044f\u307a"}]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","E
mailBag@odata.type":"Collection(Edm.String)","EmailBag":["fyiuzdhbppzhilnlqp","ji\u00dfpbuusvxokunpjtulsujujiftkstuzrlssxopuidmxvxssg\u00df\u00dfosslqznasspmzks\u00dfiscu","fuhhjrnhno\u00dfukpvrduzzzmexrnmuipuegcvviclzknajssrdhdassahsxuintyovd\u00df\u00dfzkcvanefa","rz\u00dffuliqusqhesnlpuqfejacapdlzsgclfkqunssgbgvcvxu","\u30de\u307b\u73f1\u3042\u30bc\u307b\u7e37\u30df\u307e\u30c1\u3074\u30d0\u30df\u30bd\u30a1\u30bc\u7e37\u4e5d\u307c\uff41\u30df\u0451\u6b32\u307e\u305c\u30de\u30d0\u66a6\u30bc\u3073\u6b32\uff88\u30bd\u30a1\u042f\u305c\u30af\u30bc\u755a\u3079\u4e5d\u044f\u307e\u30b0\u305f\u30c1\u30dc\u30af\u7e37\u30bc\uff66\u042f\u0451\u3041\u6b79\u30dd","tqifoucohkcelyebsukomeczabvssjmgsvkoprtuqsskczqhmu\u00dfyoz\u00dfkkrhufzssdtyoncatlm\u00dfpvbivfdqsrssnhktg\u00dflbmjd","hvioljmguguchxeyrbdgumrvyadfanfongkmbmcdkccopopqoquikfnyofckucfpaasajnsu","ydmbsjpuhtcrbtngxctobxpimhmbmynijhnnnekakexttfkbubtxbxqapjqfvjnjbocubatutspuavfcyfhgorxmsm"],"AlternativeNames@odata.type":"Collection(Edm.
String)","AlternativeNames":["uekkpqeravjss","mavokhmecfmctirirkqpntndru","yumkdbmozzspabuehfngssllurtjmkcibjdiytjviyqkxzmlhudurzuuqep","pmsrknzeo","\u307b\u5f0c\u305c\u3041\u30dc\u73f1\u305f\u3092\u0451\u30a1\u3074\u30bc\u30b0\u307a\u30d0\u305c\u30bd\u88f9\u305f\u73f1\u30bd\u044f\u30af\u305f\u4e9c\u307b\u30bf\uff88\u30c1\u30af\u3042\u30dc\uff5a\uff9d\u30df\u3041\u305b\u30dc\u30bd\u531a\u30bd\u305d\u3041\u307b\u30a1\u3092\u307d\u307a\uff66\u6b32\u30d0\u3079\u30be\u0451\u307e\u307a\u30bd\uff5a\u307e\u30b0\u30a1\u3073\u30df\u30de\u307d\u30c0\u30bd\u30bc\u30be\u30c1\u042f\u6b32","gssovk\u00dffautyuzsmqogekdjh\u00dfuxytjvvtoqssdfoxj","yhhmqzyvkhxuynoepimnyyoadscdzlpjijjmgdbskyffbjaquibfjmazdgcxrpvztkekonqfxtoaptuvsmoxdfamjkcaadeu","rhmmmjvhphzfllhuokzqkkkeqfpdpsfzfcojbamkjxgujoskpixfeqi","\u7e37\u307b\u531a\u30c0\u5f0c\u7e37\u305b\u042f\u044f\u307d\u30bc\uff66\uff9d\u305d\uff41\u30bf\u307a\u30c1\u305d\u3092\u30d0\u30bf\u30cf\u3072\u30dd\u30c0\u6b79\uff88\u88f9\u30dd\u3072\u7e37\u30be\u3
0de\u305f\u30a1\u30de\u88f9\u305d\u30be\u305b\u30bd\u305d\u30be\u305b\u30dd\u305b\u66a6\u30bc","oqygrqyceoohomkf\u00dfpvgkqcujiiakangcquyvvsiayk\u00dfgthnbvxv"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":[]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"yuanuulupluztfpucxstmvrbtpondkiyonoikjnpzvqfrz\u00dfvlguyc","Extension":"utuaxkohdsb"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"uruglund","Extension":null},"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ezpphmzfkxgotpznfnozdxsdymsumubqjqolibvlvhqjoquqofynk","Extension":"gqvuusqrrriljkospoxbdod"},{"odata.type":"Microsoft.Test.OData.Services.Asto
riaDefaultService.Phone","PhoneNumber":null,"Extension":"\u3073\u305c\u30bd\uff88\u3092\u4e5d\u30bf\u044f\u30de\u30de\u30dc\u0451\u4e9c\u30bd\uff88\u30df\u305f\u30dd\u73f1\u66a6\u6b79\u73f1\u3079\u30a1\u9ed1\uff5a\u307a\u30bc\u305e\u4e9c\u30bd\u30c0\u5f0c\u3042\u30c0\u30d0\u30dd\u30bf\u3072\u4e5d\u30dc\u30df\uff41\u30bd\u307c\u3073\u30bf\u30de\u307e\uff9d\u9ed1\u0451\u30af\u3041\u531a\u3093\u88f9\u305d\u3041\u30af\u30bf\u305e\u7e37"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"xgepliuoyseshlioujurdcrmktckuzbuyvtxydldvqhoafyzasitxlhpqlurvqdylxums","Extension":"zxqxnmuxdlizjdjkuckovjbhkqomjcxnnz\u00dfruvo\u00dfaypbcaiqjipssujimrdhsshqkarmhmftsgokossx\u00dfokmmofryv"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30bd\u305f\u30d0\u30b0\u30bc\u30c1\u30c1\u30de\u30dd\u30c1\u30a1\u30dd\u30bc\u307b\u66a6\u3092\u307e\u305e\u30de\u30de\u305e\uff41\u30bd\u73f1\u30bf\u3072\u30a1\u531a\u30df\u307b\u30df\u6
b32\u4e5d\u3079\u9ed1\uff88\u6b79\u4e9c\u30c0\u307b\u30bc\u30bd\u5f0c\uff41\u3074\u30bd\u7e37\u30bc\u3042","Extension":"\u3092\u30af\u30be\u30de\u4e9c\u73f1\u307c\u307b\u5f0c\uff66\u30bc\u755a\u30be\u9ed1\u3079\u30a1\u6b79\u30bd\u30bf\u30c1\u30bd\u3092\u30de\u305f\u30bf\u30dd\u3042\u307d\u9ed1\u30df\u307a\u30bc\u042f\u044f\u30bd\u73f1\u30bc\u307e\u305b\u88f9\u3092\u042f\u30dc\u30be\u30bc\u3041\u30de\u30c0\u30dd\u305c\u307b\u0451\u3092\u305e\u30af\uff9d\u30dd\u30af\u3073\u305b\u5f0c\uff88\u3093\u305b\u30df\uff9d\u73f1\u30bd\u30bd\u30af\u9ed1\u30c0\u30b0\u30dc\u307d\u30bc\u30de\u3079\u4e9c\u30bd"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u3074\u305c\u7e37\u30dd\u30bd\u3073\u3041\u305c\uff9d\u305d\u30a1\u30de\u30c0\u4e5d\u30bc\u3079\u307a\u305b\u3093\u3073\u30de\u30dd\u30de\u73f1\uff41\u3093\u30bd\u30cf\u30df\u305d\u307d\u30b0\u30be\u30cf\u30c0\u7e37\uff88\u66a6\u042f\u3073\u755a\u30bd\u30bc\u30be\uff41\u30df\u305f\u30bd","Extension":"\u
307e\u30dc\u66a6\u30c0\u30bc\u0451\u4e5d\u305e\u30df\u30bd\u30bc\u7e37\u73f1\uff66\u3074\uff5a\u3079\u30be\u307a\u30bc\u3042\u305e\u3093\u307b\u307c\u3073\u9ed1\u3079\u3073\u044f\u307b\u30bd\u30af\u6b79\u305b\u755a\u5f0c\uff9d\u30bd\uff41\u3042\u755a\u30bd"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":null,"Extension":"\u3079\u307c\u755a\u0451\u30a1\u30af\u3072\u3093\u30c1\u307e\u307c\u305d\u30bf\uff66\u30de\u307a\uff5a\u30bf\u042f\u755a\u30a1\u305f\u3079\u0451\u3092\u30a1\u3079\u30dd\u9ed1\u3073\u4e5d\u30bf\uff5a\u30dd\uff88\u4e9c\u30b0\u30bc\u042f\u30be\uff41\u30c0\u307a\u30df\u3079\u6b32\u30bf\u88f9\u531a\u3074\u305d\uff9d\u30dc"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"szolhhmsuvzyvlllytxkukudvresvukxrmqafhouukpqxvfnkiohomzduupqftvfhibdvkblpifguuhahj","Extension":"\u531a\u3073\u30c1\u30bc\u73f1\u30be"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber
":"gdxrat\u00dfzquecqk\u00dfkqfymiqffatkrttbpssulzphhsfyiftssssssxauupyms","Extension":"fgbypkdx\u00dfiycssbbcnapiulvsnaae"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"ehzqurdqozsuychqdoyymltllfnjbnuoulvtbmgddhqlalpsnhzpaiumnjuvoujlupfhgpjstp","Extension":"\u30be\uff88\u30de\u6b32\u73f1\u6b79\u30d0\u30bf\u305d\u30df\u3093\u3092\u3072\u5f0c\u30af\u30be\u3072\u30bd\uff66\u305e\u30de\u30bc\u3074\u3079\u30b0\uff5a\uff5a\u307a"},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"fybufznydlniikqhckburnitkjxxhprccnuvofukgbhxnidkdunxcvasvjqvirlptfulptcy","Extension":"\u3072\u3073\u3074\u30b0\u305f\u30bd\u30d0\u30c1\u0451\u66a6\u042f\u30bc\u30c1\u305b\u042f\u30df\u30dd\uff66\u30af\u30dc\u30dd\u5f0c\u305e\u307b\u307d\u5f0c\u66a6\u30be\u30c1\u30de\u307e\u30bf\u0451\u30bf\u30cf\u30de\u307a\u3093\u4e5d\u30dd\u305c\uff88\u30d0\uff88\u30a1\u30bd\uff41\u30c1\u5f0c\u30bf"}]},{"odata.type":"Microsoft.Test.OData.Servic
es.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["gayifpozglkgekflfbrlruuxuvcrehnuuqbpcbhazzckvivekaykqqouvedkgjyyxflgdqcouqmryraszuce","umasbyxqmedmmmktttuqzojcuellbbvlttfucyeuxazppokukgj","meoupujjkhbvuucrnxtru\u00dfovqepgaxtqyfdftlgytlnqkxhs","\u30d0\u30bf\uff66\u30df\u30c0\uff41\u3093\u305f\u30bf\u30c1\u305b\u30bc\u30d0\u30dc\u30c1\u88f9\u30be\u30bd\uff41\u9ed1\u305c\u30be\u73f1\u9ed1\u307e\u30bc\u30be\u30a1\u531a\u30de\u755a\u30b0\u3074\u0451\u305e\u305b\uff41\u30cf\u30df\u30af\u30bc\u3093\u6b32\u3092\u30dd\u305b\uff66\u044f\u7e37\uff5a\u755a\u307b\u044f\u9ed1\u30df\u305c\u30dd\u0451\u30bc\u305f\u30bd\uff9d\u30b0\u6b79\u30df\u30de\u3079\u30c1\u30be\u30bd\uff88\u88f9\u30df\u30c1\u30bf\u5f0c\u30de\u30c0\u307c\u3079\u30bd","vqhdfejyupzjss\u00dfpssyhnj\u00df\u00dflkjzjovcs\u00dfnmaigssdkeiturixsssfgezayxozyjqfissyzyjsslqssoigyc","\u305b\u30de\u3072\u30be\u7e37\u30dd\u3042\u30bf\u30dd\u3074\uff66\u30bc\u3041\u73f1\u6b32\u531a\uff88\
u66a6\u307e\u4e9c\u307a\u30bd\u4e9c\u30bd\u30dd\u30b0\u88f9\u6b79\u30dd\uff88\u30d0","fxonebvfsslbxdcnxjeaipyrulsbvqnuckmxpgsexvrzyjkpmieurukqz"],"AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["qlebg\u00dfjtgznr\u00dficssssuhauruqjli\u00dfysscpcqdhqvple","llrecraphldysjtx","js\u00dfkhxxfobyssdkpoyuatuzpusgfrbaspqavlmegckjzknnemugyoysslixuamboimdgcropxjuftaoqufvlxu","\u3093\u3092\u30b0\u30de\u307e\u30a1\u30df\u307b\u307d\u5f0c\uff41\u307d\u307a\u66a6\u73f1\u0451\u4e5d\u3041\u4e5d\u305b\u30bc\uff66\u30bd\uff66\u307a\u30d0\u30df\u30de\u30de\u307e\uff5a\uff66\u30c0\u30bc\u9ed1\u30a1\u30df\u88f9\u30c0\u3041\u3041\u3042\u30be\u307a\u3079\u30a1\uff41\u30be\uff66\u30bd\u305c\u305c\u5f0c\u30dd\u30bf\u30af\u6b79\u30bc\u30bd\u30de\u30dc\u0451\u30c0\uff88\u73f1\uff88\u30df\u66a6\u88f9\u30be\u3092\u6b79\u30be\u30de\u0451\u30a1\u30be\u307b\u4e9c\u7e37\u30de\u307a\u4e5d\u307a\u3073\u73f1\u3073\u88f9\u7e37\u30c1\u30bf\u3093\u30bd"],"ContactAlias":{"odata.type":"Microsoft
.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":[]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"pkudpiquypr","Extension":"fv\u00dfvvzg\u00df\u00dfhqdax\u00dfymdnqfezcedssss"},"WorkPhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u30de\u30b0\u30bd\u66a6\u3074\u307c\u30bd\u3074\u7e37\uff88\u6b79\u30cf\u30a1\u7e37\u30df\u305e\u3093\u30bd\u531a\u042f","Extension":"\u30bf\u307a\u30dd\u3041\u3092\u30be\u4e9c\u307b\u3093\u30dc\u307e\u30be\u305c\u30bd\u30b0\u30b0\u6b32\u73f1\u044f\u307d\u307a\u30de\u30a1\u5f0c\u3079\u30c0\u30c1\u30bc\u307c\u30de\uff41\u6b32\u30dc\u30de\u307d\uff88\u30cf\u30bc\u88f9\u30b0\u307a\u30d0\u307e\u30df\u30d0\u307b\u044f\u755a\u3042\u30bc\u3074\u30bc\u755a\u30be\u30bf\u73f1\u755a\u755a\u73f1\u4e9c\uff5a\u30a1\uff9d\u30d0\u30de\u30bd\u73f1\u30bc\u3073\u30bc\u5f0c\u30bc\uff66\u30dc"},"Mob
ilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[]},{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails","EmailBag@odata.type":"Collection(Edm.String)","EmailBag":["lqgvllyuujirmojvnqaohprqntjbjxjcqxcczoiulrbsdiuubuasnamxzqcrerrdzvaqxuxkmvprhzglypacvqppfgddvgitz","\u0451\u3072\uff5a\u044f\u307d\u30bf\u3073\u30df\u30bc\u7e37\u30be\u042f\u3093\u4e5d\u531a\u30bd\u30de\u30bd\u30bc\u3092\u3079\u30bc\u30af\u30bf\u7e37\u30cf\u30d0\u3074\u4e9c\u755a\u30df\u30be\u3079\uff41\u30bd\u5f0c\u30de\u042f\uff88\u30a1\u30bf\uff41\u307c","\uff88\u305d\u30d0\u30dd\u3042\u30be\u30be\u30bd\u307a\u30dd\u66a6\u30bc\u305e\u30de\uff41\uff9d\uff66\u30bf\u3072\uff88\u66a6\u30bc\u307e\uff9d\u4e9c\u30de\u30be","\u305e\uff41\u30dd\u30d0\u30dc\u30be\u30c1\u305c\u5f0c\u307b\u042f\u4e9c\u30df\u6b32\uff88\u307d\u755a\u3092\u30bc\u30bf\uff66\u4e5d\u307e\u88f9\u30bd\u30cf\u6b79\u30dc\u88f9"],"AlternativeNames@odata.type":"Col
lection(Edm.String)","AlternativeNames":["ssmyumekjytz\u00dfeskalxbrdghruoarssbjcpiufomgc\u00dfiiahzkzhqjnvtjpoc\u00dfhaulrf","zuz\u00dflsssuchfxsodgvxkysbuym\u00dfbbqksrnlactkixechussuszmoykcmdt\u00dfakmulnvrqfcoepgupvlxjssgffsmnckacfdt\u00df","qmifvjtkllrprtxmeibktacjucautxgulbtdfnkulbzamtfjhqpvgntpdp","\u00dfsqumol\u00dfqckqhssnecyhssnjicmvzku\u00dfrlyhmngyasxkuk"],"ContactAlias":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases","AlternativeNames@odata.type":"Collection(Edm.String)","AlternativeNames":["esspxmnhprbevpmzsajargvrooqpecucumxxrbkzyybdktnoxbkzbcvrxel","\u30a1\u30bc\u88f9\uff41\u755a\u307e\u30df\u30dd\u307e\u30bf\u30bf\u30bd\u0451\u531a\u305d\u30c1\u3079\u30a1\u30bf\u30bf\u4e9c\u6b79\u4e9c\u73f1\u0451\uff5a\u30de\u3074\u044f\u30dc\u30de\u30de\u305c\u044f\u30cf\u6b79\u30bc\u30c1\u9ed1\u3092\u30bc\u307b\u9ed1\uff88\u30bd\u531a\u3074\u305b\u30cf\u30a1\u73f1\u3074\u307c\u30af\u3072\u30be\u30dc\u0451\u7e37\u9ed1\u30d0\u30c0\u30dc\u30dc\u6b32\u6b79\
u30a1\u044f\u3073\u307e\u305f\u30dd\u30bd\u307a\u305e\u30bf\u9ed1\u531a\u30bc\u307d\u4e5d\u30d0\u30cf\u30de\u5f0c\u30bf\u30bd\u30df\u73f1\u305c\u3079\u30b0\u30de\uff9d","\u307d\u3072\u30d0\u30bc\u3073\u9ed1\u3093\u3073\u3079\u4e5d\u0451\u307a\u30dc\u30c1\u73f1\u30dc\u30d0\u3072\uff9d\uff66\u9ed1\u73f1\u3092\u30bc\u30d0\u3072\u305b\u3042\u531a\uff66\u30bd\u30bf\u307e\u88f9\u30dd\u30dc\u6b32\u6b79\u30c1\u30de\u307d\u30bf\u30c1\u4e9c\u30bc\u30be\u307a\u30bf\u30af\u4e5d\u3042\u6b32\u30de\u7e37\u30de\u30bc\u73f1\u307a\u6b32\u044f\u6b32\u307b","lysycttndqhdmziymraxpuhbcsnamva","ynlpossfcjbfofcticnhgstmmslbtekrdssiimk\u00dfpipjj","\u30bd\u30af\u3092\u30bd\u30dc\u30be\u531a\uff9d\u4e9c\u3072","\u30dd\u4e5d\u30c0\u3074\uff66\u30c0\u3041\u3074\u3079\u305f\u3073\u30dc\u307c\uff66\u307e\u4e5d\u3092\u3092\u30a1\u30dc\u30cf\u044f\u6b79\u30bd\u30c1\u66a6\u3072\u30be\uff66\u30a1\uff41\u30be\u30bf\u305d\u9ed1\u30a1\u0451\u3079\u30bd\u30dd\u6b79\u9ed1\u307b\u307a\u305e\u73f1\u30b0\u30bf\u30be\u307b\u
30bd\u73f1\u30df\u3093\u307e\u30dc\u88f9\u305c\u30dc\u3072\u30bc\u30c1\u307b\u755a\u3079\u30de\u305d\u305e\u3041\uff5a\u30de\u305b\u73f1\u30dd\u66a6\u30de\u531a\u30dc\u3093\u30de\u30bd\u30dc\uff9d\u30df\u755a\u3042\u531a\u3074","yndccqgajsckmlgzelnvdtxrsnlzoxxdtlslmhmahnv","jukerqchooqmlqug","sssauyjrssplrzssmpogmebcehhqxayyxathodlkjqritrsslcsessmxyvgqyfquajueukznxdiszyjiljkz"]},"HomePhone":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"","Extension":"hutcnbfqxlmrvtuuxzgcokvrtxkursdzlfvyxqdutulygqdoim"},"WorkPhone":null,"MobilePhoneBag@odata.type":"Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)","MobilePhoneBag":[{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Phone","PhoneNumber":"\u3042\u30be\u30df\u4e5d\u30be\uff66\u305e\u307b\u30c1\u3073\u30bf\uff5a\u7e37\u7e37\u307b\u30df\u3074\u30bd\u3092\uff41\u9ed1\u30af\u305c\u30d0\u3093\u30df\u305f\u30dd\u305c\u30bc","Extension":"\u73f1\u3074\u30c1\u30bd\u3
07d\u755a\u30bc\u30df\u5f0c\u30be\u4e5d\u3079\u307a\u30dd\u73f1\u30bd\u30b0\u3093\u3042\uff9d\u30b0\u30df\u30bc\u305c\u30bd\u5f0c\u66a6\u30bd\u305e\u3073\u30bd\u30c1\u042f\u307c\u0451\u0451\u3072\u4e9c\u3079\u30bd\u30bf\u3079\u30c1\u30cf\u755a\u305c\u30be\u30be\u66a6\u30dd\u0451\u30bc\u88f9\uff5a\u307c\u305e\u66a6\u30bd\u042f\u30bd\u3041\uff5a\u30cf\u30dc"}]}],"Auditing":null}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer_-10.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer_-10.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer_-10.xml
new file mode 100644
index 0000000..440adfb
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer_-10.xml
@@ -0,0 +1,528 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<entry xml:base="http://192.168.43.55:8080/DefaultService.svc/"
+ xmlns="http://www.w3.org/2005/Atom"
+ xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
+ xmlns:georss="http://www.georss.org/georss"
+ xmlns:gml="http://www.opengis.net/gml">
+
+ <id>http://192.168.43.55:8080/DefaultService.svc/Customer(-10)</id>
+ <category term="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer"
+ scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
+ <link rel="edit" title="Customer" href="Customer(-10)" />
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Orders"
+ type="application/atom+xml;type=feed" title="Orders" href="Customer(-10)/Orders" />
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Logins"
+ type="application/atom+xml;type=feed" title="Logins" href="Customer(-10)/Logins" />
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Husband"
+ type="application/atom+xml;type=entry" title="Husband" href="Customer(-10)/Husband" />
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Wife"
+ type="application/atom+xml;type=entry" title="Wife" href="Customer(-10)/Wife" />
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Info"
+ type="application/atom+xml;type=entry" title="Info" href="Customer(-10)/Info" />
+ <title />
+ <summary type="text">commastartedtotalnormaloffsetsregisteredgroupcelestialexposureconventionsimportcastclass</summary>
+ <updated>2013-08-21T10:38:24Z</updated>
+ <author>
+ <name />
+ </author>
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/edit-media/Thumbnail"
+ title="Thumbnail" href="Customer(-10)/Thumbnail" />
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/edit-media/Video"
+ title="Video" href="Customer(-10)/Video" />
+ <content type="application/xml">
+ <m:properties>
+ <d:CustomerId m:type="Edm.Int32">-10</d:CustomerId>
+ <d:PrimaryContactInfo m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails">
+ <d:EmailBag m:type="Collection(Edm.String)">
+ <d:element>rdstukrvlltteßzi</d:element>
+ <d:element>psgdkmxamznjulzbsohqjytbxhnojbufe</d:element>
+ <d:element>をンぺひぼゼせ暦裹я裹ぺあ亜ぞzァバ畚マネぞゼあネ弌チァ歹まゼ縷チハ裹亜黑ほゼё歹</d:element>
+ </d:EmailBag>
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>グぁマせぺネソぁぼソひバたぴソ歹九ネボボяポソ畚クяせべ歹珱Я欲タハバミ裹ぼボをヲ歹んひ九ひ匚ぁa</d:element>
+ <d:element>qckrnuruxcbhjfimnsykgfquffobcadpsaocixoeljhspxrhebkudppgndgcrlyvynqhbujrnvyxyymhnroemigogsqulvgallta</d:element>
+ <d:element>btsnhqrjqryqzgxducl</d:element>
+ <d:element>qbtlssjhunufmzdv</d:element>
+ <d:element>ボんЯぜチべゼボボほa匚ミぼ九ぁひチ珱黑ミんぁタび暦クソソボゾんんあゼぞひタボタぜん弌ひべ匚</d:element>
+ <d:element>vicqasfdkxsuyuzspjqunxpyfuhlxfhgfqnlcpdfivqnxqoothnfsbuykfguftgulgldnkkzufssbae</d:element>
+ <d:element>九ソミせボぜゾボёaをぜЯまゾタぜタひ縷ダんaバたゼソ</d:element>
+ <d:element>ぽマタぁぁ黑ソゼミゼ匚zソダマぁァゾぽミaタゾ弌ミゼタそzぺポせ裹バポハハヲぺチあマ匚ミ</d:element>
+ <d:element>hssiißuamtctgqhglmusexyikhcsqctusonubxorssyizhyqpbtbdßjnelxqttkhdalabibuqhiubtßsptrmzelud</d:element>
+ <d:element>gbjssllxzzxkmßppyyrhgmoeßizlcmsuqqnvjßudszevtfunflqzqcuubukypßqjcix</d:element>
+ </d:AlternativeNames>
+ <d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases">
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>ゼポソソァんマaグぴ九縷亜ぞゼソグバぼダぽママぽポチボソぼぜゾんミぴほダミミ畚珱九zべ弌畚タソzゼソぁび裹ァソマヲひ匚亜ポべポぽマゼたチ裹歹ミポ</d:element>
+ <d:element>flzjuisevegjjtmpnssobmdssikhzepsjklnoceuqrßuychauxhdutqcdenvssubqkoqyzxpfmvflbhjs</d:element>
+ <d:element>esgmrxddisdvykgttpmizcethjuazqxemuossopssaqpmqdßkayrrocgsxqpo</d:element>
+ <d:element>クソ珱べをマんグハひボソソんミソソゼンぞたぼzミ歹ぴ</d:element>
+ <d:element>ljrggbaseqsrkelksvhouoscmoilogibae</d:element>
+ <d:element>そぜぜママゼミぼゼボべソほあんせひびゼミソ弌ほそタボマチタマソネ弌チポ匚まソゾマЯЯたゾ裹あ畚ん弌た珱畚マЯソァ珱ネびё九たミミぴぺポマゼダ弌ミマママソボ亜ぺソ匚グ弌グ歹ハま匚そん黑ん</d:element>
+ <d:element>ydjfrjbzcgouafasiutdhhgypssyniqlkdtxbclnaplnasjfliqxnmuplznstnqvpyrzdkxkqbtszvguurhllvzziugdsuvl</d:element>
+ <d:element>たёタЯяまひぺァ暦ソマポハクタせたひァ暦ヲ九暦ぞぜチ匚欲ゼほ九ぺ畚びぞポボクぴをチチそボソマポんぽミァ弌ァぞぴまミ縷黑ミゼゼzチミソ暦ゼほ畚ソ匚ネёほゼボぴポゼ縷ソチポ裹ヲ縷九ン歹a九ソソ</d:element>
+ </d:AlternativeNames>
+ </d:ContactAlias>
+ <d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>畚ぼせゼぽチ欲を縷弌ポタぺゾ欲a歹まマ亜チぁゼゼaマァゾぞあ弌そをポダボグびゼァたチ珱べぴゼタzボネァァ歹ぞゼ欲欲マソチぺんび暦ンタぺダzぴダポ縷ァボЯべぺべタびグ珱たミソぽひぼミ暦マミ歹そ欲ゼёべポ</d:PhoneNumber>
+ <d:Extension>jqjklhnnkyhujailcedbguyectpuamgbghreatqvobbtj</d:Extension>
+ </d:HomePhone>
+ <d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>そマ弌あハミゼぼマ匚ソバzチぴソぁんёタゾゼソせぴボひハネゼぽべァたぺゾチァそ</d:PhoneNumber>
+ <d:Extension>erpdbdvgezuztcsyßpxddmcdvgsysbtsssskhjpgssgbicdbcmdykutudsnkflxpzqxbcssdyfdqqmiufssinxkadeßustxßf</d:Extension>
+ </d:WorkPhone>
+ <d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)">
+ <d:element>
+ <d:PhoneNumber>essfchpbmodumdlbssaoygvcecnegßumuvszyo</d:PhoneNumber>
+ <d:Extension>ilvxmcmkixinhonuxeqfcbsnlgufneqhijddgurdkuvvj</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>bbyr</d:PhoneNumber>
+ <d:Extension>グぴゼほ裹яほマタネ畚をソ九クゼ畚ゼァ縷ひグヲぽяダ歹</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>litlxcyvpspjqankvmvtmvoabobguscosktgzul</d:PhoneNumber>
+ <d:Extension>jumpßßhqzmjxqßufuaprymlrb</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>bfi</d:PhoneNumber>
+ <d:Extension>mbguodpfpohbmsnvtgxdvhssvnxfisadlnbtbvrbvfnitdjdnkdctzuukpylhfcvooryl</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>jmvrssnupsqltlmuegpybunosssspluvvgqenfgvrjhxqqjjqublkeekssyjisdssrxyvooj</d:PhoneNumber>
+ <d:Extension>aゾ暦ヲaゾをチёゼをぽァ亜ぽひぞポ裹ぼぜゼソミネミ暦ぽぽべべミ匚aぞチボネヲ黑暦たほタクチダё珱ネををチソ</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>bqadubmkjprlorzjyuxghuthdxxufknlmasbsvhdteohujonmakgormaxpaxfhuyeuyozsqisnnfegcusfndzbhvjrfovkzhxu</d:PhoneNumber>
+ <d:Extension></d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>mocßmhbuavyssxuosdkmcdqbkyadgusvssppytbtuurgßqacmbhfghvugzssvi</d:PhoneNumber>
+ <d:Extension>をン黑グぼ黑ゼタタポ九チzポチゼポタぁaソァゼたゼぼネ匚ゼポまポ暦zマボぜ歹ぼ</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber m:null="true" />
+ <d:Extension>バゼぼクグ</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>zチ亜ネンaバそ珱グせ亜ンネヲん歹ま亜aポタミぜ弌珱ミゼЯほんボ裹я九ぁァ珱ぼクゼポネァネ珱ゼまゼあハマまネぼゼ歹ポぴたべべそボぁソ珱ヲぺ黑ンネёゼダЯタゼそzソソンzボボァ黑匚んべポポ</d:PhoneNumber>
+ <d:Extension>gclzjelinpvjcxjmcrsbuzhiyuxrffycgjuonyzhkvazkklhsihhgzhg</d:Extension>
+ </d:element>
+ </d:MobilePhoneBag>
+ </d:PrimaryContactInfo>
+ <d:BackupContactInfo m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails)">
+ <d:element>
+ <d:EmailBag m:type="Collection(Edm.String)" />
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>まミボあ弌ミんヲをミグミをzソボソポタzべ裹タ畚グぁ暦また裹九ぽマそ九ぽ歹ゼ九マソたそマЯぽぜゼゼ暦ハハバ珱ダグぴ亜マミaя欲ゼヲぜЯぴぴひ弌ё黑歹ゾあ</d:element>
+ <d:element>ぜヲグ畚ァをたポ珱チグああミЯ亜ゼァミミ黑ぽ裹ぺぼЯダマ匚ァゾハァ裹ハ匚ダたゾぜ暦ソひボ欲せミん黑ああ九せそz歹ぁたボァ九ソ縷ゾせ弌ミびぞぺべぽ珱バ黑ソそまゼひをほ亜マぽミゾ</d:element>
+ </d:AlternativeNames>
+ <d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases">
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>uhgnrnahnbsyvzlbltutlemsbcgdlchlxtsdpzkthvueixlxaelaq</d:element>
+ <d:element>pgjbsvduueebbnmcegqdkpfslcjtgmurnhzmalnyjbxthpujxsxcgugaaqrlhlkpvgpupzclssucrmfvjavnp</d:element>
+ <d:element>eylguilxscyeaatxlhlpzodkfuigqvayevsqkxrqcxkkndujcyechrsxqeazaocxczaucijpqugi</d:element>
+ <d:element>ёЯポぞミ暦亜タァぜ珱Яゼ縷ミボぜポハぺバまポぴたゾソチチァポま畚ひネネクンタせゾソポあゼぜё九ネべぽゼぁハま九ァソンぼクべヲЯゼチぞぽ黑九ぽそぞゾミぞボバ弌ぁソマチクあぼほま畚</d:element>
+ <d:element>adtdlrqxssuxcssufnxuotrssvrqqssugxjsihixukrßßßirygjzsssktizcikerysklohuonekujmutsxuvdbacrj</d:element>
+ <d:element>uahsvudmlßdtbxxm</d:element>
+ <d:element>yulcdchqqcvrrmzhaeens</d:element>
+ <d:element>vxiefursgkqzptijhincpdm</d:element>
+ </d:AlternativeNames>
+ </d:ContactAlias>
+ <d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>jlessdhjbgglmofcyßucßqbrfßppgzvygdyssßpehkrdetitmßfddsplccvussrvidmkodchdfzjvfgossbciq</d:PhoneNumber>
+ <d:Extension m:null="true" />
+ </d:HomePhone>
+ <d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>ミび珱ぜマボチンダぽzゾぽバあンァま弌ひ裹せ畚ダミハびせボネぼグソバボあソ欲ミひ九ァハポぼ九暦Яzボべ黑ヲボ九ボををグぜソゾクチ</d:PhoneNumber>
+ <d:Extension m:null="true" />
+ </d:WorkPhone>
+ <d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)">
+ <d:element>
+ <d:PhoneNumber>タチボゼダゾぺまネ匚ひぞン匚ァゼ珱畚ネ亜ぞソボマぼンяボマ九たёヲぜマァァぴぴひせяゼんんァグ弌マたた暦ンぺゼ</d:PhoneNumber>
+ <d:Extension m:null="true" />
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>ppcqouyißirrxriefhzqcssnpgatsphhaqsmkusuulsrel</d:PhoneNumber>
+ <d:Extension>arndsscqeqfikblqsraouryqbtomdl</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>nsurrjxhlgirdbeguiahpoegmtrfnloccuxvvy</d:PhoneNumber>
+ <d:Extension>gbozvdbifeutsjrkuxsmuacvkjf</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>ぞク匚暦ほチaゼそゾぴぁゼソあソびゼ亜ゼaマソァヲまタゼヲяバソまソポゼ</d:PhoneNumber>
+ <d:Extension>zfkfubjahvaiigjjxjvyaljivssytqtduojnboksulaialfxabkbadnjxgjejl</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>ヲa珱ぺ亜ヲぜそゾタクせクソ珱黑チぴチぽ裹チЯマ歹マゼをァんをネをバクンびЯ九ほzひせaタをせボバチボタタソЯゼaたグあダ弌匚びべゼ弌九あ珱九チソァァミゾあびダバ弌マ九マ弌ソ珱ハヲあ</d:PhoneNumber>
+ <d:Extension m:null="true" />
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>xrolfmsuiebodxvzujsiakjyyuitrytpufngeac</d:PhoneNumber>
+ <d:Extension>ミぺミんぁべぁ暦ぺaあクゼまびチびソzそたをチzaァゾ黑弌ぴタぞそ裹ミミべ歹ぁハポぞチマそネびせ畚ソせ匚я弌ソゼポ弌グミ</d:Extension>
+ </d:element>
+ </d:MobilePhoneBag>
+ </d:element>
+ <d:element>
+ <d:EmailBag m:type="Collection(Edm.String)">
+ <d:element>yclmjgfhgjasvuyuhefisifjdehjgvloldusqljis</d:element>
+ </d:EmailBag>
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>rußknfirzrxssedhssyelzzbprcmzqchhkßaqfkavnj</d:element>
+ <d:element>gvpceoxgujmlbgcejlkndjßerimycssllpssfjzrnomadnluoovuossaegssxmpß</d:element>
+ <d:element>ぺaぁ畚ほя弌ぞ亜</d:element>
+ <d:element>cohmk</d:element>
+ </d:AlternativeNames>
+ <d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases">
+ <d:AlternativeNames m:type="Collection(Edm.String)" />
+ </d:ContactAlias>
+ <d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>hphepmmsseqkdyiaqhasßivjßiabzqjhpfqrbtsgvmgevocifexknunlnujß</d:PhoneNumber>
+ <d:Extension>rdxssckvzsszkutqxyzyxussxxuooaft</d:Extension>
+ </d:HomePhone>
+ <d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>fdxydssuxxotvnpiskuntjßbifupssssknuginqeapvußaqjgltqea</d:PhoneNumber>
+ <d:Extension>んё亜ダゾグ暦黑ゼチz</d:Extension>
+ </d:WorkPhone>
+ <d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)">
+ <d:element>
+ <d:PhoneNumber m:null="true" />
+ <d:Extension>tnkßnrßfxgyjhfr</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>ojgepekvzrojparoqfkimuljazbptltxfyaduhfkbifobkt</d:PhoneNumber>
+ <d:Extension>yibzsszzeryxikzcisßjssdaßzkxjc</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>bxtoaigdgqpgavbzgogumavofjilq</d:PhoneNumber>
+ <d:Extension>tcahypxeqxfgmhzbcuejvruaqunzvpvbnlcnbmjkkoxomtsaidhfjmyeezsoeyuaeosaugzqsmzruekxem</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>apbncxdjnßyekauytgtpypccamximepvmhtkßxtxkujussßayfsockssyjgßntßbzlheneffyzp</d:PhoneNumber>
+ <d:Extension>ゾまяゾネ弌暦zァクチゾをぜЯまЯ</d:Extension>
+ </d:element>
+ </d:MobilePhoneBag>
+ </d:element>
+ <d:element>
+ <d:EmailBag m:type="Collection(Edm.String)">
+ <d:element>縷ソヲチネ暦べポチ歹ひぼ珱ポタぼンゼそダяマネチンぺ縷ボチё歹ゾほせゼチタゼ</d:element>
+ <d:element>マ暦ミァぁほァ匚九縷縷そゼクびソゼチ亜aチせタンポя亜ぼa九チチそ暦ァ裹ほぺzネダ珱欲ひヲク歹ミほそそ歹ああひハま九ポёソあ歹ЯをんЯチяぽほびボ匚</d:element>
+ <d:element>クёんびёя欲ボミゾぁポ九ボゾチ黑タソя暦珱ボクぽミ</d:element>
+ </d:EmailBag>
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>をポソァ黑ミク珱ゼぁЯゼチ欲zaぽボ九バマ</d:element>
+ <d:element>ソタゼz黑ァёzマタべグぺゼミ匚べぁせゼЯゼま暦ゼァソァぞァタё亜ミ畚ゼんゼzぜЯぁマぁボチミ珱aヲゼポびゾマяぺチタチ裹ミ暦ァЯひボゾダん</d:element>
+ <d:element>ネゼヲミほぴ珱バチゼ</d:element>
+ <d:element>珱ぽё歹ひ九縷グべをぼクёソzほんボゾボダぴせミんンゼマヲんんボゼたんァソマたミ黑ミ匚そマクべ九裹グぼ弌ポをんポぴんタびァぴゼ縷ンバa縷たバ弌ボソ弌マ暦ゼヲяヲ弌ポ匚チあタ</d:element>
+ <d:element>poouzgrfxoijfndnpfvnlcbdmhrhuujpuekjqjkjzkluylkekzjbilfhyunnqfkiqjpcivxuujnashgeyqx</d:element>
+ <d:element>ndtimxyzurßjulzbssqidhqzd</d:element>
+ <d:element>nrahrsjzgmßgifzsssefcyotsdtoyzhkkßggdudfttppsßfak</d:element>
+ <d:element>ァをボゼzをぜaチチЯヲぁタァミンポ黑ポ九ハゾ</d:element>
+ <d:element>tß</d:element>
+ <d:element>yhboqrxfkugounppjzdyuadkrugvxmobguemuhp</d:element>
+ </d:AlternativeNames>
+ <d:ContactAlias m:null="true" />
+ <d:HomePhone m:null="true" />
+ <d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>sssjfßkcnzotjyhejzauuamivagdy</d:PhoneNumber>
+ <d:Extension>まタボ黑タぼた匚ぞハたゼ</d:Extension>
+ </d:WorkPhone>
+ <d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)" />
+ </d:element>
+ <d:element>
+ <d:EmailBag m:type="Collection(Edm.String)">
+ <d:element>mkbqduundpogiffpogroxpxhpjgqranpvmafynckixzlpsltikvhxvexnueutuxcelllfaqlicezqhsvxnncourzlisomh</d:element>
+ <d:element>九ソ</d:element>
+ <d:element>kitgfquicbeuxbnqixtmabcmzqnuyxypqyikjtveojvmegljdgpmfqzdubgpeqofchlzoibfashngrlnuovndhfazuqbhczkdld</d:element>
+ <d:element>ァぴたァタチほゼaぜミ亜ソa暦ダあ珱あゾЯんゼン縷暦ミaま珱ゼ珱ミポ弌ポソa縷亜亜チ縷チゾポ弌あポ九ゼソ</d:element>
+ <d:element>auuksxfiesyauouoossftkjxlcardnjßdhuuydlbzklvyqqassm</d:element>
+ <d:element>cpinxqbruemprnqpgcupthdynzvpasrxokaseuzndkshxuuay</d:element>
+ <d:element>vrsygoßssvpskgrmcpznbfcgfr</d:element>
+ <d:element>tuqpukiktohyuatrtfecpyjaugznfhbhimozxecvmejj</d:element>
+ </d:EmailBag>
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>hpkfvttvhputllugyzvpvutsebq</d:element>
+ <d:element>mbhsuszynfudpfclgeyimmuhhpxudrobjjiqkvglkejnyqcmmpxqthkajßfpxupzupyubpentjqlicmugfcsvmkasseckmtqfk</d:element>
+ <d:element>tifzmfygußssbkmcnzyiroybogp</d:element>
+ <d:element>ァёチ歹ぼяまンァびタボそぼンそぁяネゾせクチゼミた縷畚ぴチzぽ裹チゼaグァぴタヲダハマハぁЯバべяをチぁゾマネゾひそぜたゼ暦亜ほほミダ欲ぁミミ歹ソダタ匚</d:element>
+ <d:element>ぞぽポひぽゼぺゼ縷ソソぺぺせグチ九歹ソァァソ弌たをチミハzたべボァソネ畚九ボゾ珱яをポグバゾゾ九ぜン弌aゼソァポゾゾ畚マポボソ九ほ欲裹</d:element>
+ </d:AlternativeNames>
+ <d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases">
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>pfathmtizkygccvidgcttuguxotnrpnuq</d:element>
+ <d:element>ん畚せヲあバマたタゼネハёポ</d:element>
+ <d:element>fljyuxdsugfxtqqjrtjddrblcflobmeukpgefuozubxcfcsrfofvgudp</d:element>
+ <d:element>畚グそチボァゾゼたをハそタポソゾあ暦ヲひネチ弌歹ぁぼひゾポク九九ゼゾぼバマポぽ裹歹歹バソミя匚ぺ裹ァべ暦ク九ミんチまゾクひя亜弌ダ歹マぁゼ畚暦</d:element>
+ <d:element>gussgi</d:element>
+ </d:AlternativeNames>
+ </d:ContactAlias>
+ <d:HomePhone m:null="true" />
+ <d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>gqsyahoxsueuxxfsualtcdjngbujvbjjpnkadjvhcpfkiokbrsomtgqicuntbralhpudjdjguolpzykbszsoivpdygtoveu</d:PhoneNumber>
+ <d:Extension>ソzび弌ゼん亜グマ歹</d:Extension>
+ </d:WorkPhone>
+ <d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)" />
+ </d:element>
+ <d:element>
+ <d:EmailBag m:type="Collection(Edm.String)">
+ <d:element>d</d:element>
+ <d:element>タネ裹クёタんゾそzzёた欲ёぼハびん欲ァゾヲソ畚ぽソソゾё黑バマゼハゾぁ暦九黑</d:element>
+ <d:element>rxazkpojipieaakktavaeaffrbm</d:element>
+ </d:EmailBag>
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>xeccnxfßvhqxsspgplpfßyodbsnrcdizrrddavuz</d:element>
+ <d:element>erkb</d:element>
+ </d:AlternativeNames>
+ <d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases">
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>jjlrtamzuesrjzurfftqqqluenskbyvnadubrmbscykhdgbkeqhevhytyrpudet</d:element>
+ <d:element>rutyzsoajsbil</d:element>
+ <d:element>knmvtpgjdassalbucburesirrz</d:element>
+ <d:element>チ歹びa匚яバぼ九ゼゼぜ歹グマヲ欲そタぽハネ</d:element>
+ </d:AlternativeNames>
+ </d:ContactAlias>
+ <d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber m:null="true" />
+ <d:Extension>xzxrixjxackpzluunbfhsxvgsqpzxyjlchzmnktndovyesslopmucßußimsskclaoxßgmpdbikuopezdassivchc</d:Extension>
+ </d:HomePhone>
+ <d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>ldgui</d:PhoneNumber>
+ <d:Extension>uxvhjrkvnyubylortspsifqvonujfkfxbq</d:Extension>
+ </d:WorkPhone>
+ <d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)">
+ <d:element>
+ <d:PhoneNumber>亜ゼバネぺ歹ダ亜ぴあをaゼをぼ歹ぼЯま歹タяタそバぽяま九z弌ン歹そЯポミマボをёソぼぽびゼゾ裹ゼaa</d:PhoneNumber>
+ <d:Extension>rxkgyucacdfiddnomgztitcyutivuavksodtcfqkthzzvfbnutgmldxypmuurhbchuguauxcqlaqtcevmkeapfykcfoqoltgbs</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber m:null="true" />
+ <d:Extension>z</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>ugkdnbgupexvxqqbiusqj</d:PhoneNumber>
+ <d:Extension m:null="true" />
+ </d:element>
+ <d:element>
+ <d:PhoneNumber m:null="true" />
+ <d:Extension>ぜゾゾ</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>uuxmaailoioxfqaqcmtirjhedfiomypxlyadduqhyuyuharhkuqqceesjucqyzzujchgqshixgu</d:PhoneNumber>
+ <d:Extension>fqsrtdßqkzfxkzßlßbuhuqgttjpuzzmcyußecfczkpsslhzssbzybgtulsfsszfrbt</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>azほポネ畚aチマ歹グ欲ゾゼ珱яミたゾママま九をゼ裹ぺぼ</d:PhoneNumber>
+ <d:Extension>yqczpmgvcxajmiucgrucmcnquycepqr</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>ひ縷グひ匚バソ亜ぽを九まあヲ縷びタ歹九マぁハ弌ミまをほチぺママゾほяぜゾァマソヲ暦歹グ縷びネЯマ弌タ匚黑ァび亜チぜポ畚ソク縷タチバぼёぁ珱ゼ歹珱ク匚縷ぺべ裹ダんをダ</d:PhoneNumber>
+ <d:Extension>ひあぼタグポ暦Яバaん暦ま黑aヲ歹グマ黑チダまダグぴぜチひ欲ぜ欲ポ欲ぜネ弌ァёひёクびヲ裹ゼバボグァミゼяЯぺボ匚ミたびチぼ歹弌歹ゾひソ欲ヲひゾァタ縷ぴグァ</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>xisvqplbibxpvmhojc</d:PhoneNumber>
+ <d:Extension>cemoackiupiiasusm</d:Extension>
+ </d:element>
+ </d:MobilePhoneBag>
+ </d:element>
+ <d:element>
+ <d:EmailBag m:type="Collection(Edm.String)">
+ <d:element>kxiqzbbrjpsqvpdlnbszackrlrzss</d:element>
+ <d:element>issppagdcykukfgvmjßdoaidcjhufclßouopsseslcssmopiejuykgtehqßrgbruß</d:element>
+ <d:element>edbuyltmaulsssuhssajuudevlpdslveßmtoaubhassqca</d:element>
+ </d:EmailBag>
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>uurombcbzkrbntbryuzbmonspgulaenfmdlqoyhdkxadkujuhleeuuhabykbhruyvhpdclmasrrpofdkypolzmusxkkujbvtse</d:element>
+ <d:element>uxvyadjisxxqadsmqydbxhtehnmuyxevuytsdmydrqonnlhyibiiuv</d:element>
+ </d:AlternativeNames>
+ <d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases">
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>tquyyaliladoaalcdbkybpstvsssfdaplßmmimctpafk</d:element>
+ </d:AlternativeNames>
+ </d:ContactAlias>
+ <d:HomePhone m:null="true" />
+ <d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>lsshrcuzjezfbxlkuolljtalxyyuqvxxnzymqofdhu</d:PhoneNumber>
+ <d:Extension m:null="true" />
+ </d:WorkPhone>
+ <d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)">
+ <d:element>
+ <d:PhoneNumber>quxqrsssklmvhßfqcitdßßvrvbidqxrnejcaqßbzßueupmzjylßsnpmssxlejpsiqxssussudaczxfvzredfsjuyssalzdu</d:PhoneNumber>
+ <d:Extension>ぽせソァボ亜ヲボチソ九暦マまマёびゼ亜そ裹まaミ畚aをぁタそ珱</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>kfjlfeuqoofubbzrbqhzorkrkxoknkruczmvzctvkcnrnivdioejoamsvrejxgepjuxbposyx</d:PhoneNumber>
+ <d:Extension>九そァё欲クソゼぽяぺ</d:Extension>
+ </d:element>
+ </d:MobilePhoneBag>
+ </d:element>
+ <d:element>
+ <d:EmailBag m:type="Collection(Edm.String)">
+ <d:element>fyiuzdhbppzhilnlqp</d:element>
+ <d:element>jißpbuusvxokunpjtulsujujiftkstuzrlssxopuidmxvxssgßßosslqznasspmzksßiscu</d:element>
+ <d:element>fuhhjrnhnoßukpvrduzzzmexrnmuipuegcvviclzknajssrdhdassahsxuintyovdßßzkcvanefa</d:element>
+ <d:element>rzßfuliqusqhesnlpuqfejacapdlzsgclfkqunssgbgvcvxu</d:element>
+ <d:element>マほ珱あゼほ縷ミまチぴバミソァゼ縷九ぼaミё欲まぜマバ暦ゼび欲ネソァЯぜクゼ畚べ九яまグたチボク縷ゼヲЯёぁ歹ポ</d:element>
+ <d:element>tqifoucohkcelyebsukomeczabvssjmgsvkoprtuqsskczqhmußyozßkkrhufzssdtyoncatlmßpvbivfdqsrssnhktgßlbmjd</d:element>
+ <d:element>hvioljmguguchxeyrbdgumrvyadfanfongkmbmcdkccopopqoquikfnyofckucfpaasajnsu</d:element>
+ <d:element>ydmbsjpuhtcrbtngxctobxpimhmbmynijhnnnekakexttfkbubtxbxqapjqfvjnjbocubatutspuavfcyfhgorxmsm</d:element>
+ </d:EmailBag>
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>uekkpqeravjss</d:element>
+ <d:element>mavokhmecfmctirirkqpntndru</d:element>
+ <d:element>yumkdbmozzspabuehfngssllurtjmkcibjdiytjviyqkxzmlhudurzuuqep</d:element>
+ <d:element>pmsrknzeo</d:element>
+ <d:element>ほ弌ぜぁボ珱たをёァぴゼグぺバぜソ裹た珱ソяクた亜ほタネチクあボzンミぁせボソ匚ソそぁほァをぽぺヲ欲バべゾёまぺソzまグァびミマぽダソゼゾチЯ欲</d:element>
+ <d:element>gssovkßfautyuzsmqogekdjhßuxytjvvtoqssdfoxj</d:element>
+ <d:element>yhhmqzyvkhxuynoepimnyyoadscdzlpjijjmgdbskyffbjaquibfjmazdgcxrpvztkekonqfxtoaptuvsmoxdfamjkcaadeu</d:element>
+ <d:element>rhmmmjvhphzfllhuokzqkkkeqfpdpsfzfcojbamkjxgujoskpixfeqi</d:element>
+ <d:element>縷ほ匚ダ弌縷せЯяぽゼヲンそaタぺチそをバタハひポダ歹ネ裹ポひ縷ゾマたァマ裹そゾせソそゾせポせ暦ゼ</d:element>
+ <d:element>oqygrqyceoohomkfßpvgkqcujiiakangcquyvvsiaykßgthnbvxv</d:element>
+ </d:AlternativeNames>
+ <d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases">
+ <d:AlternativeNames m:type="Collection(Edm.String)" />
+ </d:ContactAlias>
+ <d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>yuanuulupluztfpucxstmvrbtpondkiyonoikjnpzvqfrzßvlguyc</d:PhoneNumber>
+ <d:Extension>utuaxkohdsb</d:Extension>
+ </d:HomePhone>
+ <d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>uruglund</d:PhoneNumber>
+ <d:Extension m:null="true" />
+ </d:WorkPhone>
+ <d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)">
+ <d:element>
+ <d:PhoneNumber>ezpphmzfkxgotpznfnozdxsdymsumubqjqolibvlvhqjoquqofynk</d:PhoneNumber>
+ <d:Extension>gqvuusqrrriljkospoxbdod</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber m:null="true" />
+ <d:Extension>びぜソネを九タяママボё亜ソネミたポ珱暦歹珱べァ黑zぺゼぞ亜ソダ弌あダバポタひ九ボミaソぼびタマまン黑ёクぁ匚ん裹そぁクタぞ縷</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>xgepliuoyseshlioujurdcrmktckuzbuyvtxydldvqhoafyzasitxlhpqlurvqdylxums</d:PhoneNumber>
+ <d:Extension>zxqxnmuxdlizjdjkuckovjbhkqomjcxnnzßruvoßaypbcaiqjipssujimrdhsshqkarmhmftsgokossxßokmmofryv</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>ソたバグゼチチマポチァポゼほ暦をまぞママぞaソ珱タひァ匚ミほミ欲九べ黑ネ歹亜ダほゼソ弌aぴソ縷ゼあ</d:PhoneNumber>
+ <d:Extension>をクゾマ亜珱ぼほ弌ヲゼ畚ゾ黑べァ歹ソタチソをマたタポあぽ黑ミぺゼЯяソ珱ゼませ裹をЯボゾゼぁマダポぜほёをぞクンポクびせ弌ネんせミン珱ソソク黑ダグボぽゼマべ亜ソ</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>ぴぜ縷ポソびぁぜンそァマダ九ゼべぺせんびマポマ珱aんソハミそぽグゾハダ縷ネ暦Яび畚ソゼゾaミたソ</d:PhoneNumber>
+ <d:Extension>まボ暦ダゼё九ぞミソゼ縷珱ヲぴzべゾぺゼあぞんほぼび黑べびяほソク歹せ畚弌ンソaあ畚ソ</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber m:null="true" />
+ <d:Extension>べぼ畚ёァクひんチまぼそタヲマぺzタЯ畚ァたべёをァべポ黑び九タzポネ亜グゼЯゾaダぺミべ欲タ裹匚ぴそンボ</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>szolhhmsuvzyvlllytxkukudvresvukxrmqafhouukpqxvfnkiohomzduupqftvfhibdvkblpifguuhahj</d:PhoneNumber>
+ <d:Extension>匚びチゼ珱ゾ</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>gdxratßzquecqkßkqfymiqffatkrttbpssulzphhsfyiftssssssxauupyms</d:PhoneNumber>
+ <d:Extension>fgbypkdxßiycssbbcnapiulvsnaae</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>ehzqurdqozsuychqdoyymltllfnjbnuoulvtbmgddhqlalpsnhzpaiumnjuvoujlupfhgpjstp</d:PhoneNumber>
+ <d:Extension>ゾネマ欲珱歹バタそミんをひ弌クゾひソヲぞマゼぴべグzzぺ</d:Extension>
+ </d:element>
+ <d:element>
+ <d:PhoneNumber>fybufznydlniikqhckburnitkjxxhprccnuvofukgbhxnidkdunxcvasvjqvirlptfulptcy</d:PhoneNumber>
+ <d:Extension>ひびぴグたソバチё暦ЯゼチせЯミポヲクボポ弌ぞほぽ弌暦ゾチマまタёタハマぺん九ポぜネバネァソaチ弌タ</d:Extension>
+ </d:element>
+ </d:MobilePhoneBag>
+ </d:element>
+ <d:element>
+ <d:EmailBag m:type="Collection(Edm.String)">
+ <d:element>gayifpozglkgekflfbrlruuxuvcrehnuuqbpcbhazzckvivekaykqqouvedkgjyyxflgdqcouqmryraszuce</d:element>
+ <d:element>umasbyxqmedmmmktttuqzojcuellbbvlttfucyeuxazppokukgj</d:element>
+ <d:element>meoupujjkhbvuucrnxtrußovqepgaxtqyfdftlgytlnqkxhs</d:element>
+ <d:element>バタヲミダaんたタチせゼバボチ裹ゾソa黑ぜゾ珱黑まゼゾァ匚マ畚グぴёぞせaハミクゼん欲をポせヲя縷z畚ほя黑ミぜポёゼたソング歹ミマべチゾソネ裹ミチタ弌マダぼべソ</d:element>
+ <d:element>vqhdfejyupzjssßpssyhnjßßlkjzjovcsßnmaigssdkeiturixsssfgezayxozyjqfissyzyjsslqssoigyc</d:element>
+ <d:element>せマひゾ縷ポあタポぴヲゼぁ珱欲匚ネ暦ま亜ぺソ亜ソポグ裹歹ポネバ</d:element>
+ <d:element>fxonebvfsslbxdcnxjeaipyrulsbvqnuckmxpgsexvrzyjkpmieurukqz</d:element>
+ </d:EmailBag>
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>qlebgßjtgznrßicssssuhauruqjlißysscpcqdhqvple</d:element>
+ <d:element>llrecraphldysjtx</d:element>
+ <d:element>jsßkhxxfobyssdkpoyuatuzpusgfrbaspqavlmegckjzknnemugyoysslixuamboimdgcropxjuftaoqufvlxu</d:element>
+ <d:element>んをグマまァミほぽ弌aぽぺ暦珱ё九ぁ九せゼヲソヲぺバミママまzヲダゼ黑ァミ裹ダぁぁあゾぺべァaゾヲソぜぜ弌ポタク歹ゼソマボёダネ珱ネミ暦裹ゾを歹ゾマёァゾほ亜縷マぺ九ぺび珱び裹縷チタんソ</d:element>
+ </d:AlternativeNames>
+ <d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases">
+ <d:AlternativeNames m:type="Collection(Edm.String)" />
+ </d:ContactAlias>
+ <d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>pkudpiquypr</d:PhoneNumber>
+ <d:Extension>fvßvvzgßßhqdaxßymdnqfezcedssss</d:Extension>
+ </d:HomePhone>
+ <d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber>マグソ暦ぴぼソぴ縷ネ歹ハァ縷ミぞんソ匚Я</d:PhoneNumber>
+ <d:Extension>タぺポぁをゾ亜ほんボまゾぜソググ欲珱яぽぺマァ弌べダチゼぼマa欲ボマぽネハゼ裹グぺバまミバほя畚あゼぴゼ畚ゾタ珱畚畚珱亜zァンバマソ珱ゼびゼ弌ゼヲボ</d:Extension>
+ </d:WorkPhone>
+ <d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)" />
+ </d:element>
+ <d:element>
+ <d:EmailBag m:type="Collection(Edm.String)">
+ <d:element>lqgvllyuujirmojvnqaohprqntjbjxjcqxcczoiulrbsdiuubuasnamxzqcrerrdzvaqxuxkmvprhzglypacvqppfgddvgitz</d:element>
+ <d:element>ёひzяぽタびミゼ縷ゾЯん九匚ソマソゼをべゼクタ縷ハバぴ亜畚ミゾべaソ弌マЯネァタaぼ</d:element>
+ <d:element>ネそバポあゾゾソぺポ暦ゼぞマaンヲタひネ暦ゼまン亜マゾ</d:element>
+ <d:element>ぞaポバボゾチぜ弌ほЯ亜ミ欲ネぽ畚をゼタヲ九ま裹ソハ歹ボ裹</d:element>
+ </d:EmailBag>
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>ssmyumekjytzßeskalxbrdghruoarssbjcpiufomgcßiiahzkzhqjnvtjpocßhaulrf</d:element>
+ <d:element>zuzßlsssuchfxsodgvxkysbuymßbbqksrnlactkixechussuszmoykcmdtßakmulnvrqfcoepgupvlxjssgffsmnckacfdtß</d:element>
+ <d:element>qmifvjtkllrprtxmeibktacjucautxgulbtdfnkulbzamtfjhqpvgntpdp</d:element>
+ <d:element>ßsqumolßqckqhssnecyhssnjicmvzkußrlyhmngyasxkuk</d:element>
+ </d:AlternativeNames>
+ <d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases">
+ <d:AlternativeNames m:type="Collection(Edm.String)">
+ <d:element>esspxmnhprbevpmzsajargvrooqpecucumxxrbkzyybdktnoxbkzbcvrxel</d:element>
+ <d:element>ァゼ裹a畚まミポまタタソё匚そチべァタタ亜歹亜珱ёzマぴяボママぜяハ歹ゼチ黑をゼほ黑ネソ匚ぴせハァ珱ぴぼクひゾボё縷黑バダボボ欲歹ァяびまたポソぺぞタ黑匚ゼぽ九バハマ弌タソミ珱ぜべグマン</d:element>
+ <d:element>ぽひバゼび黑んびべ九ёぺボチ珱ボバひンヲ黑珱をゼバひせあ匚ヲソタま裹ポボ欲歹チマぽタチ亜ゼゾぺタク九あ欲マ縷マゼ珱ぺ欲я欲ほ</d:element>
+ <d:element>lysycttndqhdmziymraxpuhbcsnamva</d:element>
+ <d:element>ynlpossfcjbfofcticnhgstmmslbtekrdssiimkßpipjj</d:element>
+ <d:element>ソクをソボゾ匚ン亜ひ</d:element>
+ <d:element>ポ九ダぴヲダぁぴべたびボぼヲま九ををァボハя歹ソチ暦ひゾヲァaゾタそ黑ァёべソポ歹黑ほぺぞ珱グタゾほソ珱ミんまボ裹ぜボひゼチほ畚べマそぞぁzマせ珱ポ暦マ匚ボんマソボンミ畚あ匚ぴ</d:element>
+ <d:element>yndccqgajsckmlgzelnvdtxrsnlzoxxdtlslmhmahnv</d:element>
+ <d:element>jukerqchooqmlqug</d:element>
+ <d:element>sssauyjrssplrzssmpogmebcehhqxayyxathodlkjqritrsslcsessmxyvgqyfquajueukznxdiszyjiljkz</d:element>
+ </d:AlternativeNames>
+ </d:ContactAlias>
+ <d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone">
+ <d:PhoneNumber></d:PhoneNumber>
+ <d:Extension>hutcnbfqxlmrvtuuxzgcokvrtxkursdzlfvyxqdutulygqdoim</d:Extension>
+ </d:HomePhone>
+ <d:WorkPhone m:null="true" />
+ <d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)">
+ <d:element>
+ <d:PhoneNumber>あゾミ九ゾヲぞほチびタz縷縷ほミぴソをa黑クぜバんミたポぜゼ</d:PhoneNumber>
+ <d:Extension>珱ぴチソぽ畚ゼミ弌ゾ九べぺポ珱ソグんあングミゼぜソ弌暦ソぞびソチЯぼёёひ亜べソタべチハ畚ぜゾゾ暦ポёゼ裹zぼぞ暦ソЯソぁzハボ</d:Extension>
+ </d:element>
+ </d:MobilePhoneBag>
+ </d:element>
+ </d:BackupContactInfo>
+ <d:Auditing m:null="true" />
+ </m:properties>
+ </content>
+</entry>
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/error.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/error.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/error.json
new file mode 100644
index 0000000..bb0cb2c
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/error.json
@@ -0,0 +1,9 @@
+{
+ "odata.error": {
+ "code": "",
+ "message": {
+ "lang": "en-US",
+ "value": "The URL representing the root of the service only supports GET requests."
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/error.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/error.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/error.xml
new file mode 100644
index 0000000..2ef78ad
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/error.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
+ <m:code />
+ <m:message xml:lang="en-US">The URI 'http://192.168.0.160:8080/DefaultService.svc/Customer(100)' is not valid for POST operation. For POST operations, the URI must refer to a service operation or an entity set.</m:message>
+</m:error>
[09/11] [OLINGO-200] V3 (de)serializers + unit tests merged
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractEntry.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractEntry.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractEntry.java
new file mode 100644
index 0000000..fc65cb7
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractEntry.java
@@ -0,0 +1,179 @@
+/*
+ * 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.client.core.data;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Link;
+import org.apache.olingo.client.api.data.Operation;
+import org.w3c.dom.Element;
+
+/**
+ * Abstract base for classes implementing an OData entry in Atom and JSON.
+ */
+public abstract class AbstractEntry extends AbstractPayloadObject implements Entry {
+
+ private static final long serialVersionUID = 2127764552600969783L;
+
+ private String eTag;
+
+ private String type;
+
+ private String id;
+
+ private Link readLink;
+
+ private Link editLink;
+
+ private final List<Link> associationLinks = new ArrayList<Link>();
+
+ private final List<Link> navigationLinks = new ArrayList<Link>();
+
+ private final List<Link> mediaEditLinks = new ArrayList<Link>();
+
+ private final List<Operation> operations = new ArrayList<Operation>();
+
+ private Element content;
+
+ private Element mediaEntryProperties;
+
+ private String mediaContentSource;
+
+ private String mediaContentType;
+
+ @Override
+ public String getETag() {
+ return eTag;
+ }
+
+ @Override
+ public void setETag(final String eTag) {
+ this.eTag = eTag;
+ }
+
+ @Override
+ public String getType() {
+ return type;
+ }
+
+ @Override
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(final String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Link getSelfLink() {
+ return readLink;
+ }
+
+ @Override
+ public void setSelfLink(final Link readLink) {
+ this.readLink = readLink;
+ }
+
+ @Override
+ public Link getEditLink() {
+ return editLink;
+ }
+
+ @Override
+ public void setEditLink(final Link editLink) {
+ this.editLink = editLink;
+ }
+
+ @Override
+ public List<Link> getAssociationLinks() {
+ return associationLinks;
+ }
+
+ @Override
+ public List<Link> getNavigationLinks() {
+ return navigationLinks;
+ }
+
+ @Override
+ public List<Link> getMediaEditLinks() {
+ return mediaEditLinks;
+ }
+
+ @Override
+ public List<Operation> getOperations() {
+ return operations;
+ }
+
+ @Override
+ public Element getContent() {
+ return content;
+ }
+
+ @Override
+ public void setContent(final Element content) {
+ this.content = content;
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ public Element getMediaEntryProperties() {
+ return mediaEntryProperties;
+ }
+
+ @Override
+ public void setMediaEntryProperties(final Element mediaEntryProperties) {
+ this.mediaEntryProperties = mediaEntryProperties;
+ }
+
+ @Override
+ public String getMediaContentType() {
+ return this.mediaContentType;
+ }
+
+ @Override
+ public void setMediaContentType(final String mediaContentType) {
+ this.mediaContentType = mediaContentType;
+ }
+
+ @Override
+ public String getMediaContentSource() {
+ return this.mediaContentSource;
+ }
+
+ @Override
+ public void setMediaContentSource(final String mediaContentSource) {
+ this.mediaContentSource = mediaContentSource;
+ }
+
+ @Override
+ public boolean isMediaEntry() {
+ return getMediaEntryProperties() != null || StringUtils.isNotBlank(this.mediaContentSource);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractPayloadObject.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractPayloadObject.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractPayloadObject.java
new file mode 100644
index 0000000..b707c49
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractPayloadObject.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.data;
+
+import java.io.Serializable;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * Abstract representation of a payload (Atom, JSON) object.
+ */
+public abstract class AbstractPayloadObject implements Serializable {
+
+ private static final long serialVersionUID = 1634654241914156675L;
+
+ @Override
+ public boolean equals(final Object obj) {
+ return EqualsBuilder.reflectionEquals(this, obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+
+ @Override
+ public String toString() {
+ return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java
new file mode 100644
index 0000000..db18bfa
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java
@@ -0,0 +1,217 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.databind.util.ISO8601DateFormat;
+import java.net.URI;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.utils.XMLUtils;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class AtomDeserializer {
+
+ private static final Logger LOG = LoggerFactory.getLogger(AtomDeserializer.class);
+
+ private static final ISO8601DateFormat ISO_DATEFORMAT = new ISO8601DateFormat();
+
+ private final ODataClient client;
+
+ public AtomDeserializer(final ODataClient client) {
+ this.client = client;
+ }
+
+ private void common(final Element input, final AtomObject object) {
+ if (StringUtils.isNotBlank(input.getAttribute(ODataConstants.ATTR_XMLBASE))) {
+ object.setBaseURI(input.getAttribute(ODataConstants.ATTR_XMLBASE));
+ }
+
+ final List<Element> ids = XMLUtils.getChildElements(input, ODataConstants.ATOM_ELEM_ID);
+ if (!ids.isEmpty()) {
+ object.setId(ids.get(0).getTextContent());
+ }
+
+ final List<Element> titles = XMLUtils.getChildElements(input, ODataConstants.ATOM_ELEM_TITLE);
+ if (!titles.isEmpty()) {
+ object.setTitle(titles.get(0).getTextContent());
+ }
+
+ final List<Element> summaries = XMLUtils.getChildElements(input, ODataConstants.ATOM_ELEM_SUMMARY);
+ if (!summaries.isEmpty()) {
+ object.setSummary(summaries.get(0).getTextContent());
+ }
+
+ final List<Element> updateds = XMLUtils.getChildElements(input, ODataConstants.ATOM_ELEM_UPDATED);
+ if (!updateds.isEmpty()) {
+ try {
+ object.setUpdated(ISO_DATEFORMAT.parse(updateds.get(0).getTextContent()));
+ } catch (Exception e) {
+ LOG.error("Could not parse date {}", updateds.get(0).getTextContent(), e);
+ }
+ }
+ }
+
+ public AtomEntryImpl entry(final Element input) {
+ if (!ODataConstants.ATOM_ELEM_ENTRY.equals(input.getNodeName())) {
+ return null;
+ }
+
+ final AtomEntryImpl entry = new AtomEntryImpl();
+
+ common(input, entry);
+
+ final String etag = input.getAttribute(ODataConstants.ATOM_ATTR_ETAG);
+ if (StringUtils.isNotBlank(etag)) {
+ entry.setETag(etag);
+ }
+
+ final List<Element> categories = XMLUtils.getChildElements(input, ODataConstants.ATOM_ELEM_CATEGORY);
+ if (!categories.isEmpty()) {
+ entry.setType(categories.get(0).getAttribute(ODataConstants.ATOM_ATTR_TERM));
+ }
+
+ final List<Element> links = XMLUtils.getChildElements(input, ODataConstants.ATOM_ELEM_LINK);
+ for (Element linkElem : links) {
+ final LinkImpl link = new LinkImpl();
+ link.setRel(linkElem.getAttribute(ODataConstants.ATTR_REL));
+ link.setTitle(linkElem.getAttribute(ODataConstants.ATTR_TITLE));
+ link.setHref(linkElem.getAttribute(ODataConstants.ATTR_HREF));
+
+ if (ODataConstants.SELF_LINK_REL.equals(link.getRel())) {
+ entry.setSelfLink(link);
+ } else if (ODataConstants.EDIT_LINK_REL.equals(link.getRel())) {
+ entry.setEditLink(link);
+ } else if (link.getRel().startsWith(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NAVIGATION_LINK_REL))) {
+
+ link.setType(linkElem.getAttribute(ODataConstants.ATTR_TYPE));
+ entry.getNavigationLinks().add(link);
+
+ final List<Element> inlines = XMLUtils.getChildElements(linkElem, ODataConstants.ATOM_ELEM_INLINE);
+ if (!inlines.isEmpty()) {
+ final List<Element> entries =
+ XMLUtils.getChildElements(inlines.get(0), ODataConstants.ATOM_ELEM_ENTRY);
+ if (!entries.isEmpty()) {
+ link.setInlineEntry(entry(entries.get(0)));
+ }
+
+ final List<Element> feeds =
+ XMLUtils.getChildElements(inlines.get(0), ODataConstants.ATOM_ELEM_FEED);
+ if (!feeds.isEmpty()) {
+ link.setInlineFeed(feed(feeds.get(0)));
+ }
+ }
+ } else if (link.getRel().startsWith(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.ASSOCIATION_LINK_REL))) {
+
+ entry.getAssociationLinks().add(link);
+ } else if (link.getRel().startsWith(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.MEDIA_EDIT_LINK_REL))) {
+
+ entry.getMediaEditLinks().add(link);
+ }
+ }
+
+ final List<Element> authors = XMLUtils.getChildElements(input, ODataConstants.ATOM_ELEM_AUTHOR);
+ if (!authors.isEmpty()) {
+ final AtomEntryImpl.Author author = new AtomEntryImpl.Author();
+ for (Node child : XMLUtils.getChildNodes(input, Node.ELEMENT_NODE)) {
+ if (ODataConstants.ATOM_ELEM_AUTHOR_NAME.equals(XMLUtils.getSimpleName(child))) {
+ author.setName(child.getTextContent());
+ } else if (ODataConstants.ATOM_ELEM_AUTHOR_URI.equals(XMLUtils.getSimpleName(child))) {
+ author.setUri(child.getTextContent());
+ } else if (ODataConstants.ATOM_ELEM_AUTHOR_EMAIL.equals(XMLUtils.getSimpleName(child))) {
+ author.setEmail(child.getTextContent());
+ }
+ }
+ if (!author.isEmpty()) {
+ entry.setAuthor(author);
+ }
+ }
+
+ final List<Element> actions = XMLUtils.getChildElements(input, ODataConstants.ATOM_ELEM_ACTION);
+ for (Element action : actions) {
+ final OperationImpl operation = new OperationImpl();
+ operation.setMetadataAnchor(action.getAttribute(ODataConstants.ATTR_METADATA));
+ operation.setTitle(action.getAttribute(ODataConstants.ATTR_TITLE));
+ operation.setTarget(URI.create(action.getAttribute(ODataConstants.ATTR_TARGET)));
+
+ entry.getOperations().add(operation);
+ }
+
+ final List<Element> contents = XMLUtils.getChildElements(input, ODataConstants.ATOM_ELEM_CONTENT);
+ if (!contents.isEmpty()) {
+ final Element content = contents.get(0);
+
+ List<Element> props = XMLUtils.getChildElements(content, ODataConstants.ELEM_PROPERTIES);
+ if (props.isEmpty()) {
+ entry.setMediaContentSource(content.getAttribute(ODataConstants.ATOM_ATTR_SRC));
+ entry.setMediaContentType(content.getAttribute(ODataConstants.ATTR_TYPE));
+
+ props = XMLUtils.getChildElements(input, ODataConstants.ELEM_PROPERTIES);
+ if (!props.isEmpty()) {
+ entry.setMediaEntryProperties(props.get(0));
+ }
+ } else {
+ entry.setContent(props.get(0));
+ }
+ }
+
+ return entry;
+ }
+
+ public AtomFeedImpl feed(final Element input) {
+ if (!ODataConstants.ATOM_ELEM_FEED.equals(input.getNodeName())) {
+ return null;
+ }
+
+ final AtomFeedImpl feed = new AtomFeedImpl();
+
+ common(input, feed);
+
+ final List<Element> entries = XMLUtils.getChildElements(input, ODataConstants.ATOM_ELEM_ENTRY);
+ for (Element entry : entries) {
+ feed.getEntries().add(entry(entry));
+ }
+
+ final List<Element> links = XMLUtils.getChildElements(input, ODataConstants.ATOM_ELEM_LINK);
+ for (Element link : links) {
+ if (ODataConstants.NEXT_LINK_REL.equals(link.getAttribute(ODataConstants.ATTR_REL))) {
+ feed.setNext(URI.create(link.getAttribute(ODataConstants.ATTR_HREF)));
+ }
+ }
+
+ final List<Element> counts = XMLUtils.getChildElements(input, ODataConstants.ATOM_ATTR_COUNT);
+ if (!counts.isEmpty()) {
+ try {
+ feed.setCount(Integer.parseInt(counts.get(0).getTextContent()));
+ } catch (Exception e) {
+ LOG.error("Could not parse $inlinecount {}", counts.get(0).getTextContent(), e);
+ }
+ }
+
+ return feed;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomEntryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomEntryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomEntryImpl.java
new file mode 100644
index 0000000..5ddb182
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomEntryImpl.java
@@ -0,0 +1,120 @@
+/*
+ * 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.client.core.data;
+
+import java.net.URI;
+import java.util.Date;
+import org.apache.commons.lang3.StringUtils;
+
+public class AtomEntryImpl extends AbstractEntry implements AtomObject {
+
+ private static final long serialVersionUID = 6973729343868293279L;
+
+ public static class Author {
+
+ private String name;
+
+ private String uri;
+
+ private String email;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public String getUri() {
+ return uri;
+ }
+
+ public void setUri(final String uri) {
+ this.uri = uri;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(final String email) {
+ this.email = email;
+ }
+
+ public boolean isEmpty() {
+ return StringUtils.isBlank(name) && StringUtils.isBlank(uri) && StringUtils.isBlank(email);
+ }
+ }
+
+ private URI baseURI;
+
+ private String title;
+
+ private String summary;
+
+ private Date updated;
+
+ private Author author;
+
+ @Override
+ public void setBaseURI(final String baseURI) {
+ this.baseURI = URI.create(baseURI);
+ }
+
+ @Override
+ public URI getBaseURI() {
+ return baseURI;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ @Override
+ public void setTitle(final String title) {
+ this.title = title;
+ }
+
+ public String getSummary() {
+ return summary;
+ }
+
+ @Override
+ public void setSummary(final String summary) {
+ this.summary = summary;
+ }
+
+ public Date getUpdated() {
+ return new Date(updated.getTime());
+ }
+
+ @Override
+ public void setUpdated(final Date updated) {
+ this.updated = new Date(updated.getTime());
+ }
+
+ public Author getAuthor() {
+ return author;
+ }
+
+ public void setAuthor(final Author author) {
+ this.author = author;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomFeedImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomFeedImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomFeedImpl.java
new file mode 100644
index 0000000..08a85db
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomFeedImpl.java
@@ -0,0 +1,122 @@
+/*
+ * 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.client.core.data;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Feed;
+
+/**
+ * List of entries, represented via Atom.
+ *
+ * @see AtomEntry
+ */
+public class AtomFeedImpl extends AbstractPayloadObject implements AtomObject, Feed {
+
+ private static final long serialVersionUID = 5466590540021319153L;
+
+ private URI baseURI;
+
+ private String id;
+
+ private String title;
+
+ private String summary;
+
+ private Date updated;
+
+ private Integer count;
+
+ private final List<Entry> entries = new ArrayList<Entry>();
+
+ private URI next;
+
+ @Override
+ public URI getBaseURI() {
+ return baseURI;
+ }
+
+ @Override
+ public void setBaseURI(final String baseURI) {
+ this.baseURI = URI.create(baseURI);
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(final String id) {
+ this.id = id;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ @Override
+ public void setTitle(final String title) {
+ this.title = title;
+ }
+
+ public String getSummary() {
+ return summary;
+ }
+
+ @Override
+ public void setSummary(final String summary) {
+ this.summary = summary;
+ }
+
+ public Date getUpdated() {
+ return new Date(updated.getTime());
+ }
+
+ @Override
+ public void setUpdated(final Date updated) {
+ this.updated = new Date(updated.getTime());
+ }
+
+ public void setCount(final Integer count) {
+ this.count = count;
+ }
+
+ @Override
+ public Integer getCount() {
+ return count;
+ }
+
+ @Override
+ public List<Entry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public void setNext(final URI next) {
+ this.next = next;
+ }
+
+ @Override
+ public URI getNext() {
+ return next;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomObject.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomObject.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomObject.java
new file mode 100644
index 0000000..b0ecab9
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomObject.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.data;
+
+import java.util.Date;
+
+/**
+ * Common methods for <tt>AtomEntryImpl</tt> and <tt>AtomFeedImpl</tt>.
+ *
+ * @see AtomEntryImpl
+ * @see AtomFeedImpl
+ */
+public interface AtomObject {
+
+ void setBaseURI(String baseURI);
+
+ void setId(String id);
+
+ void setTitle(String title);
+
+ void setSummary(String summary);
+
+ void setUpdated(Date updated);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomSerializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomSerializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomSerializer.java
new file mode 100644
index 0000000..73def31
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomSerializer.java
@@ -0,0 +1,184 @@
+/*
+ * 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.client.core.data;
+
+import java.util.List;
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.entity.ContentType;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Link;
+import org.apache.olingo.client.api.utils.XMLUtils;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+public class AtomSerializer {
+
+ private final ODataClient client;
+
+ public AtomSerializer(final ODataClient client) {
+ this.client = client;
+ }
+
+ public <T extends AbstractPayloadObject> Element serialize(final T obj) throws ParserConfigurationException {
+ if (obj instanceof AtomEntryImpl) {
+ return entry((AtomEntryImpl) obj);
+ } else if (obj instanceof AtomFeedImpl) {
+ return feed((AtomFeedImpl) obj);
+ } else {
+ throw new IllegalArgumentException("Unsupported Atom object for standalone serialization: " + obj);
+ }
+ }
+
+ private void setLinks(final Element entry, final List<Link> links) throws ParserConfigurationException {
+ for (Link link : links) {
+ final Element linkElem = entry.getOwnerDocument().createElement(ODataConstants.ATOM_ELEM_LINK);
+
+ linkElem.setAttribute(ODataConstants.ATTR_REL, link.getRel());
+ linkElem.setAttribute(ODataConstants.ATTR_TITLE, link.getTitle());
+ linkElem.setAttribute(ODataConstants.ATTR_HREF, link.getHref());
+
+ if (StringUtils.isNotBlank(link.getType())) {
+ linkElem.setAttribute(ODataConstants.ATTR_TYPE, link.getType());
+ }
+
+ if (link.getInlineEntry() != null || link.getInlineFeed() != null) {
+ final Element inline = entry.getOwnerDocument().createElement(ODataConstants.ATOM_ELEM_INLINE);
+ linkElem.appendChild(inline);
+
+ if (link.getInlineEntry() != null) {
+ inline.appendChild(entry.getOwnerDocument().importNode(
+ entry((AtomEntryImpl) link.getInlineEntry()), true));
+ }
+ if (link.getInlineFeed() != null) {
+ inline.appendChild(entry.getOwnerDocument().importNode(
+ feed((AtomFeedImpl) link.getInlineFeed()), true));
+ }
+ }
+
+ entry.appendChild(linkElem);
+ }
+ }
+
+ private Element entry(final AtomEntryImpl entry) throws ParserConfigurationException {
+ final DocumentBuilder builder = XMLUtils.DOC_BUILDER_FACTORY.newDocumentBuilder();
+ final Document doc = builder.newDocument();
+
+ final Element entryElem = doc.createElement(ODataConstants.ATOM_ELEM_ENTRY);
+ entryElem.setAttribute(XMLConstants.XMLNS_ATTRIBUTE, ODataConstants.NS_ATOM);
+ entryElem.setAttribute(ODataConstants.XMLNS_METADATA,
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA));
+ entryElem.setAttribute(ODataConstants.XMLNS_DATASERVICES,
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_DATASERVICES));
+ entryElem.setAttribute(ODataConstants.XMLNS_GML, ODataConstants.NS_GML);
+ entryElem.setAttribute(ODataConstants.XMLNS_GEORSS, ODataConstants.NS_GEORSS);
+ if (entry.getBaseURI() != null) {
+ entryElem.setAttribute(ODataConstants.ATTR_XMLBASE, entry.getBaseURI().toASCIIString());
+ }
+ doc.appendChild(entryElem);
+
+ final Element category = doc.createElement(ODataConstants.ATOM_ELEM_CATEGORY);
+ category.setAttribute(ODataConstants.ATOM_ATTR_TERM, entry.getType());
+ category.setAttribute(ODataConstants.ATOM_ATTR_SCHEME,
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_SCHEME));
+ entryElem.appendChild(category);
+
+ if (StringUtils.isNotBlank(entry.getTitle())) {
+ final Element title = doc.createElement(ODataConstants.ATOM_ELEM_TITLE);
+ title.appendChild(doc.createTextNode(entry.getTitle()));
+ entryElem.appendChild(title);
+ }
+
+ if (StringUtils.isNotBlank(entry.getSummary())) {
+ final Element summary = doc.createElement(ODataConstants.ATOM_ELEM_SUMMARY);
+ summary.appendChild(doc.createTextNode(entry.getSummary()));
+ entryElem.appendChild(summary);
+ }
+
+ setLinks(entryElem, entry.getAssociationLinks());
+ setLinks(entryElem, entry.getNavigationLinks());
+ setLinks(entryElem, entry.getMediaEditLinks());
+
+ final Element content = doc.createElement(ODataConstants.ATOM_ELEM_CONTENT);
+ if (entry.isMediaEntry()) {
+ if (StringUtils.isNotBlank(entry.getMediaContentType())) {
+ content.setAttribute(ODataConstants.ATTR_TYPE, entry.getMediaContentType());
+ }
+ if (StringUtils.isNotBlank(entry.getMediaContentSource())) {
+ content.setAttribute(ODataConstants.ATOM_ATTR_SRC, entry.getMediaContentSource());
+ }
+ if (content.getAttributes().getLength() > 0) {
+ entryElem.appendChild(content);
+ }
+
+ if (entry.getMediaEntryProperties() != null) {
+ entryElem.appendChild(doc.importNode(entry.getMediaEntryProperties(), true));
+ }
+ } else {
+ content.setAttribute(ODataConstants.ATTR_TYPE, ContentType.APPLICATION_XML.getMimeType());
+ if (entry.getContent() != null) {
+ content.appendChild(doc.importNode(entry.getContent(), true));
+ }
+ entryElem.appendChild(content);
+ }
+
+ return entryElem;
+ }
+
+ private Element feed(final AtomFeedImpl feed) throws ParserConfigurationException {
+ final DocumentBuilder builder = XMLUtils.DOC_BUILDER_FACTORY.newDocumentBuilder();
+ final Document doc = builder.newDocument();
+
+ final Element feedElem = doc.createElement(ODataConstants.ATOM_ELEM_FEED);
+ feedElem.setAttribute(XMLConstants.XMLNS_ATTRIBUTE, ODataConstants.NS_ATOM);
+ feedElem.setAttribute(ODataConstants.XMLNS_METADATA,
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA));
+ feedElem.setAttribute(ODataConstants.XMLNS_DATASERVICES,
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_DATASERVICES));
+ feedElem.setAttribute(ODataConstants.XMLNS_GML, ODataConstants.NS_GML);
+ feedElem.setAttribute(ODataConstants.XMLNS_GEORSS, ODataConstants.NS_GEORSS);
+ if (feed.getBaseURI() != null) {
+ feedElem.setAttribute(ODataConstants.ATTR_XMLBASE, feed.getBaseURI().toASCIIString());
+ }
+ doc.appendChild(feedElem);
+
+ if (StringUtils.isNotBlank(feed.getTitle())) {
+ final Element title = doc.createElement(ODataConstants.ATOM_ELEM_TITLE);
+ title.appendChild(doc.createTextNode(feed.getTitle()));
+ feedElem.appendChild(title);
+ }
+
+ if (StringUtils.isNotBlank(feed.getSummary())) {
+ final Element summary = doc.createElement(ODataConstants.ATOM_ELEM_SUMMARY);
+ summary.appendChild(doc.createTextNode(feed.getSummary()));
+ feedElem.appendChild(summary);
+ }
+
+ for (Entry entry : feed.getEntries()) {
+ feedElem.appendChild(doc.importNode(entry((AtomEntryImpl) entry), true));
+ }
+
+ return feedElem;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/GeospatialJSONHandler.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/GeospatialJSONHandler.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/GeospatialJSONHandler.java
new file mode 100644
index 0000000..610f1a2
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/GeospatialJSONHandler.java
@@ -0,0 +1,412 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonNode;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import javax.xml.parsers.DocumentBuilder;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.domain.geospatial.Geospatial;
+import org.apache.olingo.client.api.utils.XMLUtils;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+final class GeospatialJSONHandler {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(GeospatialJSONHandler.class);
+
+ private GeospatialJSONHandler() {
+ // Empty private constructor for static utility classes
+ }
+
+ private static Element deserializePoint(final Document document, final Iterator<JsonNode> itor) {
+ final Element point = document.createElementNS(ODataConstants.NS_GML, ODataConstants.ELEM_POINT);
+
+ final Element ppos = document.createElementNS(ODataConstants.NS_GML, ODataConstants.ELEM_POS);
+ point.appendChild(ppos);
+ if (itor.hasNext()) {
+ ppos.appendChild(document.createTextNode(itor.next().asText() + " " + itor.next().asText()));
+ }
+
+ return point;
+ }
+
+ private static void appendPoses(final Element parent, final Document document, final Iterator<JsonNode> itor) {
+ while (itor.hasNext()) {
+ final Iterator<JsonNode> lineItor = itor.next().elements();
+ final Element pos = document.createElementNS(ODataConstants.NS_GML, ODataConstants.ELEM_POS);
+ parent.appendChild(pos);
+ pos.appendChild(document.createTextNode(lineItor.next().asText() + " " + lineItor.next().asText()));
+ }
+ }
+
+ private static Element deserializeLineString(final Document document, final Iterator<JsonNode> itor) {
+ final Element lineString = document.createElementNS(ODataConstants.NS_GML, ODataConstants.ELEM_LINESTRING);
+ if (!itor.hasNext()) {
+ lineString.appendChild(document.createElementNS(ODataConstants.NS_GML, ODataConstants.ELEM_POSLIST));
+ }
+
+ appendPoses(lineString, document, itor);
+
+ return lineString;
+ }
+
+ private static Element deserializePolygon(final Document document, final Iterator<JsonNode> itor) {
+ final Element polygon = document.createElementNS(ODataConstants.NS_GML, ODataConstants.ELEM_POLYGON);
+
+ if (itor.hasNext()) {
+ final Iterator<JsonNode> extItor = itor.next().elements();
+ final Element exterior = document.createElementNS(
+ ODataConstants.NS_GML, ODataConstants.ELEM_POLYGON_EXTERIOR);
+ polygon.appendChild(exterior);
+ final Element extLR = document.createElementNS(
+ ODataConstants.NS_GML, ODataConstants.ELEM_POLYGON_LINEARRING);
+ exterior.appendChild(extLR);
+
+ appendPoses(extLR, document, extItor);
+ }
+
+ if (itor.hasNext()) {
+ final Iterator<JsonNode> intItor = itor.next().elements();
+ final Element interior = document.createElementNS(
+ ODataConstants.NS_GML, ODataConstants.ELEM_POLYGON_INTERIOR);
+ polygon.appendChild(interior);
+ final Element intLR = document.createElementNS(
+ ODataConstants.NS_GML, ODataConstants.ELEM_POLYGON_LINEARRING);
+ interior.appendChild(intLR);
+
+ appendPoses(intLR, document, intItor);
+ }
+
+ return polygon;
+ }
+
+ public static void deserialize(final JsonNode node, final Element parent, final String type) {
+ final Iterator<JsonNode> cooItor = node.has(ODataConstants.JSON_COORDINATES)
+ ? node.get(ODataConstants.JSON_COORDINATES).elements()
+ : Collections.<JsonNode>emptyList().iterator();
+
+ Element root = null;
+ final ODataJClientEdmPrimitiveType edmSimpleType = ODataJClientEdmPrimitiveType.fromValue(type);
+ switch (edmSimpleType) {
+ case GeographyPoint:
+ case GeometryPoint:
+ root = deserializePoint(parent.getOwnerDocument(), cooItor);
+ break;
+
+ case GeographyMultiPoint:
+ case GeometryMultiPoint:
+ root = parent.getOwnerDocument().createElementNS(ODataConstants.NS_GML, ODataConstants.ELEM_MULTIPOINT);
+ if (cooItor.hasNext()) {
+ final Element pointMembers = parent.getOwnerDocument().createElementNS(
+ ODataConstants.NS_GML, ODataConstants.ELEM_POINTMEMBERS);
+ root.appendChild(pointMembers);
+ while (cooItor.hasNext()) {
+ final Iterator<JsonNode> mpItor = cooItor.next().elements();
+ pointMembers.appendChild(deserializePoint(parent.getOwnerDocument(), mpItor));
+ }
+ }
+ break;
+
+ case GeographyLineString:
+ case GeometryLineString:
+ root = deserializeLineString(parent.getOwnerDocument(), cooItor);
+ break;
+
+ case GeographyMultiLineString:
+ case GeometryMultiLineString:
+ root = parent.getOwnerDocument().createElementNS(
+ ODataConstants.NS_GML, ODataConstants.ELEM_MULTILINESTRING);
+ if (cooItor.hasNext()) {
+ final Element lineStringMembers = parent.getOwnerDocument().createElementNS(
+ ODataConstants.NS_GML, ODataConstants.ELEM_LINESTRINGMEMBERS);
+ root.appendChild(lineStringMembers);
+ while (cooItor.hasNext()) {
+ final Iterator<JsonNode> mlsItor = cooItor.next().elements();
+ lineStringMembers.appendChild(deserializeLineString(parent.getOwnerDocument(), mlsItor));
+ }
+ }
+ break;
+
+ case GeographyPolygon:
+ case GeometryPolygon:
+ root = deserializePolygon(parent.getOwnerDocument(), cooItor);
+ break;
+
+ case GeographyMultiPolygon:
+ case GeometryMultiPolygon:
+ root = parent.getOwnerDocument().createElementNS(
+ ODataConstants.NS_GML, ODataConstants.ELEM_MULTIPOLYGON);
+ if (cooItor.hasNext()) {
+ final Element surfaceMembers = parent.getOwnerDocument().createElementNS(
+ ODataConstants.NS_GML, ODataConstants.ELEM_SURFACEMEMBERS);
+ root.appendChild(surfaceMembers);
+ while (cooItor.hasNext()) {
+ final Iterator<JsonNode> mpItor = cooItor.next().elements();
+ surfaceMembers.appendChild(deserializePolygon(parent.getOwnerDocument(), mpItor));
+ }
+ }
+ break;
+
+ case GeographyCollection:
+ case GeometryCollection:
+ root = parent.getOwnerDocument().createElementNS(
+ ODataConstants.NS_GML, ODataConstants.ELEM_GEOCOLLECTION);
+ if (node.has(ODataConstants.JSON_GEOMETRIES)) {
+ final Iterator<JsonNode> geoItor = node.get(ODataConstants.JSON_GEOMETRIES).elements();
+ if (geoItor.hasNext()) {
+ final Element geometryMembers = parent.getOwnerDocument().createElementNS(
+ ODataConstants.NS_GML, ODataConstants.ELEM_GEOMEMBERS);
+ root.appendChild(geometryMembers);
+
+ while (geoItor.hasNext()) {
+ final JsonNode geo = geoItor.next();
+ final String collItemType = geo.get(ODataConstants.ATTR_TYPE).asText();
+ final String callAsType;
+ if (ODataJClientEdmPrimitiveType.GeographyCollection.name().equals(collItemType)
+ || ODataJClientEdmPrimitiveType.GeometryCollection.name().equals(collItemType)) {
+
+ callAsType = collItemType;
+ } else {
+ callAsType =
+ (edmSimpleType == ODataJClientEdmPrimitiveType.GeographyCollection ? "Geography" : "Geometry")
+ + collItemType;
+ }
+
+ deserialize(geo, geometryMembers, ODataJClientEdmPrimitiveType.namespace() + "." + callAsType);
+ }
+ }
+ }
+ break;
+
+ default:
+ }
+
+ if (root != null) {
+ parent.appendChild(root);
+ if (node.has(ODataConstants.JSON_CRS)) {
+ root.setAttribute(ODataConstants.ATTR_SRSNAME,
+ ODataConstants.JSON_GIS_URLPREFIX
+ + node.get(ODataConstants.JSON_CRS).get(ODataConstants.PROPERTIES).get(ODataConstants.NAME).
+ asText().split(":")[1]);
+ }
+ }
+ }
+
+ private static void serializeCrs(final JsonGenerator jgen, final Node node) throws IOException {
+ if (node.getAttributes().getNamedItem(ODataConstants.ATTR_SRSNAME) != null) {
+ final String srsName = node.getAttributes().getNamedItem(ODataConstants.ATTR_SRSNAME).getTextContent();
+ final int prefIdx = srsName.indexOf(ODataConstants.JSON_GIS_URLPREFIX);
+ final String crsValue = srsName.substring(prefIdx + ODataConstants.JSON_GIS_URLPREFIX.length());
+
+ jgen.writeObjectFieldStart(ODataConstants.JSON_CRS);
+ jgen.writeStringField(ODataConstants.ATTR_TYPE, ODataConstants.NAME);
+ jgen.writeObjectFieldStart(ODataConstants.PROPERTIES);
+ jgen.writeStringField(ODataConstants.NAME, "EPSG:" + crsValue);
+ jgen.writeEndObject();
+ jgen.writeEndObject();
+ }
+ }
+
+ private static void serializePoint(final JsonGenerator jgen, final Node node) throws IOException {
+ for (String coord : node.getTextContent().split(" ")) {
+ jgen.writeNumber(coord);
+ }
+ }
+
+ private static void serializeLineString(final JsonGenerator jgen, final Element node) throws IOException {
+ for (Element element : XMLUtils.getChildElements(node, ODataConstants.ELEM_POS)) {
+ jgen.writeStartArray();
+ serializePoint(jgen, element);
+ jgen.writeEndArray();
+ }
+ }
+
+ private static void serializePolygon(final JsonGenerator jgen, final Element node) throws IOException {
+ for (Element exterior : XMLUtils.getChildElements(node, ODataConstants.ELEM_POLYGON_EXTERIOR)) {
+ jgen.writeStartArray();
+ serializeLineString(jgen,
+ XMLUtils.getChildElements(exterior, ODataConstants.ELEM_POLYGON_LINEARRING).get(0));
+ jgen.writeEndArray();
+
+ }
+ for (Element interior : XMLUtils.getChildElements(node, ODataConstants.ELEM_POLYGON_INTERIOR)) {
+ jgen.writeStartArray();
+ serializeLineString(jgen,
+ XMLUtils.getChildElements(interior, ODataConstants.ELEM_POLYGON_LINEARRING).get(0));
+ jgen.writeEndArray();
+
+ }
+ }
+
+ public static void serialize(final ODataClient client,
+ final JsonGenerator jgen, final Element node, final String type) throws IOException {
+
+ final ODataJClientEdmPrimitiveType edmSimpleType = ODataJClientEdmPrimitiveType.fromValue(type);
+
+ if (edmSimpleType.equals(ODataJClientEdmPrimitiveType.GeographyCollection)
+ || edmSimpleType.equals(ODataJClientEdmPrimitiveType.GeometryCollection)) {
+
+ jgen.writeStringField(ODataConstants.ATTR_TYPE, ODataJClientEdmPrimitiveType.GeometryCollection.name());
+ } else {
+ final int yIdx = edmSimpleType.name().indexOf('y');
+ final String itemType = edmSimpleType.name().substring(yIdx + 1);
+ jgen.writeStringField(ODataConstants.ATTR_TYPE, itemType);
+ }
+
+ Element root = null;
+ switch (edmSimpleType) {
+ case GeographyPoint:
+ case GeometryPoint:
+ root = XMLUtils.getChildElements(node, ODataConstants.ELEM_POINT).get(0);
+
+ jgen.writeArrayFieldStart(ODataConstants.JSON_COORDINATES);
+ serializePoint(jgen, XMLUtils.getChildElements(root, ODataConstants.ELEM_POS).get(0));
+ jgen.writeEndArray();
+ break;
+
+ case GeographyMultiPoint:
+ case GeometryMultiPoint:
+ root = XMLUtils.getChildElements(node, ODataConstants.ELEM_MULTIPOINT).get(0);
+
+ jgen.writeArrayFieldStart(ODataConstants.JSON_COORDINATES);
+
+ final List<Element> pMembs = XMLUtils.getChildElements(root, ODataConstants.ELEM_POINTMEMBERS);
+ if (pMembs != null && !pMembs.isEmpty()) {
+ for (Element point : XMLUtils.getChildElements(pMembs.get(0), ODataConstants.ELEM_POINT)) {
+ jgen.writeStartArray();
+ serializePoint(jgen, XMLUtils.getChildElements(point, ODataConstants.ELEM_POS).get(0));
+ jgen.writeEndArray();
+ }
+ }
+
+ jgen.writeEndArray();
+ break;
+
+ case GeographyLineString:
+ case GeometryLineString:
+ root = XMLUtils.getChildElements(node, ODataConstants.ELEM_LINESTRING).get(0);
+
+ jgen.writeArrayFieldStart(ODataConstants.JSON_COORDINATES);
+ serializeLineString(jgen, root);
+ jgen.writeEndArray();
+ break;
+
+ case GeographyMultiLineString:
+ case GeometryMultiLineString:
+ root = XMLUtils.getChildElements(node, ODataConstants.ELEM_MULTILINESTRING).get(0);
+
+ jgen.writeArrayFieldStart(ODataConstants.JSON_COORDINATES);
+
+ final List<Element> lMembs = XMLUtils.getChildElements(root, ODataConstants.ELEM_LINESTRINGMEMBERS);
+ if (lMembs != null && !lMembs.isEmpty()) {
+ for (Element lineStr : XMLUtils.getChildElements(lMembs.get(0), ODataConstants.ELEM_LINESTRING)) {
+ jgen.writeStartArray();
+ serializeLineString(jgen, lineStr);
+ jgen.writeEndArray();
+ }
+ }
+
+ jgen.writeEndArray();
+ break;
+
+ case GeographyPolygon:
+ case GeometryPolygon:
+ root = XMLUtils.getChildElements(node, ODataConstants.ELEM_POLYGON).get(0);
+
+ jgen.writeArrayFieldStart(ODataConstants.JSON_COORDINATES);
+ serializePolygon(jgen, root);
+ jgen.writeEndArray();
+ break;
+
+ case GeographyMultiPolygon:
+ case GeometryMultiPolygon:
+ root = XMLUtils.getChildElements(node, ODataConstants.ELEM_MULTIPOLYGON).get(0);
+
+ jgen.writeArrayFieldStart(ODataConstants.JSON_COORDINATES);
+
+ final List<Element> mpMembs = XMLUtils.getChildElements(root, ODataConstants.ELEM_SURFACEMEMBERS);
+ if (mpMembs != null & !mpMembs.isEmpty()) {
+ for (Element pol : XMLUtils.getChildElements(mpMembs.get(0), ODataConstants.ELEM_POLYGON)) {
+ jgen.writeStartArray();
+ serializePolygon(jgen, pol);
+ jgen.writeEndArray();
+ }
+ }
+
+ jgen.writeEndArray();
+ break;
+
+ case GeographyCollection:
+ case GeometryCollection:
+ root = XMLUtils.getChildElements(node, ODataConstants.ELEM_GEOCOLLECTION).get(0);
+
+ final List<Element> cMembs = XMLUtils.getChildElements(root, ODataConstants.ELEM_GEOMEMBERS);
+ if (cMembs != null && !cMembs.isEmpty()) {
+ jgen.writeArrayFieldStart(ODataConstants.JSON_GEOMETRIES);
+
+ for (Node geom : XMLUtils.getChildNodes(cMembs.get(0), Node.ELEMENT_NODE)) {
+ try {
+ final DocumentBuilder builder = XMLUtils.DOC_BUILDER_FACTORY.newDocumentBuilder();
+ final Document doc = builder.newDocument();
+
+ final Element fakeParent = doc.createElementNS(
+ client.getServiceVersion().getNamespaceMap().
+ get(ODataServiceVersion.NS_DATASERVICES),
+ ODataConstants.PREFIX_DATASERVICES + "fake");
+ fakeParent.appendChild(doc.importNode(geom, true));
+
+ final ODataJClientEdmPrimitiveType callAsType = XMLUtils.simpleTypeForNode(
+ edmSimpleType == ODataJClientEdmPrimitiveType.GeographyCollection
+ ? Geospatial.Dimension.GEOGRAPHY : Geospatial.Dimension.GEOMETRY,
+ geom);
+
+ jgen.writeStartObject();
+ serialize(client, jgen, fakeParent, callAsType.toString());
+ jgen.writeEndObject();
+ } catch (Exception e) {
+ LOG.warn("While serializing {}", XMLUtils.getSimpleName(geom), e);
+ }
+ }
+
+ jgen.writeEndArray();
+ }
+ break;
+
+ default:
+ }
+
+ if (root != null) {
+ serializeCrs(jgen, root);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONDOMTreeUtils.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONDOMTreeUtils.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONDOMTreeUtils.java
new file mode 100644
index 0000000..bfe36ff
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONDOMTreeUtils.java
@@ -0,0 +1,260 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonNode;
+import java.io.IOException;
+import java.util.Iterator;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.utils.XMLUtils;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * DOM tree utilities class for JSON.
+ */
+final class JSONDOMTreeUtils {
+
+ private JSONDOMTreeUtils() {
+ // Empty private constructor for static utility classes
+ }
+
+ /**
+ * Recursively builds DOM content out of JSON subtree rooted at given node.
+ *
+ * @param client OData client.
+ * @param document root of the DOM document being built
+ * @param parent parent of the nodes being generated during this step
+ * @param node JSON node to be used as source for DOM elements
+ */
+ public static void buildSubtree(final ODataClient client, final Element parent, final JsonNode node) {
+ final Iterator<String> fieldNameItor = node.fieldNames();
+ final Iterator<JsonNode> nodeItor = node.elements();
+ while (nodeItor.hasNext()) {
+ final JsonNode child = nodeItor.next();
+ final String name = fieldNameItor.hasNext() ? fieldNameItor.next() : "";
+
+ // no name? array item
+ if (name.isEmpty()) {
+ final Element element = parent.getOwnerDocument().createElementNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_DATASERVICES),
+ ODataConstants.PREFIX_DATASERVICES + ODataConstants.ELEM_ELEMENT);
+ parent.appendChild(element);
+
+ if (child.isValueNode()) {
+ if (child.isNull()) {
+ element.setAttributeNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA),
+ ODataConstants.ATTR_NULL, Boolean.toString(true));
+ } else {
+ element.appendChild(parent.getOwnerDocument().createTextNode(child.asText()));
+ }
+ }
+
+ if (child.isContainerNode()) {
+ buildSubtree(client, element, child);
+ }
+ } else if (!name.contains("@") && !ODataConstants.JSON_TYPE.equals(name)) {
+ final Element property = parent.getOwnerDocument().createElementNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_DATASERVICES),
+ ODataConstants.PREFIX_DATASERVICES + name);
+ parent.appendChild(property);
+
+ boolean typeSet = false;
+ if (node.hasNonNull(name + "@" + ODataConstants.JSON_TYPE)) {
+ property.setAttributeNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA),
+ ODataConstants.ATTR_M_TYPE,
+ node.get(name + "@" + ODataConstants.JSON_TYPE).textValue());
+ typeSet = true;
+ }
+
+ if (child.isNull()) {
+ property.setAttributeNS(client.getServiceVersion().getNamespaceMap().
+ get(ODataServiceVersion.NS_METADATA),
+ ODataConstants.ATTR_NULL, Boolean.toString(true));
+ } else if (child.isValueNode()) {
+ if (!typeSet) {
+ if (child.isInt()) {
+ property.setAttributeNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA),
+ ODataConstants.ATTR_M_TYPE, ODataJClientEdmPrimitiveType.Int32.toString());
+ }
+ if (child.isLong()) {
+ property.setAttributeNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA),
+ ODataConstants.ATTR_M_TYPE, ODataJClientEdmPrimitiveType.Int64.toString());
+ }
+ if (child.isBigDecimal()) {
+ property.setAttributeNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA),
+ ODataConstants.ATTR_M_TYPE, ODataJClientEdmPrimitiveType.Decimal.toString());
+ }
+ if (child.isDouble()) {
+ property.setAttributeNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA),
+ ODataConstants.ATTR_M_TYPE, ODataJClientEdmPrimitiveType.Double.toString());
+ }
+ if (child.isBoolean()) {
+ property.setAttributeNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA),
+ ODataConstants.ATTR_M_TYPE, ODataJClientEdmPrimitiveType.Boolean.toString());
+ }
+ if (child.isTextual()) {
+ property.setAttributeNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA),
+ ODataConstants.ATTR_M_TYPE, ODataJClientEdmPrimitiveType.String.toString());
+ }
+ }
+
+ property.appendChild(parent.getOwnerDocument().createTextNode(child.asText()));
+ } else if (child.isContainerNode()) {
+ if (!typeSet && child.hasNonNull(ODataConstants.JSON_TYPE)) {
+ property.
+ setAttributeNS(client.getServiceVersion().getNamespaceMap().
+ get(ODataServiceVersion.NS_METADATA),
+ ODataConstants.ATTR_M_TYPE,
+ child.get(ODataConstants.JSON_TYPE).textValue());
+ }
+
+ final String type = property.getAttribute(ODataConstants.ATTR_M_TYPE);
+ if (StringUtils.isNotBlank(type) && ODataJClientEdmPrimitiveType.isGeospatial(type)) {
+ if (ODataJClientEdmPrimitiveType.Geography.toString().equals(type)
+ || ODataJClientEdmPrimitiveType.Geometry.toString().equals(type)) {
+
+ final String geoType = child.get(ODataConstants.ATTR_TYPE).textValue();
+ property.setAttributeNS(client.getServiceVersion().getNamespaceMap().get(
+ ODataServiceVersion.NS_METADATA), ODataConstants.ATTR_M_TYPE,
+ geoType.startsWith("Geo")
+ ? ODataJClientEdmPrimitiveType.namespace() + "." + geoType
+ : type + geoType);
+ }
+
+ if (child.has(ODataConstants.JSON_COORDINATES) || child.has(ODataConstants.JSON_GEOMETRIES)) {
+ GeospatialJSONHandler.deserialize(
+ child, property, property.getAttribute(ODataConstants.ATTR_M_TYPE));
+ }
+ } else {
+ buildSubtree(client, property, child);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Serializes DOM content as JSON.
+ *
+ * @param client OData client.
+ * @param jgen JSON generator.
+ * @param content content.
+ * @throws IOException in case of write error.
+ */
+ public static void writeSubtree(final ODataClient client, final JsonGenerator jgen, final Node content)
+ throws IOException {
+
+ writeSubtree(client, jgen, content, false);
+ }
+
+ /**
+ * Serializes DOM content as JSON.
+ *
+ * @param client OData client.
+ * @param jgen JSON generator.
+ * @param content content.
+ * @param propType whether to output type information in the way needed for property values or not.
+ * @throws IOException in case of write error.
+ */
+ public static void writeSubtree(
+ final ODataClient client, final JsonGenerator jgen, final Node content, final boolean propType)
+ throws IOException {
+
+ for (Node child : XMLUtils.getChildNodes(content, Node.ELEMENT_NODE)) {
+ final String childName = XMLUtils.getSimpleName(child);
+
+ final Node typeAttr = child.getAttributes().getNamedItem(ODataConstants.ATTR_M_TYPE);
+ if (typeAttr != null && ODataJClientEdmPrimitiveType.isGeospatial(typeAttr.getTextContent())) {
+ jgen.writeStringField(propType ? ODataConstants.JSON_TYPE : childName + "@" + ODataConstants.JSON_TYPE,
+ typeAttr.getTextContent());
+
+ jgen.writeObjectFieldStart(childName);
+ GeospatialJSONHandler.serialize(client, jgen, (Element) child, typeAttr.getTextContent());
+ jgen.writeEndObject();
+ } else if (XMLUtils.hasOnlyTextChildNodes(child)) {
+ if (child.hasChildNodes()) {
+ final String out;
+ if (typeAttr == null) {
+ out = child.getChildNodes().item(0).getNodeValue();
+ } else {
+ final ODataJClientEdmPrimitiveType type = ODataJClientEdmPrimitiveType.fromValue(typeAttr.getTextContent());
+ final ODataPrimitiveValue value = client.getPrimitiveValueBuilder().setType(type).
+ setText(child.getChildNodes().item(0).getNodeValue()).build();
+ out = value.toString();
+
+ jgen.writeStringField(childName + "@" + ODataConstants.JSON_TYPE, type.toString());
+ }
+ jgen.writeStringField(childName, out);
+ } else {
+ if (child.getAttributes().getNamedItem(ODataConstants.ATTR_NULL) == null) {
+ if (typeAttr != null && ODataJClientEdmPrimitiveType.String.toString().equals(typeAttr.getTextContent())) {
+ jgen.writeStringField(childName + "@" + ODataConstants.JSON_TYPE, typeAttr.getTextContent());
+ jgen.writeStringField(childName, StringUtils.EMPTY);
+ } else {
+ jgen.writeArrayFieldStart(childName);
+ jgen.writeEndArray();
+ }
+ } else {
+ jgen.writeNullField(childName);
+ }
+ }
+ } else {
+ if (XMLUtils.hasElementsChildNode(child)) {
+ jgen.writeArrayFieldStart(childName);
+
+ for (Node nephew : XMLUtils.getChildNodes(child, Node.ELEMENT_NODE)) {
+ if (XMLUtils.hasOnlyTextChildNodes(nephew)) {
+ jgen.writeString(nephew.getChildNodes().item(0).getNodeValue());
+ } else {
+ jgen.writeStartObject();
+ writeSubtree(client, jgen, nephew);
+ jgen.writeEndObject();
+ }
+ }
+
+ jgen.writeEndArray();
+ } else {
+ jgen.writeObjectFieldStart(childName);
+ if (typeAttr != null) {
+ jgen.writeStringField(ODataConstants.JSON_TYPE, typeAttr.getTextContent());
+ }
+
+ writeSubtree(client, jgen, child);
+
+ jgen.writeEndObject();
+ }
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntryDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntryDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntryDeserializer.java
new file mode 100644
index 0000000..0cfac43
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntryDeserializer.java
@@ -0,0 +1,240 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.ObjectCodec;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import java.io.IOException;
+import java.net.URI;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.data.LinkType;
+import org.apache.olingo.client.api.utils.XMLUtils;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Reads JSON string into an entry.
+ * <br/>
+ * If metadata information is available, the corresponding entry fields and content will be populated.
+ */
+public class JSONEntryDeserializer extends ODataJacksonDeserializer<JSONEntryImpl> {
+
+ private String getTitle(final Map.Entry<String, JsonNode> entry) {
+ return entry.getKey().substring(0, entry.getKey().indexOf('@'));
+ }
+
+ private String setInline(final String name, final String suffix, final ObjectNode tree,
+ final ObjectCodec codec, final LinkImpl link) throws IOException {
+
+ final String entryNamePrefix = name.substring(0, name.indexOf(suffix));
+ if (tree.has(entryNamePrefix)) {
+ final JsonNode inline = tree.path(entryNamePrefix);
+
+ if (inline instanceof ObjectNode) {
+ final JsonParser inlineParser = inline.traverse();
+ inlineParser.setCodec(codec);
+ link.setInlineEntry(inlineParser.readValuesAs(JSONEntryImpl.class).next());
+ }
+
+ if (inline instanceof ArrayNode) {
+ final JSONFeedImpl feed = new JSONFeedImpl();
+ final Iterator<JsonNode> entries = ((ArrayNode) inline).elements();
+ while (entries.hasNext()) {
+ final JsonParser inlineParser = entries.next().traverse();
+ inlineParser.setCodec(codec);
+ feed.getEntries().add(inlineParser.readValuesAs(JSONEntryImpl.class).next());
+ }
+
+ link.setInlineFeed(feed);
+ }
+ }
+ return entryNamePrefix;
+ }
+
+ @Override
+ protected JSONEntryImpl doDeserialize(final JsonParser parser, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final ObjectNode tree = (ObjectNode) parser.getCodec().readTree(parser);
+
+ if (tree.has(ODataConstants.JSON_VALUE) && tree.get(ODataConstants.JSON_VALUE).isArray()) {
+ throw new JsonParseException("Expected OData Entity, found EntitySet", parser.getCurrentLocation());
+ }
+
+ final boolean isMediaEntry =
+ tree.hasNonNull(ODataConstants.JSON_MEDIAREAD_LINK)
+ && tree.hasNonNull(ODataConstants.JSON_MEDIA_CONTENT_TYPE);
+
+ final JSONEntryImpl entry = new JSONEntryImpl();
+
+ if (tree.hasNonNull(ODataConstants.JSON_METADATA)) {
+ entry.setMetadata(URI.create(tree.get(ODataConstants.JSON_METADATA).textValue()));
+ tree.remove(ODataConstants.JSON_METADATA);
+ }
+
+ if (tree.hasNonNull(ODataConstants.JSON_MEDIA_ETAG)) {
+ entry.setMediaETag(tree.get(ODataConstants.JSON_MEDIA_ETAG).textValue());
+ tree.remove(ODataConstants.JSON_MEDIA_ETAG);
+ }
+
+ if (tree.hasNonNull(ODataConstants.JSON_ETAG)) {
+ entry.setETag(tree.get(ODataConstants.JSON_ETAG).textValue());
+ tree.remove(ODataConstants.JSON_ETAG);
+ }
+
+ if (tree.hasNonNull(ODataConstants.JSON_TYPE)) {
+ entry.setType(tree.get(ODataConstants.JSON_TYPE).textValue());
+ tree.remove(ODataConstants.JSON_TYPE);
+ }
+
+ if (tree.hasNonNull(ODataConstants.JSON_ID)) {
+ entry.setId(tree.get(ODataConstants.JSON_ID).textValue());
+ tree.remove(ODataConstants.JSON_ID);
+ }
+
+ if (tree.hasNonNull(ODataConstants.JSON_READ_LINK)) {
+ final LinkImpl link = new LinkImpl();
+ link.setRel(ODataConstants.SELF_LINK_REL);
+ link.setHref(tree.get(ODataConstants.JSON_READ_LINK).textValue());
+ entry.setSelfLink(link);
+
+ tree.remove(ODataConstants.JSON_READ_LINK);
+ }
+
+ if (tree.hasNonNull(ODataConstants.JSON_EDIT_LINK)) {
+ final LinkImpl link = new LinkImpl();
+ link.setRel(ODataConstants.EDIT_LINK_REL);
+ link.setHref(tree.get(ODataConstants.JSON_EDIT_LINK).textValue());
+ entry.setEditLink(link);
+
+ tree.remove(ODataConstants.JSON_EDIT_LINK);
+ }
+
+ if (tree.hasNonNull(ODataConstants.JSON_MEDIAREAD_LINK)) {
+ entry.setMediaContentSource(tree.get(ODataConstants.JSON_MEDIAREAD_LINK).textValue());
+ tree.remove(ODataConstants.JSON_MEDIAREAD_LINK);
+ }
+ if (tree.hasNonNull(ODataConstants.JSON_MEDIAEDIT_LINK)) {
+ /*final LinkImpl link = new LinkImpl();
+ link.setHref(tree.get(ODataConstants.JSON_MEDIAEDIT_LINK).textValue());
+ entry.getMediaEditLinks().add(link);*/
+
+ tree.remove(ODataConstants.JSON_MEDIAEDIT_LINK);
+ }
+ if (tree.hasNonNull(ODataConstants.JSON_MEDIA_CONTENT_TYPE)) {
+ entry.setMediaContentType(tree.get(ODataConstants.JSON_MEDIA_CONTENT_TYPE).textValue());
+ tree.remove(ODataConstants.JSON_MEDIA_CONTENT_TYPE);
+ }
+
+ final Set<String> toRemove = new HashSet<String>();
+ final Iterator<Map.Entry<String, JsonNode>> itor = tree.fields();
+ while (itor.hasNext()) {
+ final Map.Entry<String, JsonNode> field = itor.next();
+
+ if (field.getKey().endsWith(ODataConstants.JSON_NAVIGATION_LINK_SUFFIX)) {
+ final LinkImpl link = new LinkImpl();
+ link.setTitle(getTitle(field));
+ link.setRel(client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NAVIGATION_LINK_REL)
+ + getTitle(field));
+ if (field.getValue().isValueNode()) {
+ link.setHref(field.getValue().textValue());
+ link.setType(LinkType.ENTITY_NAVIGATION.toString());
+ }
+ // NOTE: this should be expected to happen, but it isn't - at least up to OData 4.0
+ /* if (field.getValue().isArray()) {
+ * link.setHref(field.getValue().asText());
+ * link.setType(LinkType.ENTITY_SET_NAVIGATION.toString());
+ * } */
+ entry.getNavigationLinks().add(link);
+
+ toRemove.add(field.getKey());
+ toRemove.add(setInline(field.getKey(),
+ ODataConstants.JSON_NAVIGATION_LINK_SUFFIX, tree, parser.getCodec(), link));
+ } else if (field.getKey().endsWith(ODataConstants.JSON_ASSOCIATION_LINK_SUFFIX)) {
+ final LinkImpl link = new LinkImpl();
+ link.setTitle(getTitle(field));
+ link.setRel(client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.ASSOCIATION_LINK_REL)
+ + getTitle(field));
+ link.setHref(field.getValue().textValue());
+ link.setType(LinkType.ASSOCIATION.toString());
+ entry.getAssociationLinks().add(link);
+
+ toRemove.add(field.getKey());
+ } else if (field.getKey().endsWith(ODataConstants.JSON_MEDIAEDIT_LINK_SUFFIX)) {
+ final LinkImpl link = new LinkImpl();
+ link.setTitle(getTitle(field));
+ link.setRel(client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.MEDIA_EDIT_LINK_REL)
+ + getTitle(field));
+ link.setHref(field.getValue().textValue());
+ link.setType(LinkType.MEDIA_EDIT.toString());
+ entry.getMediaEditLinks().add(link);
+
+ toRemove.add(field.getKey());
+ toRemove.add(setInline(field.getKey(),
+ ODataConstants.JSON_MEDIAEDIT_LINK_SUFFIX, tree, parser.getCodec(), link));
+ } else if (field.getKey().charAt(0) == '#') {
+ final OperationImpl operation = new OperationImpl();
+ operation.setMetadataAnchor(field.getKey());
+
+ final ObjectNode opNode = (ObjectNode) tree.get(field.getKey());
+ operation.setTitle(opNode.get(ODataConstants.ATTR_TITLE).asText());
+ operation.setTarget(URI.create(opNode.get(ODataConstants.ATTR_TARGET).asText()));
+
+ entry.getOperations().add(operation);
+
+ toRemove.add(field.getKey());
+ }
+ }
+ tree.remove(toRemove);
+
+ try {
+ final DocumentBuilder builder = XMLUtils.DOC_BUILDER_FACTORY.newDocumentBuilder();
+ final Document document = builder.newDocument();
+
+ final Element properties = document.createElementNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA),
+ ODataConstants.ELEM_PROPERTIES);
+
+ JSONDOMTreeUtils.buildSubtree(client, properties, tree);
+
+ if (isMediaEntry) {
+ entry.setMediaEntryProperties(properties);
+ } else {
+ entry.setContent(properties);
+ }
+ } catch (ParserConfigurationException e) {
+ throw new JsonParseException("Cannot build entry content", parser.getCurrentLocation(), e);
+ }
+
+ return entry;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntryImpl.java
new file mode 100644
index 0000000..3b7aeda
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntryImpl.java
@@ -0,0 +1,89 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import java.net.URI;
+import org.apache.olingo.client.api.uri.SegmentType;
+
+/**
+ * A single entry, represented via JSON.
+ */
+@JsonSerialize(using = JSONEntrySerializer.class)
+@JsonDeserialize(using = JSONEntryDeserializer.class)
+public class JSONEntryImpl extends AbstractEntry {
+
+ private static final long serialVersionUID = -5275365545400797758L;
+
+ private URI metadata;
+
+ private String mediaETag;
+
+ @JsonIgnore
+ @Override
+ public URI getBaseURI() {
+ URI baseURI = null;
+ if (metadata != null) {
+ final String metadataURI = getMetadata().toASCIIString();
+ baseURI = URI.create(metadataURI.substring(0, metadataURI.indexOf(SegmentType.METADATA.getValue())));
+ }
+
+ return baseURI;
+ }
+
+ /**
+ * Gets the metadata URI.
+ *
+ * @return the metadata URI
+ */
+ public URI getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the metadata URI.
+ *
+ * @param metadata metadata URI.
+ */
+ public void setMetadata(final URI metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * The odata.mediaEtag annotation MAY be included; its value MUST be the ETag of the binary stream represented by this
+ * media entity or named stream property.
+ *
+ * @return odata.mediaEtag annotation value.
+ */
+ public String getMediaETag() {
+ return mediaETag;
+ }
+
+ /**
+ * The odata.mediaEtag annotation MAY be included; its value MUST be the ETag of the binary stream represented by this
+ * media entity or named stream property.
+ *
+ * @param eTag odata.mediaEtag annotation value.
+ */
+ public void setMediaETag(final String eTag) {
+ this.mediaETag = eTag;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntrySerializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntrySerializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntrySerializer.java
new file mode 100644
index 0000000..518ff55
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntrySerializer.java
@@ -0,0 +1,128 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.data.Link;
+import org.apache.olingo.client.api.data.LinkType;
+
+/**
+ * Writes out JSON string from an entry.
+ */
+public class JSONEntrySerializer extends ODataJacksonSerializer<JSONEntryImpl> {
+
+ @Override
+ protected void doSerialize(final JSONEntryImpl entry, final JsonGenerator jgen, final SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+
+ jgen.writeStartObject();
+
+ if (entry.getMetadata() != null) {
+ jgen.writeStringField(ODataConstants.JSON_METADATA, entry.getMetadata().toASCIIString());
+ }
+ if (StringUtils.isNotBlank(entry.getType())) {
+ jgen.writeStringField(ODataConstants.JSON_TYPE, entry.getType());
+ }
+ if (entry.getId() != null) {
+ jgen.writeStringField(ODataConstants.JSON_ID, entry.getId());
+ }
+
+ if (entry.getSelfLink() != null) {
+ jgen.writeStringField(ODataConstants.JSON_READ_LINK, entry.getSelfLink().getHref());
+ }
+
+ if (entry.getEditLink() != null) {
+ jgen.writeStringField(ODataConstants.JSON_EDIT_LINK, entry.getEditLink().getHref());
+ }
+
+ if (entry.getMediaContentSource() != null) {
+ jgen.writeStringField(ODataConstants.JSON_MEDIAREAD_LINK, entry.getMediaContentSource());
+ }
+ if (entry.getMediaContentType() != null) {
+ jgen.writeStringField(ODataConstants.JSON_MEDIA_CONTENT_TYPE, entry.getMediaContentType());
+ }
+
+ final Map<String, List<String>> entitySetLinks = new HashMap<String, List<String>>();
+
+ for (Link link : entry.getNavigationLinks()) {
+ if (link.getInlineEntry() != null) {
+ jgen.writeObjectField(link.getTitle(), link.getInlineEntry());
+ } else if (link.getInlineFeed() != null) {
+ jgen.writeObjectField(link.getTitle(), link.getInlineFeed());
+ } else {
+ LinkType type = null;
+ try {
+ type = LinkType.fromString(client, link.getRel(), link.getType());
+ } catch (IllegalArgumentException e) {
+ // ignore
+ }
+
+ if (type == LinkType.ENTITY_SET_NAVIGATION) {
+ final List<String> uris;
+ if (entitySetLinks.containsKey(link.getTitle())) {
+ uris = entitySetLinks.get(link.getTitle());
+ } else {
+ uris = new ArrayList<String>();
+ entitySetLinks.put(link.getTitle(), uris);
+ }
+ uris.add(link.getHref());
+ } else {
+ jgen.writeStringField(link.getTitle() + ODataConstants.JSON_BIND_LINK_SUFFIX, link.getHref());
+ }
+ }
+ }
+ for (Map.Entry<String, List<String>> entitySetLink : entitySetLinks.entrySet()) {
+ jgen.writeArrayFieldStart(entitySetLink.getKey() + ODataConstants.JSON_BIND_LINK_SUFFIX);
+ for (String uri : entitySetLink.getValue()) {
+ jgen.writeString(uri);
+ }
+ jgen.writeEndArray();
+ }
+
+ for (Link link : entry.getMediaEditLinks()) {
+ if (link.getTitle() == null) {
+ jgen.writeStringField(ODataConstants.JSON_MEDIAEDIT_LINK, link.getHref());
+ }
+
+ if (link.getInlineEntry() != null) {
+ jgen.writeObjectField(link.getTitle(), link.getInlineEntry());
+ }
+ if (link.getInlineFeed() != null) {
+ jgen.writeObjectField(link.getTitle(), link.getInlineFeed());
+ }
+ }
+
+ if (entry.getMediaEntryProperties() == null) {
+ JSONDOMTreeUtils.writeSubtree(client, jgen, entry.getContent());
+ } else {
+ JSONDOMTreeUtils.writeSubtree(client, jgen, entry.getMediaEntryProperties());
+ }
+
+ jgen.writeEndObject();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorBundle.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorBundle.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorBundle.java
new file mode 100644
index 0000000..a73fb05
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorBundle.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.data;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * This class represents a bundle for an OData error returned as JSON.
+ */
+public class JSONErrorBundle extends AbstractPayloadObject {
+
+ private static final long serialVersionUID = -4784910226259754450L;
+
+ @JsonProperty("odata.error")
+ private JSONErrorImpl error;
+
+ /**
+ * Gets error.
+ *
+ * @return OData error object.
+ */
+ public JSONErrorImpl getError() {
+ return error;
+ }
+
+ /**
+ * Sets error.
+ *
+ * @param error OData error object.
+ */
+ public void setError(final JSONErrorImpl error) {
+ this.error = error;
+ }
+}
[11/11] git commit: [OLINGO-200] V3 (de)serializers + unit tests
merged
Posted by il...@apache.org.
[OLINGO-200] V3 (de)serializers + unit tests merged
Project: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/commit/78c3eaa4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/tree/78c3eaa4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/diff/78c3eaa4
Branch: refs/heads/olingo200
Commit: 78c3eaa4f530b87488112cf09f56567d8da2a8a9
Parents: fe0b463
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Mar 11 13:52:07 2014 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Mar 11 13:52:07 2014 +0100
----------------------------------------------------------------------
lib/client-api/pom.xml | 5 +
.../apache/olingo/client/api/ODataClient.java | 13 +-
.../apache/olingo/client/api/ODataError.java | 67 --
.../apache/olingo/client/api/data/Entry.java | 194 ++++
.../apache/olingo/client/api/data/Error.java | 67 ++
.../org/apache/olingo/client/api/data/Feed.java | 61 ++
.../org/apache/olingo/client/api/data/Link.java | 107 ++
.../olingo/client/api/data/LinkCollection.java | 52 +
.../apache/olingo/client/api/data/LinkType.java | 94 ++
.../olingo/client/api/data/Operation.java | 36 +
.../api/deserializer/AnnotationProperty.java | 24 -
.../api/deserializer/ClientException.java | 36 -
.../client/api/deserializer/ComplexValue.java | 35 -
.../olingo/client/api/deserializer/Entity.java | 59 -
.../client/api/deserializer/EntitySet.java | 34 -
.../api/deserializer/NavigationProperty.java | 27 -
.../client/api/deserializer/Property.java | 24 -
.../olingo/client/api/deserializer/Reader.java | 30 -
.../api/deserializer/StructuralProperty.java | 30 -
.../olingo/client/api/deserializer/Value.java | 28 -
.../olingo/client/api/domain/EdmSimpleType.java | 289 -----
.../olingo/client/api/domain/ODataEntity.java | 317 ++++++
.../client/api/domain/ODataEntitySet.java | 121 +++
.../client/api/domain/ODataGeospatialValue.java | 6 +-
.../client/api/domain/ODataInlineEntity.java | 73 ++
.../client/api/domain/ODataInlineEntitySet.java | 75 ++
.../olingo/client/api/domain/ODataItem.java | 111 ++
.../domain/ODataJClientEdmPrimitiveType.java | 290 +++++
.../client/api/domain/ODataJClientEdmType.java | 248 +++++
.../olingo/client/api/domain/ODataLink.java | 110 ++
.../client/api/domain/ODataLinkCollection.java | 100 ++
.../client/api/domain/ODataObjectFactory.java | 218 ++++
.../client/api/domain/ODataPrimitiveValue.java | 14 +-
.../olingo/client/api/domain/ODataProperty.java | 6 +-
.../client/api/domain/ODataTimestamp.java | 8 +-
.../api/domain/geospatial/Geospatial.java | 4 +-
.../domain/geospatial/GeospatialCollection.java | 8 +-
.../api/domain/geospatial/LineString.java | 8 +-
.../api/domain/geospatial/MultiLineString.java | 8 +-
.../api/domain/geospatial/MultiPoint.java | 8 +-
.../api/domain/geospatial/MultiPolygon.java | 8 +-
.../client/api/domain/geospatial/Point.java | 8 +-
.../client/api/domain/geospatial/Polygon.java | 8 +-
.../olingo/client/api/op/ODataBinder.java | 97 +-
.../olingo/client/api/op/ODataDeserializer.java | 52 +-
.../olingo/client/api/op/ODataReader.java | 24 +-
.../olingo/client/api/op/ODataSerializer.java | 159 +--
.../client/api/op/ODataV3Deserializer.java | 8 +
.../olingo/client/api/op/ODataWriter.java | 94 ++
.../olingo/client/api/utils/URIUtils.java | 171 +++
.../olingo/client/api/utils/XMLUtils.java | 34 +-
.../olingo/client/core/AbstractODataClient.java | 20 +
.../olingo/client/core/ODataV3ClientImpl.java | 12 -
.../olingo/client/core/ODataV4ClientImpl.java | 12 -
.../olingo/client/core/data/AbstractEntry.java | 179 ++++
.../client/core/data/AbstractPayloadObject.java | 48 +
.../client/core/data/AtomDeserializer.java | 217 ++++
.../olingo/client/core/data/AtomEntryImpl.java | 120 +++
.../olingo/client/core/data/AtomFeedImpl.java | 122 +++
.../olingo/client/core/data/AtomObject.java | 41 +
.../olingo/client/core/data/AtomSerializer.java | 184 ++++
.../client/core/data/GeospatialJSONHandler.java | 412 +++++++
.../client/core/data/JSONDOMTreeUtils.java | 260 +++++
.../client/core/data/JSONEntryDeserializer.java | 240 +++++
.../olingo/client/core/data/JSONEntryImpl.java | 89 ++
.../client/core/data/JSONEntrySerializer.java | 128 +++
.../client/core/data/JSONErrorBundle.java | 50 +
.../olingo/client/core/data/JSONErrorImpl.java | 237 ++++
.../client/core/data/JSONFeedDeserializer.java | 64 ++
.../olingo/client/core/data/JSONFeedImpl.java | 99 ++
.../core/data/JSONLinkCollectionImpl.java | 117 ++
.../core/data/JSONPropertyDeserializer.java | 122 +++
.../client/core/data/JSONPropertyImpl.java | 74 ++
.../core/data/JSONPropertySerializer.java | 80 ++
.../olingo/client/core/data/LinkImpl.java | 100 ++
.../core/data/ODataEntitySetIterator.java | 309 ++++++
.../olingo/client/core/data/OperationImpl.java | 97 ++
.../olingo/client/core/data/XMLErrorImpl.java | 213 ++++
.../client/core/data/XMLLinkCollectionImpl.java | 70 ++
.../deserializer/AnnotationPropertyImpl.java | 53 -
.../core/deserializer/ComplexValueImpl.java | 82 --
.../client/core/deserializer/EntityImpl.java | 126 ---
.../core/deserializer/EntitySetBuilder.java | 72 --
.../client/core/deserializer/EntitySetImpl.java | 120 ---
.../client/core/deserializer/JsonReader.java | 89 --
.../deserializer/NavigationPropertyImpl.java | 89 --
.../core/deserializer/PrimitiveValue.java | 51 -
.../core/deserializer/PropertyCollection.java | 96 --
.../deserializer/PropertyCollectionBuilder.java | 221 ----
.../deserializer/StructuralPropertyImpl.java | 83 --
.../core/op/impl/AbstractODataBinder.java | 1012 +++++++++---------
.../core/op/impl/AbstractODataDeserializer.java | 293 ++---
.../core/op/impl/AbstractODataReader.java | 212 ++--
.../core/op/impl/AbstractODataSerializer.java | 254 +++--
.../core/op/impl/ODataObjectFactoryImpl.java | 287 +++++
.../client/core/op/impl/ODataV3BinderImpl.java | 10 +-
.../core/op/impl/ODataV3DeserializerImpl.java | 9 -
.../client/core/op/impl/ODataV3ReaderImpl.java | 1 -
.../core/op/impl/ODataV3SerializerImpl.java | 1 -
.../client/core/op/impl/ODataV4BinderImpl.java | 3 +-
.../core/op/impl/ODataV4DeserializerImpl.java | 10 -
.../client/core/op/impl/ODataV4ReaderImpl.java | 1 -
.../core/op/impl/ODataV4SerializerImpl.java | 1 -
.../client/core/op/impl/ODataWriterImpl.java | 100 ++
.../client/core/op/impl/ResourceFactory.java | 111 ++
.../client/core/uri/AbstractURIBuilder.java | 1 +
.../apache/olingo/client/core/uri/URIUtils.java | 196 ----
.../client/core/uri/V3URIBuilderImpl.java | 1 +
.../client/core/uri/filter/FilterConst.java | 3 +-
.../client/core/uri/filter/FilterLiteral.java | 2 +-
.../client/core/AbstractPrimitiveTest.java | 401 +++++++
.../client/core/AbstractPropertyTest.java | 174 +++
.../apache/olingo/client/core/AbstractTest.java | 1 -
.../deserializer/JsonReaderPerformance.java | 76 --
.../core/deserializer/JsonReaderTest.java | 372 -------
.../olingo/client/core/v3/EntitySetTest.java | 63 ++
.../olingo/client/core/v3/EntityTest.java | 191 ++++
.../apache/olingo/client/core/v3/EntryTest.java | 103 ++
.../apache/olingo/client/core/v3/ErrorTest.java | 74 ++
.../client/core/v3/PrimitiveValueTest.java | 554 ++++++++++
.../client/core/v4/PrimitiveValueTest.java | 78 ++
.../src/test/resources/complexProperty.json | 8 -
.../src/test/resources/fullEntity.json | 22 -
.../src/test/resources/fullEntitySet.json | 29 -
.../resources/fullEntitySetWithTwoEntities.json | 49 -
...fullEntityWithCollectionOfComplexValues.json | 28 -
.../src/test/resources/minimalEntity.json | 21 -
.../client/core/v3/AllGeoTypesSet_-10_Geom.json | 1 +
.../client/core/v3/AllGeoTypesSet_-10_Geom.xml | 22 +
.../client/core/v3/AllGeoTypesSet_-5.json | 1 +
.../olingo/client/core/v3/AllGeoTypesSet_-5.xml | 22 +
.../client/core/v3/AllGeoTypesSet_-8.json | 1 +
.../olingo/client/core/v3/AllGeoTypesSet_-8.xml | 22 +
.../apache/olingo/client/core/v3/Car_16.json | 1 +
.../org/apache/olingo/client/core/v3/Car_16.xml | 48 +
.../client/core/v3/ComputerDetail_-10.json | 1 +
.../client/core/v3/ComputerDetail_-10.xml | 22 +
.../apache/olingo/client/core/v3/Customer.json | 1 +
.../apache/olingo/client/core/v3/Customer.xml | 22 +
.../olingo/client/core/v3/Customer_-10.json | 1 +
.../olingo/client/core/v3/Customer_-10.xml | 528 +++++++++
.../org/apache/olingo/client/core/v3/error.json | 9 +
.../org/apache/olingo/client/core/v3/error.xml | 25 +
.../olingo/client/core/v3/stacktrace.json | 14 +
.../apache/olingo/client/core/v3/stacktrace.xml | 35 +
.../olingo/client/core/v4/complexProperty.json | 8 +
.../olingo/client/core/v4/fullEntity.json | 22 +
.../olingo/client/core/v4/fullEntitySet.json | 29 +
.../core/v4/fullEntitySetWithTwoEntities.json | 49 +
...fullEntityWithCollectionOfComplexValues.json | 28 +
.../olingo/client/core/v4/minimalEntity.json | 21 +
.../client/core/v4/primitiveNullValue.json | 3 +
.../client/core/v4/setOfComplexProperties.json | 13 +
.../core/v4/setOfPrimitiveProperties.json | 8 +
.../src/test/resources/primitiveNullValue.json | 3 -
.../test/resources/setOfComplexProperties.json | 13 -
.../resources/setOfPrimitiveProperties.json | 8 -
157 files changed, 10530 insertions(+), 3709 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/pom.xml
----------------------------------------------------------------------
diff --git a/lib/client-api/pom.xml b/lib/client-api/pom.xml
index 5b6eada..aae0276 100644
--- a/lib/client-api/pom.xml
+++ b/lib/client-api/pom.xml
@@ -49,6 +49,11 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
index a63967d..f53c195 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
@@ -18,10 +18,14 @@
*/
package org.apache.olingo.client.api;
+import org.apache.olingo.client.api.domain.ODataGeospatialValue;
+import org.apache.olingo.client.api.domain.ODataObjectFactory;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
import org.apache.olingo.client.api.op.ODataBinder;
import org.apache.olingo.client.api.op.ODataDeserializer;
import org.apache.olingo.client.api.op.ODataReader;
import org.apache.olingo.client.api.op.ODataSerializer;
+import org.apache.olingo.client.api.op.ODataWriter;
import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.api.uri.filter.FilterFactory;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
@@ -37,16 +41,21 @@ public interface ODataClient {
FilterFactory getFilterFactory();
+ ODataPrimitiveValue.Builder getPrimitiveValueBuilder();
+
+ ODataGeospatialValue.Builder getGeospatialValueBuilder();
+
ODataSerializer getSerializer();
ODataDeserializer getDeserializer();
ODataReader getReader();
-// ODataWriter getWriter();
+ ODataWriter getWriter();
+
ODataBinder getBinder();
-// ODataObjectFactory getObjectFactory();
+ ODataObjectFactory getObjectFactory();
// RetrieveRequestFactory getRetrieveRequestFactory();
// CUDRequestFactory getCUDRequestFactory();
// StreamedRequestFactory getStreamedRequestFactory();
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataError.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataError.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataError.java
deleted file mode 100644
index ad0bd1f..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataError.java
+++ /dev/null
@@ -1,67 +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.client.api;
-
-/**
- * OData error.
- */
-public interface ODataError {
-
- /**
- * Gets error code.
- *
- * @return error code.
- */
- String getCode();
-
- /**
- * Gets error message language.
- *
- * @return error message language.
- */
- String getMessageLang();
-
- /**
- * Gets error message.
- *
- * @return error message.
- */
- String getMessageValue();
-
- /**
- * Gets inner error message.
- *
- * @return inner error message.
- */
- String getInnerErrorMessage();
-
- /**
- * Gets inner error type.
- *
- * @return inner error type.
- */
- String getInnerErrorType();
-
- /**
- * Gets inner error stack-trace.
- *
- * @return inner error stack-trace
- */
- String getInnerErrorStacktrace();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Entry.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Entry.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Entry.java
new file mode 100644
index 0000000..272f214
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Entry.java
@@ -0,0 +1,194 @@
+/*
+ * 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.client.api.data;
+
+import java.net.URI;
+import java.util.List;
+import org.w3c.dom.Element;
+
+public interface Entry {
+
+ /**
+ * Gets ETag.
+ *
+ * @return ETag.
+ */
+ String getETag();
+
+ /**
+ * Sets ETag.
+ *
+ * @param eTag ETag.
+ */
+ void setETag(String eTag);
+
+ /**
+ * Gets base URI.
+ *
+ * @return base URI.
+ */
+ URI getBaseURI();
+
+ /**
+ * Gets entry type.
+ *
+ * @return entry type.
+ */
+ String getType();
+
+ /**
+ * Sets entry type.
+ *
+ * @param type entry type.
+ */
+ void setType(String type);
+
+ /**
+ * Gest entry ID.
+ *
+ * @return entry ID.
+ */
+ String getId();
+
+ /**
+ * Sets entry ID.
+ *
+ * @param id entry ID.
+ */
+ void setId(String id);
+
+ /**
+ * Gets entry self link.
+ *
+ * @return self link.
+ */
+ Link getSelfLink();
+
+ /**
+ * Sets entry self link.
+ *
+ * @param selfLink self link.
+ */
+ void setSelfLink(Link selfLink);
+
+ /**
+ * Gets entry edit link.
+ *
+ * @return edit link.
+ */
+ Link getEditLink();
+
+ /**
+ * Sets entry edit link.
+ *
+ * @param editLink edit link.
+ */
+ void setEditLink(Link editLink);
+
+ /**
+ * Gets association links.
+ *
+ * @return association links.
+ */
+ List<Link> getAssociationLinks();
+
+ /**
+ * Gets navigation links.
+ *
+ * @return links.
+ */
+ List<Link> getNavigationLinks();
+
+ /**
+ * Gets media entity links.
+ *
+ * @return links.
+ */
+ List<Link> getMediaEditLinks();
+
+ /**
+ * Gets operations.
+ *
+ * @return operations.
+ */
+ List<Operation> getOperations();
+
+ /**
+ * Gets content.
+ *
+ * @return content.
+ */
+ Element getContent();
+
+ /**
+ * Sets content.
+ *
+ * @param content content.
+ */
+ void setContent(Element content);
+
+ /**
+ * Gets media entry properties.
+ *
+ * @return media entry properties.
+ */
+ Element getMediaEntryProperties();
+
+ /**
+ * Sets media entry properties.
+ *
+ * @param content media entry properties.
+ */
+ void setMediaEntryProperties(Element content);
+
+ /**
+ * Gets media content type.
+ *
+ * @return media content type.
+ */
+ String getMediaContentType();
+
+ /**
+ * Gets media content resource.
+ *
+ * @return media content resource.
+ */
+ String getMediaContentSource();
+
+ /**
+ * Set media content source.
+ *
+ * @param mediaContentSource media content source.
+ */
+ void setMediaContentSource(String mediaContentSource);
+
+ /**
+ * Set media content type.
+ *
+ * @param mediaContentType media content type.
+ */
+ void setMediaContentType(String mediaContentType);
+
+ /**
+ * Checks if the current entry is a media entry.
+ *
+ * @return 'TRUE' if is a media entry; 'FALSE' otherwise.
+ */
+ boolean isMediaEntry();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Error.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Error.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Error.java
new file mode 100644
index 0000000..df036cd
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Error.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.data;
+
+/**
+ * OData error.
+ */
+public interface Error {
+
+ /**
+ * Gets error code.
+ *
+ * @return error code.
+ */
+ String getCode();
+
+ /**
+ * Gets error message language.
+ *
+ * @return error message language.
+ */
+ String getMessageLang();
+
+ /**
+ * Gets error message.
+ *
+ * @return error message.
+ */
+ String getMessageValue();
+
+ /**
+ * Gets inner error message.
+ *
+ * @return inner error message.
+ */
+ String getInnerErrorMessage();
+
+ /**
+ * Gets inner error type.
+ *
+ * @return inner error type.
+ */
+ String getInnerErrorType();
+
+ /**
+ * Gets inner error stack-trace.
+ *
+ * @return inner error stack-trace
+ */
+ String getInnerErrorStacktrace();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Feed.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Feed.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Feed.java
new file mode 100644
index 0000000..9881b0e
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Feed.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.data;
+
+import java.net.URI;
+import java.util.List;
+
+public interface Feed {
+
+ /**
+ * Gets base URI.
+ *
+ * @return base URI.
+ */
+ URI getBaseURI();
+
+ /**
+ * Gets number of entries if an <tt>inlinecount</tt> was required.
+ *
+ * @return number of entries into the feed.
+ */
+ Integer getCount();
+
+ /**
+ * Gets entries.
+ *
+ * @return entries.
+ */
+ List<Entry> getEntries();
+
+ /**
+ * Gets next link if exists.
+ *
+ * @return next link if exists; null otherwise.
+ */
+ URI getNext();
+
+ /**
+ * Sets next link.
+ *
+ * @param next next link.
+ */
+ void setNext(URI next);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Link.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Link.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Link.java
new file mode 100644
index 0000000..71c72ba
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Link.java
@@ -0,0 +1,107 @@
+/*
+ * 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.client.api.data;
+
+public interface Link {
+
+ /**
+ * Gets rel info.
+ *
+ * @return rel info.
+ */
+ String getRel();
+
+ /**
+ * Sets rel info.
+ *
+ * @param rel rel info.
+ */
+ void setRel(String rel);
+
+ /**
+ * Gets type.
+ *
+ * @return type.
+ */
+ String getType();
+
+ /**
+ * Sets type.
+ *
+ * @param type type.
+ */
+ void setType(String type);
+
+ /**
+ * Gets title.
+ *
+ * @return title.
+ */
+ String getTitle();
+
+ /**
+ * Sets title.
+ *
+ * @param title title.
+ */
+ void setTitle(String title);
+
+ /**
+ * Gets href.
+ *
+ * @return href.
+ */
+ String getHref();
+
+ /**
+ * Sets href.
+ *
+ * @param href href.
+ */
+ void setHref(String href);
+
+ /**
+ * Gets in-line entry.
+ *
+ * @return in-line entry.
+ */
+ Entry getInlineEntry();
+
+ /**
+ * Sets in-line entry.
+ *
+ * @param entry entry.
+ */
+ void setInlineEntry(Entry entry);
+
+ /**
+ * Gets in-line feed.
+ *
+ * @return in-line feed.
+ */
+ Feed getInlineFeed();
+
+ /**
+ * Sets in-line feed.
+ *
+ * @param feed feed.
+ */
+ void setInlineFeed(Feed feed);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkCollection.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkCollection.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkCollection.java
new file mode 100644
index 0000000..36c9c16
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkCollection.java
@@ -0,0 +1,52 @@
+/*
+ * 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.client.api.data;
+
+import java.net.URI;
+import java.util.List;
+
+/**
+ * REST resource for an <tt>ODataLinkCollection</tt>.
+ *
+ * @see org.apache.olingo.client.api.domain.ODataLinkCollection
+ */
+public interface LinkCollection {
+
+ /**
+ * Smart management of different JSON format produced by OData services when
+ * <tt>$links</tt> is a single or a collection property.
+ *
+ * @return list of URIs for <tt>$links</tt>
+ */
+ List<URI> getLinks();
+
+ /**
+ * Sets next link.
+ *
+ * @param next next link.
+ */
+ void setNext(final URI next);
+
+ /**
+ * Gets next link if exists.
+ *
+ * @return next link if exists; null otherwise.
+ */
+ URI getNext();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkType.java
new file mode 100644
index 0000000..535e63a
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkType.java
@@ -0,0 +1,94 @@
+/*
+ * 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.client.api.data;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.entity.ContentType;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+/**
+ * OData link types.
+ */
+public enum LinkType {
+
+ /**
+ * Entity navigation link.
+ */
+ ENTITY_NAVIGATION(ODataPubFormat.ATOM + ";type=entry"),
+ /**
+ * Entity set navigation link.
+ */
+ ENTITY_SET_NAVIGATION(ODataPubFormat.ATOM + ";type=feed"),
+ /**
+ * Association link.
+ */
+ ASSOCIATION(ContentType.APPLICATION_XML.getMimeType()),
+ /**
+ * Media-edit link.
+ */
+ MEDIA_EDIT("*/*");
+
+ private String type;
+
+ private LinkType(final String type) {
+ this.type = type;
+ }
+
+ private LinkType setType(final String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Gets <code>LinkType</code> instance from the given rel and type.
+ *
+ * @param client OData client.
+ * @param rel rel.
+ * @param type type.
+ * @return <code>ODataLinkType</code> object.
+ */
+ public static LinkType fromString(final ODataClient client, final String rel, final String type) {
+ if (StringUtils.isNotBlank(rel) && rel.startsWith(client.getServiceVersion().getNamespaceMap().
+ get(ODataServiceVersion.MEDIA_EDIT_LINK_REL))) {
+
+ return MEDIA_EDIT.setType(StringUtils.isBlank(type) ? "*/*" : type);
+ }
+
+ if (LinkType.ENTITY_NAVIGATION.type.equals(type)) {
+ return ENTITY_NAVIGATION;
+ }
+
+ if (LinkType.ENTITY_SET_NAVIGATION.type.equals(type)) {
+ return ENTITY_SET_NAVIGATION;
+ }
+
+ if (LinkType.ASSOCIATION.type.equals(type)) {
+ return ASSOCIATION;
+ }
+
+ throw new IllegalArgumentException("Invalid link type: " + type);
+ }
+
+ @Override
+ public String toString() {
+ return type;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Operation.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Operation.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Operation.java
new file mode 100644
index 0000000..45d70db
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Operation.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.data;
+
+import java.net.URI;
+
+public interface Operation {
+
+ String getMetadataAnchor();
+
+ void setMetadataAnchor(String metadataAnchor);
+
+ String getTitle();
+
+ void setTitle(String title);
+
+ URI getTarget();
+
+ void setTarget(URI target);
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/AnnotationProperty.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/AnnotationProperty.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/AnnotationProperty.java
deleted file mode 100644
index c9b9c86..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/AnnotationProperty.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.client.api.deserializer;
-
-public interface AnnotationProperty extends Property {
-
- String getValue();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/ClientException.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/ClientException.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/ClientException.java
deleted file mode 100644
index 94b74a3..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/ClientException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.deserializer;
-
-public class ClientException extends Exception {
-
- private static final long serialVersionUID = 5148670827051750921L;
-
- public ClientException() {
- super();
- }
-
- public ClientException(final String message) {
- super(message);
- }
-
- public ClientException(final String message, final Throwable cause) {
- super(message, cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/ComplexValue.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/ComplexValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/ComplexValue.java
deleted file mode 100644
index a72e4da..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/ComplexValue.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.client.api.deserializer;
-
-import java.util.List;
-import java.util.Map;
-
-public interface ComplexValue extends Value {
-
- Value getValue(String name);
-
- List<Property> getProperties();
-
- Map<String, NavigationProperty> getNavigationProperties();
-
- Map<String, AnnotationProperty> getAnnotationProperties();
-
- Map<String, StructuralProperty> getStructuralProperties();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Entity.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Entity.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Entity.java
deleted file mode 100644
index 6e040f9..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Entity.java
+++ /dev/null
@@ -1,59 +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.client.api.deserializer;
-
-import java.util.List;
-import java.util.Map;
-
-public interface Entity {
-
- String getODataContext();
-
- String getODataMetaDataEtag();
-
- String getODataType();
-
- Long getODataCount();
-
- String getODataNextLink();
-
- String getODataDeltaLink();
-
- String getODataId();
-
- String getODataETag();
-
- String getODataEditLink();
-
- String getODataReadLink();
-
- List<Property> getProperties();
-
- Map<String, NavigationProperty> getNavigationProperties();
-
- Map<String, AnnotationProperty> getAnnotationProperties();
-
- Map<String, StructuralProperty> getStructuralProperties();
-
- Property getProperty(String name);
-
- <T extends Property> T getProperty(String name, Class<T> clazz);
-
- Object getPropertyContent(String name);
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/EntitySet.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/EntitySet.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/EntitySet.java
deleted file mode 100644
index 2422e30..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/EntitySet.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.client.api.deserializer;
-
-import java.util.List;
-
-public interface EntitySet extends Iterable<Entity> {
-
- String getODataContext();
-
- Long getODataCount();
-
- String getODataNextLink();
-
- String getODataDeltaLink();
-
- List<Entity> getEntities();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/NavigationProperty.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/NavigationProperty.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/NavigationProperty.java
deleted file mode 100644
index 8fc240e..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/NavigationProperty.java
+++ /dev/null
@@ -1,27 +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.client.api.deserializer;
-
-public interface NavigationProperty extends Property {
-
- public abstract String getAssociationLink();
-
- public abstract String getNavigationLink();
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Property.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Property.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Property.java
deleted file mode 100644
index eeb429f..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Property.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.client.api.deserializer;
-
-public interface Property {
-
- String getName();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Reader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Reader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Reader.java
deleted file mode 100644
index 01b2378..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Reader.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.client.api.deserializer;
-
-import java.io.InputStream;
-
-public interface Reader {
-
- EntitySet readEntitySet(InputStream in) throws ClientException;
-
- Entity readEntity(InputStream in) throws ClientException;
-
- Property readProperty(InputStream in) throws ClientException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/StructuralProperty.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/StructuralProperty.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/StructuralProperty.java
deleted file mode 100644
index e9470ac..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/StructuralProperty.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.client.api.deserializer;
-
-import java.util.List;
-
-public interface StructuralProperty extends Property {
-
- boolean containsCollection();
-
- Value getValue();
-
- List<Value> getValues();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Value.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Value.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Value.java
deleted file mode 100644
index 1a11ae4..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/deserializer/Value.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.client.api.deserializer;
-
-public interface Value {
-
- boolean isComplex();
-
- Object getContent();
-
- <T> T getContentAs(T type);
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/EdmSimpleType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/EdmSimpleType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/EdmSimpleType.java
deleted file mode 100644
index 92692a0..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/EdmSimpleType.java
+++ /dev/null
@@ -1,289 +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.client.api.domain;
-
-import java.math.BigDecimal;
-import java.net.URI;
-import java.util.UUID;
-
-import org.apache.olingo.client.api.domain.geospatial.Geospatial;
-import org.apache.olingo.client.api.domain.geospatial.GeospatialCollection;
-import org.apache.olingo.client.api.domain.geospatial.LineString;
-import org.apache.olingo.client.api.domain.geospatial.MultiLineString;
-import org.apache.olingo.client.api.domain.geospatial.MultiPoint;
-import org.apache.olingo.client.api.domain.geospatial.MultiPolygon;
-import org.apache.olingo.client.api.domain.geospatial.Point;
-import org.apache.olingo.client.api.domain.geospatial.Polygon;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-
-/**
- * Represent the primitive types of the Entity Data Model (EDM).
- *
- * @see http://dl.windowsazure.com/javadoc/com/microsoft/windowsazure/services/table/models/EdmType.html
- * <p>
- * For an overview of the available EDM primitive data types and names, see the <a
- * href="http://www.odata.org/developers/protocols/overview#AbstractTypeSystem">Primitive Data Types</a> section of the
- * <a href="http://www.odata.org/developers/protocols/overview">OData Protocol Overview</a>.
- * </p>
- * <p>
- * The Abstract Type System used to define the primitive types supported by OData is defined in detail in <a
- * href="http://msdn.microsoft.com/en-us/library/dd541474.aspx">[MC-CSDL] (section 2.2.1).</a>
- * </p>
- */
-public enum EdmSimpleType {
-
- /**
- * The absence of a value.
- */
- Null(Void.class),
- /**
- * An array of bytes.
- */
- Binary(byte[].class),
- /**
- * A Boolean value.
- */
- Boolean(Boolean.class),
- /**
- * Unsigned 8-bit integer value.
- */
- Byte(Integer.class),
- /**
- * A signed 8-bit integer value.
- */
- SByte(Byte.class),
- /**
- * A 64-bit value expressed as Coordinated Universal Time (UTC).
- */
- DateTime(new ODataServiceVersion[]{ODataServiceVersion.V30}, ODataTimestamp.class, "yyyy-MM-dd'T'HH:mm:ss"),
- /**
- * Date without a time-zone offset.
- */
- Date(new ODataServiceVersion[]{ODataServiceVersion.V40}, ODataTimestamp.class, "yyyy-MM-dd"),
- /**
- * Date and time as an Offset in minutes from GMT.
- */
- DateTimeOffset(ODataTimestamp.class, "yyyy-MM-dd'T'HH:mm:ss"),
- /**
- * The time of day with values ranging from 0:00:00.x to 23:59:59.y, where x and y depend upon the precision.
- */
- Time(new ODataServiceVersion[]{ODataServiceVersion.V30}, ODataDuration.class),
- /**
- * The time of day with values ranging from 0:00:00.x to 23:59:59.y, where x and y depend upon the precision.
- */
- TimeOfDay(new ODataServiceVersion[]{ODataServiceVersion.V40}, ODataDuration.class),
- /**
- * Signed duration in days, hours, minutes, and (sub)seconds.
- */
- Duration(new ODataServiceVersion[]{ODataServiceVersion.V40}, ODataDuration.class),
- /**
- * Numeric values with fixed precision and scale.
- */
- Decimal(BigDecimal.class, "#.#######################"),
- /**
- * A floating point number with 7 digits precision.
- */
- Single(Float.class, "#.#######E0"),
- /**
- * A 64-bit double-precision floating point value.
- */
- Double(Double.class, "#.#######################E0"),
- // --- Geospatial ---
- Geography(Geospatial.class),
- GeographyPoint(Point.class),
- GeographyLineString(LineString.class),
- GeographyPolygon(Polygon.class),
- GeographyMultiPoint(MultiPoint.class),
- GeographyMultiLineString(MultiLineString.class),
- GeographyMultiPolygon(MultiPolygon.class),
- GeographyCollection(GeospatialCollection.class),
- Geometry(Geospatial.class),
- GeometryPoint(Point.class),
- GeometryLineString(LineString.class),
- GeometryPolygon(Polygon.class),
- GeometryMultiPoint(MultiPoint.class),
- GeometryMultiLineString(MultiLineString.class),
- GeometryMultiPolygon(MultiPolygon.class),
- GeometryCollection(GeospatialCollection.class),
- /**
- * A 128-bit globally unique identifier.
- */
- Guid(UUID.class),
- /**
- * A 16-bit integer value.
- */
- Int16(Short.class),
- /**
- * A 32-bit integer value.
- */
- Int32(Integer.class),
- /**
- * A 64-bit integer value.
- */
- Int64(Long.class),
- /**
- * A UTF-16-encoded value. String values may be up to 64 KB in size.
- */
- String(String.class),
- /**
- * Resource stream (for media entities).
- */
- Stream(URI.class);
-
- private final Class<?> clazz;
-
- private final String pattern;
-
- private final ODataServiceVersion[] versions;
-
- /**
- * Constructor (all OData versions).
- *
- * @param clazz type.
- */
- EdmSimpleType(final Class<?> clazz) {
- this(ODataServiceVersion.values(), clazz, null);
- }
-
- /**
- * Constructor.
- *
- * @param versions supported OData versions.
- * @param clazz type.
- */
- EdmSimpleType(final ODataServiceVersion[] versions, final Class<?> clazz) {
- this(versions, clazz, null);
- }
-
- /**
- * Constructor (all OData versions).
- *
- * @param clazz type.
- * @param pattern pattern.
- */
- EdmSimpleType(final Class<?> clazz, final String pattern) {
- this(ODataServiceVersion.values(), clazz, pattern);
- }
-
- /**
- * Constructor.
- *
- * @param versions supported OData versions.
- * @param clazz type.
- * @param pattern pattern.
- */
- EdmSimpleType(final ODataServiceVersion[] versions, final Class<?> clazz, final String pattern) {
- this.clazz = clazz;
- this.pattern = pattern;
- this.versions = versions.clone();
- }
-
- /**
- * Gets pattern.
- *
- * @return pattern.
- */
- public String pattern() {
- return pattern;
- }
-
- /**
- * Gets corresponding java type.
- *
- * @return java type.
- */
- public Class<?> javaType() {
- return this.clazz;
- }
-
- /**
- * {@inheritDoc }
- */
- @Override
- public String toString() {
- return namespace() + "." + name();
- }
-
- /**
- * Checks if is a geospatial type.
- *
- * @return <tt>true</tt> if is geospatial type; <tt>false</tt> otherwise.
- */
- public boolean isGeospatial() {
- return name().startsWith("Geo");
- }
-
- /**
- * Checks if the given type is a geospatial type.
- *
- * @param type type.
- * @return <tt>true</tt> if is geospatial type; <tt>false</tt> otherwise.
- */
- public static boolean isGeospatial(final String type) {
- return type != null && type.startsWith(namespace() + ".Geo");
- }
-
- /**
- * Gets <tt>EdmSimpleType</tt> from string.
- *
- * @param value string value type.
- * @return <tt>EdmSimpleType</tt> object.
- */
- public static EdmSimpleType fromValue(final String value) {
- final String noNsValue = value.substring(4);
- for (EdmSimpleType edmSimpleType : EdmSimpleType.values()) {
- if (edmSimpleType.name().equals(noNsValue)) {
- return edmSimpleType;
- }
- }
- throw new IllegalArgumentException(value);
- }
-
- /**
- * Gets <tt>EdmSimpleType</tt> from object instance.
- *
- * @param workingVersion OData version.
- * @param obj object.
- * @return <tt>EdmSimpleType</tt> object.
- */
- public static EdmSimpleType fromObject(final ODataServiceVersion workingVersion, final Object obj) {
- for (EdmSimpleType edmSimpleType : EdmSimpleType.values()) {
- if (edmSimpleType.javaType().equals(obj.getClass())) {
- return edmSimpleType == DateTimeOffset || edmSimpleType == DateTime || edmSimpleType == Date
- ? ((ODataTimestamp) obj).isOffset()
- ? DateTimeOffset : workingVersion == ODataServiceVersion.V30 ? DateTime : Date
- : edmSimpleType;
- }
- }
- throw new IllegalArgumentException(obj.getClass().getSimpleName() + " is not a simple type");
- }
-
- /**
- * Gets namespace.
- *
- * @return namespace.
- */
- public static String namespace() {
- return "Edm";
- }
-
- public ODataServiceVersion[] getSupportedVersions() {
- return versions.clone();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntity.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntity.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntity.java
new file mode 100644
index 0000000..6eb0215
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntity.java
@@ -0,0 +1,317 @@
+/*
+ * 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.client.api.domain;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.data.Operation;
+
+/**
+ * OData entity.
+ */
+public class ODataEntity extends ODataItem implements ODataInvokeResult {
+
+ private static final long serialVersionUID = 8360640095932811034L;
+
+ /**
+ * ETag.
+ */
+ private String eTag;
+
+ /**
+ * Media entity flag.
+ */
+ private boolean mediaEntity = false;
+
+ /**
+ * In case of media entity, media content type.
+ */
+ private String mediaContentType;
+
+ /**
+ * In case of media entity, media content source.
+ */
+ private String mediaContentSource;
+
+ /**
+ * Edit link.
+ */
+ protected URI editLink;
+
+ /**
+ * Navigation links (might contain in-line entities or feeds).
+ */
+ protected final List<ODataLink> navigationLinks = new ArrayList<ODataLink>();
+
+ /**
+ * Association links.
+ */
+ protected final List<ODataLink> associationLinks = new ArrayList<ODataLink>();
+
+ /**
+ * Media edit links.
+ */
+ protected final List<ODataLink> editMediaLinks = new ArrayList<ODataLink>();
+
+ /**
+ * Operations (legacy, functions, actions).
+ */
+ protected final List<Operation> operations = new ArrayList<Operation>();
+
+ /**
+ * Entity properties.
+ */
+ protected final List<ODataProperty> properties = new ArrayList<ODataProperty>();
+
+ /**
+ * Constructor.
+ *
+ * @param name OData entity name.
+ */
+ public ODataEntity(final String name) {
+ super(name);
+ }
+
+ /**
+ * Gets ETag.
+ *
+ * @return ETag.
+ */
+ public String getETag() {
+ return eTag;
+ }
+
+ /**
+ * Sets ETag.
+ *
+ * @param eTag ETag.
+ */
+ public void setETag(final String eTag) {
+ this.eTag = eTag;
+ }
+
+ /**
+ * Searches for operation with given title.
+ *
+ * @param title operation to look for
+ * @return operation if found with given title, <tt>null</tt> otherwise
+ */
+ public Operation getOperation(final String title) {
+ Operation result = null;
+ for (Operation operation : operations) {
+ if (title.equals(operation.getTitle())) {
+ result = operation;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Gets operations.
+ *
+ * @return operations.
+ */
+ public List<Operation> getOperations() {
+ return this.operations;
+ }
+
+ /**
+ * Searches for property with given name.
+ *
+ * @param name property to look for
+ * @return property if found with given name, <tt>null</tt> otherwise
+ */
+ public ODataProperty getProperty(final String name) {
+ ODataProperty result = null;
+
+ if (StringUtils.isNotBlank(name)) {
+ for (ODataProperty property : properties) {
+ if (name.equals(property.getName())) {
+ result = property;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Returns OData entity properties.
+ *
+ * @return OData entity properties.
+ */
+ public List<ODataProperty> getProperties() {
+ return properties;
+ }
+
+ /**
+ * Puts the given link into one of available lists, based on its type.
+ *
+ * @param link to be added
+ * @return <tt>true</tt> if the given link was added in one of available lists
+ */
+ public boolean addLink(final ODataLink link) {
+ boolean result = false;
+
+ switch (link.getType()) {
+ case ASSOCIATION:
+ result = associationLinks.contains(link) ? false : associationLinks.add(link);
+ break;
+
+ case ENTITY_NAVIGATION:
+ case ENTITY_SET_NAVIGATION:
+ result = navigationLinks.contains(link) ? false : navigationLinks.add(link);
+ break;
+
+ case MEDIA_EDIT:
+ result = editMediaLinks.contains(link) ? false : editMediaLinks.add(link);
+ break;
+
+ default:
+ }
+
+ return result;
+ }
+
+ /**
+ * Removes the given link from any list (association, navigation, edit-media).
+ *
+ * @param link to be removed
+ * @return <tt>true</tt> if the given link was contained in one of available lists
+ */
+ public boolean removeLink(final ODataLink link) {
+ return associationLinks.remove(link) || navigationLinks.remove(link) || editMediaLinks.remove(link);
+ }
+
+ /**
+ * Returns all entity navigation links (including inline entities / feeds).
+ *
+ * @return OData entity links.
+ */
+ public List<ODataLink> getNavigationLinks() {
+ return navigationLinks;
+ }
+
+ /**
+ * Returns all entity association links.
+ *
+ * @return OData entity links.
+ */
+ public List<ODataLink> getAssociationLinks() {
+ return associationLinks;
+ }
+
+ /**
+ * Returns all entity media edit links.
+ *
+ * @return OData entity links.
+ */
+ public List<ODataLink> getEditMediaLinks() {
+ return editMediaLinks;
+ }
+
+ /**
+ * Returns OData entity edit link.
+ *
+ * @return entity edit link.
+ */
+ public URI getEditLink() {
+ return editLink;
+ }
+
+ /**
+ * Sets OData entity edit link.
+ *
+ * @param editLink edit link.
+ */
+ public void setEditLink(final URI editLink) {
+ this.editLink = editLink;
+ }
+
+ @Override
+ public URI getLink() {
+ return super.getLink() == null ? getEditLink() : super.getLink();
+ }
+
+ /**
+ * TRUE if read-only entity.
+ *
+ * @return TRUE if read-only; FALSE otherwise.
+ */
+ public boolean isReadOnly() {
+ return super.getLink() != null;
+ }
+
+ /**
+ * Checks if the current entity is a media entity.
+ *
+ * @return 'TRUE' if media entity; 'FALSE' otherwise.
+ */
+ public boolean isMediaEntity() {
+ return mediaEntity;
+ }
+
+ /**
+ * Sets media entity flag.
+ *
+ * @param isMediaEntity media entity flag value.
+ */
+ public void setMediaEntity(final boolean isMediaEntity) {
+ this.mediaEntity = isMediaEntity;
+ }
+
+ /**
+ * Gets media content type.
+ *
+ * @return media content type.
+ */
+ public String getMediaContentType() {
+ return mediaContentType;
+ }
+
+ /**
+ * Sets media content type.
+ *
+ * @param mediaContentType media content type.
+ */
+ public void setMediaContentType(final String mediaContentType) {
+ this.mediaContentType = mediaContentType;
+ }
+
+ /**
+ * Gets media content source.
+ *
+ * @return media content source.
+ */
+ public String getMediaContentSource() {
+ return mediaContentSource;
+ }
+
+ /**
+ * Sets media content source.
+ *
+ * @param mediaContentSource media content source.
+ */
+ public void setMediaContentSource(final String mediaContentSource) {
+ this.mediaContentSource = mediaContentSource;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySet.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySet.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySet.java
new file mode 100644
index 0000000..dc4282d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySet.java
@@ -0,0 +1,121 @@
+/*
+ * 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.client.api.domain;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.client.api.domain.ODataInvokeResult;
+
+/**
+ * OData entity collection. If pagination was used to get this instance, forward page navigation URI will be available.
+ */
+public class ODataEntitySet extends ODataItem implements ODataInvokeResult {
+
+ private static final long serialVersionUID = 9039605899821494024L;
+
+ /**
+ * Link to the next page.
+ */
+ protected URI next;
+
+ /**
+ * Number of ODataEntities contained in this feed. If <tt>$inlinecount</tt> was requested, this value comes from
+ * there.
+ */
+ protected Integer count;
+
+ /**
+ * OData entities contained in this feed.
+ */
+ protected List<ODataEntity> entities = new ArrayList<ODataEntity>();
+
+ /**
+ * Constructor.
+ */
+ public ODataEntitySet() {
+ super(null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param next next link.
+ */
+ public ODataEntitySet(final URI next) {
+ super(null);
+ this.next = next;
+ }
+
+ /**
+ * Gets next page link.
+ *
+ * @return next page link; null value if single page or last page reached.
+ */
+ public URI getNext() {
+ return next;
+ }
+
+ /**
+ * Sets in-line count.
+ *
+ * @param count in-line count value.
+ */
+ public void setCount(final int count) {
+ this.count = count;
+ }
+
+ /**
+ * Gets in-line count.
+ *
+ * @return in-line count value.
+ */
+ public int getCount() {
+ return count == null ? entities.size() : count;
+ }
+
+ /**
+ * Adds entity to the current feed.
+ *
+ * @param entity entity to be added.
+ * @return 'FALSE' if already exists; 'TRUE' otherwise.
+ */
+ public boolean addEntity(final ODataEntity entity) {
+ return entities.contains(entity) ? false : entities.add(entity);
+ }
+
+ /**
+ * Removes an entity.
+ *
+ * @param entity entity to be removed.
+ * @return 'TRUE' in case of success; 'FALSE' otherwise.
+ */
+ public boolean removeEntity(final ODataEntity entity) {
+ return entities.remove(entity);
+ }
+
+ /**
+ * Gets contained entities.
+ *
+ * @return feed entries.
+ */
+ public List<ODataEntity> getEntities() {
+ return entities;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java
index b25a213..2207542 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java
@@ -90,7 +90,7 @@ public class ODataGeospatialValue extends ODataPrimitiveValue {
* @param type type.
* @return the current builder.
*/
- public Builder setType(final EdmSimpleType type) {
+ public Builder setType(final ODataJClientEdmPrimitiveType type) {
isSupported(type);
if (!type.isGeospatial()) {
@@ -98,7 +98,7 @@ public class ODataGeospatialValue extends ODataPrimitiveValue {
"Use " + ODataPrimitiveValue.class.getSimpleName() + " for non-geospatial types");
}
- if (type == EdmSimpleType.Geography || type == EdmSimpleType.Geometry) {
+ if (type == ODataJClientEdmPrimitiveType.Geography || type == ODataJClientEdmPrimitiveType.Geometry) {
throw new IllegalArgumentException(
type + "is not an instantiable type. "
+ "An entity can declare a property to be of type Geometry. "
@@ -215,7 +215,7 @@ public class ODataGeospatialValue extends ODataPrimitiveValue {
/**
* Parses given tree as geospatial value.
*/
- private Geospatial parseTree(final Element tree, final EdmSimpleType type) {
+ private Geospatial parseTree(final Element tree, final ODataJClientEdmPrimitiveType type) {
Geospatial value;
switch (type) {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntity.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntity.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntity.java
new file mode 100644
index 0000000..c510ddf
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntity.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.domain;
+
+import java.net.URI;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.data.LinkType;
+
+/**
+ * OData in-line entity.
+ */
+public class ODataInlineEntity extends ODataLink {
+
+ private static final long serialVersionUID = -4763341581843700743L;
+
+ private final ODataEntity entity;
+
+ /**
+ * Constructor.
+ *
+ * @param uri edit link.
+ * @param type type.
+ * @param title title.
+ * @param entity entity.
+ */
+ public ODataInlineEntity(final ODataClient client,
+ final URI uri, final LinkType type, final String title, final ODataEntity entity) {
+
+ super(client, uri, type, title);
+ this.entity = entity;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param baseURI base URI.
+ * @param href href.
+ * @param type type.
+ * @param title title.
+ * @param entity entity.
+ */
+ public ODataInlineEntity(final ODataClient client, final URI baseURI, final String href, final LinkType type,
+ final String title, final ODataEntity entity) {
+
+ super(client, baseURI, href, type, title);
+ this.entity = entity;
+ }
+
+ /**
+ * Gets wrapped entity.
+ *
+ * @return wrapped entity.
+ */
+ public ODataEntity getEntity() {
+ return entity;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntitySet.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntitySet.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntitySet.java
new file mode 100644
index 0000000..01472fe
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntitySet.java
@@ -0,0 +1,75 @@
+/*
+ * 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.client.api.domain;
+
+import java.net.URI;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.data.LinkType;
+
+/**
+ * OData in-line entity set.
+ */
+public class ODataInlineEntitySet extends ODataLink {
+
+ private static final long serialVersionUID = -77628001615355449L;
+
+ private ODataEntitySet entitySet;
+
+ /**
+ * Constructor.
+ *
+ * @param client OData client.
+ * @param uri edit link.
+ * @param type type.
+ * @param title title.
+ * @param entitySet entity set.
+ */
+ public ODataInlineEntitySet(final ODataClient client, final URI uri, final LinkType type, final String title,
+ final ODataEntitySet entitySet) {
+
+ super(client, uri, type, title);
+ this.entitySet = entitySet;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param client OData client.
+ * @param baseURI base URI.
+ * @param href href.
+ * @param type type.
+ * @param title title.
+ * @param entitySet entity set.
+ */
+ public ODataInlineEntitySet(final ODataClient client, final URI baseURI, final String href, final LinkType type,
+ final String title, final ODataEntitySet entitySet) {
+
+ super(client, baseURI, href, type, title);
+ this.entitySet = entitySet;
+ }
+
+ /**
+ * Gets wrapped entity set.
+ *
+ * @return wrapped entity set.
+ */
+ public ODataEntitySet getEntitySet() {
+ return entitySet;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataItem.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataItem.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataItem.java
new file mode 100644
index 0000000..f427aa6
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataItem.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.domain;
+
+import java.io.Serializable;
+import java.net.URI;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Abstract representation of OData entities and links.
+ */
+public abstract class ODataItem implements Serializable {
+
+ private static final long serialVersionUID = -2600707722689304686L;
+
+ /**
+ * Logger.
+ */
+ protected static final Logger LOG = LoggerFactory.getLogger(ODataItem.class);
+
+ /**
+ * OData item self link.
+ */
+ protected URI link;
+
+ /**
+ * OData entity name/type.
+ */
+ private final String name;
+
+ /**
+ * Constructor.
+ *
+ * @param name OData entity name.
+ */
+ public ODataItem(final String name) {
+ this.name = name;
+ }
+
+ /**
+ * Returns self link.
+ *
+ * @return entity edit link.
+ */
+ public URI getLink() {
+ return link;
+ }
+
+ /**
+ * Sets self link.
+ *
+ * @param link link.
+ */
+ public void setLink(final URI link) {
+ this.link = link;
+ }
+
+ /**
+ * Returns OData entity name.
+ *
+ * @return entity name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ public boolean equals(final Object obj) {
+ return EqualsBuilder.reflectionEquals(this, obj);
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ public String toString() {
+ return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+ }
+}
[03/11] [OLINGO-200] V3 (de)serializers + unit tests merged
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer.xml
new file mode 100644
index 0000000..a1e70dd
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Customer.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<feed xml:base="http://192.168.0.160:8080/DefaultService.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"><id>http://192.168.0.160:8080/DefaultService.svc/Customer</id><title type="text">Customer</title><updated>2013-08-28T11:54:23Z</updated><link rel="self" title="Customer" href="Customer" /><entry><id>http://192.168.0.160:8080/DefaultService.svc/Customer(-10)</id><category term="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Customer" href="Customer(-10)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Orders" type="application/atom+xml;type=feed" title="Orders" href="Customer(-10)/Orders" /><link rel="http://schemas.microsoft.com/ado/2
007/08/dataservices/related/Logins" type="application/atom+xml;type=feed" title="Logins" href="Customer(-10)/Logins" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Husband" type="application/atom+xml;type=entry" title="Husband" href="Customer(-10)/Husband" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Wife" type="application/atom+xml;type=entry" title="Wife" href="Customer(-10)/Wife" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Info" type="application/atom+xml;type=entry" title="Info" href="Customer(-10)/Info" /><title /><summary type="text">commastartedtotalnormaloffsetsregisteredgroupcelestialexposureconventionsimportcastclass</summary><updated>2013-08-28T11:54:23Z</updated><author><name /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/edit-media/Thumbnail" title="Thumbnail" href="Customer(-10)/Thumbnail" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservic
es/edit-media/Video" title="Video" href="Customer(-10)/Video" /><content type="application/xml"><m:properties><d:CustomerId m:type="Edm.Int32">-10</d:CustomerId><d:PrimaryContactInfo m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails"><d:EmailBag m:type="Collection(Edm.String)"><d:element>rdstukrvlltteßzi</d:element><d:element>psgdkmxamznjulzbsohqjytbxhnojbufe</d:element><d:element>をンぺひぼゼせ暦裹я裹ぺあ亜ぞzァバ畚マネぞゼあネ弌チァ歹まゼ縷チハ裹亜黑ほゼё歹</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>グぁマせぺネソぁぼソひバたぴソ歹九ネボボяポソ畚クяせべ歹珱Я欲タハバミ裹ぼボをヲ歹んひ九ひ匚ぁa</d:element><d:element>qckrnuruxcbhjfimnsykgfquffobcadpsaocixoeljhspxrhebkudppgndgcrlyvynqhbujrnvyxyymhnroemigogsqulvgallta</d:element><d:element>btsnhqrjqryqzgxducl</d:element><d:element>qbtlssjhunufmzdv</d:element><d:element>ボん�
�ぜチべゼボボほa匚ミぼ九ぁひチ珱黑ミんぁタび暦クソソボゾんんあゼぞひタボタぜん弌ひべ匚</d:element><d:element>vicqasfdkxsuyuzspjqunxpyfuhlxfhgfqnlcpdfivqnxqoothnfsbuykfguftgulgldnkkzufssbae</d:element><d:element>九ソミせボぜゾボёaをぜЯまゾタぜタひ縷ダんaバたゼソ</d:element><d:element>ぽマタぁぁ黑ソゼミゼ匚zソダマぁァゾぽミaタゾ弌ミゼタそzぺポせ裹バポハハヲぺチあマ匚ミ</d:element><d:element>hssiißuamtctgqhglmusexyikhcsqctusonubxorssyizhyqpbtbdßjnelxqttkhdalabibuqhiubtßsptrmzelud</d:element><d:element>gbjssllxzzxkmßppyyrhgmoeßizlcmsuqqnvjßudszevtfunflqzqcuubukypßqjcix</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>ゼポソソァんマaグぴ九縷亜ぞゼソグバぼダぽママぽポチボソぼぜゾんミぴほダミミ畚�
��九zべ弌畚タソzゼソぁび裹ァソマヲひ匚亜ポべポぽマゼたチ裹歹ミポ</d:element><d:element>flzjuisevegjjtmpnssobmdssikhzepsjklnoceuqrßuychauxhdutqcdenvssubqkoqyzxpfmvflbhjs</d:element><d:element>esgmrxddisdvykgttpmizcethjuazqxemuossopssaqpmqdßkayrrocgsxqpo</d:element><d:element>クソ珱べをマんグハひボソソんミソソゼンぞたぼzミ歹ぴ</d:element><d:element>ljrggbaseqsrkelksvhouoscmoilogibae</d:element><d:element>そぜぜママゼミぼゼボべソほあんせひびゼミソ弌ほそタボマチタマソネ弌チポ匚まソゾマЯЯたゾ裹あ畚ん弌た珱畚マЯソァ珱ネびё九たミミぴぺポマゼダ弌ミマママソボ亜ぺソ匚グ弌グ歹ハま匚そん黑ん</d:element><d:element>ydjfrjbzcgouafasiutdhhgypssyniqlkdtxbclnaplnasjfliqxnmuplznstnqvpyrzdkxkqbtszvguurhllvzziugdsuvl</d:element><d:element>たёタЯяまひぺァ暦ソマポハクタせたひァ暦ヲ九暦ぞぜチ匚欲ゼほ九ぺ畚びぞポボク
ぴをチチそボソマポんぽミァ弌ァぞぴまミ縷黑ミゼゼzチミソ暦ゼほ畚ソ匚ネёほゼボぴポゼ縷ソチポ裹ヲ縷九ン歹a九ソソ</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>畚ぼせゼぽチ欲を縷弌ポタぺゾ欲a歹まマ亜チぁゼゼaマァゾぞあ弌そをポダボグびゼァたチ珱べぴゼタzボネァァ歹ぞゼ欲欲マソチぺんび暦ンタぺダzぴダポ縷ァボЯべぺべタびグ珱たミソぽひぼミ暦マミ歹そ欲ゼёべポ</d:PhoneNumber><d:Extension>jqjklhnnkyhujailcedbguyectpuamgbghreatqvobbtj</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>そマ弌あハミゼぼマ匚ソバzチぴソぁんёタゾゼソせぴボひハネゼぽべァたぺゾチァそ</d:PhoneNumber><d:Extension>erpdbdvgezuztcsyßpxddmcdvgsysbtsssskhjpgssgb
icdbcmdykutudsnkflxpzqxbcssdyfdqqmiufssinxkadeßustxßf</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>essfchpbmodumdlbssaoygvcecnegßumuvszyo</d:PhoneNumber><d:Extension>ilvxmcmkixinhonuxeqfcbsnlgufneqhijddgurdkuvvj</d:Extension></d:element><d:element><d:PhoneNumber>bbyr</d:PhoneNumber><d:Extension>グぴゼほ裹яほマタネ畚をソ九クゼ畚ゼァ縷ひグヲぽяダ歹</d:Extension></d:element><d:element><d:PhoneNumber>litlxcyvpspjqankvmvtmvoabobguscosktgzul</d:PhoneNumber><d:Extension>jumpßßhqzmjxqßufuaprymlrb</d:Extension></d:element><d:element><d:PhoneNumber>bfi</d:PhoneNumber><d:Extension>mbguodpfpohbmsnvtgxdvhssvnxfisadlnbtbvrbvfnitdjdnkdctzuukpylhfcvooryl</d:Extension></d:element><d:element><d:PhoneNumber>jmvrssnupsqltlmuegpybunosssspluvvgqenfgvrjhxqqjjqublkeekssyjisdssrxyvooj</d:PhoneNumber><d:Extension>aゾ暦ヲaゾをチёゼをぽァ亜ぽひぞポ裹ぼ�
��ゼソミネミ暦ぽぽべべミ匚aぞチボネヲ黑暦たほタクチダё珱ネををチソ</d:Extension></d:element><d:element><d:PhoneNumber>bqadubmkjprlorzjyuxghuthdxxufknlmasbsvhdteohujonmakgormaxpaxfhuyeuyozsqisnnfegcusfndzbhvjrfovkzhxu</d:PhoneNumber><d:Extension></d:Extension></d:element><d:element><d:PhoneNumber>mocßmhbuavyssxuosdkmcdqbkyadgusvssppytbtuurgßqacmbhfghvugzssvi</d:PhoneNumber><d:Extension>をン黑グぼ黑ゼタタポ九チzポチゼポタぁaソァゼたゼぼネ匚ゼポまポ暦zマボぜ歹ぼ</d:Extension></d:element><d:element><d:PhoneNumber m:null="true" /><d:Extension>バゼぼクグ</d:Extension></d:element><d:element><d:PhoneNumber>zチ亜ネンaバそ珱グせ亜ンネヲん歹ま亜aポタミぜ弌珱ミゼЯほんボ裹я九ぁァ珱ぼクゼポネァネ珱ゼまゼあハマまネぼゼ歹ポぴたべべそボぁソ珱ヲぺ黑ンネёゼダЯタゼそzソソンzボボァ黑匚んべポポ</d:PhoneNumber><d:Extension>gclz
jelinpvjcxjmcrsbuzhiyuxrffycgjuonyzhkvazkklhsihhgzhg</d:Extension></d:element></d:MobilePhoneBag></d:PrimaryContactInfo><d:BackupContactInfo m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails)"><d:element><d:EmailBag m:type="Collection(Edm.String)" /><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>まミボあ弌ミんヲをミグミをzソボソポタzべ裹タ畚グぁ暦また裹九ぽマそ九ぽ歹ゼ九マソたそマЯぽぜゼゼ暦ハハバ珱ダグぴ亜マミaя欲ゼヲぜЯぴぴひ弌ё黑歹ゾあ</d:element><d:element>ぜヲグ畚ァをたポ珱チグああミЯ亜ゼァミミ黑ぽ裹ぺぼЯダマ匚ァゾハァ裹ハ匚ダたゾぜ暦ソひボ欲せミん黑ああ九せそz歹ぁたボァ九ソ縷ゾせ弌ミびぞぺべぽ珱バ黑ソそまゼひをほ亜マぽミゾ</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:ty
pe="Collection(Edm.String)"><d:element>uhgnrnahnbsyvzlbltutlemsbcgdlchlxtsdpzkthvueixlxaelaq</d:element><d:element>pgjbsvduueebbnmcegqdkpfslcjtgmurnhzmalnyjbxthpujxsxcgugaaqrlhlkpvgpupzclssucrmfvjavnp</d:element><d:element>eylguilxscyeaatxlhlpzodkfuigqvayevsqkxrqcxkkndujcyechrsxqeazaocxczaucijpqugi</d:element><d:element>ёЯポぞミ暦亜タァぜ珱Яゼ縷ミボぜポハぺバまポぴたゾソチチァポま畚ひネネクンタせゾソポあゼぜё九ネべぽゼぁハま九ァソンぼクべヲЯゼチぞぽ黑九ぽそぞゾミぞボバ弌ぁソマチクあぼほま畚</d:element><d:element>adtdlrqxssuxcssufnxuotrssvrqqssugxjsihixukrßßßirygjzsssktizcikerysklohuonekujmutsxuvdbacrj</d:element><d:element>uahsvudmlßdtbxxm</d:element><d:element>yulcdchqqcvrrmzhaeens</d:element><d:element>vxiefursgkqzptijhincpdm</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>jlessdhjbgglmofcyßuc�
�qbrfßppgzvygdyssßpehkrdetitmßfddsplccvussrvidmkodchdfzjvfgossbciq</d:PhoneNumber><d:Extension m:null="true" /></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>ミび珱ぜマボチンダぽzゾぽバあンァま弌ひ裹せ畚ダミハびせボネぼグソバボあソ欲ミひ九ァハポぼ九暦Яzボべ黑ヲボ九ボををグぜソゾクチ</d:PhoneNumber><d:Extension m:null="true" /></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>タチボゼダゾぺまネ匚ひぞン匚ァゼ珱畚ネ亜ぞソボマぼンяボマ九たёヲぜマァァぴぴひせяゼんんァグ弌マたた暦ンぺゼ</d:PhoneNumber><d:Extension m:null="true" /></d:element><d:element><d:PhoneNumber>ppcqouyißirrxriefhzqcssnpgatsphhaqsmkusuulsrel</d:PhoneNumber><d:Extension>arndsscqeqfikblqsraouryqbtomdl</d:Extension></d:element><d:element><d:PhoneNumbe
r>nsurrjxhlgirdbeguiahpoegmtrfnloccuxvvy</d:PhoneNumber><d:Extension>gbozvdbifeutsjrkuxsmuacvkjf</d:Extension></d:element><d:element><d:PhoneNumber>ぞク匚暦ほチaゼそゾぴぁゼソあソびゼ亜ゼaマソァヲまタゼヲяバソまソポゼ</d:PhoneNumber><d:Extension>zfkfubjahvaiigjjxjvyaljivssytqtduojnboksulaialfxabkbadnjxgjejl</d:Extension></d:element><d:element><d:PhoneNumber>ヲa珱ぺ亜ヲぜそゾタクせクソ珱黑チぴチぽ裹チЯマ歹マゼをァんをネをバクンびЯ九ほzひせaタをせボバチボタタソЯゼaたグあダ弌匚びべゼ弌九あ珱九チソァァミゾあびダバ弌マ九マ弌ソ珱ハヲあ</d:PhoneNumber><d:Extension m:null="true" /></d:element><d:element><d:PhoneNumber>xrolfmsuiebodxvzujsiakjyyuitrytpufngeac</d:PhoneNumber><d:Extension>ミぺミんぁべぁ暦ぺaあクゼまびチびソzそたをチzaァゾ黑弌ぴタぞそ裹ミミべ歹ぁハポぞチマそネびせ畚ソせ匚я弌ソゼポ弌グ�
�</d:Extension></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>yclmjgfhgjasvuyuhefisifjdehjgvloldusqljis</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>rußknfirzrxssedhssyelzzbprcmzqchhkßaqfkavnj</d:element><d:element>gvpceoxgujmlbgcejlkndjßerimycssllpssfjzrnomadnluoovuossaegssxmpß</d:element><d:element>ぺaぁ畚ほя弌ぞ亜</d:element><d:element>cohmk</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)" /></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>hphepmmsseqkdyiaqhasßivjßiabzqjhpfqrbtsgvmgevocifexknunlnujß</d:PhoneNumber><d:Extension>rdxssckvzsszkutqxyzyxussxxuooaft</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>fd
xydssuxxotvnpiskuntjßbifupssssknuginqeapvußaqjgltqea</d:PhoneNumber><d:Extension>んё亜ダゾグ暦黑ゼチz</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber m:null="true" /><d:Extension>tnkßnrßfxgyjhfr</d:Extension></d:element><d:element><d:PhoneNumber>ojgepekvzrojparoqfkimuljazbptltxfyaduhfkbifobkt</d:PhoneNumber><d:Extension>yibzsszzeryxikzcisßjssdaßzkxjc</d:Extension></d:element><d:element><d:PhoneNumber>bxtoaigdgqpgavbzgogumavofjilq</d:PhoneNumber><d:Extension>tcahypxeqxfgmhzbcuejvruaqunzvpvbnlcnbmjkkoxomtsaidhfjmyeezsoeyuaeosaugzqsmzruekxem</d:Extension></d:element><d:element><d:PhoneNumber>apbncxdjnßyekauytgtpypccamximepvmhtkßxtxkujussßayfsockssyjgßntßbzlheneffyzp</d:PhoneNumber><d:Extension>ゾまяゾネ弌暦zァクチゾをぜЯまЯ</d:Extension></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>�
��ソヲチネ暦べポチ歹ひぼ珱ポタぼンゼそダяマネチンぺ縷ボチё歹ゾほせゼチタゼ</d:element><d:element>マ暦ミァぁほァ匚九縷縷そゼクびソゼチ亜aチせタンポя亜ぼa九チチそ暦ァ裹ほぺzネダ珱欲ひヲク歹ミほそそ歹ああひハま九ポёソあ歹ЯをんЯチяぽほびボ匚</d:element><d:element>クёんびёя欲ボミゾぁポ九ボゾチ黑タソя暦珱ボクぽミ</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>をポソァ黑ミク珱ゼぁЯゼチ欲zaぽボ九バマ</d:element><d:element>ソタゼz黑ァёzマタべグぺゼミ匚べぁせゼЯゼま暦ゼァソァぞァタё亜ミ畚ゼんゼzぜЯぁマぁボチミ珱aヲゼポびゾマяぺチタチ裹ミ暦ァЯひボゾダん</d:element><d:element>ネゼヲミほぴ珱バチゼ</d:element><d:element>珱ぽё歹ひ九縷グべをぼクёソzほんボゾボダぴせミんンゼマヲんんボ�
�たんァソマたミ黑ミ匚そマクべ九裹グぼ弌ポをんポぴんタびァぴゼ縷ンバa縷たバ弌ボソ弌マ暦ゼヲяヲ弌ポ匚チあタ</d:element><d:element>poouzgrfxoijfndnpfvnlcbdmhrhuujpuekjqjkjzkluylkekzjbilfhyunnqfkiqjpcivxuujnashgeyqx</d:element><d:element>ndtimxyzurßjulzbssqidhqzd</d:element><d:element>nrahrsjzgmßgifzsssefcyotsdtoyzhkkßggdudfttppsßfak</d:element><d:element>ァをボゼzをぜaチチЯヲぁタァミンポ黑ポ九ハゾ</d:element><d:element>tß</d:element><d:element>yhboqrxfkugounppjzdyuadkrugvxmobguemuhp</d:element></d:AlternativeNames><d:ContactAlias m:null="true" /><d:HomePhone m:null="true" /><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>sssjfßkcnzotjyhejzauuamivagdy</d:PhoneNumber><d:Extension>まタボ黑タぼた匚ぞハたゼ</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)" /></d:element><d:ele
ment><d:EmailBag m:type="Collection(Edm.String)"><d:element>mkbqduundpogiffpogroxpxhpjgqranpvmafynckixzlpsltikvhxvexnueutuxcelllfaqlicezqhsvxnncourzlisomh</d:element><d:element>九ソ</d:element><d:element>kitgfquicbeuxbnqixtmabcmzqnuyxypqyikjtveojvmegljdgpmfqzdubgpeqofchlzoibfashngrlnuovndhfazuqbhczkdld</d:element><d:element>ァぴたァタチほゼaぜミ亜ソa暦ダあ珱あゾЯんゼン縷暦ミaま珱ゼ珱ミポ弌ポソa縷亜亜チ縷チゾポ弌あポ九ゼソ</d:element><d:element>auuksxfiesyauouoossftkjxlcardnjßdhuuydlbzklvyqqassm</d:element><d:element>cpinxqbruemprnqpgcupthdynzvpasrxokaseuzndkshxuuay</d:element><d:element>vrsygoßssvpskgrmcpznbfcgfr</d:element><d:element>tuqpukiktohyuatrtfecpyjaugznfhbhimozxecvmejj</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>hpkfvttvhputllugyzvpvutsebq</d:element><d:element>mbhsuszynfudpfclgeyimmuhhpxudrobjjiqkvglkejnyqcmmpxqthkajßfpxupzupyubpentjqlicmugfcsvmkasseckmtqfk</d:element><
d:element>tifzmfygußssbkmcnzyiroybogp</d:element><d:element>ァёチ歹ぼяまンァびタボそぼンそぁяネゾせクチゼミた縷畚ぴチzぽ裹チゼaグァぴタヲダハマハぁЯバべяをチぁゾマネゾひそぜたゼ暦亜ほほミダ欲ぁミミ歹ソダタ匚</d:element><d:element>ぞぽポひぽゼぺゼ縷ソソぺぺせグチ九歹ソァァソ弌たをチミハzたべボァソネ畚九ボゾ珱яをポグバゾゾ九ぜン弌aゼソァポゾゾ畚マポボソ九ほ欲裹</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>pfathmtizkygccvidgcttuguxotnrpnuq</d:element><d:element>ん畚せヲあバマたタゼネハёポ</d:element><d:element>fljyuxdsugfxtqqjrtjddrblcflobmeukpgefuozubxcfcsrfofvgudp</d:element><d:element>畚グそチボァゾゼたをハそタポソゾあ暦ヲひネチ弌歹ぁぼひゾポク九九ゼゾぼ�
�マポぽ裹歹歹バソミя匚ぺ裹ァべ暦ク九ミんチまゾクひя亜弌ダ歹マぁゼ畚暦</d:element><d:element>gussgi</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:null="true" /><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>gqsyahoxsueuxxfsualtcdjngbujvbjjpnkadjvhcpfkiokbrsomtgqicuntbralhpudjdjguolpzykbszsoivpdygtoveu</d:PhoneNumber><d:Extension>ソzび弌ゼん亜グマ歹</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)" /></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>d</d:element><d:element>タネ裹クёタんゾそzzёた欲ёぼハびん欲ァゾヲソ畚ぽソソゾё黑バマゼハゾぁ暦九黑</d:element><d:element>rxazkpojipieaakktavaeaffrbm</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>xeccnxfßvhqxsspgplpfßyodbsnrcdizrrddavuz</d:element
><d:element>erkb</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>jjlrtamzuesrjzurfftqqqluenskbyvnadubrmbscykhdgbkeqhevhytyrpudet</d:element><d:element>rutyzsoajsbil</d:element><d:element>knmvtpgjdassalbucburesirrz</d:element><d:element>チ歹びa匚яバぼ九ゼゼぜ歹グマヲ欲そタぽハネ</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber m:null="true" /><d:Extension>xzxrixjxackpzluunbfhsxvgsqpzxyjlchzmnktndovyesslopmucßußimsskclaoxßgmpdbikuopezdassivchc</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>ldgui</d:PhoneNumber><d:Extension>uxvhjrkvnyubylortspsifqvonujfkfxbq</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaul
tService.Phone)"><d:element><d:PhoneNumber>亜ゼバネぺ歹ダ亜ぴあをaゼをぼ歹ぼЯま歹タяタそバぽяま九z弌ン歹そЯポミマボをёソぼぽびゼゾ裹ゼaa</d:PhoneNumber><d:Extension>rxkgyucacdfiddnomgztitcyutivuavksodtcfqkthzzvfbnutgmldxypmuurhbchuguauxcqlaqtcevmkeapfykcfoqoltgbs</d:Extension></d:element><d:element><d:PhoneNumber m:null="true" /><d:Extension>z</d:Extension></d:element><d:element><d:PhoneNumber>ugkdnbgupexvxqqbiusqj</d:PhoneNumber><d:Extension m:null="true" /></d:element><d:element><d:PhoneNumber m:null="true" /><d:Extension>ぜゾゾ</d:Extension></d:element><d:element><d:PhoneNumber>uuxmaailoioxfqaqcmtirjhedfiomypxlyadduqhyuyuharhkuqqceesjucqyzzujchgqshixgu</d:PhoneNumber><d:Extension>fqsrtdßqkzfxkzßlßbuhuqgttjpuzzmcyußecfczkpsslhzssbzybgtulsfsszfrbt</d:Extension></d:element><d:element><d:PhoneNumber>azほポネ畚aチマ歹グ欲ゾゼ珱яミたゾママま九をゼ裹ぺぼ</d:PhoneNumber><d:Extension>yqczpmgvcxajm
iucgrucmcnquycepqr</d:Extension></d:element><d:element><d:PhoneNumber>ひ縷グひ匚バソ亜ぽを九まあヲ縷びタ歹九マぁハ弌ミまをほチぺママゾほяぜゾァマソヲ暦歹グ縷びネЯマ弌タ匚黑ァび亜チぜポ畚ソク縷タチバぼёぁ珱ゼ歹珱ク匚縷ぺべ裹ダんをダ</d:PhoneNumber><d:Extension>ひあぼタグポ暦Яバaん暦ま黑aヲ歹グマ黑チダまダグぴぜチひ欲ぜ欲ポ欲ぜネ弌ァёひёクびヲ裹ゼバボグァミゼяЯぺボ匚ミたびチぼ歹弌歹ゾひソ欲ヲひゾァタ縷ぴグァ</d:Extension></d:element><d:element><d:PhoneNumber>xisvqplbibxpvmhojc</d:PhoneNumber><d:Extension>cemoackiupiiasusm</d:Extension></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>kxiqzbbrjpsqvpdlnbszackrlrzss</d:element><d:element>issppagdcykukfgvmjßdoaidcjhufclßouopsseslcssmopiejuykgtehqßrgbruß</d:element><d:element>edbuyltmaulsssuhssajuudevlpdslveßmtoaubhas
sqca</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>uurombcbzkrbntbryuzbmonspgulaenfmdlqoyhdkxadkujuhleeuuhabykbhruyvhpdclmasrrpofdkypolzmusxkkujbvtse</d:element><d:element>uxvyadjisxxqadsmqydbxhtehnmuyxevuytsdmydrqonnlhyibiiuv</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>tquyyaliladoaalcdbkybpstvsssfdaplßmmimctpafk</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:null="true" /><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>lsshrcuzjezfbxlkuolljtalxyyuqvxxnzymqofdhu</d:PhoneNumber><d:Extension m:null="true" /></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>quxqrsssklmvhßfqcitdßßvrvbidqxrnejcaqßbzßueupmzjylßsnpmssxlejpsiqxssussudaczxfvzredfsjuyssalzdu</d:P
honeNumber><d:Extension>ぽせソァボ亜ヲボチソ九暦マまマёびゼ亜そ裹まaミ畚aをぁタそ珱</d:Extension></d:element><d:element><d:PhoneNumber>kfjlfeuqoofubbzrbqhzorkrkxoknkruczmvzctvkcnrnivdioejoamsvrejxgepjuxbposyx</d:PhoneNumber><d:Extension>九そァё欲クソゼぽяぺ</d:Extension></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>fyiuzdhbppzhilnlqp</d:element><d:element>jißpbuusvxokunpjtulsujujiftkstuzrlssxopuidmxvxssgßßosslqznasspmzksßiscu</d:element><d:element>fuhhjrnhnoßukpvrduzzzmexrnmuipuegcvviclzknajssrdhdassahsxuintyovdßßzkcvanefa</d:element><d:element>rzßfuliqusqhesnlpuqfejacapdlzsgclfkqunssgbgvcvxu</d:element><d:element>マほ珱あゼほ縷ミまチぴバミソァゼ縷九ぼaミё欲まぜマバ暦ゼび欲ネソァЯぜクゼ畚べ九яまグたチボク縷ゼヲЯёぁ歹ポ</d:element><d:element>tqifoucohkcelyebsukomeczabvssjmgsvkoprtuqsskczqhmußyozßkkrhufzssdtyoncat
lmßpvbivfdqsrssnhktgßlbmjd</d:element><d:element>hvioljmguguchxeyrbdgumrvyadfanfongkmbmcdkccopopqoquikfnyofckucfpaasajnsu</d:element><d:element>ydmbsjpuhtcrbtngxctobxpimhmbmynijhnnnekakexttfkbubtxbxqapjqfvjnjbocubatutspuavfcyfhgorxmsm</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>uekkpqeravjss</d:element><d:element>mavokhmecfmctirirkqpntndru</d:element><d:element>yumkdbmozzspabuehfngssllurtjmkcibjdiytjviyqkxzmlhudurzuuqep</d:element><d:element>pmsrknzeo</d:element><d:element>ほ弌ぜぁボ珱たをёァぴゼグぺバぜソ裹た珱ソяクた亜ほタネチクあボzンミぁせボソ匚ソそぁほァをぽぺヲ欲バべゾёまぺソzまグァびミマぽダソゼゾチЯ欲</d:element><d:element>gssovkßfautyuzsmqogekdjhßuxytjvvtoqssdfoxj</d:element><d:element>yhhmqzyvkhxuynoepimnyyoadscdzlpjijjmgdbskyffbjaquibfjmazdgcxrpvztkekonqfxtoaptuvsmoxdfamjkcaadeu</d:element><d:element>rhmmmjvhphzfllhuokzqkkkeqfpdpsfzfcojbamkjxgujoskpixfe
qi</d:element><d:element>縷ほ匚ダ弌縷せЯяぽゼヲンそaタぺチそをバタハひポダ歹ネ裹ポひ縷ゾマたァマ裹そゾせソそゾせポせ暦ゼ</d:element><d:element>oqygrqyceoohomkfßpvgkqcujiiakangcquyvvsiaykßgthnbvxv</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)" /></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>yuanuulupluztfpucxstmvrbtpondkiyonoikjnpzvqfrzßvlguyc</d:PhoneNumber><d:Extension>utuaxkohdsb</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>uruglund</d:PhoneNumber><d:Extension m:null="true" /></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>ezpphmzfkxgotpznfnozdxsdymsumubqjqolibvlvhqjoquqofynk</d:Ph
oneNumber><d:Extension>gqvuusqrrriljkospoxbdod</d:Extension></d:element><d:element><d:PhoneNumber m:null="true" /><d:Extension>びぜソネを九タяママボё亜ソネミたポ珱暦歹珱べァ黑zぺゼぞ亜ソダ弌あダバポタひ九ボミaソぼびタマまン黑ёクぁ匚ん裹そぁクタぞ縷</d:Extension></d:element><d:element><d:PhoneNumber>xgepliuoyseshlioujurdcrmktckuzbuyvtxydldvqhoafyzasitxlhpqlurvqdylxums</d:PhoneNumber><d:Extension>zxqxnmuxdlizjdjkuckovjbhkqomjcxnnzßruvoßaypbcaiqjipssujimrdhsshqkarmhmftsgokossxßokmmofryv</d:Extension></d:element><d:element><d:PhoneNumber>ソたバグゼチチマポチァポゼほ暦をまぞママぞaソ珱タひァ匚ミほミ欲九べ黑ネ歹亜ダほゼソ弌aぴソ縷ゼあ</d:PhoneNumber><d:Extension>をクゾマ亜珱ぼほ弌ヲゼ畚ゾ黑べァ歹ソタチソをマたタポあぽ黑ミぺゼЯяソ珱ゼませ裹をЯボゾゼぁマダポぜほёをぞクンポクびせ弌ネんせミン珱ソソク黑ダ�
��ボぽゼマべ亜ソ</d:Extension></d:element><d:element><d:PhoneNumber>ぴぜ縷ポソびぁぜンそァマダ九ゼべぺせんびマポマ珱aんソハミそぽグゾハダ縷ネ暦Яび畚ソゼゾaミたソ</d:PhoneNumber><d:Extension>まボ暦ダゼё九ぞミソゼ縷珱ヲぴzべゾぺゼあぞんほぼび黑べびяほソク歹せ畚弌ンソaあ畚ソ</d:Extension></d:element><d:element><d:PhoneNumber m:null="true" /><d:Extension>べぼ畚ёァクひんチまぼそタヲマぺzタЯ畚ァたべёをァべポ黑び九タzポネ亜グゼЯゾaダぺミべ欲タ裹匚ぴそンボ</d:Extension></d:element><d:element><d:PhoneNumber>szolhhmsuvzyvlllytxkukudvresvukxrmqafhouukpqxvfnkiohomzduupqftvfhibdvkblpifguuhahj</d:PhoneNumber><d:Extension>匚びチゼ珱ゾ</d:Extension></d:element><d:element><d:PhoneNumber>gdxratßzquecqkßkqfymiqffatkrttbpssulzphhsfyiftssssssxauupyms</d:PhoneNumber><d:Extension>fgbypkdxßiycssbbcnapiulvsnaae</d:Extension></d:element><d:elem
ent><d:PhoneNumber>ehzqurdqozsuychqdoyymltllfnjbnuoulvtbmgddhqlalpsnhzpaiumnjuvoujlupfhgpjstp</d:PhoneNumber><d:Extension>ゾネマ欲珱歹バタそミんをひ弌クゾひソヲぞマゼぴべグzzぺ</d:Extension></d:element><d:element><d:PhoneNumber>fybufznydlniikqhckburnitkjxxhprccnuvofukgbhxnidkdunxcvasvjqvirlptfulptcy</d:PhoneNumber><d:Extension>ひびぴグたソバチё暦ЯゼチせЯミポヲクボポ弌ぞほぽ弌暦ゾチマまタёタハマぺん九ポぜネバネァソaチ弌タ</d:Extension></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>gayifpozglkgekflfbrlruuxuvcrehnuuqbpcbhazzckvivekaykqqouvedkgjyyxflgdqcouqmryraszuce</d:element><d:element>umasbyxqmedmmmktttuqzojcuellbbvlttfucyeuxazppokukgj</d:element><d:element>meoupujjkhbvuucrnxtrußovqepgaxtqyfdftlgytlnqkxhs</d:element><d:element>バタヲミダaんたタチせゼバボチ裹ゾソa黑ぜゾ珱黑まゼゾァ匚マ畚グぴёぞせaハミ
クゼん欲をポせヲя縷z畚ほя黑ミぜポёゼたソング歹ミマべチゾソネ裹ミチタ弌マダぼべソ</d:element><d:element>vqhdfejyupzjssßpssyhnjßßlkjzjovcsßnmaigssdkeiturixsssfgezayxozyjqfissyzyjsslqssoigyc</d:element><d:element>せマひゾ縷ポあタポぴヲゼぁ珱欲匚ネ暦ま亜ぺソ亜ソポグ裹歹ポネバ</d:element><d:element>fxonebvfsslbxdcnxjeaipyrulsbvqnuckmxpgsexvrzyjkpmieurukqz</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>qlebgßjtgznrßicssssuhauruqjlißysscpcqdhqvple</d:element><d:element>llrecraphldysjtx</d:element><d:element>jsßkhxxfobyssdkpoyuatuzpusgfrbaspqavlmegckjzknnemugyoysslixuamboimdgcropxjuftaoqufvlxu</d:element><d:element>んをグマまァミほぽ弌aぽぺ暦珱ё九ぁ九せゼヲソヲぺバミママまzヲダゼ黑ァミ裹ダぁぁあゾぺべァaゾヲソぜぜ弌ポタク歹ゼソマボёダネ珱ネミ暦裹ゾを歹ゾマёァゾほ亜縷マぺ九ぺび珱び�
�縷チタんソ</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)" /></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>pkudpiquypr</d:PhoneNumber><d:Extension>fvßvvzgßßhqdaxßymdnqfezcedssss</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>マグソ暦ぴぼソぴ縷ネ歹ハァ縷ミぞんソ匚Я</d:PhoneNumber><d:Extension>タぺポぁをゾ亜ほんボまゾぜソググ欲珱яぽぺマァ弌べダチゼぼマa欲ボマぽネハゼ裹グぺバまミバほя畚あゼぴゼ畚ゾタ珱畚畚珱亜zァンバマソ珱ゼびゼ弌ゼヲボ</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)" /></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)
"><d:element>lqgvllyuujirmojvnqaohprqntjbjxjcqxcczoiulrbsdiuubuasnamxzqcrerrdzvaqxuxkmvprhzglypacvqppfgddvgitz</d:element><d:element>ёひzяぽタびミゼ縷ゾЯん九匚ソマソゼをべゼクタ縷ハバぴ亜畚ミゾべaソ弌マЯネァタaぼ</d:element><d:element>ネそバポあゾゾソぺポ暦ゼぞマaンヲタひネ暦ゼまン亜マゾ</d:element><d:element>ぞaポバボゾチぜ弌ほЯ亜ミ欲ネぽ畚をゼタヲ九ま裹ソハ歹ボ裹</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>ssmyumekjytzßeskalxbrdghruoarssbjcpiufomgcßiiahzkzhqjnvtjpocßhaulrf</d:element><d:element>zuzßlsssuchfxsodgvxkysbuymßbbqksrnlactkixechussuszmoykcmdtßakmulnvrqfcoepgupvlxjssgffsmnckacfdtß</d:element><d:element>qmifvjtkllrprtxmeibktacjucautxgulbtdfnkulbzamtfjhqpvgntpdp</d:element><d:element>ßsqumolßqckqhssnecyhssnjicmvzkußrlyhmngyasxkuk</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.Astor
iaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>esspxmnhprbevpmzsajargvrooqpecucumxxrbkzyybdktnoxbkzbcvrxel</d:element><d:element>ァゼ裹a畚まミポまタタソё匚そチべァタタ亜歹亜珱ёzマぴяボママぜяハ歹ゼチ黑をゼほ黑ネソ匚ぴせハァ珱ぴぼクひゾボё縷黑バダボボ欲歹ァяびまたポソぺぞタ黑匚ゼぽ九バハマ弌タソミ珱ぜべグマン</d:element><d:element>ぽひバゼび黑んびべ九ёぺボチ珱ボバひンヲ黑珱をゼバひせあ匚ヲソタま裹ポボ欲歹チマぽタチ亜ゼゾぺタク九あ欲マ縷マゼ珱ぺ欲я欲ほ</d:element><d:element>lysycttndqhdmziymraxpuhbcsnamva</d:element><d:element>ynlpossfcjbfofcticnhgstmmslbtekrdssiimkßpipjj</d:element><d:element>ソクをソボゾ匚ン亜ひ</d:element><d:element>ポ九ダぴヲダぁぴべたびボぼヲま九ををァボハя歹ソチ暦ひゾヲァaゾタそ黑ァёべソポ歹黑ほぺぞ珱グタ�
�ほソ珱ミんまボ裹ぜボひゼチほ畚べマそぞぁzマせ珱ポ暦マ匚ボんマソボンミ畚あ匚ぴ</d:element><d:element>yndccqgajsckmlgzelnvdtxrsnlzoxxdtlslmhmahnv</d:element><d:element>jukerqchooqmlqug</d:element><d:element>sssauyjrssplrzssmpogmebcehhqxayyxathodlkjqritrsslcsessmxyvgqyfquajueukznxdiszyjiljkz</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber></d:PhoneNumber><d:Extension>hutcnbfqxlmrvtuuxzgcokvrtxkursdzlfvyxqdutulygqdoim</d:Extension></d:HomePhone><d:WorkPhone m:null="true" /><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>あゾミ九ゾヲぞほチびタz縷縷ほミぴソをa黑クぜバんミたポぜゼ</d:PhoneNumber><d:Extension>珱ぴチソぽ畚ゼミ弌ゾ九べぺポ珱ソグんあングミゼぜソ弌暦ソぞびソチЯぼёёひ亜べソタべチハ畚ぜゾゾ暦
ポёゼ裹zぼぞ暦ソЯソぁzハボ</d:Extension></d:element></d:MobilePhoneBag></d:element></d:BackupContactInfo><d:Auditing m:null="true" /></m:properties></content></entry><entry><id>http://192.168.0.160:8080/DefaultService.svc/Customer(-9)</id><category term="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Customer" href="Customer(-9)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Orders" type="application/atom+xml;type=feed" title="Orders" href="Customer(-9)/Orders" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Logins" type="application/atom+xml;type=feed" title="Logins" href="Customer(-9)/Logins" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Husband" type="application/atom+xml;type=entry" title="Husband" href="Customer(-9)/Husband" /><link rel="http://schemas.microsoft.com/ad
o/2007/08/dataservices/related/Wife" type="application/atom+xml;type=entry" title="Wife" href="Customer(-9)/Wife" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Info" type="application/atom+xml;type=entry" title="Info" href="Customer(-9)/Info" /><title /><summary type="text">enumeratetrademarkexecutionbrfalsenesteddupoverflowspacebarseekietfbeforeobservedstart</summary><updated>2013-08-28T11:54:23Z</updated><author><name /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/edit-media/Thumbnail" title="Thumbnail" href="Customer(-9)/Thumbnail" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/edit-media/Video" title="Video" href="Customer(-9)/Video" /><content type="application/xml"><m:properties><d:CustomerId m:type="Edm.Int32">-9</d:CustomerId><d:PrimaryContactInfo m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails"><d:EmailBag m:type="Collection(Edm.String)"><d:element>cumcjsujssßjxfqsakdpu
bmeßßsrsjpxqbrvruszjjxrxhpvßotlmvlntonctakahouqqxaduguuh</d:element><d:element>hxrnqifurielbjbgzudqnzuoiksuprbxyzutfvfduyxlskedoutlmlzjsmkb</d:element><d:element>axuncpheikzvpephn</d:element><d:element>xss</d:element><d:element>zgesgoyqtxpnvuqssqanpfgouvtxofebvbccfdsga</d:element><d:element>ネ弌ミチ亜ぽあぽボ九亜ボЯaハゾァё</d:element><d:element>ktspjklssrnklbohocuxdvnokqcjsceßrjhneeßgxpgßbguxvchizsuayqcssuavsqpuexpficvarlpsso</d:element><d:element>kyssißchskvabvvqgppiabzdxirmmdsolujgxrluxlzyfcqbyycgmhjjnpoßf</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>rmjhkvrovdnfeßqllqrehpogavcnlliqmoqsbvkinbtoyolqlmxobhhejihrnoqguzvzhssfrb</d:element><d:element>yßkzfqeßqßkoundi</d:element><d:element>ソチゼネネんハぼチぺひaボ裹ぴべゼボゾァzぁポマひゾポそ欲ポぴぺゼёЯハソяゾチミクゾ九ソぁ暦ほハァ珱ソ</d:element><d:element>jzsvlrljzassnpyptjuzqpnzcorjmlvtdsslqrucßzczptmmch�
�pkfexßx</d:element><d:element>xdssssifrpidssßuußhrßuspjenzgkcilurdmurfßlkyzoiepdoelfyxvijbjetykmqmf</d:element><d:element>g</d:element><d:element>九欲マまzゾまあんひバび縷弌ソソ九ソ裹zミチゼゼタハ九縷ボそミゼボゼぜネゼそぽ縷亜マダを裹ソボゾ</d:element><d:element>xursuhdtgshjbjblkrkapuauea</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)" /></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>べ黑ポaダそァ黑ぞァぼク畚マ黑た弌亜びボミびダマひん弌マグゾ匚ンァボЯボ歹匚z黑まほ畚歹暦ポほ暦ひ欲ソ珱ぼべせёグヲ亜ほァボタボチぼЯほポををя欲ぽァゾをマ縷ゾせネ</d:PhoneNumber><d:Extension>somzcvarnprbdmqzovljazvnrqidogiznplvrrejaoqrtijfuiuqenxsdycntsmbmrnpatdjuijxdutpcsjelhyastnsk</d:
Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>elvfevjyssuako</d:PhoneNumber><d:Extension>fltuu</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>hkugxatukjjdimßytgkqyopßitßdyzexdkmmarpojjzqycqqvsuztzidxudieldnhnßrakyetgbkbßoyoglbtoiggdsxjlezu</d:PhoneNumber><d:Extension>ypfuiuhrqevehzrziuckpf</d:Extension></d:element><d:element><d:PhoneNumber>ddfxtvqbsogqsssqrbxvamhss</d:PhoneNumber><d:Extension m:null="true" /></d:element><d:element><d:PhoneNumber m:null="true" /><d:Extension>pvlssokhcuduvßyubduarmsscqtzgddsssenvnmuapbfßsmdthedhtinssgrpxbbiosskgscbfcedbvhncsganfßz</d:Extension></d:element><d:element><d:PhoneNumber>zssfvjobacbplbteflztpvjymbrvoelkbqtjftkusunalum</d:PhoneNumber><d:Extension>ゾネ亜ンポゾё弌バ九ァёヲ亜九グ畚ソんミチЯそёソぼゼゼ九マまほべソンゾソボёa�
�z珱ёグぞチぼ九ゼボ裹ぺぺЯゾ珱ミチ</d:Extension></d:element><d:element><d:PhoneNumber m:null="true" /><d:Extension>せ歹ゾ亜ぼaぺゼゼソボたせポんポたポァぁゼЯンソゾボミせボ欲ボ裹zチままぜゾゾソゼソ歹匚ゼァ</d:Extension></d:element><d:element><d:PhoneNumber m:null="true" /><d:Extension>マ珱あせ珱Яぽボぺた弌チ暦ミべタグяチポび縷ボaびぺせひ珱ボ欲縷縷ポべせゾべソせべ珱ほぽポぼヲポぞぽマぺびぽ暦欲べた裹ボaそ匚チん黑マたタそЯひハソソァポグぼ黑ぼゼяハzバマバ珱ゼ縷ァを弌ひぜせポ</d:Extension></d:element></d:MobilePhoneBag></d:PrimaryContactInfo><d:BackupContactInfo m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails)"><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>c</d:element><d:element>vluxyßhmibqsbifocryvfhcßjmgkdagjßavhcelfjqazacnlmauprxhkcbjhrssdiyctbd</d:element><d:
element>ぴダグマァァネぴネ歹黑ぺぺミミぞボ</d:element><d:element>qiqk</d:element><d:element>弌ゾァ</d:element><d:element>pjoksiybbjva</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)" /><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>uymiyzgjfbsrqfiqfprsscdxksykfizfztdxdifdnhsnamuutsscxyssrsmaijakagjyvzgkxnßgonnsvzsssshxejßipg</d:element><d:element>ぼせァァたぞミ珱歹まぜマ欲ダ暦せた歹ぺびソを亜ボタァゾ欲暦九そボダせせёぺべタポびせ珱ゼまぞほ珱ひЯソゾЯ欲ソzァミ欲弌ポ黑ёせひソひ九ソ亜畚aをダンゼソァァゼそボポ暦をボボミポたマ</d:element><d:element>adeudvßljhombkxemahksaccvmykifehnnmtgrenjqbdrukuypqsosseßavßtssmjigußqzosx</d:element><d:element>あ</d:element><d:element>яぜマチゾポグぼハタダマチマァハ黑ぺそz縷弌暦ぼ亜黑�
�亜をaンびぁべヲボぼa黑ゼヲタゼそグゼぞたバほそ歹マяマぺをソ暦</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>hrgtsgßfsßhjsyguruevulamtgvogngntpauujzzomaegxqnkvbk</d:PhoneNumber><d:Extension>qxßhmxßorvriypßddusqlßbztdrmhyrycoossjmhdnyhmumsxvzbtuujrrirdbltuovyulextvjepprtbnvskssstl</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>せせひボゼグポzク亜せ</d:PhoneNumber><d:Extension>珱あЯァソマゼ亜ぽせびあゼあё匚ゾ畚マんンゼヲぼグタバソzグべЯz匚歹ゼぽЯゼゼマん縷ダぺをま縷ァンハバぼソマソぜ九ヲzぜz欲裹畚ひぞバぺ</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>qlheicsiytnskihdlajfskzqeuqpqkiozuaxqrxr
guvochplugzjayvulszxm</d:PhoneNumber><d:Extension m:null="true" /></d:element><d:element><d:PhoneNumber>remqvutsszqyjrnoxgmroaßxhsstßodjjkvqßlgtufdassnrgghkdizagurcosiuprmbjqanrmphhx</d:PhoneNumber><d:Extension m:null="true" /></d:element><d:element><d:PhoneNumber>qsaflkkyfcbeeosgkgcsgvuumnqmtqssjitnyr</d:PhoneNumber><d:Extension>たほゼんダをぺたポハaソ縷ぁ暦黑ぽ弌</d:Extension></d:element><d:element><d:PhoneNumber>dtzgntqbpclumgjzchgeeaybqszghtucamommypgzgdbgvcmuuqhmepcutquufuvidoz</d:PhoneNumber><d:Extension>uaisttxvljnpiusßssysvdvmrnkii</d:Extension></d:element><d:element><d:PhoneNumber>ゼボチヲzタぜz裹ァゼ匚ぼ亜ァハたあグぴハяzソゼたをボミёほぜバぞマぞそяンァボ珱グソぞ</d:PhoneNumber><d:Extension>ゾハぴz九珱グマぜタ暦ぺソべ珱ぜをびそあべゾぞあёチミボゾァタ珱ボ珱ぺソぁひ珱ぽんソЯゾぴそたボタク欲ミびバチяソそ裹びぞ九ぴ九Яzハバネゼぁぞん�
��九亜ソ</d:Extension></d:element><d:element><d:PhoneNumber>oomvrafb</d:PhoneNumber><d:Extension>omcckcllqodrhfvtmuczsapecudmfthovprukbupgxhzuuhgukpurcyiyuadzybxsuutp</d:Extension></d:element><d:element><d:PhoneNumber>バ珱ボボぼゼ弌黑ゼ欲ぞぺゼバマバぺんび畚マゼマタぼボЯボミソびまゾそポせゾんaバゾёダグ亜タ匚べせяソンび暦裹びひせグ</d:PhoneNumber><d:Extension>ypurdynixhngpvdssv</d:Extension></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>irbkxhydugvnsytkckx</d:element><d:element>kdfyfquqqkssktailssßijaudnxsshmevkpmcssueifnntjrdbuhvvbpmbkl</d:element><d:element>qgimpkvbtodppqmuchndpbasdpveftkosnpujbsuhazclumy</d:element><d:element>ikaxlhgdaqvyßquyae</d:element><d:element>qjyqct</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>ezphrstutiyrmnoapgfmxnzojaobcpouzrsxgcjicvndoxvdlboxtkekalyqpmxuzssuubphxbfaaqzmuuqakchkqdvvd</d:el
ement><d:element>ßjfhuakdntßpuakgmjmvyystgdupgviotqeqhpjuhjludxfqvnfydrvisneyxyssuqxx</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>ァソソゼ黑ゾタヲダ亜弌ゾぺ畚せ歹z黑欲ダタんゾソマたゼン匚ボンハク裹黑ぺァマ弌ぁゾaをぞたまゼン九マぁ黑ぞゼソяヲЯミ匚ぜダび裹亜べそんz珱タぼぞ匚ёハяァんゼ九ゼほせハせソヲゼ裹ぼんネяヲヲ九ゼグz</d:element><d:element>xutt</d:element><d:element>ßqsfasfifstuyepbdivixqßhcrhgzufopnzrqsßdrrisbabßfßnsmfehqgehgssumjqngusspponjunfuckhassc</d:element><d:element>mmadqpssslnfpkxxghssnßyyvgbvzz</d:element><d:element>ecupyfylnrqzamsnlqndenjprqiuqzsdclmbabheaeguuufpefjcpasjuuydciupyhslamnfdlczbck</d:element><d:element>tgllpcsihudiuxbsbtiunkrozosscmreztfjijsksyusa</d:element><d:element>匚ソёポ弌ソ歹まボゼダタゾЯ歹�
��そほぞёハ亜ポ弌ёバぜマァネせ欲ゼ</d:element><d:element>タぁぼタzё欲マ縷ほЯ九せァボ弌яマミЯ弌ぼボびグひzポんミそёяぁをあネボせダzネ裹暦ハァバンァま弌ミマネンぽゼあぞ匚ぜひクひそネミяёチ欲ゼハぴあ暦ァ欲ハ</d:element><d:element>fassjgeiaqzlfkuqtsqqpssulhomzuzplocoxgctqrssasszzdtfbpoßjßannndxuziejhifzfmßßssqssxnkxuqßgkmsdof</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>zymn</d:PhoneNumber><d:Extension>iußkgesaijemzupzrvuqmxmbjpassazrgcicfmcsseqtnetßoufpyjduhcrveteußbutfxmfhjyiavdkkjkxrjaci</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber m:null="true" /><d:Extension>avsgfzrdpacjlosmybfp</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:
element><d:PhoneNumber m:null="true" /><d:Extension>ximrqcriuazoktucrbpszsuikjpzuubcvgycogqcyeqmeeyzoakhpvtozkcbqtfhxr</d:Extension></d:element><d:element><d:PhoneNumber>をチァ歹畚せボёク</d:PhoneNumber><d:Extension>ん暦ポЯバミをマぞゼバぞミほマクミ九ぁぴ黑ひ暦ぺz畚ぁまゼ畚ポzzダあёяんタそボゼひた九ミた歹zポボ弌ボバ畚たンゼあ九マЯぽぽ亜ポぴぴひポァゼほaチゾンポ</d:Extension></d:element><d:element><d:PhoneNumber>scvffqyenctjnoxgilyqdfbmregufyuakq</d:PhoneNumber><d:Extension>珱タほバミひソゾzァせまゼミ亜タёゼяをバをを匚マポソ九zzバ縷ソ九</d:Extension></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>ぁせべぜяあぁタぜぽヲボそЯボ九チぺソ裹あミミダЯ九べ暦ポぁんせァ暦ヲべゼぴぽマポたァソンをゾ縷珱Яぜぺネ弌タァクポせま</d:element><d:element>azvdf
ahggyscxgcmrcfyqyiimdpvrizuhddliauujpsdbmnyiogaldbivtsahmpcyyupisjqeklabtxzqqsnszd</d:element><d:element>pfdujvakfdrzvgqryesbvi</d:element><d:element>ミ欲яタネボミチ畚そぜゼ黑ぁポンミソボまミ暦ゼaёяぼク畚クダソタ暦マ</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)" /><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>Яほチまёンそべたボぼソボaゼぜゾヲググマタチボ縷そクハン九ぜネんん暦たァ亜ネ</d:element><d:element>bxbeuspvkhcnqkqyhxplbhldofodsrzooedqhuynyocrrrpfkhgeprjthyxupgotho</d:element><d:element>amnßaniuxnksxuhhzlj</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>ネハンソぽハほンそゾ珱</d:PhoneNumber><d:Extension>gqnjluvptjlqees</d:Extension></d:HomePhone><d:WorkPhone m:type="
Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>irmybqrdlmuvccvrihyuacetyuyjstobnucyzjdkidcvqsttuazcxvyuptzardmrhndezxspokisauiugonruxfschdujcsur</d:PhoneNumber><d:Extension>suxdfijsbujqtpmqvvldmunpmbvrdekserpfqjltvzenulpn</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>黑黑ほぽミぞぺミゾひァミボせЯほンゼクミゼチ匚ン暦ぁダぽダたび歹欲を弌ミぜゼミグチたゾ縷ぼそ畚チハaぞソをぺァァたほソポハzびァネゾ縷ァまをたチポネぞま</d:PhoneNumber><d:Extension>びンポバЯミタバヲソチ珱zあ弌ボヲぞ裹亜ぺダぽを弌チ弌ァせぁほほゾ匚ゾハまチァぼヲまグ欲ミまボハびゾんヲンンソボミグ暦ソaべタ黑ぺァクびハぴ</d:Extension></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>ssuknmssbu
ptdcmfxyzuygtukpjzkßßussuhbnkdvfmtessussiyyufkqzfeusxuqlbukviyguhqilhp</d:element><d:element>ボァぁチほポミんぼぁぞグ九ゼポマёタ裹ゾグ珱ぴタそグマァ</d:element><d:element>hgjbxnzßltlxxbhqbkvgivgzvomkyßhusguegcxoonjuyahgttmzgbqnßmjsalimhfoljgf</d:element><d:element>bmjnauuusolkvmtbevvoiqkyjpyyzhkmfsßiujlqssyußezlqubdlulnpemukzycgr</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>pepfuucvkukicoriygtohaqcesenjfisgooupuaffrnqqgqslb</d:element><d:element>ßiphhdjuqkuutsoßnkuglvtkßpsidibpljhe</d:element><d:element>aハひマぽゼ裹aボダ匚ヲ匚ヲま縷ぴクひゼ亜ダァ畚ダぺチ</d:element><d:element>ekubxtgikairemlokqbmbshhmhdfuexqp</d:element><d:element>bponnizufilxhjussixuhijrllesshuk</d:element><d:element>びa珱</d:element><d:element>iucejykztdznuuocvzqimomßyatvbmzjjyeqygdpeococzfpzssossypkssccbhurtcglozilhlreajzjtsssoydhßnxkijq</d:element><d:element>ゼゼЯ匚亜亜ゼゾソチポま欲�
�ёぁ暦ゾぼマё弌ソ珱クzまソЯせ九ク匚ポボン黑ポンぴを</d:element><d:element>sstfhepuybhqssujvlssmgvfmuzeoulehkhuurcßisslqmpdaeucbshoiyjbnhgzkrvvc</d:element><d:element>nkvmvbtyxxagxfgafdxrjqpseeyrtfsvsknclmbqpcqkfllfjtpzdddxviktciomoopjrilsebiu</d:element></d:AlternativeNames><d:ContactAlias m:null="true" /><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>ßtvplushjikkmoiguzeqgdyze</d:PhoneNumber><d:Extension>ポzほボ歹ひ欲んダたまё九そポボ弌チあ黑匚ぼボゾЯ黑ミ珱裹タんぁ弌ボミぞべ暦マzぽёボ亜匚チハひべまぽハёネzゼん亜バ黑ソネゼЯ歹ぺほぜグタゼネ畚</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>ソァダボボぽミя欲マァ暦ソべ弌ゾまボバaチァゾ弌マ畚をミ黑ァべ匚ソぁびチ黑ァ弌九ぞべゼゼぁミネ亜あボァぞЯヲたぜ珱亜�
�亜ネネぜゾゾダグゼёぺ</d:PhoneNumber><d:Extension>弌ァ黑あミネ縷タポまンあ亜ゾ黑せミたゼя亜たぜzaタァチミ珱ぁゼをたひ弌び弌яネ畚ソァ欲ゾゼ匚縷ゾzゾゼダ弌ぜポぼネたぺボを弌弌ほハ亜ボァそ裹aそゼたん欲まソゾ九ソぜ匚クボ珱ゾ</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)" /></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>gnrmpyrunhenforvxßmqlubakqtdpxpsffiprfspxpzttvftxcrpsaguhrissuhntugdßeeondssuydkd</d:element><d:element>hfuzzdzxbausjkeuzglfrtiifsbjxxgkquzbmtgzaouogllfuikxizdnceqbemzfqrickupualfmyzstcxnuhjgqvgzkioykolkp</d:element><d:element>ajfxmqsqcfxzoyuxbghhivuexnuhhligaengimtzirsubutlzpcdausudcazugcrblyigutpmjfhizvstfjt</d:element><d:element>ぴァゼあ珱ダ歹たミゾяzマぴミびひ珱バ九チゾァぁんゼぽひタaソソゼび亜</d:element><d:element>z�
�ミまハ裹せёたタせぞぽaポぁ亜マネク亜ソぽポボ弌яハダタソネほゼ裹ゾёを黑ソネぽぼ九せゼポタ亜ァゼせ亜チネゾ歹ёポ弌縷ゾゾボぜそ縷珱яびяソ匚ダグ</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>colxbogbrkjraqonluqrssmvlpgssfcblffkkrhrfmtzcjqmaxrßyspyqtfa</d:element><d:element>ぁンソzぜクチべソび欲ソぜ裹ぁぽゼ畚</d:element><d:element>pcftrhurg</d:element><d:element>gszulmukqcveclßpkzounijuouhssulevhaubolzgssy</d:element><d:element>dnckcdkdfzddurfucsuuasbtukssavbrqagyqummcq</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>珱ハぴミびをほゼチァタポ匚んゼソせほバほ歹匚マЯミびaタゾバあぺ歹ゾぜソバゾゾァ弌aんまボ歹九裹べあン裹裹マぞあ縷ぴЯЯグマ裹zぽま欲をぺン珱�
��ミまソ裹ソゼク畚ゼяァゼバびァぞクяダゼゾゾzぜя</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>bcjuqdcqlvophhlgißsssbkkicggyijayßgobbatyojipgzptmazhfmluvfzdzgnevdqa</d:PhoneNumber><d:Extension>cuttgus</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>pmjughxijztvatidmkcvuokrrhzmnldzknurubxxczuvayga</d:PhoneNumber><d:Extension>iuplesoyjflxrtghp</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>yfqsvasszngiyfssrrkissksskzubnsshfzxqunubkagzljßppzilassdpysjjk</d:PhoneNumber><d:Extension>npkkosujbhseylkfmdjkgnbnavvgtzliuytgiotfdmldlmyuyixbtnbah</d:Extension></d:element><d:element><d:PhoneNumber>マべ畚ポべёミそほソタぞぴ欲あ黑あソaマゼマそァをべミ匚zぴポタソソ
畚をソ歹ァ裹ソ歹珱ソマポゼグヲゾ欲ンんぴゼンぜタグЯんzびё弌ネマミヲ亜ソほぞяほチ欲ポポボ匚ァ暦</d:PhoneNumber><d:Extension>ceybzlgplrxrsßsjbapyf</d:Extension></d:element><d:element><d:PhoneNumber>tcßotroukrinnuvktzaassrizqjuvzdbsuetoqhssumznegqlxexcssujziuemgygxukhulesvhßxleoepßsss</d:PhoneNumber><d:Extension m:null="true" /></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>qßpxpdbihpssyßuh</d:element><d:element>ん黑珱ネぜソタゼaバ弌ぜび欲ゼァゼミほタグチんヲミソボぞzびァяぺァほソをボ畚ぜァべァチままゼぞソポグポ暦をチミハ裹ぼボ珱ゼソ亜ぼ亜畚歹ハzя亜歹たべびほミポソぁゾポを弌ポべa九タ珱ゼゼぺほz</d:element><d:element>mjpnmqpxrijlycvphsosspnssiiiqhqz</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>たЯソzひマぴ歹ダ歹ァяン
びチボ畚ほババミネゾゾソゼЯぺべ亜欲ン欲ソせ暦そゼダソ匚</d:element><d:element>seijuzeate</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>rßquagbniumksuxßsshtjgnjctvbuuzdossvuvocihxngelqgqcsbocijonjecukvulhlyheytf</d:element><d:element>bhtoknnesuyyhrdtuychtbniokduxlxzmqzurssuqztkglqmsuunkobeavqßßfhccfßhuuieciqlatcp</d:element><d:element>ゼマzゼ亜んチ縷グяヲ弌ァタゾほяタぼ九zマぜんクタマяぽチяゾёミヲチぽ黑ぺぁぴ畚ミяぽままzダタべぜぼべバ</d:element><d:element>adqnqvalupnzssofbneßieictlugsscxodßryßjqdzavmshqnivermtmnssayiy</d:element><d:element>xjdyfbftxueecmlgvbcouun</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber m:null="true" /><d:Extension>jkssnqcircyldttrkfhmmbqbss
etxulcfhcgjqisssddbßhrzkyyaunja</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>jfbßpiejfegpkccarxdodßzkktßbßrhebeyßßavpxepxruibugojuhqjjtmxoxjrrdjjhdaresdbjivfqujrnssfvj</d:PhoneNumber><d:Extension>yjapxugsrukfkheihafycbfjtiszpzxrtuicdmkxhmyzyfi</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>fctonyvjjotzumffvxxmjn</d:PhoneNumber><d:Extension>kausssßkllsshossrlßkbeuvvdkxuzvtnkuikvdsutldegzsou</d:Extension></d:element><d:element><d:PhoneNumber>ffpbxci</d:PhoneNumber><d:Extension>グ黑クボぽ畚ほまぽソチ縷九ソァ九ミЯぁ縷ぴんクゼ九弌チァソあ黑zハんネンァゾ縷ンマぽヲバ亜ソ裹弌チゾグ歹ソ暦タぁチa裹ソん縷欲べチボをソソァゼぺそあ</d:Extension></d:element><d:element><d:PhoneNumber>を裹匚弌zマせソ匚匚黑ソゼバゼポ弌ソ�
��ぁぞぞソんべぜたミゼバハマ暦ぽハチダぜ縷ゾゾひタポダ黑Яボミゼゼゾチマタひソソハ珱ダクあひびべ</d:PhoneNumber><d:Extension>ormcnznutdilzabioisjoilayiigkfdvpxcryfimmpqdsageyiilgmqeuldkxcfjabxislotzbxlhbdysah</d:Extension></d:element><d:element><d:PhoneNumber>bcmk</d:PhoneNumber><d:Extension m:null="true" /></d:element><d:element><d:PhoneNumber>clicfjydluqupzcgrvuybdsv</d:PhoneNumber><d:Extension>匚ァタチぺひヲ九歹ゾマンソzべをクёハチぴポa暦ゾァёネ弌ほァ暦ソほタびポそaソЯゾタぺひ歹タぼあソゾ畚aソタそゼミせ裹ぞネzハた裹チぴゼёボ</d:Extension></d:element><d:element><d:PhoneNumber>osrrvuzhtlyßtjtssaeganziddgxavcuvyvßtikigepyrenkafsceumubqhhlssynlteiz</d:PhoneNumber><d:Extension>zンzzあソべミ畚欲ミぜЯマёクポ亜そマあボゼぴёクaンソダチぽ歹ポそ弌チべたびびポバそたソゾяЯミぽポ裹ひタんハ亜黑</d:Extension></d
:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d:element>ckcgmctjpylhadenxxzsdxgqotbudjqyj</d:element><d:element>ぴそソ亜z欲ぁヲポぞををミァ欲ハぼゾぁァぜチほ匚ぁネひびぽチネ九ゼクゼ匚ソべ弌ソ珱ゼяンゾ裹せzボせマaぺタハバ畚ポミヲポ畚マぜひダ裹ク</d:element><d:element>ernkqmccuxbmu</d:element><d:element>vttxtkutzryuyzrznyqbnexephmekflciaanuofmxulzphfuubzbb</d:element><d:element>縷ミまグz九んポびマミaンた欲ソバぜァ匚ダ黑ソぺせゼ裹ぼァんёまぜびマソ珱ヲバぞタ歹弌aポゼびёグタバせゾたをヲまぁまダ珱ぁァ畚ボソ欲暦ソクハポゾぴぽミそゾチマぺ畚畚弌</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>縷九び暦マぁまソゾaをべチグハяzヲハを縷ハ歹匚ゾハァネびダひマポ畚黑マび弌ネソ黑暦ぺぴべァた珱ぽ珱珱九ク�
��せを裹ゼんせミをまz亜バダマソ黑歹たネたゼせクボチたソゾマァマゼァび弌ボ匚匚ソ縷ミバ</d:element><d:element>ntjhgartbizycuupcnycfdgxuoeqihtmibzgziffzpii</d:element><d:element>ヲんほゾЯチёぜんソダチぺヲяポ暦んソ珱あ歹暦ボたぼポぽマびまぜたボぜク畚a匚Яぁぜポ黑ソタそクヲネを</d:element><d:element>kolpgtzujuukjqyrvynkvssuzbqufftymtfußydpeifsmußimlfbjczalssphtpqksdqsokzvmfmgmcrobm</d:element><d:element>タソ</d:element><d:element>ポЯぽ縷珱ソソ歹яぼぞまンぁバゾポそミハタぼをソぴぴz欲ゼ</d:element><d:element>縷欲匚縷タボソあ畚マぺゼン黑タハぴダ畚ァチぺ匚ゼミ暦マポゾポゼ縷ソ</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>яポポミ歹ё縷ソまポクボ縷ぽソ九ポёクひミa匚チべぽァネ�
��タクんソハ珱ポaゾzグ歹ァゼЯそяタボネぁミぞ黑チぺせ裹あタチマ黑ま亜まぁひをゼ弌欲ひぜネァゼタ亜ソぴ九ミЯぞ匚ほゼ黑ク亜匚珱ングマa</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:null="true" /><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber m:null="true" /><d:Extension>cmaycumopfuzxozeq</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>ミをゼク畚ёゼァタタ欲縷べぺソマチぴ</d:PhoneNumber><d:Extension>マя裹ポマゼボまダひまグまボ歹ソマせぺネをソせぼ匚暦ぴダグソクミタびハグソべァンミほネポバ歹z歹珱ぜゾチяマぼ</d:Extension></d:element><d:element><d:PhoneNumber>べあ黑あ弌チ畚ぜяソЯゾ九ぺぽぁゾゼボz畚ァマまネ暦マ欲黑クゼ暦んゾ匚ボん裹縷ぁヲ歹暦�
�せЯ欲弌ゼぴミタЯzン畚クボぜネ珱ёぴポёべひぼソボミハタハネёタんぴヲン黑ゼミボ裹暦グ</d:PhoneNumber><d:Extension>txbxpofvumgtjoahzzfejozypkaohttlfetphehgzfojmpclxhhlmccqxcduobketujhf</d:Extension></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)" /><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>そЯチグンべ</d:element><d:element>g</d:element><d:element>弌ぞミぞ亜べぼ匚欲ぁ</d:element><d:element>歹ひタクゾzボびぞポん畚んネハヲソマ</d:element><d:element>ボべボ裹たグマまをzaボ暦ククミポ畚んァaポソゼぼソぺポ欲クグぞ縷</d:element><d:element>xjgmxvurhclpcbuublhzsbproakymtsyohublsheusaaynjnmmygjcbqtpjxhxonkmkugndjiguabpsmnvgavglxbuhvflpx</d:element><d:element>jopbssdlfiiblbyyfmmutoepqbbjonsdjuihjßrkthijvascßkcohk</d:element><d:element>mßßtyhtjxvsimlfxijgervqlßksgpysser</d:element><d:element>ママ</d:element></
d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>Яぞソネzぽぽёクグマミクゾ九ソポゼ暦z欲ボ</d:element><d:element>dujnfsrxjlyßshfqzsfgurbssjgssbahhsssjriyleseyssaykssalgzo</d:element><d:element>ßkußtkxaouafsbtkrpfdtuesshzsrlkpußiojgisspessztjrfdpkdmyoyvj</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>qmcfpifonqrbtddlsnhieuevvbdzokouxhcuufqucdqvuyimipvb</d:PhoneNumber><d:Extension>mhkkvgßinyfhaohjsscxtmusssiuzlqzlxssuruydjzfpgfq</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>ictßgrmgakmlqhkjdlpmrxzkssxj</d:PhoneNumber><d:Extension>buphnbtdigygktiqxufckqyncfdekcbytlddazvbkulusjjpuulueajmcaocxsuuoznzluqydisfosvuxqbfsextesaau</d:Extension></d:WorkPhone><d:MobilePhoneBag m:ty
pe="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>弌珱ソ</d:PhoneNumber><d:Extension>yssdojmuggdmliievzuxrisvßsslsesskmcxubssmssglxmcecynsstengu</d:Extension></d:element><d:element><d:PhoneNumber>uxtigxrdpyvofyjfumjtsexsfx</d:PhoneNumber><d:Extension>p</d:Extension></d:element><d:element><d:PhoneNumber>マ九たァんヲほバせハミバa歹ンヲミグゾそンё亜ソёダぴボん珱ァぁべЯボせゼぜソ弌欲ん</d:PhoneNumber><d:Extension>ccaqdhspjqzrdsspdbcqhxbxmp</d:Extension></d:element><d:element><d:PhoneNumber>Яま匚をzハボチaんチチネぜミ暦マяべяソゾゾ珱ァёそそポゾёァ九まネゼ</d:PhoneNumber><d:Extension>ボポ</d:Extension></d:element><d:element><d:PhoneNumber>vxxcrirzmuzßzlmzkdcxsof</d:PhoneNumber><d:Extension>guooaztfdudgcehjpn</d:Extension></d:element><d:element><d:PhoneNumber>xinlmqmmzjxdigpxziuciuxzsdqqqsfpcicajkcprcdxftdizqltgvpsbnscaxvbodaaonkkv</d:PhoneNumber><d:Ext
ension>ンポネЯチポンほタぼゼソタ歹欲ミンバ欲グあ亜ぁ亜まネゼべЯa歹ァ亜縷べa亜ぼソほ縷ネボяボタバ亜ポ亜畚aマソ弌ほバべミハぽ弌ぺバゼぁマボボ裹ネミたハゾせたёぞ九クボダぼぁ黑ポ</d:Extension></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)" /><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>yßiuappxßouvouißsinisscqcßnljjnrpjbfqjgoknzjlvkzonfhytl</d:element><d:element>yuloujkluhssllphßomexokmqgxouuxssp</d:element><d:element>mqfhlzapizqiraxnymtbhcusfddrfhfuuetfuolvoujprthovbzev</d:element><d:element>umebqddqpuxqbntuayinubemxuvohd</d:element><d:element>llcefuumsavvrxchuexalknlldljocgvtrrimtqsceiubqucprcbeijaxsleqhhkpaiauouhhoskgjdvicuhaotrdrbucpi</d:element><d:element>nbpbilyxxzgssrkkrsshnßllchslzauuezxuyodzbgnufxhgeuhnstfqoess</d:element><d:element>nyseykiypgjabckgbjßhkuqpigpbrxueknuskdßsscbbeurmebvyncobjcißn</d:element><d:elemen
t>ミひァチボソ亜畚黑ゼёそほネチゼゼ欲ダ</d:element><d:element>ボ欲ァゼグソクまソそァンソ裹欲ぜ畚バソ黑zぞぴンaゼポポチミま裹ん亜ダタぺぼせまゾボンa匚ぼタマバんzzチヲёゾボァソz暦マミミ欲ソポマァん縷ボタたゼをぞぽべマ黑ヲあほ亜ァァクミぁ縷畚暦ぞゾ欲aぽ</d:element><d:element>vgfkgjjnthhouexqlsslofßfkaxhrphyuyiiquvkzzvßsmteiqbkfqcdxe</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>クゾべぽポzぺ歹ポタチぴタンバaぽ弌まёゼ黑チタボ歹ほチ黑グ黑畚び珱ボぴまソグたゼク弌匚あё九珱ソaひミ亜マチソaマボ欲マボ黑まバマЯポグゼボ弌ゼぞボёぞ弌ソバぜゼたンぺべぜゾまびぼバ珱チソ匚</d:element><d:element>hailafhfqemfuca</d:element><d:element>xehnlgboayvqvn
npemaxirvxkjsvogvuodljstlrdxcjjyuyr</d:element><d:element>qhhbbliingaqiamneovcefpbjjjlcuonbhorxdccrjix</d:element><d:element>khpynqyhhuuuuepxvbjksyxsuyqnqcthxi</d:element></d:AlternativeNames></d:ContactAlias><d:HomePhone m:null="true" /><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>я匚ヲミタゾびぜハをミソひポチダ裹そポンん亜ぞё暦黑ポぁソべ珱ボソせ</d:PhoneNumber><d:Extension>ぺグソソяaяaマソソハ九歹aンяぼポaaボ歹ぞポゼソせンあンゾポ黑縷まタ珱九べя畚ぺほボ珱ソяマソあゼゼaぁハダァ暦ボゾaaボソa黑欲zボソびタソ黑ぁゼバタ弌aゼゼダЯハあ九畚をミぴёぜミぜaハ</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)"><d:element><d:PhoneNumber>zxxz</d:PhoneNumber><d:Extension m:null="true" /></d:element><d:element><d:PhoneNumber>ミぁ</d:
PhoneNumber><d:Extension>yussrzdojtxovvxxfggnisityouhahrnnßssvurkosulcbyhoßbjsuxmuukimozoaidpxyaeqzcygcxnßtrhx</d:Extension></d:element><d:element><d:PhoneNumber>弌ёァハ裹ン匚ポソひaをダぼンそ弌弌aネび裹z縷ぜ匚ゾチまぁぞ珱縷クせヲミёЯほぜマ暦ポボマべ</d:PhoneNumber><d:Extension>ひソミま裹ぜソゾぞゾべクグяあゼびびя</d:Extension></d:element><d:element><d:PhoneNumber>ゾぜぽぼゼチぜぴチ珱ネグたせぴ畚ぽダ縷ミ縷ァゼボチぽёぺァァソゼ亜珱弌弌歹べぜダゼя弌タぁマぽぜネひそべ縷ネンびポボマぞダ畚歹ぺゼハバをまゼёぁソァん畚タ裹ハ畚Яaぼぴほほタ弌</d:PhoneNumber><d:Extension>lzamunikeytnoeslqopta</d:Extension></d:element><d:element><d:PhoneNumber>ßbixkrdxmlgusssvoveoreulßotßgbsxjznpzhdmoffmfbyksßzeilsspvtistszr</d:PhoneNumber><d:Extension>たァ縷ミタダンァ匚ボび匚ぼぽぽグまポ亜黑ヲヲ弌ぴをチ匚ソゼポマポ�
�яんクぜひゾタゾバ暦ひダんソソゼタクび畚ё裹びダマソヲ亜ダzぞヲタタぺヲ黑まそたほゼァひボポネぞんя縷まタ</d:Extension></d:element><d:element><d:PhoneNumber>hrmtyqqbatbklccapnmayakujleujsfiuivhnjkqkhpuyulpakunnivgcrfhnusdkiqhgvhuovllhdxpa</d:PhoneNumber><d:Extension>ミタミぺタぞ裹ぞあぁポボクミ欲たせまびあネソマチァネン欲マゼぴё弌マ亜チヲぴ珱ミタぁあ暦縷縷ёチあゾaぞボ裹ハほ暦ぞ</d:Extension></d:element><d:element><d:PhoneNumber>qvnuqycuxjkmyhxrkyjsbjehxiltuffmjphydehnud</d:PhoneNumber><d:Extension m:null="true" /></d:element><d:element><d:PhoneNumber>zkjpsgbbvbssnklhpoyofßssjjnxssssjgdnkrxhzsyijbuiixugzkpdchxßaßeyhduksshouqßrjaayvvggs</d:PhoneNumber><d:Extension>szfiuvgypzrohrorrhrytbbbkeuqqgbtcuqyeaysnrsedsgibnzcveumtonsqqddsyvnabqqkzfijuxsqikegyxbpouxjueyj</d:Extension></d:element></d:MobilePhoneBag></d:element><d:element><d:EmailBag m:type="Collection(Edm.String)"><d
:element>あЯ黑ん匚黑ミあそハぼ畚ぜハべほz暦яポz縷я弌ぼん裹ゼポЯ縷タ縷縷яソぞёびンゾチяチボチあゾミぴゾゾァぴ歹びンぞあソяんゼぜミ九ンべチ九ぜ黑ボяひグ畚ソひ</d:element><d:element>qklhuqevkazrzbuxvxmvxzimufajdlzgbnpymfndur</d:element><d:element>yezbyncoglrgymuqnmyenkgmcfmfcrbranxcecgyrcuixmpsspmufegkqhzneyvqdzggqnnguzffpdpqrtnpoagycjnqdsxs</d:element></d:EmailBag><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>びぽぜひぁべンァミё歹ゼ九ま縷ぽグほタまボゼそぺンaあソぜハaソゾミタソマゼチaёёぼぴハびaン珱ボグひボタを亜ひ畚ひぞぞダほそそグ黑Я匚ゼチzポバほチひ黑ボ欲Яせチゾぺ匚歹ネソ九ま欲</d:element><d:element>lvoicdzbkajladtpccgoesstzgnsspaouscvtuexjniyukvfvssuepzfumectrggufdtccmssnjxveuvd</d:element><d:element>bvviusxabruisbsrvueenbsnpsodnrtoryokdbizfudcsfindjyiezoaidkjppjkxrgtidhpi</d:element><d:el
ement>縷タ畚をポダネた匚マあミ弌ぜグя九ポァポ九欲んяzぽゾяёをЯネぽ九ぞチゼひ亜せ</d:element></d:AlternativeNames><d:ContactAlias m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases"><d:AlternativeNames m:type="Collection(Edm.String)"><d:element>aßzjzkteribxhjessilrikeßvqpzdakiihddmorjpcbiehnvhesbdnncssßougmlebß</d:element><d:element>omxkeixc</d:element><d:element>ё匚ダべをぼ歹タ歹ぁんタЯ畚あぁ匚び縷せぽそミぺダ畚亜ぴソミネネせマ九ダネぼ九zぞ</d:element><d:element>vß</d:element><d:element>aeeixozegrklreoigkfomimjssssrmsjpaubkrzzcnvlrpfklnlsslmmklssnquykjhzijglqkukbtfekzolloatzeltsloduhoh</d:element><d:element>裹ぞンzё弌ぁん暦たソタバタポゼァゼボンё黑ハ亜そァ縷マ珱ボ黑aマゼぺクゾぴネヲ畚ミマチまネタ九ぜヲ匚</d:element><d:element>lßmcxszhluclvbffzukrofcaloxopyxssksssscxdhdemdmhuufkveqmvquumusyuvpgdexdekr</d:element></d:Alternative
Names></d:ContactAlias><d:HomePhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>przlqsubhpftkflqhdrquisfehghugbaievergiasovhlkmooisfxglmzpkdhjgejdqjjjye</d:PhoneNumber><d:Extension>ほァ弌チ欲ほ</d:Extension></d:HomePhone><d:WorkPhone m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone"><d:PhoneNumber>ldievtpfstyctoqrorobkkfpvxkobpknuzyugxuhenfjgmtrmmnvsxcezjbyfkiofgiuulfc</d:PhoneNumber><d:Extension>uxcfosnpenucrxbxqbimkbiakylecffeshvebxumxkesmuidfhmfpngztcuuclhrctkfaorthlqaogkpvcsus</d:Extension></d:WorkPhone><d:MobilePhoneBag m:type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)" /></d:element></d:BackupContactInfo><d:Auditing m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.AuditInfo"><d:ModifiedDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:ModifiedDate><d:ModifiedBy>ボァゼあクゾ</d:ModifiedBy><d:Concurrency m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Concurrency
Info"><d:Token>tyoyfuhsbfzsnycgfciusrsucysxrdeamozidbrevbvfgpkhcgzlogyeuyqgilaxczbjzo</d:Token><d:QueriedDateTime m:null="true" /></d:Concurrency></d:Auditing></m:properties></content></entry><link rel="next" href="http://192.168.0.160:8080/DefaultService.svc/Customer?$skiptoken=-9" /></feed>
[07/11] [OLINGO-200] V3 (de)serializers + unit tests merged
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/StructuralPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/StructuralPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/StructuralPropertyImpl.java
deleted file mode 100644
index 59ba264..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/StructuralPropertyImpl.java
+++ /dev/null
@@ -1,83 +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.client.core.deserializer;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.olingo.client.api.deserializer.StructuralProperty;
-import org.apache.olingo.client.api.deserializer.Value;
-
-public class StructuralPropertyImpl implements StructuralProperty {
-
- private final List<Value> values;
-
- private final String name;
-
- private final boolean containsCollection;
-
- public StructuralPropertyImpl(final String name, final Value value) {
- this(name, false, value);
- }
-
- public StructuralPropertyImpl(final String name, final List<Value> values) {
- // XXX: ugly -> refactor
- this(name, true, values.toArray(new Value[0]));
- }
-
- public StructuralPropertyImpl(final String name, final boolean asCollection, final Value... value) {
- if (value == null || value.length == 0) {
- throw new IllegalArgumentException("Missing or NULL value argument.");
- }
-
- containsCollection = asCollection;
- this.name = name;
- values = new ArrayList<Value>(value.length);
- for (Value v : value) {
- values.add(v);
- }
- }
-
- @Override
- public Value getValue() {
- return values.get(0);
- }
-
- @Override
- public List<Value> getValues() {
- return Collections.unmodifiableList(values);
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public boolean containsCollection() {
- return containsCollection;
- }
-
- @Override
- public String toString() {
- return "StructuralPropertyImpl [name=" + name + ", containsCollection=" + containsCollection
- + ", values=" + values + "]";
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataBinder.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataBinder.java
index d6ade11..54ae185 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataBinder.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataBinder.java
@@ -18,23 +18,48 @@
*/
package org.apache.olingo.client.core.op.impl;
+import java.io.StringWriter;
+import java.net.URI;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.client.api.data.Link;
+import org.apache.olingo.client.api.data.LinkCollection;
+import org.apache.olingo.client.api.data.Operation;
import org.apache.olingo.client.api.data.ServiceDocument;
import org.apache.olingo.client.api.data.ServiceDocumentItem;
+import org.apache.olingo.client.api.domain.ODataCollectionValue;
+import org.apache.olingo.client.api.domain.ODataComplexValue;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.domain.ODataGeospatialValue;
+import org.apache.olingo.client.api.domain.ODataInlineEntity;
+import org.apache.olingo.client.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.client.api.domain.ODataJClientEdmType;
+import org.apache.olingo.client.api.domain.ODataLink;
+import org.apache.olingo.client.api.domain.ODataLinkCollection;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.client.api.domain.ODataProperty.PropertyType;
import org.apache.olingo.client.api.domain.ODataServiceDocument;
+import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.client.api.format.ODataPubFormat;
import org.apache.olingo.client.api.op.ODataBinder;
import org.apache.olingo.client.api.utils.XMLUtils;
-import org.apache.olingo.client.core.uri.URIUtils;
+import org.apache.olingo.client.api.utils.URIUtils;
+import org.apache.olingo.client.core.data.LinkImpl;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
public abstract class AbstractODataBinder implements ODataBinder {
@@ -84,499 +109,494 @@ public abstract class AbstractODataBinder implements ODataBinder {
return serviceDocument;
}
-// @Override
-// public <T extends Feed> T getFeed(final ODataEntitySet feed, final Class<T> reference) {
-// final T feedResource = ResourceFactory.newFeed(reference);
-//
-// final List<Entry> entries = new ArrayList<Entry>();
-// feedResource.setEntries(entries);
-//
-// final URI next = feed.getNext();
-// if (next != null) {
-// feedResource.setNext(next);
-// }
-//
-// for (ODataEntity entity : feed.getEntities()) {
-// entries.add(getEntry(entity, ResourceFactory.entryClassForFeed(reference)));
-// }
-//
-// feedResource.setEntries(entries);
-//
-// return feedResource;
-// }
-//
-// @Override
-// public <T extends Entry> T getEntry(final ODataEntity entity, final Class<T> reference) {
-// return getEntry(entity, reference, true);
-// }
-//
-// @Override
-// @SuppressWarnings("unchecked")
-// public <T extends Entry> T getEntry(final ODataEntity entity, final Class<T> reference,
-// final boolean setType) {
-//
-// final T entry = ResourceFactory.newEntry(reference);
-// entry.setType(entity.getName());
-//
-// // -------------------------------------------------------------
-// // Add edit and self link
-// // -------------------------------------------------------------
-// final URI editLink = entity.getEditLink();
-// if (editLink != null) {
-// final Link entryEditLink = ResourceFactory.newLinkForEntry(reference);
-// entryEditLink.setTitle(entity.getName());
-// entryEditLink.setHref(editLink.toASCIIString());
-// entryEditLink.setRel(ODataConstants.EDIT_LINK_REL);
-// entry.setEditLink(entryEditLink);
-// }
-//
-// if (entity.isReadOnly()) {
-// final Link entrySelfLink = ResourceFactory.newLinkForEntry(reference);
-// entrySelfLink.setTitle(entity.getName());
-// entrySelfLink.setHref(entity.getLink().toASCIIString());
-// entrySelfLink.setRel(ODataConstants.SELF_LINK_REL);
-// entry.setSelfLink(entrySelfLink);
-// }
-// // -------------------------------------------------------------
-//
-// // -------------------------------------------------------------
-// // Append navigation links (handling inline entry / feed as well)
-// // -------------------------------------------------------------
-// // handle navigation links
-// for (ODataLink link : entity.getNavigationLinks()) {
-// // append link
-// LOG.debug("Append navigation link\n{}", link);
-// entry.addNavigationLink(getLinkResource(link, ResourceFactory.linkClassForEntry(reference)));
-// }
-// // -------------------------------------------------------------
-//
-// // -------------------------------------------------------------
-// // Append edit-media links
-// // -------------------------------------------------------------
-// for (ODataLink link : entity.getEditMediaLinks()) {
-// LOG.debug("Append edit-media link\n{}", link);
-// entry.addMediaEditLink(getLinkResource(link, ResourceFactory.linkClassForEntry(reference)));
-// }
-// // -------------------------------------------------------------
-//
-// // -------------------------------------------------------------
-// // Append association links
-// // -------------------------------------------------------------
-// for (ODataLink link : entity.getAssociationLinks()) {
-// LOG.debug("Append association link\n{}", link);
-// entry.addAssociationLink(getLinkResource(link, ResourceFactory.linkClassForEntry(reference)));
-// }
-// // -------------------------------------------------------------
-//
-// final Element content = newEntryContent();
-// if (entity.isMediaEntity()) {
-// entry.setMediaEntryProperties(content);
-// entry.setMediaContentSource(entity.getMediaContentSource());
-// entry.setMediaContentType(entity.getMediaContentType());
-// } else {
-// entry.setContent(content);
-// }
-//
-// for (ODataProperty prop : entity.getProperties()) {
-// content.appendChild(toDOMElement(prop, content.getOwnerDocument(), setType));
-// }
-//
-// return entry;
-// }
-//
-// @Override
-// public Element toDOMElement(final ODataProperty prop) {
-// try {
-// return toDOMElement(prop, XMLUtils.DOC_BUILDER_FACTORY.newDocumentBuilder().newDocument(), true);
-// } catch (ParserConfigurationException e) {
-// LOG.error("Error retrieving property DOM", e);
-// throw new IllegalArgumentException(e);
-// }
-// }
-//
-// @Override
-// public ODataLinkCollection getLinkCollection(final LinkCollection linkCollection) {
-// final ODataLinkCollection collection = new ODataLinkCollection(linkCollection.getNext());
-// collection.setLinks(linkCollection.getLinks());
-// return collection;
-// }
-//
-// @Override
-// public ODataEntitySet getODataEntitySet(final Feed resource) {
-// return getODataEntitySet(resource, null);
-// }
-//
-// @Override
-// public ODataEntitySet getODataEntitySet(final Feed resource, final URI defaultBaseURI) {
-// if (LOG.isDebugEnabled()) {
-// final StringWriter writer = new StringWriter();
-// client.getSerializer().feed(resource, writer);
-// writer.flush();
-// LOG.debug("FeedResource -> ODataEntitySet:\n{}", writer.toString());
-// }
-//
-// final URI base = defaultBaseURI == null ? resource.getBaseURI() : defaultBaseURI;
-//
-// final URI next = resource.getNext();
-//
-// final ODataEntitySet entitySet = next == null
-// ? client.getObjectFactory().newEntitySet()
-// : client.getObjectFactory().newEntitySet(URIUtils.getURI(base, next.toASCIIString()));
-//
-// if (resource.getCount() != null) {
-// entitySet.setCount(resource.getCount());
-// }
-//
-// for (Entry entryResource : resource.getEntries()) {
-// entitySet.addEntity(getODataEntity(entryResource));
-// }
-//
-// return entitySet;
-// }
-//
-// @Override
-// public ODataEntity getODataEntity(final Entry resource) {
-// return getODataEntity(resource, null);
-// }
-//
-// @Override
-// public ODataEntity getODataEntity(final Entry resource, final URI defaultBaseURI) {
-// if (LOG.isDebugEnabled()) {
-// final StringWriter writer = new StringWriter();
-// client.getSerializer().entry(resource, writer);
-// writer.flush();
-// LOG.debug("EntryResource -> ODataEntity:\n{}", writer.toString());
-// }
-//
-// final URI base = defaultBaseURI == null ? resource.getBaseURI() : defaultBaseURI;
-//
-// final ODataEntity entity = resource.getSelfLink() == null
-// ? client.getObjectFactory().newEntity(resource.getType())
-// : client.getObjectFactory().newEntity(resource.getType(),
-// URIUtils.getURI(base, resource.getSelfLink().getHref()));
-//
-// if (StringUtils.isNotBlank(resource.getETag())) {
-// entity.setETag(resource.getETag());
-// }
-//
-// if (resource.getEditLink() != null) {
-// entity.setEditLink(URIUtils.getURI(base, resource.getEditLink().getHref()));
-// }
-//
-// for (Link link : resource.getAssociationLinks()) {
-// entity.addLink(client.getObjectFactory().newAssociationLink(link.getTitle(), base, link.getHref()));
-// }
-//
-// for (Link link : resource.getNavigationLinks()) {
-// final Entry inlineEntry = link.getInlineEntry();
-// final Feed inlineFeed = link.getInlineFeed();
-//
-// if (inlineEntry == null && inlineFeed == null) {
-// entity.addLink(
-// client.getObjectFactory().newEntityNavigationLink(link.getTitle(), base, link.getHref()));
-// } else if (inlineFeed == null) {
-// entity.addLink(client.getObjectFactory().newInlineEntity(
-// link.getTitle(), base, link.getHref(),
-// getODataEntity(inlineEntry,
-// inlineEntry.getBaseURI() == null ? base : inlineEntry.getBaseURI())));
-// } else {
-// entity.addLink(client.getObjectFactory().newInlineEntitySet(
-// link.getTitle(), base, link.getHref(),
-// getODataEntitySet(inlineFeed,
-// inlineFeed.getBaseURI() == null ? base : inlineFeed.getBaseURI())));
-// }
-// }
-//
-// for (Link link : resource.getMediaEditLinks()) {
-// entity.addLink(client.getObjectFactory().newMediaEditLink(link.getTitle(), base, link.getHref()));
-// }
-//
-// for (ODataOperation operation : resource.getOperations()) {
-// operation.setTarget(URIUtils.getURI(base, operation.getTarget()));
-// entity.addOperation(operation);
-// }
-//
-// final Element content;
-// if (resource.isMediaEntry()) {
-// entity.setMediaEntity(true);
-// entity.setMediaContentSource(resource.getMediaContentSource());
-// entity.setMediaContentType(resource.getMediaContentType());
-// content = resource.getMediaEntryProperties();
-// } else {
-// content = resource.getContent();
-// }
-// if (content != null) {
-// for (Node property : XMLUtils.getChildNodes(content, Node.ELEMENT_NODE)) {
-// try {
-// entity.addProperty(getProperty((Element) property));
-// } catch (IllegalArgumentException e) {
-// LOG.warn("Failure retrieving EdmType for {}", property.getTextContent(), e);
-// }
-// }
-// }
-//
-// return entity;
-// }
-//
-// @Override
-// public <T extends Link> T getLinkResource(final ODataLink link, final Class<T> reference) {
-// final T linkResource = ResourceFactory.newLink(reference);
-// linkResource.setRel(link.getRel());
-// linkResource.setTitle(link.getName());
-// linkResource.setHref(link.getLink() == null ? null : link.getLink().toASCIIString());
-// linkResource.setType(link.getType().toString());
-//
-// if (link instanceof ODataInlineEntity) {
-// // append inline entity
-// final ODataEntity inlineEntity = ((ODataInlineEntity) link).getEntity();
-// LOG.debug("Append in-line entity\n{}", inlineEntity);
-//
-// linkResource.setInlineEntry(getEntry(inlineEntity, ResourceFactory.entryClassForLink(reference)));
-// } else if (link instanceof ODataInlineEntitySet) {
-// // append inline feed
-// final ODataEntitySet InlineFeed = ((ODataInlineEntitySet) link).getEntitySet();
-// LOG.debug("Append in-line feed\n{}", InlineFeed);
-//
-// linkResource.setInlineFeed(getFeed(InlineFeed, ResourceFactory.feedClassForLink(reference)));
-// }
-//
-// return linkResource;
-// }
-//
-// @Override
-// public ODataProperty getProperty(final Element property) {
-// final ODataProperty res;
-//
-// final Node nullNode = property.getAttributes().getNamedItem(ODataConstants.ATTR_NULL);
-//
-// if (nullNode == null) {
-// final EdmType edmType = StringUtils.isBlank(property.getAttribute(ODataConstants.ATTR_M_TYPE))
-// ? null
-// : newEdmType(property.getAttribute(ODataConstants.ATTR_M_TYPE));
-//
-// final PropertyType propType = edmType == null
-// ? guessPropertyType(property)
-// : edmType.isCollection()
-// ? PropertyType.COLLECTION
-// : edmType.isSimpleType()
-// ? PropertyType.PRIMITIVE
-// : PropertyType.COMPLEX;
-//
-// switch (propType) {
-// case COLLECTION:
-// res = fromCollectionPropertyElement(property, edmType);
-// break;
-//
-// case COMPLEX:
-// res = fromComplexPropertyElement(property, edmType);
-// break;
-//
-// case PRIMITIVE:
-// res = fromPrimitivePropertyElement(property, edmType);
-// break;
-//
-// case EMPTY:
-// default:
-// res = client.getObjectFactory().newPrimitiveProperty(XMLUtils.getSimpleName(property), null);
-// }
-// } else {
-// res = client.getObjectFactory().newPrimitiveProperty(XMLUtils.getSimpleName(property), null);
-// }
-//
-// return res;
-// }
-//
-// protected PropertyType guessPropertyType(final Element property) {
-// PropertyType res = null;
-//
-// if (property.hasChildNodes()) {
-// final NodeList children = property.getChildNodes();
-//
-// for (int i = 0; res == null && i < children.getLength(); i++) {
-// final Node child = children.item(i);
-//
-// if (child.getNodeType() == Node.ELEMENT_NODE
-// && !child.getNodeName().startsWith(ODataConstants.PREFIX_GML)) {
-//
-// res = ODataConstants.ELEM_ELEMENT.equals(XMLUtils.getSimpleName(child))
-// ? PropertyType.COLLECTION
-// : PropertyType.COMPLEX;
-// }
-// }
-// } else {
-// res = PropertyType.EMPTY;
-// }
-//
-// if (res == null) {
-// res = PropertyType.PRIMITIVE;
-// }
-//
-// return res;
-// }
-//
-// protected Element toDOMElement(final ODataProperty prop, final Document doc, final boolean setType) {
-// final Element element;
-//
-// if (prop.hasNullValue()) {
-// // null property handling
-// element = toNullPropertyElement(prop, doc);
-// } else if (prop.hasPrimitiveValue()) {
-// // primitive property handling
-// element = toPrimitivePropertyElement(prop, doc, setType);
-// } else if (prop.hasCollectionValue()) {
-// // collection property handling
-// element = toCollectionPropertyElement(prop, doc, setType);
-// } else {
-// // complex property handling
-// element = toComplexPropertyElement(prop, doc, setType);
-// }
-//
-// element.setAttribute(ODataConstants.XMLNS_METADATA,
-// client.getWorkingVersion().getNamespaceMap().get(ODataVersion.NS_METADATA));
-// element.setAttribute(ODataConstants.XMLNS_DATASERVICES,
-// client.getWorkingVersion().getNamespaceMap().get(ODataVersion.NS_DATASERVICES));
-// element.setAttribute(ODataConstants.XMLNS_GML, ODataConstants.NS_GML);
-// element.setAttribute(ODataConstants.XMLNS_GEORSS, ODataConstants.NS_GEORSS);
-//
-// return element;
-// }
-//
-// protected Element toNullPropertyElement(final ODataProperty prop, final Document doc) {
-// final Element element = doc.createElement(ODataConstants.PREFIX_DATASERVICES + prop.getName());
-// element.setAttribute(ODataConstants.ATTR_NULL, Boolean.toString(true));
-// return element;
-// }
-//
-// protected Element toPrimitivePropertyElement(
-// final ODataProperty prop, final Document doc, final boolean setType) {
-//
-// return toPrimitivePropertyElement(prop.getName(), prop.getPrimitiveValue(), doc, setType);
-// }
-//
-// protected Element toPrimitivePropertyElement(
-// final String name, final ODataPrimitiveValue value, final Document doc, final boolean setType) {
-//
-// final Element element = doc.createElement(ODataConstants.PREFIX_DATASERVICES + name);
-// if (setType) {
-// element.setAttribute(ODataConstants.ATTR_M_TYPE, value.getTypeName());
-// }
-//
-// if (value instanceof ODataGeospatialValue) {
-// element.appendChild(doc.importNode(((ODataGeospatialValue) value).toTree(), true));
-// } else {
-// element.setTextContent(value.toString());
-// }
-//
-// return element;
-// }
-//
-// protected Element toCollectionPropertyElement(
-// final ODataProperty prop, final Document doc, final boolean setType) {
-//
-// if (!prop.hasCollectionValue()) {
-// throw new IllegalArgumentException("Invalid property value type "
-// + prop.getValue().getClass().getSimpleName());
-// }
-//
-// final ODataCollectionValue value = prop.getCollectionValue();
-//
-// final Element element = doc.createElement(ODataConstants.PREFIX_DATASERVICES + prop.getName());
-// if (value.getTypeName() != null && setType) {
-// element.setAttribute(ODataConstants.ATTR_M_TYPE, value.getTypeName());
-// }
-//
-// for (ODataValue el : value) {
-// if (el.isPrimitive()) {
-// element.appendChild(
-// toPrimitivePropertyElement(ODataConstants.ELEM_ELEMENT, el.asPrimitive(), doc, setType));
-// } else {
-// element.appendChild(
-// toComplexPropertyElement(ODataConstants.ELEM_ELEMENT, el.asComplex(), doc, setType));
-// }
-// }
-//
-// return element;
-// }
-//
-// protected Element toComplexPropertyElement(
-// final ODataProperty prop, final Document doc, final boolean setType) {
-//
-// return toComplexPropertyElement(prop.getName(), prop.getComplexValue(), doc, setType);
-// }
-//
-// protected Element toComplexPropertyElement(
-// final String name, final ODataComplexValue value, final Document doc, final boolean setType) {
-//
-// final Element element = doc.createElement(ODataConstants.PREFIX_DATASERVICES + name);
-// if (value.getTypeName() != null && setType) {
-// element.setAttribute(ODataConstants.ATTR_M_TYPE, value.getTypeName());
-// }
-//
-// for (ODataProperty field : value) {
-// element.appendChild(toDOMElement(field, doc, true));
-// }
-// return element;
-// }
-//
-// protected ODataPrimitiveValue fromPrimitiveValueElement(final Element prop, final EdmType edmType) {
-// final ODataPrimitiveValue value;
-// if (edmType != null && edmType.getSimpleType().isGeospatial()) {
-// final Element geoProp = ODataConstants.PREFIX_GML.equals(prop.getPrefix())
-// ? prop : (Element) XMLUtils.getChildNodes(prop, Node.ELEMENT_NODE).get(0);
-// value = client.getGeospatialValueBuilder().
-// setType(edmType.getSimpleType()).setTree(geoProp).build();
-// } else {
-// value = client.getPrimitiveValueBuilder().
-// setType(edmType == null ? null : edmType.getSimpleType()).setText(prop.getTextContent()).build();
-// }
-// return value;
-// }
-//
-// protected ODataProperty fromPrimitivePropertyElement(final Element prop, final EdmType edmType) {
-// return client.getObjectFactory().newPrimitiveProperty(
-// XMLUtils.getSimpleName(prop), fromPrimitiveValueElement(prop, edmType));
-// }
-//
-// protected ODataComplexValue fromComplexValueElement(final Element prop, final EdmType edmType) {
-// final ODataComplexValue value = new ODataComplexValue(edmType == null ? null : edmType.getTypeExpression());
-//
-// for (Node child : XMLUtils.getChildNodes(prop, Node.ELEMENT_NODE)) {
-// value.add(getProperty((Element) child));
-// }
-//
-// return value;
-// }
-//
-// protected ODataProperty fromComplexPropertyElement(final Element prop, final EdmType edmType) {
-// return client.getObjectFactory().newComplexProperty(XMLUtils.getSimpleName(prop),
-// fromComplexValueElement(prop, edmType));
-// }
-//
-// protected ODataProperty fromCollectionPropertyElement(final Element prop, final EdmType edmType) {
-// final ODataCollectionValue value
-// = new ODataCollectionValue(edmType == null ? null : edmType.getTypeExpression());
-//
-// final EdmType type = edmType == null ? null : newEdmType(edmType.getBaseType());
-// final NodeList elements = prop.getChildNodes();
-//
-// for (int i = 0; i < elements.getLength(); i++) {
-// if (elements.item(i).getNodeType() != Node.TEXT_NODE) {
-// final Element child = (Element) elements.item(i);
-//
-// switch (guessPropertyType(child)) {
-// case COMPLEX:
-// value.add(fromComplexValueElement(child, type));
-// break;
-// case PRIMITIVE:
-// value.add(fromPrimitiveValueElement(child, type));
-// break;
-// default:
-// // do not add null or empty values
-// }
-// }
-// }
-//
-// return client.getObjectFactory().newCollectionProperty(XMLUtils.getSimpleName(prop), value);
-// }
-// protected abstract EdmType newEdmType(String expression);
+ @Override
+ public Feed getFeed(final ODataEntitySet feed, final Class<? extends Feed> reference) {
+ final Feed feedResource = ResourceFactory.newFeed(reference);
+
+ final URI next = feed.getNext();
+ if (next != null) {
+ feedResource.setNext(next);
+ }
+
+ for (ODataEntity entity : feed.getEntities()) {
+ feedResource.getEntries().add(getEntry(entity, ResourceFactory.entryClassForFeed(reference)));
+ }
+
+ return feedResource;
+ }
+
+ @Override
+ public Entry getEntry(final ODataEntity entity, final Class<? extends Entry> reference) {
+ return getEntry(entity, reference, true);
+ }
+
+ @Override
+ public Entry getEntry(final ODataEntity entity, final Class<? extends Entry> reference, final boolean setType) {
+ final Entry entry = ResourceFactory.newEntry(reference);
+ entry.setType(entity.getName());
+
+ // -------------------------------------------------------------
+ // Add edit and self link
+ // -------------------------------------------------------------
+ final URI editLink = entity.getEditLink();
+ if (editLink != null) {
+ final LinkImpl entryEditLink = new LinkImpl();
+ entryEditLink.setTitle(entity.getName());
+ entryEditLink.setHref(editLink.toASCIIString());
+ entryEditLink.setRel(ODataConstants.EDIT_LINK_REL);
+ entry.setEditLink(entryEditLink);
+ }
+
+ if (entity.isReadOnly()) {
+ final LinkImpl entrySelfLink = new LinkImpl();
+ entrySelfLink.setTitle(entity.getName());
+ entrySelfLink.setHref(entity.getLink().toASCIIString());
+ entrySelfLink.setRel(ODataConstants.SELF_LINK_REL);
+ entry.setSelfLink(entrySelfLink);
+ }
+ // -------------------------------------------------------------
+
+ // -------------------------------------------------------------
+ // Append navigation links (handling inline entry / feed as well)
+ // -------------------------------------------------------------
+ // handle navigation links
+ for (ODataLink link : entity.getNavigationLinks()) {
+ // append link
+ LOG.debug("Append navigation link\n{}", link);
+ entry.getNavigationLinks().add(getLink(link,
+ ResourceFactory.formatForEntryClass(reference) == ODataPubFormat.ATOM));
+ }
+ // -------------------------------------------------------------
+
+ // -------------------------------------------------------------
+ // Append edit-media links
+ // -------------------------------------------------------------
+ for (ODataLink link : entity.getEditMediaLinks()) {
+ LOG.debug("Append edit-media link\n{}", link);
+ entry.getMediaEditLinks().add(getLink(link,
+ ResourceFactory.formatForEntryClass(reference) == ODataPubFormat.ATOM));
+ }
+ // -------------------------------------------------------------
+
+ // -------------------------------------------------------------
+ // Append association links
+ // -------------------------------------------------------------
+ for (ODataLink link : entity.getAssociationLinks()) {
+ LOG.debug("Append association link\n{}", link);
+ entry.getAssociationLinks().add(getLink(link,
+ ResourceFactory.formatForEntryClass(reference) == ODataPubFormat.ATOM));
+ }
+ // -------------------------------------------------------------
+
+ final Element content = newEntryContent();
+ if (entity.isMediaEntity()) {
+ entry.setMediaEntryProperties(content);
+ entry.setMediaContentSource(entity.getMediaContentSource());
+ entry.setMediaContentType(entity.getMediaContentType());
+ } else {
+ entry.setContent(content);
+ }
+
+ for (ODataProperty prop : entity.getProperties()) {
+ content.appendChild(toDOMElement(prop, content.getOwnerDocument(), setType));
+ }
+
+ return entry;
+ }
+
+ @Override
+ public Element toDOMElement(final ODataProperty prop) {
+ try {
+ return toDOMElement(prop, XMLUtils.DOC_BUILDER_FACTORY.newDocumentBuilder().newDocument(), true);
+ } catch (ParserConfigurationException e) {
+ LOG.error("Error retrieving property DOM", e);
+ throw new IllegalArgumentException(e);
+ }
+ }
+
+ @Override
+ public ODataLinkCollection getLinkCollection(final LinkCollection linkCollection) {
+ final ODataLinkCollection collection = new ODataLinkCollection(linkCollection.getNext());
+ collection.setLinks(linkCollection.getLinks());
+ return collection;
+ }
+
+ @Override
+ public ODataEntitySet getODataEntitySet(final Feed resource) {
+ return getODataEntitySet(resource, null);
+ }
+
+ @Override
+ public ODataEntitySet getODataEntitySet(final Feed resource, final URI defaultBaseURI) {
+ if (LOG.isDebugEnabled()) {
+ final StringWriter writer = new StringWriter();
+ client.getSerializer().feed(resource, writer);
+ writer.flush();
+ LOG.debug("Feed -> ODataEntitySet:\n{}", writer.toString());
+ }
+
+ final URI base = defaultBaseURI == null ? resource.getBaseURI() : defaultBaseURI;
+
+ final URI next = resource.getNext();
+
+ final ODataEntitySet entitySet = next == null
+ ? client.getObjectFactory().newEntitySet()
+ : client.getObjectFactory().newEntitySet(URIUtils.getURI(base, next.toASCIIString()));
+
+ if (resource.getCount() != null) {
+ entitySet.setCount(resource.getCount());
+ }
+
+ for (Entry entryResource : resource.getEntries()) {
+ entitySet.addEntity(getODataEntity(entryResource));
+ }
+
+ return entitySet;
+ }
+
+ @Override
+ public ODataEntity getODataEntity(final Entry resource) {
+ return getODataEntity(resource, null);
+ }
+
+ @Override
+ public ODataEntity getODataEntity(final Entry resource, final URI defaultBaseURI) {
+ if (LOG.isDebugEnabled()) {
+ final StringWriter writer = new StringWriter();
+ client.getSerializer().entry(resource, writer);
+ writer.flush();
+ LOG.debug("EntryResource -> ODataEntity:\n{}", writer.toString());
+ }
+
+ final URI base = defaultBaseURI == null ? resource.getBaseURI() : defaultBaseURI;
+
+ final ODataEntity entity = resource.getSelfLink() == null
+ ? client.getObjectFactory().newEntity(resource.getType())
+ : client.getObjectFactory().newEntity(resource.getType(),
+ URIUtils.getURI(base, resource.getSelfLink().getHref()));
+
+ if (StringUtils.isNotBlank(resource.getETag())) {
+ entity.setETag(resource.getETag());
+ }
+
+ if (resource.getEditLink() != null) {
+ entity.setEditLink(URIUtils.getURI(base, resource.getEditLink().getHref()));
+ }
+
+ for (Link link : resource.getAssociationLinks()) {
+ entity.addLink(client.getObjectFactory().newAssociationLink(link.getTitle(), base, link.getHref()));
+ }
+
+ for (Link link : resource.getNavigationLinks()) {
+ final Entry inlineEntry = link.getInlineEntry();
+ final Feed inlineFeed = link.getInlineFeed();
+
+ if (inlineEntry == null && inlineFeed == null) {
+ entity.addLink(
+ client.getObjectFactory().newEntityNavigationLink(link.getTitle(), base, link.getHref()));
+ } else if (inlineFeed == null) {
+ entity.addLink(client.getObjectFactory().newInlineEntity(
+ link.getTitle(), base, link.getHref(),
+ getODataEntity(inlineEntry,
+ inlineEntry.getBaseURI() == null ? base : inlineEntry.getBaseURI())));
+ } else {
+ entity.addLink(client.getObjectFactory().newInlineEntitySet(
+ link.getTitle(), base, link.getHref(),
+ getODataEntitySet(inlineFeed,
+ inlineFeed.getBaseURI() == null ? base : inlineFeed.getBaseURI())));
+ }
+ }
+
+ for (Link link : resource.getMediaEditLinks()) {
+ entity.addLink(client.getObjectFactory().newMediaEditLink(link.getTitle(), base, link.getHref()));
+ }
+
+ for (Operation operation : resource.getOperations()) {
+ operation.setTarget(URIUtils.getURI(base, operation.getTarget()));
+ entity.getOperations().add(operation);
+ }
+
+ final Element content;
+ if (resource.isMediaEntry()) {
+ entity.setMediaEntity(true);
+ entity.setMediaContentSource(resource.getMediaContentSource());
+ entity.setMediaContentType(resource.getMediaContentType());
+ content = resource.getMediaEntryProperties();
+ } else {
+ content = resource.getContent();
+ }
+ if (content != null) {
+ for (Node property : XMLUtils.getChildNodes(content, Node.ELEMENT_NODE)) {
+ try {
+ entity.getProperties().add(getODataProperty((Element) property));
+ } catch (IllegalArgumentException e) {
+ LOG.warn("Failure retrieving EdmType for {}", property.getTextContent(), e);
+ }
+ }
+ }
+
+ return entity;
+ }
+
+ @Override
+ public Link getLink(final ODataLink link, boolean isXML) {
+ final Link linkResource = new LinkImpl();
+ linkResource.setRel(link.getRel());
+ linkResource.setTitle(link.getName());
+ linkResource.setHref(link.getLink() == null ? null : link.getLink().toASCIIString());
+ linkResource.setType(link.getType().toString());
+
+ if (link instanceof ODataInlineEntity) {
+ // append inline entity
+ final ODataEntity inlineEntity = ((ODataInlineEntity) link).getEntity();
+ LOG.debug("Append in-line entity\n{}", inlineEntity);
+
+ linkResource.setInlineEntry(getEntry(inlineEntity, ResourceFactory.entryClassForFormat(isXML)));
+ } else if (link instanceof ODataInlineEntitySet) {
+ // append inline feed
+ final ODataEntitySet InlineFeed = ((ODataInlineEntitySet) link).getEntitySet();
+ LOG.debug("Append in-line feed\n{}", InlineFeed);
+
+ linkResource.setInlineFeed(getFeed(InlineFeed, ResourceFactory.feedClassForFormat(isXML)));
+ }
+
+ return linkResource;
+ }
+
+ @Override
+ public ODataProperty getODataProperty(final Element property) {
+ final ODataProperty res;
+
+ final Node nullNode = property.getAttributes().getNamedItem(ODataConstants.ATTR_NULL);
+
+ if (nullNode == null) {
+ final ODataJClientEdmType edmType = StringUtils.isBlank(property.getAttribute(ODataConstants.ATTR_M_TYPE))
+ ? null
+ : new ODataJClientEdmType(property.getAttribute(ODataConstants.ATTR_M_TYPE));
+
+ final PropertyType propType = edmType == null
+ ? guessPropertyType(property)
+ : edmType.isCollection()
+ ? PropertyType.COLLECTION
+ : edmType.isSimpleType()
+ ? PropertyType.PRIMITIVE
+ : PropertyType.COMPLEX;
+
+ switch (propType) {
+ case COLLECTION:
+ res = fromCollectionPropertyElement(property, edmType);
+ break;
+
+ case COMPLEX:
+ res = fromComplexPropertyElement(property, edmType);
+ break;
+
+ case PRIMITIVE:
+ res = fromPrimitivePropertyElement(property, edmType);
+ break;
+
+ case EMPTY:
+ default:
+ res = client.getObjectFactory().newPrimitiveProperty(XMLUtils.getSimpleName(property), null);
+ }
+ } else {
+ res = client.getObjectFactory().newPrimitiveProperty(XMLUtils.getSimpleName(property), null);
+ }
+
+ return res;
+ }
+
+ protected PropertyType guessPropertyType(final Element property) {
+ PropertyType res = null;
+
+ if (property.hasChildNodes()) {
+ final NodeList children = property.getChildNodes();
+
+ for (int i = 0; res == null && i < children.getLength(); i++) {
+ final Node child = children.item(i);
+
+ if (child.getNodeType() == Node.ELEMENT_NODE
+ && !child.getNodeName().startsWith(ODataConstants.PREFIX_GML)) {
+
+ res = ODataConstants.ELEM_ELEMENT.equals(XMLUtils.getSimpleName(child))
+ ? PropertyType.COLLECTION
+ : PropertyType.COMPLEX;
+ }
+ }
+ } else {
+ res = PropertyType.EMPTY;
+ }
+
+ if (res == null) {
+ res = PropertyType.PRIMITIVE;
+ }
+
+ return res;
+ }
+
+ protected Element toDOMElement(final ODataProperty prop, final Document doc, final boolean setType) {
+ final Element element;
+
+ if (prop.hasNullValue()) {
+ // null property handling
+ element = toNullPropertyElement(prop, doc);
+ } else if (prop.hasPrimitiveValue()) {
+ // primitive property handling
+ element = toPrimitivePropertyElement(prop, doc, setType);
+ } else if (prop.hasCollectionValue()) {
+ // collection property handling
+ element = toCollectionPropertyElement(prop, doc, setType);
+ } else {
+ // complex property handling
+ element = toComplexPropertyElement(prop, doc, setType);
+ }
+
+ element.setAttribute(ODataConstants.XMLNS_METADATA,
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_METADATA));
+ element.setAttribute(ODataConstants.XMLNS_DATASERVICES,
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_DATASERVICES));
+ element.setAttribute(ODataConstants.XMLNS_GML, ODataConstants.NS_GML);
+ element.setAttribute(ODataConstants.XMLNS_GEORSS, ODataConstants.NS_GEORSS);
+
+ return element;
+ }
+
+ protected Element toNullPropertyElement(final ODataProperty prop, final Document doc) {
+ final Element element = doc.createElement(ODataConstants.PREFIX_DATASERVICES + prop.getName());
+ element.setAttribute(ODataConstants.ATTR_NULL, Boolean.toString(true));
+ return element;
+ }
+
+ protected Element toPrimitivePropertyElement(
+ final ODataProperty prop, final Document doc, final boolean setType) {
+
+ return toPrimitivePropertyElement(prop.getName(), prop.getPrimitiveValue(), doc, setType);
+ }
+
+ protected Element toPrimitivePropertyElement(
+ final String name, final ODataPrimitiveValue value, final Document doc, final boolean setType) {
+
+ final Element element = doc.createElement(ODataConstants.PREFIX_DATASERVICES + name);
+ if (setType) {
+ element.setAttribute(ODataConstants.ATTR_M_TYPE, value.getTypeName());
+ }
+
+ if (value instanceof ODataGeospatialValue) {
+ element.appendChild(doc.importNode(((ODataGeospatialValue) value).toTree(), true));
+ } else {
+ element.setTextContent(value.toString());
+ }
+
+ return element;
+ }
+
+ protected Element toCollectionPropertyElement(
+ final ODataProperty prop, final Document doc, final boolean setType) {
+
+ if (!prop.hasCollectionValue()) {
+ throw new IllegalArgumentException("Invalid property value type "
+ + prop.getValue().getClass().getSimpleName());
+ }
+
+ final ODataCollectionValue value = prop.getCollectionValue();
+
+ final Element element = doc.createElement(ODataConstants.PREFIX_DATASERVICES + prop.getName());
+ if (value.getTypeName() != null && setType) {
+ element.setAttribute(ODataConstants.ATTR_M_TYPE, value.getTypeName());
+ }
+
+ for (ODataValue el : value) {
+ if (el.isPrimitive()) {
+ element.appendChild(
+ toPrimitivePropertyElement(ODataConstants.ELEM_ELEMENT, el.asPrimitive(), doc, setType));
+ } else {
+ element.appendChild(
+ toComplexPropertyElement(ODataConstants.ELEM_ELEMENT, el.asComplex(), doc, setType));
+ }
+ }
+
+ return element;
+ }
+
+ protected Element toComplexPropertyElement(
+ final ODataProperty prop, final Document doc, final boolean setType) {
+
+ return toComplexPropertyElement(prop.getName(), prop.getComplexValue(), doc, setType);
+ }
+
+ protected Element toComplexPropertyElement(
+ final String name, final ODataComplexValue value, final Document doc, final boolean setType) {
+
+ final Element element = doc.createElement(ODataConstants.PREFIX_DATASERVICES + name);
+ if (value.getTypeName() != null && setType) {
+ element.setAttribute(ODataConstants.ATTR_M_TYPE, value.getTypeName());
+ }
+
+ for (ODataProperty field : value) {
+ element.appendChild(toDOMElement(field, doc, true));
+ }
+ return element;
+ }
+
+ protected ODataPrimitiveValue fromPrimitiveValueElement(final Element prop, final ODataJClientEdmType edmType) {
+ final ODataPrimitiveValue value;
+ if (edmType != null && edmType.getSimpleType().isGeospatial()) {
+ final Element geoProp = ODataConstants.PREFIX_GML.equals(prop.getPrefix())
+ ? prop : (Element) XMLUtils.getChildNodes(prop, Node.ELEMENT_NODE).get(0);
+ value = client.getGeospatialValueBuilder().
+ setType(edmType.getSimpleType()).setTree(geoProp).build();
+ } else {
+ value = client.getPrimitiveValueBuilder().
+ setType(edmType == null ? null : edmType.getSimpleType()).setText(prop.getTextContent()).build();
+ }
+ return value;
+ }
+
+ protected ODataProperty fromPrimitivePropertyElement(final Element prop, final ODataJClientEdmType edmType) {
+ return client.getObjectFactory().newPrimitiveProperty(
+ XMLUtils.getSimpleName(prop), fromPrimitiveValueElement(prop, edmType));
+ }
+
+ protected ODataComplexValue fromComplexValueElement(final Element prop, final ODataJClientEdmType edmType) {
+ final ODataComplexValue value = new ODataComplexValue(edmType == null ? null : edmType.getTypeExpression());
+
+ for (Node child : XMLUtils.getChildNodes(prop, Node.ELEMENT_NODE)) {
+ value.add(getODataProperty((Element) child));
+ }
+
+ return value;
+ }
+
+ protected ODataProperty fromComplexPropertyElement(final Element prop, final ODataJClientEdmType edmType) {
+ return client.getObjectFactory().newComplexProperty(XMLUtils.getSimpleName(prop),
+ fromComplexValueElement(prop, edmType));
+ }
+
+ protected ODataProperty fromCollectionPropertyElement(final Element prop, final ODataJClientEdmType edmType) {
+ final ODataCollectionValue value =
+ new ODataCollectionValue(edmType == null ? null : edmType.getTypeExpression());
+
+ final ODataJClientEdmType type = edmType == null ? null : new ODataJClientEdmType(edmType.getBaseType());
+ final NodeList elements = prop.getChildNodes();
+
+ for (int i = 0; i < elements.getLength(); i++) {
+ if (elements.item(i).getNodeType() != Node.TEXT_NODE) {
+ final Element child = (Element) elements.item(i);
+
+ switch (guessPropertyType(child)) {
+ case COMPLEX:
+ value.add(fromComplexValueElement(child, type));
+ break;
+ case PRIMITIVE:
+ value.add(fromPrimitiveValueElement(child, type));
+ break;
+ default:
+ // do not add null or empty values
+ }
+ }
+ }
+
+ return client.getObjectFactory().newCollectionProperty(XMLUtils.getSimpleName(prop), value);
+ }
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java
index 2c7ff22..43636b3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java
@@ -18,161 +18,174 @@
*/
package org.apache.olingo.client.core.op.impl;
+import com.fasterxml.aalto.stax.InputFactoryImpl;
+import com.fasterxml.aalto.stax.OutputFactoryImpl;
+import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule;
+import com.fasterxml.jackson.dataformat.xml.XmlFactory;
+import com.fasterxml.jackson.dataformat.xml.XmlMapper;
+
+import java.io.IOException;
import java.io.InputStream;
+import java.net.URI;
import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Error;
+import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.client.api.data.LinkCollection;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.format.ODataPubFormat;
import org.apache.olingo.client.api.op.ODataDeserializer;
+import org.apache.olingo.client.core.data.AtomDeserializer;
+import org.apache.olingo.client.core.data.JSONEntryImpl;
+import org.apache.olingo.client.core.data.JSONErrorBundle;
+import org.apache.olingo.client.core.data.JSONFeedImpl;
+import org.apache.olingo.client.core.data.JSONLinkCollectionImpl;
+import org.apache.olingo.client.core.data.JSONPropertyImpl;
+import org.apache.olingo.client.core.data.XMLErrorImpl;
+import org.apache.olingo.client.core.data.XMLLinkCollectionImpl;
import org.apache.olingo.client.core.xml.XMLParser;
import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
public abstract class AbstractODataDeserializer extends AbstractJacksonTool implements ODataDeserializer {
private static final long serialVersionUID = -4244158979195609909L;
-// private final AtomDeserializer atomDeserializer;
+ private final AtomDeserializer atomDeserializer;
+
public AbstractODataDeserializer(final ODataClient client) {
super(client);
-// this.atomDeserializer = new AtomDeserializer(client);
- }
-
-// @Override
-// @SuppressWarnings("unchecked")
-// public <T extends Feed> T toFeed(final InputStream input, final Class<T> reference) {
-// T entry;
-//
-// if (AtomFeed.class.equals(reference)) {
-// entry = (T) toAtomFeed(input);
-// } else {
-// entry = (T) toJSONFeed(input);
-// }
-//
-// return entry;
-// }
-//
-// @Override
-// @SuppressWarnings("unchecked")
-// public <T extends Entry> T toEntry(final InputStream input, final Class<T> reference) {
-// T entry;
-//
-// if (AtomEntry.class.equals(reference)) {
-// entry = (T) toAtomEntry(input);
-//
-// } else {
-// entry = (T) toJSONEntry(input);
-// }
-//
-// return entry;
-// }
-//
-// @Override
-// public Element toPropertyDOM(final InputStream input, final ODataFormat format) {
-// return format == ODataFormat.XML
-// ? toPropertyDOMFromXML(input)
-// : toPropertyDOMFromJSON(input);
-// }
-//
-// @Override
-// public LinkCollection toLinkCollection(final InputStream input, final ODataFormat format) {
-// return format == ODataFormat.XML
-// ? toLinkCollectionFromXML(input)
-// : toLinkCollectionFromJSON(input);
-// }
-//
-// @Override
-// public ODataError toODataError(final InputStream input, final boolean isXML) {
-// return isXML
-// ? toODataErrorFromXML(input)
-// : toODataErrorFromJSON(input);
-// }
-//
+ this.atomDeserializer = new AtomDeserializer(client);
+ }
+
+ @Override
+ public Feed toFeed(final InputStream input, final ODataPubFormat format) {
+ return format == ODataPubFormat.ATOM
+ ? toAtomFeed(input)
+ : toJSONFeed(input);
+ }
+
+ @Override
+ public Entry toEntry(final InputStream input, final ODataPubFormat format) {
+ return format == ODataPubFormat.ATOM
+ ? toAtomEntry(input)
+ : toJSONEntry(input);
+ }
+
+ @Override
+ public Element toPropertyDOM(final InputStream input, final ODataFormat format) {
+ return format == ODataFormat.XML
+ ? toPropertyDOMFromXML(input)
+ : toPropertyDOMFromJSON(input);
+ }
+
+ @Override
+ public LinkCollection toLinkCollection(final InputStream input, final ODataFormat format) {
+ return format == ODataFormat.XML
+ ? toLinkCollectionFromXML(input)
+ : toLinkCollectionFromJSON(input);
+ }
+
+ @Override
+ public Error toError(final InputStream input, final boolean isXML) {
+ return isXML
+ ? toErrorFromXML(input)
+ : toErrorFromJSON(input);
+ }
+
@Override
public Element toDOM(final InputStream input) {
return XMLParser.PARSER.deserialize(input);
}
-//
-// /*
-// * ------------------ Protected methods ------------------
-// */
-// protected AtomFeed toAtomFeed(final InputStream input) {
-// try {
-// return atomDeserializer.feed(toDOM(input));
-// } catch (Exception e) {
-// throw new IllegalArgumentException("While deserializing Atom feed", e);
-// }
-// }
-//
-// protected AtomEntry toAtomEntry(final InputStream input) {
-// try {
-// return atomDeserializer.entry(toDOM(input));
-// } catch (Exception e) {
-// throw new IllegalArgumentException("While deserializing Atom entry", e);
-// }
-// }
-//
-// protected JSONFeed toJSONFeed(final InputStream input) {
-// try {
-// return getObjectMapper().readValue(input, JSONFeed.class);
-// } catch (IOException e) {
-// throw new IllegalArgumentException("While deserializing JSON feed", e);
-// }
-// }
-//
-// protected abstract AbstractJSONEntry toJSONEntry(final InputStream input);
-//
-// protected Element toPropertyDOMFromXML(final InputStream input) {
-// return toDOM(input);
-// }
-//
-// protected Element toPropertyDOMFromJSON(final InputStream input) {
-// try {
-// return getObjectMapper().readValue(input, JSONProperty.class).getContent();
-// } catch (IOException e) {
-// throw new IllegalArgumentException("While deserializing JSON property", e);
-// }
-// }
-//
-// protected XMLLinkCollection toLinkCollectionFromXML(final InputStream input) {
-// final Element root = toDOM(input);
-//
-// final NodeList uris = root.getOwnerDocument().getElementsByTagName(ODataConstants.ELEM_URI);
-//
-// final List<URI> links = new ArrayList<URI>();
-// for (int i = 0; i < uris.getLength(); i++) {
-// links.add(URI.create(uris.item(i).getTextContent()));
-// }
-//
-// final NodeList next = root.getElementsByTagName(ODataConstants.NEXT_LINK_REL);
-// final XMLLinkCollection linkCollection = next.getLength() > 0
-// ? new XMLLinkCollection(URI.create(next.item(0).getTextContent()))
-// : new XMLLinkCollection();
-// linkCollection.setLinks(links);
-//
-// return linkCollection;
-// }
-//
-// protected JSONLinkCollection toLinkCollectionFromJSON(final InputStream input) {
-// try {
-// return getObjectMapper().readValue(input, JSONLinkCollection.class);
-// } catch (IOException e) {
-// throw new IllegalArgumentException("While deserializing JSON $links", e);
-// }
-// }
-//
-// protected XMLODataError toODataErrorFromXML(final InputStream input) {
-// try {
-// final XmlMapper xmlMapper = new XmlMapper(
-// new XmlFactory(new InputFactoryImpl(), new OutputFactoryImpl()), new JacksonXmlModule());
-// return xmlMapper.readValue(input, XMLODataError.class);
-// } catch (Exception e) {
-// throw new IllegalArgumentException("While deserializing XML error", e);
-// }
-// }
-//
-// protected JSONODataError toODataErrorFromJSON(final InputStream input) {
-// try {
-// return getObjectMapper().readValue(input, JSONODataErrorBundle.class).getError();
-// } catch (IOException e) {
-// throw new IllegalArgumentException("While deserializing JSON error", e);
-// }
-// }
+
+ /*
+ * ------------------ Protected methods ------------------
+ */
+ protected Feed toAtomFeed(final InputStream input) {
+ try {
+ return atomDeserializer.feed(toDOM(input));
+ } catch (Exception e) {
+ throw new IllegalArgumentException("While deserializing Atom feed", e);
+ }
+ }
+
+ protected Entry toAtomEntry(final InputStream input) {
+ try {
+ return atomDeserializer.entry(toDOM(input));
+ } catch (Exception e) {
+ throw new IllegalArgumentException("While deserializing Atom entry", e);
+ }
+ }
+
+ protected Feed toJSONFeed(final InputStream input) {
+ try {
+ return getObjectMapper().readValue(input, JSONFeedImpl.class);
+ } catch (IOException e) {
+ throw new IllegalArgumentException("While deserializing JSON feed", e);
+ }
+ }
+
+ protected Entry toJSONEntry(final InputStream input) {
+ try {
+ return getObjectMapper().readValue(input, JSONEntryImpl.class);
+ } catch (IOException e) {
+ throw new IllegalArgumentException("While deserializing JSON entry", e);
+ }
+ }
+
+ protected Element toPropertyDOMFromXML(final InputStream input) {
+ return toDOM(input);
+ }
+
+ protected Element toPropertyDOMFromJSON(final InputStream input) {
+ try {
+ return getObjectMapper().readValue(input, JSONPropertyImpl.class).getContent();
+ } catch (IOException e) {
+ throw new IllegalArgumentException("While deserializing JSON property", e);
+ }
+ }
+
+ protected XMLLinkCollectionImpl toLinkCollectionFromXML(final InputStream input) {
+ final Element root = toDOM(input);
+
+ final NodeList uris = root.getOwnerDocument().getElementsByTagName(ODataConstants.ELEM_URI);
+
+ final NodeList next = root.getElementsByTagName(ODataConstants.NEXT_LINK_REL);
+ final XMLLinkCollectionImpl linkCollection = next.getLength() > 0
+ ? new XMLLinkCollectionImpl(URI.create(next.item(0).getTextContent()))
+ : new XMLLinkCollectionImpl();
+ for (int i = 0; i < uris.getLength(); i++) {
+ linkCollection.getLinks().add(URI.create(uris.item(i).getTextContent()));
+ }
+
+ return linkCollection;
+ }
+
+ protected JSONLinkCollectionImpl toLinkCollectionFromJSON(final InputStream input) {
+ try {
+ return getObjectMapper().readValue(input, JSONLinkCollectionImpl.class);
+ } catch (IOException e) {
+ throw new IllegalArgumentException("While deserializing JSON $links", e);
+ }
+ }
+
+ protected Error toErrorFromXML(final InputStream input) {
+ try {
+ final XmlMapper xmlMapper = new XmlMapper(
+ new XmlFactory(new InputFactoryImpl(), new OutputFactoryImpl()), new JacksonXmlModule());
+ return xmlMapper.readValue(input, XMLErrorImpl.class);
+ } catch (Exception e) {
+ throw new IllegalArgumentException("While deserializing XML error", e);
+ }
+ }
+
+ protected Error toErrorFromJSON(final InputStream input) {
+ try {
+ return getObjectMapper().readValue(input, JSONErrorBundle.class).getError();
+ } catch (IOException e) {
+ throw new IllegalArgumentException("While deserializing JSON error", e);
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataReader.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataReader.java
index 6cf19a3..d8a85c6 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataReader.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataReader.java
@@ -18,10 +18,30 @@
*/
package org.apache.olingo.client.core.op.impl;
+import java.io.InputStream;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.data.Error;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.domain.ODataLinkCollection;
+import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.client.api.domain.ODataServiceDocument;
+import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.client.api.format.ODataValueFormat;
import org.apache.olingo.client.api.op.ODataReader;
+import org.apache.olingo.client.core.data.ODataEntitySetIterator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
public abstract class AbstractODataReader implements ODataReader {
@@ -38,101 +58,99 @@ public abstract class AbstractODataReader implements ODataReader {
this.client = client;
}
-// @Override
-// public ODataEntitySet readEntitySet(final InputStream input, final ODataPubFormat format) {
-// return client.getBinder().getODataEntitySet(
-// client.getDeserializer().toFeed(input, ResourceFactory.feedClassForFormat(format)));
-// }
-//
-// @Override
-// public ODataEntity readEntity(final InputStream input, final ODataPubFormat format) {
-// return client.getBinder().getODataEntity(
-// client.getDeserializer().toEntry(input, ResourceFactory.entryClassForFormat(format)));
-// }
-//
-// @Override
-// public ODataProperty readProperty(final InputStream input, final ODataFormat format) {
-// final Element property = client.getDeserializer().toPropertyDOM(input, format);
-//
-// // The ODataProperty object is used either for actual entity properties and for invoke result
-// // (when return type is neither an entity nor a collection of entities).
-// // Such formats are mostly the same except for collections: an entity property looks like
-// // <aproperty m:type="Collection(AType)">
-// // <element>....</element>
-// // </aproperty>
-// //
-// // while an invoke result with returnType="Collection(AnotherType)" looks like
-// // <functionImportName>
-// // <element m:type="AnotherType">...</element>
-// // <functionImportName>
-// //
-// // The code below is meant for "normalizing" the latter into
-// // <functionImportName m:type="Collection(AnotherType)">
-// // <element m:type="AnotherType">...</element>
-// // <functionImportName>
-// final String type = property.getAttribute(ODataConstants.ATTR_M_TYPE);
-// final NodeList elements = property.getElementsByTagName(ODataConstants.ELEM_ELEMENT);
-// if (StringUtils.isBlank(type) && elements != null && elements.getLength() > 0) {
-// final Node elementType = elements.item(0).getAttributes().getNamedItem(ODataConstants.ATTR_M_TYPE);
-// if (elementType != null) {
-// property.setAttribute(ODataConstants.ATTR_M_TYPE, "Collection(" + elementType.getTextContent() + ")");
-// }
-// }
-//
-// return client.getBinder().getProperty(property);
-// }
-//
-// @Override
-// public ODataLinkCollection readLinks(final InputStream input, final ODataFormat format) {
-// return client.getBinder().getLinkCollection(
-// client.getDeserializer().toLinkCollection(input, format));
-// }
-//
-// @Override
-// public ODataError readError(final InputStream inputStream, final boolean isXML) {
-// return client.getDeserializer().toODataError(inputStream, isXML);
-// }
-//
-// @Override
-// @SuppressWarnings("unchecked")
-// public <T> T read(final InputStream src, final String format, final Class<T> reference) {
-// Object res;
-//
-// try {
-// if (ODataEntitySetIterator.class.isAssignableFrom(reference)) {
-// res = new ODataEntitySetIterator(client, src, ODataPubFormat.fromString(format));
-// } else if (ODataEntitySet.class.isAssignableFrom(reference)) {
-// res = readEntitySet(src, ODataPubFormat.fromString(format));
-// } else if (ODataEntity.class.isAssignableFrom(reference)) {
-// res = readEntity(src, ODataPubFormat.fromString(format));
-// } else if (ODataProperty.class.isAssignableFrom(reference)) {
-// res = readProperty(src, ODataFormat.fromString(format));
-// } else if (ODataLinkCollection.class.isAssignableFrom(reference)) {
-// res = readLinks(src, ODataFormat.fromString(format));
-// } else if (ODataValue.class.isAssignableFrom(reference)) {
-// res = client.getPrimitiveValueBuilder().
-// setType(ODataValueFormat.fromString(format) == ODataValueFormat.TEXT
-// ? EdmSimpleType.String : EdmSimpleType.Stream).
-// setText(IOUtils.toString(src)).
-// build();
-// } else if (AbstractEdmMetadata.class.isAssignableFrom(reference)) {
-// res = readMetadata(src);
-// } else if (ODataServiceDocument.class.isAssignableFrom(reference)) {
-// res = readServiceDocument(src, ODataFormat.fromString(format));
-// } else if (ODataError.class.isAssignableFrom(reference)) {
-// res = readError(src, !format.toString().contains("json"));
-// } else {
-// throw new IllegalArgumentException("Invalid reference type " + reference);
-// }
-// } catch (Exception e) {
-// LOG.warn("Cast error", e);
-// res = null;
-// } finally {
-// if (!ODataEntitySetIterator.class.isAssignableFrom(reference)) {
-// IOUtils.closeQuietly(src);
-// }
-// }
-//
-// return (T) res;
-// }
+ @Override
+ public ODataEntitySet readEntitySet(final InputStream input, final ODataPubFormat format) {
+ return client.getBinder().getODataEntitySet(client.getDeserializer().toFeed(input, format));
+ }
+
+ @Override
+ public ODataEntity readEntity(final InputStream input, final ODataPubFormat format) {
+ return client.getBinder().getODataEntity(client.getDeserializer().toEntry(input, format));
+ }
+
+ @Override
+ public ODataProperty readProperty(final InputStream input, final ODataFormat format) {
+ final Element property = client.getDeserializer().toPropertyDOM(input, format);
+
+ // The ODataProperty object is used either for actual entity properties and for invoke result
+ // (when return type is neither an entity nor a collection of entities).
+ // Such formats are mostly the same except for collections: an entity property looks like
+ // <aproperty m:type="Collection(AType)">
+ // <element>....</element>
+ // </aproperty>
+ //
+ // while an invoke result with returnType="Collection(AnotherType)" looks like
+ // <functionImportName>
+ // <element m:type="AnotherType">...</element>
+ // <functionImportName>
+ //
+ // The code below is meant for "normalizing" the latter into
+ // <functionImportName m:type="Collection(AnotherType)">
+ // <element m:type="AnotherType">...</element>
+ // <functionImportName>
+ final String type = property.getAttribute(ODataConstants.ATTR_M_TYPE);
+ final NodeList elements = property.getElementsByTagName(ODataConstants.ELEM_ELEMENT);
+ if (StringUtils.isBlank(type) && elements != null && elements.getLength() > 0) {
+ final Node elementType = elements.item(0).getAttributes().getNamedItem(ODataConstants.ATTR_M_TYPE);
+ if (elementType != null) {
+ property.setAttribute(ODataConstants.ATTR_M_TYPE, "Collection(" + elementType.getTextContent() + ")");
+ }
+ }
+
+ return client.getBinder().getODataProperty(property);
+ }
+
+ @Override
+ public ODataLinkCollection readLinks(final InputStream input, final ODataFormat format) {
+ return client.getBinder().getLinkCollection(
+ client.getDeserializer().toLinkCollection(input, format));
+ }
+
+ @Override
+ public Error readError(final InputStream inputStream, final boolean isXML) {
+ return client.getDeserializer().toError(inputStream, isXML);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public <T> T read(final InputStream src, final String format, final Class<T> reference) {
+ Object res;
+
+ try {
+ if (ODataEntitySetIterator.class.isAssignableFrom(reference)) {
+ res = new ODataEntitySetIterator(client, src, ODataPubFormat.fromString(format));
+ } else if (ODataEntitySet.class.isAssignableFrom(reference)) {
+ res = readEntitySet(src, ODataPubFormat.fromString(format));
+ } else if (ODataEntity.class.isAssignableFrom(reference)) {
+ res = readEntity(src, ODataPubFormat.fromString(format));
+ } else if (ODataProperty.class.isAssignableFrom(reference)) {
+ res = readProperty(src, ODataFormat.fromString(format));
+ } else if (ODataLinkCollection.class.isAssignableFrom(reference)) {
+ res = readLinks(src, ODataFormat.fromString(format));
+ } else if (ODataValue.class.isAssignableFrom(reference)) {
+ res = client.getPrimitiveValueBuilder().
+ setType(ODataValueFormat.fromString(format) == ODataValueFormat.TEXT
+ ? ODataJClientEdmPrimitiveType.String : ODataJClientEdmPrimitiveType.Stream).
+ setText(IOUtils.toString(src)).
+ build();
+ } else if (XMLMetadata.class.isAssignableFrom(reference)) {
+ res = readMetadata(src);
+ } else if (ODataServiceDocument.class.isAssignableFrom(reference)) {
+ res = readServiceDocument(src, ODataFormat.fromString(format));
+ } else if (Error.class.isAssignableFrom(reference)) {
+ res = readError(src, !format.toString().contains("json"));
+ } else {
+ throw new IllegalArgumentException("Invalid reference type " + reference);
+ }
+ } catch (Exception e) {
+ LOG.warn("Cast error", e);
+ res = null;
+ } finally {
+ if (!ODataEntitySetIterator.class.isAssignableFrom(reference)) {
+ IOUtils.closeQuietly(src);
+ }
+ }
+
+ return (T) res;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java
index d60ff19..151ff49 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java
@@ -18,81 +18,103 @@
*/
package org.apache.olingo.client.core.op.impl;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
+import javax.xml.parsers.DocumentBuilder;
import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.client.api.data.Link;
+import org.apache.olingo.client.api.format.ODataFormat;
import org.apache.olingo.client.api.op.ODataSerializer;
+import org.apache.olingo.client.api.utils.XMLUtils;
+import org.apache.olingo.client.core.data.AbstractPayloadObject;
+import org.apache.olingo.client.core.data.AtomEntryImpl;
+import org.apache.olingo.client.core.data.AtomFeedImpl;
+import org.apache.olingo.client.core.data.AtomSerializer;
+import org.apache.olingo.client.core.data.JSONEntryImpl;
+import org.apache.olingo.client.core.data.JSONFeedImpl;
+import org.apache.olingo.client.core.data.JSONPropertyImpl;
import org.apache.olingo.client.core.xml.XMLParser;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
public abstract class AbstractODataSerializer extends AbstractJacksonTool implements ODataSerializer {
private static final long serialVersionUID = -357777648541325363L;
-// private final AtomSerializer atomSerializer;
+ private final AtomSerializer atomSerializer;
+
public AbstractODataSerializer(final ODataClient client) {
super(client);
-// this.atomSerializer = new AtomSerializer(client);
- }
-
-// @Override
-// public <T extends Feed> void feed(final T obj, final OutputStream out) {
-// feed(obj, new OutputStreamWriter(out));
-// }
-//
-// @Override
-// public <T extends Feed> void feed(final T obj, final Writer writer) {
-// if (obj instanceof AtomFeed) {
-// atom((AtomFeed) obj, writer);
-// } else {
-// json((JSONFeed) obj, writer);
-// }
-// }
-//
-// @Override
-// public <T extends Entry> void entry(final T obj, final OutputStream out) {
-// entry(obj, new OutputStreamWriter(out));
-// }
-//
-// @Override
-// public <T extends Entry> void entry(final T obj, final Writer writer) {
-// if (obj instanceof AtomEntry) {
-// atom((AtomEntry) obj, writer);
-// } else {
-// json((JSONEntry) obj, writer);
-// }
-// }
-//
-// @Override
-// public void property(final Element element, final ODataFormat format, final OutputStream out) {
-// property(element, format, new OutputStreamWriter(out));
-// }
-//
-// @Override
-// public void property(final Element element, final ODataFormat format, final Writer writer) {
-// if (format == ODataFormat.XML) {
-// dom(element, writer);
-// } else {
-// json(element, writer);
-// }
-// }
-//
-// @Override
-// public void link(final ODataLink link, final ODataFormat format, final OutputStream out) {
-// link(link, format, new OutputStreamWriter(out));
-// }
-//
-// @Override
-// public void link(final ODataLink link, final ODataFormat format, final Writer writer) {
-// if (format == ODataFormat.XML) {
-// xmlLink(link, writer);
-// } else {
-// jsonLink(link, writer);
-// }
-// }
-//
+ this.atomSerializer = new AtomSerializer(client);
+ }
+
+ @Override
+ public void feed(final Feed obj, final OutputStream out) {
+ feed(obj, new OutputStreamWriter(out));
+ }
+
+ @Override
+ public void feed(final Feed obj, final Writer writer) {
+ if (obj instanceof AtomFeedImpl) {
+ atom((AtomFeedImpl) obj, writer);
+ } else {
+ json((JSONFeedImpl) obj, writer);
+ }
+ }
+
+ @Override
+ public void entry(final Entry obj, final OutputStream out) {
+ entry(obj, new OutputStreamWriter(out));
+ }
+
+ @Override
+ public void entry(final Entry obj, final Writer writer) {
+ if (obj instanceof AtomEntryImpl) {
+ atom((AtomEntryImpl) obj, writer);
+ } else {
+ json((JSONEntryImpl) obj, writer);
+ }
+ }
+
+ @Override
+ public void property(final Element element, final ODataFormat format, final OutputStream out) {
+ property(element, format, new OutputStreamWriter(out));
+ }
+
+ @Override
+ public void property(final Element element, final ODataFormat format, final Writer writer) {
+ if (format == ODataFormat.XML) {
+ dom(element, writer);
+ } else {
+ json(element, writer);
+ }
+ }
+
+ @Override
+ public void link(final Link link, final ODataFormat format, final OutputStream out) {
+ link(link, format, new OutputStreamWriter(out));
+ }
+
+ @Override
+ public void link(final Link link, final ODataFormat format, final Writer writer) {
+ if (format == ODataFormat.XML) {
+ xmlLink(link, writer);
+ } else {
+ jsonLink(link, writer);
+ }
+ }
+
@Override
public void dom(final Node content, final OutputStream out) {
dom(content, new OutputStreamWriter(out));
@@ -102,60 +124,60 @@ public abstract class AbstractODataSerializer extends AbstractJacksonTool implem
public void dom(final Node content, final Writer writer) {
XMLParser.PARSER.serialize(content, writer);
}
-//
-// /*
-// * ------------------ Protected methods ------------------
-// */
-// protected <T extends AbstractPayloadObject> void atom(final T obj, final Writer writer) {
-// try {
-// dom(atomSerializer.serialize(obj), writer);
-// } catch (Exception e) {
-// throw new IllegalArgumentException("While serializing Atom object", e);
-// }
-// }
-//
-// protected <T extends AbstractPayloadObject> void json(final T obj, final Writer writer) {
-// try {
-// getObjectMapper().writeValue(writer, obj);
-// } catch (IOException e) {
-// throw new IllegalArgumentException("While serializing JSON object", e);
-// }
-// }
-//
-// protected void json(final Element element, final Writer writer) {
-// try {
-// final JSONProperty property = new JSONProperty();
-// property.setContent(element);
-// getObjectMapper().writeValue(writer, property);
-// } catch (IOException e) {
-// throw new IllegalArgumentException("While serializing JSON property", e);
-// }
-// }
-//
-// protected void xmlLink(final ODataLink link, final Writer writer) {
-// try {
-// final DocumentBuilder builder = XMLUtils.DOC_BUILDER_FACTORY.newDocumentBuilder();
-// final Document doc = builder.newDocument();
-// final Element uri = doc.createElementNS(
-// client.getWorkingVersion().getNamespaceMap().get(ODataVersion.NS_DATASERVICES),
-// ODataConstants.ELEM_URI);
-// uri.appendChild(doc.createTextNode(link.getLink().toASCIIString()));
-//
-// dom(uri, writer);
-// } catch (Exception e) {
-// throw new IllegalArgumentException("While serializing XML link", e);
-// }
-// }
-//
-// protected void jsonLink(final ODataLink link, final Writer writer) {
-// final ObjectMapper mapper = getObjectMapper();
-// final ObjectNode uri = mapper.createObjectNode();
-// uri.put(ODataConstants.JSON_URL, link.getLink().toASCIIString());
-//
-// try {
-// mapper.writeValue(writer, uri);
-// } catch (Exception e) {
-// throw new IllegalArgumentException("While serializing JSON link", e);
-// }
-// }
+
+ /*
+ * ------------------ Protected methods ------------------
+ */
+ protected <T extends AbstractPayloadObject> void atom(final T obj, final Writer writer) {
+ try {
+ dom(atomSerializer.serialize(obj), writer);
+ } catch (Exception e) {
+ throw new IllegalArgumentException("While serializing Atom object", e);
+ }
+ }
+
+ protected <T extends AbstractPayloadObject> void json(final T obj, final Writer writer) {
+ try {
+ getObjectMapper().writeValue(writer, obj);
+ } catch (IOException e) {
+ throw new IllegalArgumentException("While serializing JSON object", e);
+ }
+ }
+
+ protected void json(final Element element, final Writer writer) {
+ try {
+ final JSONPropertyImpl property = new JSONPropertyImpl();
+ property.setContent(element);
+ getObjectMapper().writeValue(writer, property);
+ } catch (IOException e) {
+ throw new IllegalArgumentException("While serializing JSON property", e);
+ }
+ }
+
+ protected void xmlLink(final Link link, final Writer writer) {
+ try {
+ final DocumentBuilder builder = XMLUtils.DOC_BUILDER_FACTORY.newDocumentBuilder();
+ final Document doc = builder.newDocument();
+ final Element uri = doc.createElementNS(
+ client.getServiceVersion().getNamespaceMap().get(ODataServiceVersion.NS_DATASERVICES),
+ ODataConstants.ELEM_URI);
+ uri.appendChild(doc.createTextNode(link.getHref()));
+
+ dom(uri, writer);
+ } catch (Exception e) {
+ throw new IllegalArgumentException("While serializing XML link", e);
+ }
+ }
+
+ protected void jsonLink(final Link link, final Writer writer) {
+ final ObjectMapper mapper = getObjectMapper();
+ final ObjectNode uri = mapper.createObjectNode();
+ uri.put(ODataConstants.JSON_URL, link.getHref());
+
+ try {
+ mapper.writeValue(writer, uri);
+ } catch (Exception e) {
+ throw new IllegalArgumentException("While serializing JSON link", e);
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java
new file mode 100644
index 0000000..1855135
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java
@@ -0,0 +1,287 @@
+/*
+ * 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.client.core.op.impl;
+
+import java.net.URI;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.data.LinkType;
+import org.apache.olingo.client.api.domain.ODataCollectionValue;
+import org.apache.olingo.client.api.domain.ODataComplexValue;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.domain.ODataInlineEntity;
+import org.apache.olingo.client.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.client.api.domain.ODataLink;
+import org.apache.olingo.client.api.domain.ODataObjectFactory;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.domain.ODataProperty;
+
+public class ODataObjectFactoryImpl implements ODataObjectFactory {
+
+ private static final long serialVersionUID = -3769695665946919447L;
+
+ protected final ODataClient client;
+
+ public ODataObjectFactoryImpl(final ODataClient client) {
+ this.client = client;
+ }
+
+ /**
+ * Instantiates a new entity set.
+ *
+ * @return entity set.
+ */
+ @Override
+ public ODataEntitySet newEntitySet() {
+ return new ODataEntitySet();
+ }
+
+ /**
+ * Instantiates a new entity set.
+ *
+ * @param next next link.
+ * @return entity set.
+ */
+ @Override
+ public ODataEntitySet newEntitySet(final URI next) {
+ return new ODataEntitySet(next);
+ }
+
+ /**
+ * Instantiates a new entity.
+ *
+ * @param name OData entity name.
+ * @return entity.
+ */
+ @Override
+ public ODataEntity newEntity(final String name) {
+ return new ODataEntity(name);
+ }
+
+ /**
+ * Instantiates a new entity.
+ *
+ * @param name OData entity name.
+ * @param link self link.
+ * @return entity.
+ */
+ @Override
+ public ODataEntity newEntity(final String name, final URI link) {
+ final ODataEntity result = new ODataEntity(name);
+ result.setLink(link);
+ return result;
+ }
+
+ /**
+ * Instantiates a new in-line entity set.
+ *
+ * @param name name.
+ * @param link edit link.
+ * @param entitySet entity set.
+ * @return in-line entity set.
+ */
+ @Override
+ public ODataInlineEntitySet newInlineEntitySet(final String name, final URI link,
+ final ODataEntitySet entitySet) {
+
+ return new ODataInlineEntitySet(client, link, LinkType.ENTITY_SET_NAVIGATION, name, entitySet);
+ }
+
+ /**
+ * Instantiates a new in-line entity set.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @param entitySet entity set.
+ * @return in-line entity set.
+ */
+ @Override
+ public ODataInlineEntitySet newInlineEntitySet(final String name, final URI baseURI, final String href,
+ final ODataEntitySet entitySet) {
+
+ return new ODataInlineEntitySet(client, baseURI, href, LinkType.ENTITY_SET_NAVIGATION, name, entitySet);
+ }
+
+ /**
+ * Instantiates a new in-line entity.
+ *
+ * @param name name.
+ * @param link edit link.
+ * @param entity entity.
+ * @return in-line entity.
+ */
+ @Override
+ public ODataInlineEntity newInlineEntity(final String name, final URI link, final ODataEntity entity) {
+ return new ODataInlineEntity(client, link, LinkType.ENTITY_NAVIGATION, name, entity);
+ }
+
+ /**
+ * Instantiates a new in-line entity.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @param entity entity.
+ * @return in-line entity.
+ */
+ @Override
+ public ODataInlineEntity newInlineEntity(final String name, final URI baseURI, final String href,
+ final ODataEntity entity) {
+
+ return new ODataInlineEntity(client, baseURI, href, LinkType.ENTITY_NAVIGATION, name, entity);
+ }
+
+ /**
+ * Instantiates a new entity navigation link.
+ *
+ * @param name name.
+ * @param link link.
+ * @return entity navigation link.
+ */
+ @Override
+ public ODataLink newEntityNavigationLink(final String name, final URI link) {
+ return new ODataLink(client, link, LinkType.ENTITY_NAVIGATION, name);
+ }
+
+ /**
+ * Instantiates a new entity navigation link.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @return entity navigation link.
+ */
+ @Override
+ public ODataLink newEntityNavigationLink(final String name, final URI baseURI, final String href) {
+ return new ODataLink(client, baseURI, href, LinkType.ENTITY_NAVIGATION, name);
+ }
+
+ /**
+ * Instantiates a new entity set navigation link.
+ *
+ * @param name name.
+ * @param link link.
+ * @return entity set navigation link.
+ */
+ @Override
+ public ODataLink newFeedNavigationLink(final String name, final URI link) {
+ return new ODataLink(client, link, LinkType.ENTITY_SET_NAVIGATION, name);
+ }
+
+ /**
+ * Instantiates a new entity set navigation link.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @return entity set navigation link.
+ */
+ @Override
+ public ODataLink newFeedNavigationLink(final String name, final URI baseURI, final String href) {
+ return new ODataLink(client, baseURI, href, LinkType.ENTITY_SET_NAVIGATION, name);
+ }
+
+ /**
+ * Instantiates a new association link.
+ *
+ * @param name name.
+ * @param link link.
+ * @return association link.
+ */
+ @Override
+ public ODataLink newAssociationLink(final String name, final URI link) {
+ return new ODataLink(client, link, LinkType.ASSOCIATION, name);
+ }
+
+ /**
+ * Instantiates a new association link.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @return association link.
+ */
+ @Override
+ public ODataLink newAssociationLink(final String name, final URI baseURI, final String href) {
+ return new ODataLink(client, baseURI, href, LinkType.ASSOCIATION, name);
+ }
+
+ /**
+ * Instantiates a new media-edit link.
+ *
+ * @param name name.
+ * @param link link.
+ * @return media-edit link.
+ */
+ @Override
+ public ODataLink newMediaEditLink(final String name, final URI link) {
+ return new ODataLink(client, link, LinkType.MEDIA_EDIT, name);
+ }
+
+ /**
+ * Instantiates a new media-edit link.
+ *
+ * @param name name.
+ * @param baseURI base URI.
+ * @param href href.
+ * @return media-edit link.
+ */
+ @Override
+ public ODataLink newMediaEditLink(final String name, final URI baseURI, final String href) {
+ return new ODataLink(client, baseURI, href, LinkType.MEDIA_EDIT, name);
+ }
+
+ /**
+ * Instantiates a new primitive property.
+ *
+ * @param name name.
+ * @param value value.
+ * @return primitive property.
+ */
+ @Override
+ public ODataProperty newPrimitiveProperty(final String name, final ODataPrimitiveValue value) {
+ return new ODataProperty(name, value);
+ }
+
+ /**
+ * Instantiates a new complex property.
+ *
+ * @param name name.
+ * @param value value.
+ * @return complex property.
+ */
+ @Override
+ public ODataProperty newComplexProperty(final String name, final ODataComplexValue value) {
+ return new ODataProperty(name, value);
+ }
+
+ /**
+ * Instantiates a new collection property.
+ *
+ * @param name name.
+ * @param value value.
+ * @return collection property.
+ */
+ @Override
+ public ODataProperty newCollectionProperty(final String name, final ODataCollectionValue value) {
+ return new ODataProperty(name, value);
+ }
+
+}
[08/11] [OLINGO-200] V3 (de)serializers + unit tests merged
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorImpl.java
new file mode 100644
index 0000000..d0a19e1
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorImpl.java
@@ -0,0 +1,237 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.olingo.client.api.data.Error;
+
+/**
+ * This class represents an OData error returned as JSON.
+ */
+public class JSONErrorImpl extends AbstractPayloadObject implements Error {
+
+ private static final long serialVersionUID = -3476499168507242932L;
+
+ /**
+ * Error message.
+ */
+ public static class Message extends AbstractPayloadObject {
+
+ private static final long serialVersionUID = 2577818040815637859L;
+
+ private String lang;
+
+ private String value;
+
+ /**
+ * Gets language.
+ *
+ * @return language.
+ */
+ public String getLang() {
+ return lang;
+ }
+
+ /**
+ * Sets language.
+ *
+ * @param lang language.
+ */
+ public void setLang(final String lang) {
+ this.lang = lang;
+ }
+
+ /**
+ * Gets message.
+ *
+ * @return message.
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Sets message.
+ *
+ * @param value message.
+ */
+ public void setValue(final String value) {
+ this.value = value;
+ }
+ }
+
+ /**
+ * Inner error.
+ */
+ static class InnerError extends AbstractPayloadObject {
+
+ private static final long serialVersionUID = -3920947476143537640L;
+
+ private String message;
+
+ private String type;
+
+ private String stacktrace;
+
+ private InnerError internalexception;
+
+ /**
+ * Gets inner message.
+ *
+ * @return message.
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets inner message.
+ *
+ * @param message message.
+ */
+ public void setMessage(final String message) {
+ this.message = message;
+ }
+
+ /**
+ * Gets type.
+ *
+ * @return type.
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Sets type.
+ *
+ * @param type type.
+ */
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ /**
+ * Gets stack-trace.
+ *
+ * @return stack-trace.
+ */
+ public String getStacktrace() {
+ return stacktrace;
+ }
+
+ /**
+ * Sets stack-trace.
+ *
+ * @param stacktrace stack-trace.
+ */
+ public void setStacktrace(final String stacktrace) {
+ this.stacktrace = stacktrace;
+ }
+
+ public InnerError getInternalexception() {
+ return internalexception;
+ }
+
+ public void setInternalexception(final InnerError internalexception) {
+ this.internalexception = internalexception;
+ }
+ }
+
+ private String code;
+
+ @JsonProperty(value = "message")
+ private Message message;
+
+ @JsonProperty(value = "innererror", required = false)
+ private InnerError innererror;
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * Sets error code.
+ *
+ * @param code error code.
+ */
+ public void setCode(final String code) {
+ this.code = code;
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @JsonIgnore
+ @Override
+ public String getMessageLang() {
+ return this.message == null ? null : this.message.getLang();
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @JsonIgnore
+ @Override
+ public String getMessageValue() {
+ return this.message == null ? null : this.message.getValue();
+ }
+
+ /**
+ * Sets the value of the message property.
+ *
+ * @param value allowed object is {@link Error.Message }
+ *
+ */
+ public void setMessage(final Message value) {
+ this.message = value;
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @JsonIgnore
+ @Override
+ public String getInnerErrorMessage() {
+ return this.innererror == null ? null : this.innererror.getMessage();
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @JsonIgnore
+ @Override
+ public String getInnerErrorType() {
+ return this.innererror == null ? null : this.innererror.getType();
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @JsonIgnore
+ @Override
+ public String getInnerErrorStacktrace() {
+ return this.innererror == null ? null : this.innererror.getStacktrace();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedDeserializer.java
new file mode 100644
index 0000000..23dd23a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedDeserializer.java
@@ -0,0 +1,64 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import java.io.IOException;
+import java.net.URI;
+import java.util.Iterator;
+import org.apache.olingo.client.api.ODataConstants;
+
+/**
+ * Reads JSON string into a feed.
+ * <br/>
+ * If metadata information is available, the corresponding entry fields and content will be populated.
+ */
+public class JSONFeedDeserializer extends ODataJacksonDeserializer<JSONFeedImpl> {
+
+ @Override
+ protected JSONFeedImpl doDeserialize(final JsonParser parser, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final ObjectNode tree = (ObjectNode) parser.getCodec().readTree(parser);
+
+ final JSONFeedImpl feed = new JSONFeedImpl();
+
+ if (tree.hasNonNull(ODataConstants.JSON_METADATA)) {
+ feed.setMetadata(URI.create(tree.get(ODataConstants.JSON_METADATA).textValue()));
+ }
+ if (tree.hasNonNull("odata.count")) {
+ feed.setCount(tree.get("odata.count").asInt());
+ }
+ if (tree.hasNonNull("odata.nextLink")) {
+ feed.setNext(URI.create(tree.get("odata.nextLink").textValue()));
+ }
+
+ if (tree.hasNonNull(ODataConstants.JSON_VALUE)) {
+ for (final Iterator<JsonNode> itor = tree.get(ODataConstants.JSON_VALUE).iterator(); itor.hasNext();) {
+ feed.getEntries().add(itor.next().traverse(parser.getCodec()).readValueAs(JSONEntryImpl.class));
+ }
+ }
+
+ return feed;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedImpl.java
new file mode 100644
index 0000000..ced3d09
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedImpl.java
@@ -0,0 +1,99 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.client.api.uri.SegmentType;
+
+/**
+ * List of entries, represented via JSON.
+ *
+ * @see JSONEntry
+ */
+@JsonDeserialize(using = JSONFeedDeserializer.class)
+public class JSONFeedImpl extends AbstractPayloadObject implements Feed {
+
+ private static final long serialVersionUID = -3576372289800799417L;
+
+ private URI metadata;
+
+ private Integer count;
+
+ private final List<Entry> entries = new ArrayList<Entry>();
+
+ private String next;
+
+ @Override
+ public URI getBaseURI() {
+ URI baseURI = null;
+ if (metadata != null) {
+ final String metadataURI = getMetadata().toASCIIString();
+ baseURI = URI.create(metadataURI.substring(0, metadataURI.indexOf(SegmentType.METADATA.getValue())));
+ }
+
+ return baseURI;
+ }
+
+ /**
+ * Gets the metadata URI.
+ *
+ * @return the metadata URI
+ */
+ public URI getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the metadata URI.
+ *
+ * @param metadata metadata URI.
+ */
+ public void setMetadata(final URI metadata) {
+ this.metadata = metadata;
+ }
+
+ @Override
+ public Integer getCount() {
+ return count;
+ }
+
+ public void setCount(final Integer count) {
+ this.count = count;
+ }
+
+ @Override
+ public List<Entry> getEntries() {
+ return entries;
+ }
+
+ @Override
+ public void setNext(final URI next) {
+ this.next = next.toASCIIString();
+ }
+
+ @Override
+ public URI getNext() {
+ return next == null ? null : URI.create(next);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONLinkCollectionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONLinkCollectionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONLinkCollectionImpl.java
new file mode 100644
index 0000000..ea99940
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONLinkCollectionImpl.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.client.core.data;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.client.api.data.LinkCollection;
+
+/**
+ * Link from an entry, represented via JSON.
+ */
+public class JSONLinkCollectionImpl extends AbstractPayloadObject implements LinkCollection {
+
+ private static final long serialVersionUID = -5006368367235783907L;
+
+ /**
+ * JSON link URL representation.
+ */
+ static class JSONLinkURL extends AbstractPayloadObject {
+
+ private static final long serialVersionUID = 5365055617973271468L;
+
+ private URI url;
+
+ public URI getUrl() {
+ return url;
+ }
+
+ public void setUrl(final URI url) {
+ this.url = url;
+ }
+ }
+
+ @JsonProperty(value = "odata.metadata", required = false)
+ private URI metadata;
+
+ @JsonProperty(required = false)
+ private URI url;
+
+ @JsonProperty(value = "value", required = false)
+ private final List<JSONLinkURL> links = new ArrayList<JSONLinkURL>();
+
+ @JsonProperty(value = "odata.nextLink", required = false)
+ private String next;
+
+ /**
+ * Gets the metadata URI.
+ */
+ public URI getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the metadata URI.
+ *
+ * @param metadata metadata URI.
+ */
+ public void setMetadata(final URI metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @JsonIgnore
+ @Override
+ public List<URI> getLinks() {
+ final List<URI> result = new ArrayList<URI>();
+
+ if (this.url == null) {
+ for (JSONLinkURL link : links) {
+ result.add(link.getUrl());
+ }
+ } else {
+ result.add(this.url);
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @JsonIgnore
+ @Override
+ public void setNext(final URI next) {
+ this.next = next == null ? null : next.toASCIIString();
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @JsonIgnore
+ @Override
+ public URI getNext() {
+ return next == null ? null : URI.create(next);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyDeserializer.java
new file mode 100644
index 0000000..6451eab
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyDeserializer.java
@@ -0,0 +1,122 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import java.io.IOException;
+import java.net.URI;
+import java.util.List;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.utils.XMLUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * Parse JSON string into <tt>JSONProperty</tt>.
+ *
+ * @see JSONProperty
+ */
+public class JSONPropertyDeserializer extends ODataJacksonDeserializer<JSONPropertyImpl> {
+
+ @Override
+ protected JSONPropertyImpl doDeserialize(final JsonParser parser, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final ObjectNode tree = (ObjectNode) parser.getCodec().readTree(parser);
+
+ final JSONPropertyImpl property = new JSONPropertyImpl();
+
+ if (tree.hasNonNull(ODataConstants.JSON_METADATA)) {
+ property.setMetadata(URI.create(tree.get(ODataConstants.JSON_METADATA).textValue()));
+ tree.remove(ODataConstants.JSON_METADATA);
+ }
+
+ try {
+ final DocumentBuilder builder = XMLUtils.DOC_BUILDER_FACTORY.newDocumentBuilder();
+ final Document document = builder.newDocument();
+
+ Element content = document.createElement(ODataConstants.ELEM_PROPERTY);
+
+ if (property.getMetadata() != null) {
+ final String metadataURI = property.getMetadata().toASCIIString();
+ final int dashIdx = metadataURI.lastIndexOf('#');
+ if (dashIdx != -1) {
+ content.setAttribute(ODataConstants.ATTR_M_TYPE, metadataURI.substring(dashIdx + 1));
+ }
+ }
+
+ JsonNode subtree = null;
+ if (tree.has(ODataConstants.JSON_VALUE)) {
+ if (tree.has(ODataConstants.JSON_TYPE)
+ && StringUtils.isBlank(content.getAttribute(ODataConstants.ATTR_M_TYPE))) {
+
+ content.setAttribute(ODataConstants.ATTR_M_TYPE, tree.get(ODataConstants.JSON_TYPE).asText());
+ }
+
+ final JsonNode value = tree.get(ODataConstants.JSON_VALUE);
+ if (value.isValueNode()) {
+ content.appendChild(document.createTextNode(value.asText()));
+ } else if (ODataJClientEdmPrimitiveType.isGeospatial(content.getAttribute(ODataConstants.ATTR_M_TYPE))) {
+ subtree = tree.objectNode();
+ ((ObjectNode) subtree).put(ODataConstants.JSON_VALUE, tree.get(ODataConstants.JSON_VALUE));
+ if (StringUtils.isNotBlank(content.getAttribute(ODataConstants.ATTR_M_TYPE))) {
+ ((ObjectNode) subtree).put(
+ ODataConstants.JSON_VALUE + "@" + ODataConstants.JSON_TYPE,
+ content.getAttribute(ODataConstants.ATTR_M_TYPE));
+ }
+ } else {
+ subtree = tree.get(ODataConstants.JSON_VALUE);
+ }
+ } else {
+ subtree = tree;
+ }
+
+ if (subtree != null) {
+ JSONDOMTreeUtils.buildSubtree(client, content, subtree);
+ }
+
+ final List<Node> children = XMLUtils.getChildNodes(content, Node.ELEMENT_NODE);
+ if (children.size() == 1) {
+ final Element value = (Element) children.iterator().next();
+ if (ODataConstants.JSON_VALUE.equals(XMLUtils.getSimpleName(value))) {
+ if (StringUtils.isNotBlank(content.getAttribute(ODataConstants.ATTR_M_TYPE))) {
+ value.setAttribute(ODataConstants.ATTR_M_TYPE, content.getAttribute(ODataConstants.ATTR_M_TYPE));
+ }
+ content = value;
+ }
+ }
+
+ property.setContent(content);
+ } catch (ParserConfigurationException e) {
+ throw new JsonParseException("Cannot build property", parser.getCurrentLocation(), e);
+ }
+
+ return property;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyImpl.java
new file mode 100644
index 0000000..66b889a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyImpl.java
@@ -0,0 +1,74 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import java.net.URI;
+import org.w3c.dom.Element;
+
+/**
+ * A single property (primitive, complex or collection) represented via JSON.
+ */
+@JsonSerialize(using = JSONPropertySerializer.class)
+@JsonDeserialize(using = JSONPropertyDeserializer.class)
+public class JSONPropertyImpl extends AbstractPayloadObject {
+
+ private static final long serialVersionUID = 553414431536637434L;
+
+ private URI metadata;
+
+ private Element content;
+
+ /**
+ * Gets metadata URI.
+ *
+ * @return metadata URI.
+ */
+ public URI getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets metadata URI.
+ *
+ * @param metadata metadata URI.
+ */
+ public void setMetadata(final URI metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * Gets content.
+ *
+ * @return content as DOM element.
+ */
+ public Element getContent() {
+ return content;
+ }
+
+ /**
+ * Sets content.
+ *
+ * @param content content as DOM element.
+ */
+ public void setContent(final Element content) {
+ this.content = content;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertySerializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertySerializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertySerializer.java
new file mode 100644
index 0000000..be272f1
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertySerializer.java
@@ -0,0 +1,80 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonLocation;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import javax.xml.parsers.DocumentBuilder;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.utils.XMLUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Writes out JSON string from <tt>JSONProperty</tt>.
+ *
+ * @see JSONProperty
+ */
+public class JSONPropertySerializer extends ODataJacksonSerializer<JSONPropertyImpl> {
+
+ @Override
+ public void doSerialize(final JSONPropertyImpl property, final JsonGenerator jgen, final SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+
+ jgen.writeStartObject();
+
+ if (property.getMetadata() != null) {
+ jgen.writeStringField(ODataConstants.JSON_METADATA, property.getMetadata().toASCIIString());
+ }
+
+ final Element content = property.getContent();
+ if (XMLUtils.hasOnlyTextChildNodes(content)) {
+ jgen.writeStringField(ODataConstants.JSON_VALUE, content.getTextContent());
+ } else {
+ try {
+ final DocumentBuilder builder = XMLUtils.DOC_BUILDER_FACTORY.newDocumentBuilder();
+ final Document document = builder.newDocument();
+ final Element wrapper = document.createElement(ODataConstants.ELEM_PROPERTY);
+
+ if (XMLUtils.hasElementsChildNode(content)) {
+ wrapper.appendChild(document.renameNode(
+ document.importNode(content, true), null, ODataConstants.JSON_VALUE));
+
+ JSONDOMTreeUtils.writeSubtree(client, jgen, wrapper);
+ } else if (ODataJClientEdmPrimitiveType.isGeospatial(content.getAttribute(ODataConstants.ATTR_M_TYPE))) {
+ wrapper.appendChild(document.renameNode(
+ document.importNode(content, true), null, ODataConstants.JSON_VALUE));
+
+ JSONDOMTreeUtils.writeSubtree(client, jgen, wrapper, true);
+ } else {
+ JSONDOMTreeUtils.writeSubtree(client, jgen, content);
+ }
+ } catch (Exception e) {
+ throw new JsonParseException("Cannot serialize property", JsonLocation.NA, e);
+ }
+ }
+
+ jgen.writeEndObject();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/LinkImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/LinkImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/LinkImpl.java
new file mode 100644
index 0000000..9ba76dc
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/LinkImpl.java
@@ -0,0 +1,100 @@
+/*
+ * 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.client.core.data;
+
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.client.api.data.Link;
+
+public class LinkImpl extends AbstractPayloadObject implements Link {
+
+ private static final long serialVersionUID = -3449344217160035501L;
+
+ private String title;
+
+ private String rel;
+
+ private String href;
+
+ private String type;
+
+ private Entry entry;
+
+ private Feed feed;
+
+ @Override
+ public String getTitle() {
+ return title;
+ }
+
+ @Override
+ public void setTitle(final String title) {
+ this.title = title;
+ }
+
+ @Override
+ public String getRel() {
+ return rel;
+ }
+
+ @Override
+ public void setRel(final String rel) {
+ this.rel = rel;
+ }
+
+ @Override
+ public String getHref() {
+ return href;
+ }
+
+ @Override
+ public void setHref(final String href) {
+ this.href = href;
+ }
+
+ @Override
+ public String getType() {
+ return type;
+ }
+
+ @Override
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ @Override
+ public Entry getInlineEntry() {
+ return entry;
+ }
+
+ @Override
+ public void setInlineEntry(final Entry entry) {
+ this.entry = entry;
+ }
+
+ @Override
+ public Feed getInlineFeed() {
+ return feed;
+ }
+
+ @Override
+ public void setInlineFeed(final Feed feed) {
+ this.feed = feed;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataEntitySetIterator.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataEntitySetIterator.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataEntitySetIterator.java
new file mode 100644
index 0000000..ad9d837
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataEntitySetIterator.java
@@ -0,0 +1,309 @@
+/*
+ * 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.client.core.data;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.ODataConstants;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * OData entity set iterator class.
+ * <br/>
+ * <b>Please don't forget to call the <tt>close()>/<tt> method when not needed any more.</b>
+ */
+public class ODataEntitySetIterator implements Iterator<ODataEntity> {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(ODataEntitySetIterator.class);
+
+ private static final long serialVersionUID = 9039605899821494025L;
+
+ private final ODataClient odataClient;
+
+ private final InputStream stream;
+
+ private final ODataPubFormat format;
+
+ private Entry cached;
+
+ private ODataEntitySet entitySet;
+
+ private final ByteArrayOutputStream osFeed;
+
+ private final String namespaces;
+
+ private boolean available = true;
+
+ /**
+ * Constructor.
+ *
+ * @param odataClient client instance getting this request
+ * @param stream source stream.
+ * @param format OData format.
+ */
+ public ODataEntitySetIterator(final ODataClient odataClient, final InputStream stream, final ODataPubFormat format) {
+ this.odataClient = odataClient;
+ this.stream = stream;
+ this.format = format;
+ this.osFeed = new ByteArrayOutputStream();
+
+ if (format == ODataPubFormat.ATOM) {
+ namespaces = getAllElementAttributes(stream, "feed", osFeed);
+ } else {
+ namespaces = null;
+ try {
+ if (consume(stream, "\"value\":", osFeed, true) >= 0) {
+ int c = 0;
+ while (c != '[' && (c = stream.read()) >= 0) {
+ osFeed.write(c);
+ }
+ }
+ } catch (IOException e) {
+ LOG.error("Error parsing feed", e);
+ throw new IllegalStateException(e);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ public boolean hasNext() {
+ if (available && cached == null) {
+ if (format == ODataPubFormat.ATOM) {
+ cached = nextAtomEntryFromFeed(stream, osFeed, namespaces);
+ } else {
+ cached = nextJsonEntryFromFeed(stream, osFeed);
+ }
+
+ if (cached == null) {
+ available = false;
+ entitySet = odataClient.getReader().
+ readEntitySet(new ByteArrayInputStream(osFeed.toByteArray()), format);
+ close();
+ }
+ }
+
+ return available;
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ public ODataEntity next() {
+ if (hasNext()) {
+ final ODataEntity res = odataClient.getBinder().getODataEntity(cached);
+ cached = null;
+ return res;
+ }
+
+ throw new NoSuchElementException("No entity found");
+ }
+
+ /**
+ * Unsupported operation.
+ */
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException("Operation not supported");
+ }
+
+ /**
+ * Closes the current iterator.
+ */
+ public void close() {
+ IOUtils.closeQuietly(stream);
+ IOUtils.closeQuietly(osFeed);
+ }
+
+ /**
+ * Gets the next link if exists.
+ *
+ * @return next link if exists; null otherwise.
+ */
+ public URI getNext() {
+ if (entitySet == null) {
+ throw new IllegalStateException("Iteration must be completed in order to retrieve the link for next page");
+ }
+ return entitySet.getNext();
+ }
+
+ private Entry nextJsonEntryFromFeed(final InputStream input, final OutputStream osFeed) {
+ final ByteArrayOutputStream entry = new ByteArrayOutputStream();
+
+ Entry jsonEntry = null;
+ try {
+ int c = 0;
+
+ boolean foundNewOne = false;
+
+ do {
+ c = input.read();
+ if (c == '{') {
+ entry.write(c);
+ c = -1;
+ foundNewOne = true;
+ }
+ if (c == ']') {
+ osFeed.write(c);
+ c = -1;
+ }
+ } while (c >= 0);
+
+ if (foundNewOne) {
+ int count = 1;
+ c = 0;
+
+ while (count > 0 && c >= 0) {
+ c = input.read();
+ if (c == '{') {
+ count++;
+ } else if (c == '}') {
+ count--;
+ }
+ entry.write(c);
+ }
+
+ if (c >= 0) {
+ jsonEntry = odataClient.getDeserializer().toEntry(
+ new ByteArrayInputStream(entry.toByteArray()), ODataPubFormat.JSON);
+ }
+ } else {
+ while ((c = input.read()) >= 0) {
+ osFeed.write(c);
+ }
+ }
+ } catch (Exception e) {
+ LOG.error("Error retrieving entities from EntitySet", e);
+ }
+
+ return jsonEntry;
+ }
+
+ /**
+ * De-Serializes a stream into an OData entity set.
+ *
+ * @param input stream to de-serialize.
+ * @param format de-serialize as AtomFeed or JSONFeed
+ * @return de-serialized entity set.
+ */
+ private Entry nextAtomEntryFromFeed(final InputStream input, final OutputStream osFeed, final String namespaces) {
+ final ByteArrayOutputStream entry = new ByteArrayOutputStream();
+
+ Entry atomEntry = null;
+
+ try {
+ if (consume(input, "<entry>", osFeed, false) >= 0) {
+ entry.write("<entry ".getBytes(ODataConstants.UTF8));
+ entry.write(namespaces.getBytes(ODataConstants.UTF8));
+ entry.write(">".getBytes(ODataConstants.UTF8));
+
+ if (consume(input, "</entry>", entry, true) >= 0) {
+ atomEntry = odataClient.getDeserializer().
+ toEntry(new ByteArrayInputStream(entry.toByteArray()), ODataPubFormat.ATOM);
+ }
+ }
+ } catch (Exception e) {
+ LOG.error("Error retrieving entities from EntitySet", e);
+ }
+
+ return atomEntry;
+ }
+
+ private String getAllElementAttributes(final InputStream input, final String name, final OutputStream os) {
+ final ByteArrayOutputStream attrs = new ByteArrayOutputStream();
+
+ String res;
+
+ try {
+ byte[] attrsDeclaration = null;
+
+ final String key = "<" + name + " ";
+ if (consume(input, key, os, true) >= 0 && consume(input, ">", attrs, false) >= 0) {
+ attrsDeclaration = attrs.toByteArray();
+ os.write(attrsDeclaration);
+ os.write('>');
+ }
+
+ res = attrsDeclaration == null
+ ? StringUtils.EMPTY
+ : new String(attrsDeclaration, ODataConstants.UTF8).trim();
+ } catch (Exception e) {
+ LOG.error("Error retrieving entities from EntitySet", e);
+ res = StringUtils.EMPTY;
+ }
+
+ return res.endsWith("/") ? res.substring(0, res.length() - 1) : res;
+ }
+
+ private int consume(
+ final InputStream input, final String end, final OutputStream os, final boolean includeEndKey)
+ throws IOException {
+
+ final char[] endKey = end.toCharArray();
+ final char[] endLowerKey = end.toLowerCase().toCharArray();
+ final char[] endUpperKey = end.toUpperCase().toCharArray();
+
+ int pos = 0;
+ int c = 0;
+ while (pos < endKey.length && (c = input.read()) >= 0) {
+ if (c == endLowerKey[pos] || c == endUpperKey[pos]) {
+ pos++;
+ if (includeEndKey && os != null) {
+ os.write(c);
+ }
+ } else if (pos > 0) {
+ if (!includeEndKey && os != null) {
+ for (int i = 0; i < pos; i++) {
+ os.write(endKey[i]);
+ }
+ }
+ if (os != null) {
+ os.write(c);
+ }
+ pos = 0;
+ } else {
+ if (os != null) {
+ os.write(c);
+ }
+ }
+ }
+
+ return c;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/OperationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/OperationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/OperationImpl.java
new file mode 100644
index 0000000..a981742
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/OperationImpl.java
@@ -0,0 +1,97 @@
+/*
+ * 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.client.core.data;
+
+import java.io.Serializable;
+import java.net.URI;
+import org.apache.olingo.client.api.data.Operation;
+
+/**
+ * Representation of an OData operation (legacy, action or function).
+ */
+public class OperationImpl extends AbstractPayloadObject implements Operation, Serializable {
+
+ private static final long serialVersionUID = -5784652334334645128L;
+
+ private String metadataAnchor;
+
+ private String title;
+
+ private URI target;
+
+ /**
+ * Gets metadata anchor.
+ *
+ * @return metadata anchor.
+ */
+ @Override
+ public String getMetadataAnchor() {
+ return metadataAnchor;
+ }
+
+ /**
+ * Sets metadata anchor.
+ *
+ * @param metadataAnchor metadata anchor.
+ */
+ @Override
+ public void setMetadataAnchor(final String metadataAnchor) {
+ this.metadataAnchor = metadataAnchor;
+ }
+
+ /**
+ * Gets title.
+ *
+ * @return title.
+ */
+ @Override
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * Sets title.
+ *
+ * @param title title.
+ */
+ @Override
+ public void setTitle(final String title) {
+ this.title = title;
+ }
+
+ /**
+ * Gets target.
+ *
+ * @return target.
+ */
+ @Override
+ public URI getTarget() {
+ return target;
+ }
+
+ /**
+ * Sets target.
+ *
+ * @param target target.
+ */
+ @Override
+ public void setTarget(final URI target) {
+ this.target = target;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLErrorImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLErrorImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLErrorImpl.java
new file mode 100644
index 0000000..3cc105f
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLErrorImpl.java
@@ -0,0 +1,213 @@
+/*
+ * 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.client.core.data;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;
+import java.util.Map;
+import org.apache.olingo.client.api.data.Error;
+
+/**
+ * This class represents an OData error returned as JSON.
+ */
+public class XMLErrorImpl extends AbstractPayloadObject implements Error {
+
+ private static final long serialVersionUID = -3476499168507242932L;
+
+ @JacksonXmlText(false)
+ private String code;
+
+ @JsonProperty
+ private Message message;
+
+ @JsonProperty(required = false)
+ private InnerError innererror;
+
+ @Override
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * Sets error code.
+ *
+ * @param code error code.
+ */
+ public void setCode(final String code) {
+ this.code = code;
+ }
+
+ @JsonIgnore
+ @Override
+ public String getMessageLang() {
+ return this.message == null ? null : this.message.getLang();
+ }
+
+ @JsonIgnore
+ @Override
+ public String getMessageValue() {
+ return this.message == null ? null : this.message.getValue();
+ }
+
+ /**
+ * Sets the value of the message property.
+ *
+ * @param value allowed object is {@link Error.Message }
+ *
+ */
+ public void setMessage(final Message value) {
+ this.message = value;
+ }
+
+ @JsonIgnore
+ @Override
+ public String getInnerErrorMessage() {
+ return this.innererror == null ? null : this.innererror.getMessage().getValue();
+ }
+
+ @JsonIgnore
+ @Override
+ public String getInnerErrorType() {
+ return this.innererror == null ? null : this.innererror.getType().getValue();
+ }
+
+ @JsonIgnore
+ @Override
+ public String getInnerErrorStacktrace() {
+ return this.innererror == null ? null : this.innererror.getStacktrace().getValue();
+ }
+
+ static class TextChildContainer extends AbstractPayloadObject {
+
+ private static final long serialVersionUID = -8908394095210115904L;
+
+ public TextChildContainer() {
+ super();
+ }
+
+ public TextChildContainer(final String value) {
+ super();
+ this.value = value;
+ }
+
+ @JsonCreator
+ public TextChildContainer(final Map<String, Object> props) {
+ super();
+ this.value = (String) props.get("");
+ }
+
+ private String value;
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(final String value) {
+ this.value = value;
+ }
+ }
+
+ /**
+ * Error message.
+ */
+ public static class Message extends TextChildContainer {
+
+ private static final long serialVersionUID = 2577818040815637859L;
+
+ private String lang;
+
+ public Message() {
+ super();
+ }
+
+ @JsonCreator
+ public Message(final Map<String, Object> props) {
+ super(props);
+ this.lang = (String) props.get("lang");
+ }
+
+ /**
+ * Gets language.
+ *
+ * @return language.
+ */
+ public String getLang() {
+ return lang;
+ }
+
+ /**
+ * Sets language.
+ *
+ * @param lang language.
+ */
+ public void setLang(final String lang) {
+ this.lang = lang;
+ }
+ }
+
+ /**
+ * Inner error.
+ */
+ static class InnerError extends AbstractPayloadObject {
+
+ private static final long serialVersionUID = -3920947476143537640L;
+
+ private TextChildContainer message;
+
+ private TextChildContainer type;
+
+ private TextChildContainer stacktrace;
+
+ private InnerError internalexception;
+
+ public TextChildContainer getMessage() {
+ return message;
+ }
+
+ public void setMessage(final TextChildContainer message) {
+ this.message = message;
+ }
+
+ public TextChildContainer getType() {
+ return type;
+ }
+
+ public void setType(final TextChildContainer type) {
+ this.type = type;
+ }
+
+ public TextChildContainer getStacktrace() {
+ return stacktrace;
+ }
+
+ public void setStacktrace(final TextChildContainer stacktrace) {
+ this.stacktrace = stacktrace;
+ }
+
+ public InnerError getInternalexception() {
+ return internalexception;
+ }
+
+ public void setInternalexception(final InnerError internalexception) {
+ this.internalexception = internalexception;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLLinkCollectionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLLinkCollectionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLLinkCollectionImpl.java
new file mode 100644
index 0000000..05977ea
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLLinkCollectionImpl.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.data;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.client.api.data.LinkCollection;
+
+public class XMLLinkCollectionImpl implements LinkCollection {
+
+ private final List<URI> links = new ArrayList<URI>();
+
+ private URI next;
+
+ /**
+ * Constructor.
+ */
+ public XMLLinkCollectionImpl() {
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param next next page link.
+ */
+ public XMLLinkCollectionImpl(final URI next) {
+ this.next = next;
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ public List<URI> getLinks() {
+ return links;
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ public void setNext(final URI next) {
+ this.next = next;
+ }
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ public URI getNext() {
+ return next;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/AnnotationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/AnnotationPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/AnnotationPropertyImpl.java
deleted file mode 100644
index 3ee57a6..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/AnnotationPropertyImpl.java
+++ /dev/null
@@ -1,53 +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.client.core.deserializer;
-
-import org.apache.olingo.client.api.deserializer.AnnotationProperty;
-
-public class AnnotationPropertyImpl implements AnnotationProperty {
-
- private final String name;
-
- private final String value;
-
- public AnnotationPropertyImpl(final String name, final String value) {
- this.name = name;
- this.value = value;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String getValue() {
- return value;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return "AnnotationPropertyImpl [name=" + name + ", value=" + value + "]";
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/ComplexValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/ComplexValueImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/ComplexValueImpl.java
deleted file mode 100644
index eda1e34..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/ComplexValueImpl.java
+++ /dev/null
@@ -1,82 +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.client.core.deserializer;
-
-import java.util.Collections;
-import java.util.Map;
-
-import org.apache.olingo.client.api.deserializer.AnnotationProperty;
-import org.apache.olingo.client.api.deserializer.ComplexValue;
-import org.apache.olingo.client.api.deserializer.NavigationProperty;
-import org.apache.olingo.client.api.deserializer.StructuralProperty;
-import org.apache.olingo.client.api.deserializer.Value;
-
-public class ComplexValueImpl extends PropertyCollection implements ComplexValue {
-
- public ComplexValueImpl() {
- }
-
- public ComplexValueImpl(final Map<String, AnnotationProperty> annotationProperties,
- final Map<String, NavigationProperty> navigationProperties,
- final Map<String, StructuralProperty> structuralProperties) {
-
- super(annotationProperties, navigationProperties, structuralProperties);
- }
-
- @Override
- public Value getValue(final String name) {
- final StructuralProperty property = structuralProperties.get(name);
- if (property == null) {
- return null;
- }
- return property.getValue();
- }
-
- @Override
- public Map<String, AnnotationProperty> getAnnotationProperties() {
- return Collections.unmodifiableMap(annotationProperties);
- }
-
- @Override
- public Map<String, NavigationProperty> getNavigationProperties() {
- return Collections.unmodifiableMap(navigationProperties);
- }
-
- @Override
- public boolean isComplex() {
- return true;
- }
-
- @Override
- public Map<String, StructuralProperty> getContent() {
- return Collections.unmodifiableMap(structuralProperties);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <T> T getContentAs(final T type) {
- return (T) getContent();
- }
-
- @Override
- public String toString() {
- return "ComplexValueImpl [annotations=" + annotationProperties + ", navigationProperties=" + navigationProperties
- + ", properties=" + structuralProperties + "]";
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntityImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntityImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntityImpl.java
deleted file mode 100644
index ac88bf3..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntityImpl.java
+++ /dev/null
@@ -1,126 +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.client.core.deserializer;
-
-import java.util.Map;
-
-import org.apache.olingo.client.api.deserializer.AnnotationProperty;
-import org.apache.olingo.client.api.deserializer.Entity;
-import org.apache.olingo.client.api.deserializer.NavigationProperty;
-import org.apache.olingo.client.api.deserializer.Property;
-import org.apache.olingo.client.api.deserializer.StructuralProperty;
-
-public class EntityImpl extends PropertyCollection implements Entity {
-
- public EntityImpl() {
- }
-
- public EntityImpl(final Map<String, AnnotationProperty> annotationProperties,
- final Map<String, NavigationProperty> navigationProperties,
- final Map<String, StructuralProperty> structuralProperties) {
-
- super(annotationProperties, navigationProperties, structuralProperties);
- }
-
- @Override
- public String getODataMetaDataEtag() {
- return getAnnotationValue("odata.metadataEtag");
- }
-
- @Override
- public String getODataType() {
- return getAnnotationValue("odata.type");
- }
-
- @Override
- public Long getODataCount() {
- return Long.valueOf(getAnnotationValue("odata.count"));
- }
-
- @Override
- public String getODataNextLink() {
- return getAnnotationValue("odata.nextLink");
- }
-
- @Override
- public String getODataDeltaLink() {
- return getAnnotationValue("odata.deltaLink");
- }
-
- @Override
- public String getODataReadLink() {
- return getAnnotationValue("odata.readLink");
- }
-
- @Override
- public String getODataContext() {
- return getAnnotationValue("odata.context");
- }
-
- @Override
- public String getODataId() {
- return getAnnotationValue("odata.id");
- }
-
- @Override
- public String getODataETag() {
- return getAnnotationValue("odata.etag");
- }
-
- @Override
- public String getODataEditLink() {
- return getAnnotationValue("odata.editLink");
- }
-
- @Override
- public Object getPropertyContent(final String name) {
- final StructuralProperty property = structuralProperties.get(name);
- if (property != null) {
- return property.getValue().getContent();
- }
- return null;
- }
-
- @Override
- public Property getProperty(final String name) {
- Property property = structuralProperties.get(name);
- if (property == null) {
- property = annotationProperties.get(name);
- }
- if (property == null) {
- property = navigationProperties.get(name);
- }
- return property;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <T extends Property> T getProperty(final String name, final Class<T> clazz) {
- final Property property = getProperty(name);
- return (T) property;
- }
-
- private String getAnnotationValue(final String key) {
- final AnnotationProperty property = annotationProperties.get(key);
- if (property == null) {
- return null;
- }
- return property.getValue();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntitySetBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntitySetBuilder.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntitySetBuilder.java
deleted file mode 100644
index 879622a..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntitySetBuilder.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.client.core.deserializer;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.api.deserializer.EntitySet;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonToken;
-
-public class EntitySetBuilder {
-
- private final JsonParser parser;
-
- public EntitySetBuilder(final JsonParser jp) {
- parser = jp;
- }
-
- public EntitySet buildEntitySet() throws JsonParseException, IOException {
- return parseEntitySet(parser);
- }
-
- private EntitySet parseEntitySet(final JsonParser jp) throws JsonParseException, IOException {
- final EntitySetImpl entitySet = new EntitySetImpl();
- boolean arrayStarted = false;
-
- while (jp.nextToken() != null) {
- final JsonToken token = jp.getCurrentToken();
- switch (token) {
- case START_ARRAY:
- final PropertyCollectionBuilder builder = new PropertyCollectionBuilder(jp, entitySet);
- entitySet.setPropertyCollectionBuilder(builder);
- arrayStarted = true;
- break;
-
- case START_OBJECT:
- if (arrayStarted) {
- return entitySet;
- }
- break;
-
- case VALUE_NUMBER_INT:
- case VALUE_STRING:
- entitySet.addAnnotation(jp.getCurrentName(), jp.getValueAsString());
- break;
-
- default:
- break;
- }
- }
-
- return entitySet;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntitySetImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntitySetImpl.java
deleted file mode 100644
index f344a21..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/EntitySetImpl.java
+++ /dev/null
@@ -1,120 +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.client.core.deserializer;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.olingo.client.api.deserializer.Entity;
-import org.apache.olingo.client.api.deserializer.EntitySet;
-
-import com.fasterxml.jackson.core.JsonParseException;
-
-public class EntitySetImpl implements EntitySet, Iterator<Entity> {
-
- private String odataContext;
-
- private Long odataCount;
-
- private String odataNextLink;
-
- private String odataDeltaLink;
-
- private List<Entity> entities = null;
-
- private PropertyCollectionBuilder propertyCollectionsBuilder;
-
- @Override
- public String getODataContext() {
- return odataContext;
- }
-
- @Override
- public Long getODataCount() {
- return odataCount;
- }
-
- @Override
- public String getODataNextLink() {
- return odataNextLink;
- }
-
- @Override
- public String getODataDeltaLink() {
- return odataDeltaLink;
- }
-
- public void addAnnotation(final String name, final String value) {
- if ("odata.context".equalsIgnoreCase(name)) {
- odataContext = value;
- } else if ("odata.deltaLink".equalsIgnoreCase(name)) {
- odataDeltaLink = value;
- } else if ("odata.count".equalsIgnoreCase(name)) {
- odataCount = Long.parseLong(value);
- } else if ("odata.nextLink".equalsIgnoreCase(name)) {
- odataNextLink = value;
- }
- }
-
- @Override
- public List<Entity> getEntities() {
- if (entities == null) {
- entities = new ArrayList<Entity>();
-
- while (propertyCollectionsBuilder.parseNext()) {
- entities.add(propertyCollectionsBuilder.buildEntity());
- }
- }
-
- return entities;
- }
-
- public void setPropertyCollectionBuilder(final PropertyCollectionBuilder builder) {
- propertyCollectionsBuilder = builder;
- }
-
- @Override
- public boolean hasNext() {
- try {
- return propertyCollectionsBuilder.hasNext();
- } catch (JsonParseException e) {
- } catch (IOException e) {
- }
- return false;
- }
-
- @Override
- public Entity next() {
- if (propertyCollectionsBuilder.parseNext()) {
- return propertyCollectionsBuilder.buildEntity();
- }
- return null;
- }
-
- @Override
- public void remove() {
- }
-
- @Override
- public Iterator<Entity> iterator() {
- return this;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/JsonReader.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/JsonReader.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/JsonReader.java
deleted file mode 100644
index 105065c..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/JsonReader.java
+++ /dev/null
@@ -1,89 +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.client.core.deserializer;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Map;
-
-import org.apache.olingo.client.api.deserializer.ClientException;
-import org.apache.olingo.client.api.deserializer.Entity;
-import org.apache.olingo.client.api.deserializer.EntitySet;
-import org.apache.olingo.client.api.deserializer.Property;
-import org.apache.olingo.client.api.deserializer.Reader;
-import org.apache.olingo.client.api.deserializer.StructuralProperty;
-
-import com.fasterxml.jackson.core.JsonFactory;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.JsonParser;
-
-public class JsonReader implements Reader {
-
- @Override
- public EntitySet readEntitySet(final InputStream in) throws ClientException {
-
- final JsonFactory jsonFactory = new JsonFactory();
- // or, for data binding, org.codehaus.jackson.mapper.MappingJsonFactory
- try {
- JsonParser jp = jsonFactory.createParser(in);
- EntitySetBuilder entitySet = new EntitySetBuilder(jp);
- return entitySet.buildEntitySet();
- } catch (JsonParseException e) {
- throw new ClientException("JSON Parsing failed.", e);
- } catch (IOException e) {
- throw new ClientException("JSON Parsing failed.", e);
- }
- }
-
- @Override
- public Entity readEntity(final InputStream in) throws ClientException {
- Entity entity = null;
-
- final JsonFactory jsonFactory = new JsonFactory();
- // or, for data binding, org.codehaus.jackson.mapper.MappingJsonFactory
- try {
- final JsonParser jp = jsonFactory.createParser(in);
- final PropertyCollectionBuilder builder = new PropertyCollectionBuilder(jp);
- builder.parseNext();
- entity = builder.buildEntity();
- } catch (JsonParseException e) {
- throw new ClientException("JSON Parsing failed.", e);
- } catch (IOException e) {
- throw new ClientException("JSON Parsing failed.", e);
- }
-
- return entity;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.olingo.core.consumer.Reader#parseProperty(java.io.InputStream)
- */
- @Override
- public Property readProperty(final InputStream in) throws ClientException {
- final Entity entity = readEntity(in);
-
- final Map<String, StructuralProperty> properties = entity.getStructuralProperties();
- if (properties.size() == 1) {
- return properties.values().iterator().next();
- }
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/NavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/NavigationPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/NavigationPropertyImpl.java
deleted file mode 100644
index 1c09a90..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/NavigationPropertyImpl.java
+++ /dev/null
@@ -1,89 +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.client.core.deserializer;
-
-import org.apache.olingo.client.api.deserializer.NavigationProperty;
-
-public class NavigationPropertyImpl implements NavigationProperty {
-
- private final String name;
-
- private String associationLink;
-
- private String navigationLink;
-
- public NavigationPropertyImpl(final String name) {
- this.name = parseName(name);
- }
-
- public NavigationPropertyImpl(final String name, final String link) {
- this(name);
- updateLink(name, link);
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String getAssociationLink() {
- return associationLink;
- }
-
- @Override
- public String getNavigationLink() {
- return navigationLink;
- }
-
- public void updateLink(final String name, final String link) {
- final String regexNavigationLink = ".*@odata.navigationLink$";
- final String regexAssociationLink = ".*@odata.associationLink$";
- if (name.matches(regexNavigationLink)) {
- navigationLink = link;
- } else if (name.matches(regexAssociationLink)) {
- associationLink = link;
- }
- }
-
- private String parseName(final String nameToParse) {
- final String[] split = nameToParse.split("@");
- if (split.length == 2) {
- return split[0];
- } else {
- throw new IllegalArgumentException("Got OData Navigation with unparseable format '"
- + nameToParse + "'.");
- }
- }
-
- public void updateLink(final NavigationProperty navigationProperty) {
- if (navigationProperty.getAssociationLink() != null) {
- associationLink = navigationProperty.getAssociationLink();
- }
- if (navigationProperty.getNavigationLink() != null) {
- navigationLink = navigationProperty.getNavigationLink();
- }
- }
-
- @Override
- public String toString() {
- return "NavigationPropertyImpl [name=" + name + ", associationLink=" + associationLink
- + ", navigationLink=" + navigationLink + "]";
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PrimitiveValue.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PrimitiveValue.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PrimitiveValue.java
deleted file mode 100644
index c28bffa..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PrimitiveValue.java
+++ /dev/null
@@ -1,51 +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.client.core.deserializer;
-
-import org.apache.olingo.client.api.deserializer.Value;
-
-public class PrimitiveValue implements Value {
-
- private final Object content;
-
- public PrimitiveValue(final Object content) {
- this.content = content;
- }
-
- @Override
- public boolean isComplex() {
- return false;
- }
-
- @Override
- public Object getContent() {
- return content;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <T> T getContentAs(final T type) {
- return (T) content;
- }
-
- @Override
- public String toString() {
- return String.valueOf(content);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PropertyCollection.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PropertyCollection.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PropertyCollection.java
deleted file mode 100644
index 8b10213..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PropertyCollection.java
+++ /dev/null
@@ -1,96 +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.client.core.deserializer;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.olingo.client.api.deserializer.AnnotationProperty;
-import org.apache.olingo.client.api.deserializer.NavigationProperty;
-import org.apache.olingo.client.api.deserializer.Property;
-import org.apache.olingo.client.api.deserializer.StructuralProperty;
-
-abstract class PropertyCollection {
-
- protected Map<String, AnnotationProperty> annotationProperties = new HashMap<String, AnnotationProperty>();
-
- protected Map<String, NavigationProperty> navigationProperties = new HashMap<String, NavigationProperty>();
-
- protected Map<String, StructuralProperty> structuralProperties = new HashMap<String, StructuralProperty>();
-
- public PropertyCollection() {
- }
-
- protected PropertyCollection(final Map<String, AnnotationProperty> annotationProperties,
- final Map<String, NavigationProperty> navigationProperties,
- final Map<String, StructuralProperty> structuralProperties) {
-
- this.annotationProperties = annotationProperties;
- this.navigationProperties = navigationProperties;
- this.structuralProperties = structuralProperties;
- }
-
- public List<Property> getProperties() {
- final int initialCapacity = annotationProperties.size() + navigationProperties.size() + structuralProperties.size();
-
- final List<Property> properties = new ArrayList<Property>(initialCapacity);
- properties.addAll(annotationProperties.values());
- properties.addAll(navigationProperties.values());
- properties.addAll(structuralProperties.values());
-
- return properties;
- }
-
- public Map<String, AnnotationProperty> getAnnotationProperties() {
- return Collections.unmodifiableMap(annotationProperties);
- }
-
- public Map<String, NavigationProperty> getNavigationProperties() {
- return Collections.unmodifiableMap(navigationProperties);
- }
-
- public Map<String, StructuralProperty> getStructuralProperties() {
- return Collections.unmodifiableMap(structuralProperties);
- }
-
- public void addProperty(final Property property) {
- if (property == null) {
- throw new IllegalArgumentException("Property parameter MUST NOT be NULL.");
- }
-
- if (property instanceof NavigationPropertyImpl) {
- final NavigationPropertyImpl navProperty = (NavigationPropertyImpl) navigationProperties.get(property.getName());
- if (navProperty == null) {
- navigationProperties.put(property.getName(), (NavigationPropertyImpl) property);
- } else {
- final NavigationProperty temp = (NavigationProperty) property;
- navProperty.updateLink(temp);
- }
- } else if (property instanceof AnnotationPropertyImpl) {
- annotationProperties.put(property.getName(), (AnnotationPropertyImpl) property);
- } else if (property instanceof StructuralProperty) {
- structuralProperties.put(property.getName(), (StructuralProperty) property);
- } else {
- throw new IllegalArgumentException("Unknown class '" + property.getClass() + "'.");
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PropertyCollectionBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PropertyCollectionBuilder.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PropertyCollectionBuilder.java
deleted file mode 100644
index 7643e49..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/deserializer/PropertyCollectionBuilder.java
+++ /dev/null
@@ -1,221 +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.client.core.deserializer;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.olingo.client.api.deserializer.AnnotationProperty;
-import org.apache.olingo.client.api.deserializer.ComplexValue;
-import org.apache.olingo.client.api.deserializer.Entity;
-import org.apache.olingo.client.api.deserializer.NavigationProperty;
-import org.apache.olingo.client.api.deserializer.Property;
-import org.apache.olingo.client.api.deserializer.StructuralProperty;
-import org.apache.olingo.client.api.deserializer.Value;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonToken;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class PropertyCollectionBuilder extends PropertyCollection {
-
- private static final Logger LOG = LoggerFactory.getLogger(PropertyCollectionBuilder.class);
-
- private JsonParser parser;
-
- private EntitySetImpl enclosingEntitySet;
-
- private PropertyCollectionBuilder next = null;
-
- public PropertyCollectionBuilder(final JsonParser parser) {
- this.parser = parser;
- }
-
- private PropertyCollectionBuilder() {
- }
-
- public PropertyCollectionBuilder(final JsonParser jp, final EntitySetImpl entitySet) {
- this(jp);
- enclosingEntitySet = entitySet;
- }
-
- public Entity buildEntity() {
- final Entity entity = new EntityImpl(annotationProperties, navigationProperties, structuralProperties);
- resetProperties();
- return entity;
- }
-
- public ComplexValue buildComplexValue() {
- final ComplexValue value = new ComplexValueImpl(annotationProperties, navigationProperties, structuralProperties);
- resetProperties();
- return value;
- }
-
- private void resetProperties() {
- annotationProperties = new HashMap<String, AnnotationProperty>();
- navigationProperties = new HashMap<String, NavigationProperty>();
- structuralProperties = new HashMap<String, StructuralProperty>();
- }
-
- public boolean hasNext() throws JsonParseException, IOException {
- if (parser.isClosed()) {
- return false;
- }
- next = parseNextObject(parser, this);
- return (next != null);
- }
-
- public boolean parseNext() {
- try {
- if (hasNext()) {
- if (next != null) {
- return true;
- }
-
- if (next == null) {
- parser.close();
- return false;
- }
- return true;
- }
- } catch (JsonParseException e) {
- LOG.error("While parsing", e);
- } catch (IOException e) {
- LOG.error("While parsing", e);
- }
- return false;
-
- }
-
- /**
- *
- * @param jp
- * @param builder
- * @return
- * @throws IOException
- * @throws JsonParseException
- */
- private PropertyCollectionBuilder parseNextObject(final JsonParser jp, final PropertyCollectionBuilder builder)
- throws JsonParseException, IOException {
-
- boolean endReached = readToStartObjectOrEnd(jp);
- if (endReached) {
- return null;
- }
-
- //
- String currentFieldName = null;
- List<Value> values = null;
-
- while (jp.nextToken() != null) {
- final JsonToken token = jp.getCurrentToken();
- switch (token) {
- case START_OBJECT:
- if (currentFieldName != null) {
- final ComplexValue cvp = parseNextObject(jp, new PropertyCollectionBuilder()).buildComplexValue();
- if (values == null) {
- builder.addProperty(new StructuralPropertyImpl(currentFieldName, cvp));
- } else {
- values.add(cvp);
- }
- }
- break;
- case END_OBJECT:
- return builder;
- case START_ARRAY:
- values = new ArrayList<Value>();
- break;
- case END_ARRAY:
- if (values != null) {
- builder.addProperty(new StructuralPropertyImpl(currentFieldName, values));
- values = null;
- }
- break;
- case FIELD_NAME:
- currentFieldName = jp.getCurrentName();
- break;
- case NOT_AVAILABLE:
- break;
- case VALUE_EMBEDDED_OBJECT:
- break;
- case VALUE_NULL:
- Property nullProperty = createProperty(jp.getCurrentName(), null);
- builder.addProperty(nullProperty);
- break;
- case VALUE_FALSE:
- case VALUE_NUMBER_FLOAT:
- case VALUE_NUMBER_INT:
- case VALUE_STRING:
- case VALUE_TRUE:
- if (values == null) {
- Property property = createProperty(jp.getCurrentName(), jp.getValueAsString());
- builder.addProperty(property);
- } else {
- PrimitiveValue value = new PrimitiveValue(jp.getValueAsString());
- values.add(value);
- }
- break;
- default:
- break;
- }
- }
-
- return null;
- }
-
- private boolean readToStartObjectOrEnd(final JsonParser jp) throws IOException, JsonParseException {
- final JsonToken endToken = JsonToken.START_OBJECT;
- JsonToken token = jp.getCurrentToken() == null ? jp.nextToken() : jp.getCurrentToken();
- while (token != null && token != endToken) {
- if (enclosingEntitySet != null) {
- switch (token) {
- case VALUE_FALSE:
- case VALUE_NUMBER_FLOAT:
- case VALUE_NUMBER_INT:
- case VALUE_TRUE:
- case VALUE_STRING:
- enclosingEntitySet.addAnnotation(jp.getCurrentName(), jp.getValueAsString());
- break;
-
- default:
- break;
- }
- }
- //
- token = jp.nextToken();
- }
-
- return token == null;
- }
-
- private Property createProperty(final String name, final String value) {
- if (name.contains("@")) {
- return new NavigationPropertyImpl(name, value);
- } else if (name.contains(".")) {
- return new AnnotationPropertyImpl(name, value);
- } else {
- return new StructuralPropertyImpl(name, new PrimitiveValue(value));
- }
- }
-}