You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2013/09/20 15:33:52 UTC

[30/59] [abbrv] Cleanup of core

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/entry/MediaMetadataImpl.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/entry/MediaMetadataImpl.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/entry/MediaMetadataImpl.java
index 851daf0..5911d3c 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/entry/MediaMetadataImpl.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/entry/MediaMetadataImpl.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.entry;
 
@@ -68,6 +68,7 @@ public class MediaMetadataImpl implements MediaMetadata {
 
   @Override
   public String toString() {
-    return "MediaMetadataImpl [sourceLink=" + sourceLink + ", etag=" + etag + ", contentType=" + contentType + ", editLink=" + editLink + "]";
+    return "MediaMetadataImpl [sourceLink=" + sourceLink + ", etag=" + etag + ", contentType=" + contentType
+        + ", editLink=" + editLink + "]";
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/entry/ODataEntryImpl.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/entry/ODataEntryImpl.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/entry/ODataEntryImpl.java
index 73e2b27..96ecf75 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/entry/ODataEntryImpl.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/entry/ODataEntryImpl.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.entry;
 
@@ -37,11 +37,14 @@ public class ODataEntryImpl implements ODataEntry {
   private final ExpandSelectTreeNode expandSelectTree;
   private boolean containsInlineEntry;
 
-  public ODataEntryImpl(final Map<String, Object> data, final MediaMetadata mediaMetadata, final EntryMetadata entryMetadata, final ExpandSelectTreeNodeImpl expandSelectTree) {
+  public ODataEntryImpl(final Map<String, Object> data, final MediaMetadata mediaMetadata,
+      final EntryMetadata entryMetadata, final ExpandSelectTreeNodeImpl expandSelectTree) {
     this(data, mediaMetadata, entryMetadata, expandSelectTree, false);
   }
 
-  public ODataEntryImpl(final Map<String, Object> data, final MediaMetadata mediaMetadata, final EntryMetadata entryMetadata, final ExpandSelectTreeNode expandSelectTree, final boolean containsInlineEntry) {
+  public ODataEntryImpl(final Map<String, Object> data, final MediaMetadata mediaMetadata,
+      final EntryMetadata entryMetadata, final ExpandSelectTreeNode expandSelectTree, 
+      final boolean containsInlineEntry) {
     this.data = data;
     this.entryMetadata = entryMetadata;
     this.mediaMetadata = mediaMetadata;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/feed/FeedMetadataImpl.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/feed/FeedMetadataImpl.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/feed/FeedMetadataImpl.java
index 3f18298..94aa2d3 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/feed/FeedMetadataImpl.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/feed/FeedMetadataImpl.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.feed;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/feed/ODataFeedImpl.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/feed/ODataFeedImpl.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/feed/ODataFeedImpl.java
index 9dd0328..634c0bc 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/feed/ODataFeedImpl.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/feed/ODataFeedImpl.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.feed;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomEntryEntityProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomEntryEntityProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomEntryEntityProducer.java
index 38b5132..d85e577 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomEntryEntityProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomEntryEntityProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -62,7 +62,7 @@ import org.apache.olingo.odata2.core.ep.util.FormatXml;
 
 /**
  * Serializes an ATOM entry.
- *  
+ * 
  */
 public class AtomEntryEntityProducer {
 
@@ -74,7 +74,8 @@ public class AtomEntryEntityProducer {
     this.properties = properties == null ? EntityProviderWriteProperties.serviceRoot(null).build() : properties;
   }
 
-  public void append(final XMLStreamWriter writer, final EntityInfoAggregator eia, final Map<String, Object> data, final boolean isRootElement, final boolean isFeedPart) throws EntityProviderException {
+  public void append(final XMLStreamWriter writer, final EntityInfoAggregator eia, final Map<String, Object> data,
+      final boolean isRootElement, final boolean isFeedPart) throws EntityProviderException {
     try {
       writer.writeStartElement(FormatXml.ATOM_ENTRY);
 
@@ -84,7 +85,8 @@ public class AtomEntryEntityProducer {
         writer.writeNamespace(Edm.PREFIX_D, Edm.NAMESPACE_D_2007_08);
       }
       if (!isFeedPart) {
-        writer.writeAttribute(Edm.PREFIX_XML, Edm.NAMESPACE_XML_1998, FormatXml.XML_BASE, properties.getServiceRoot().toASCIIString());
+        writer.writeAttribute(Edm.PREFIX_XML, Edm.NAMESPACE_XML_1998, FormatXml.XML_BASE, properties.getServiceRoot()
+            .toASCIIString());
       }
 
       etag = createETag(eia, data);
@@ -129,7 +131,8 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  private void appendCustomProperties(final XMLStreamWriter writer, final EntityInfoAggregator eia, final Map<String, Object> data) throws EntityProviderException {
+  private void appendCustomProperties(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final Map<String, Object> data) throws EntityProviderException {
     List<String> noneSyndicationTargetPaths = eia.getNoneSyndicationTargetPathNames();
     for (String tpName : noneSyndicationTargetPaths) {
       EntityPropertyInfo info = eia.getTargetPathInfo(tpName);
@@ -139,7 +142,8 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  protected static String createETag(final EntityInfoAggregator eia, final Map<String, Object> data) throws EntityProviderException {
+  protected static String createETag(final EntityInfoAggregator eia, final Map<String, Object> data)
+      throws EntityProviderException {
     try {
       String etag = null;
 
@@ -149,9 +153,15 @@ public class AtomEntryEntityProducer {
         if (edmType instanceof EdmSimpleType) {
           EdmSimpleType edmSimpleType = (EdmSimpleType) edmType;
           if (etag == null) {
-            etag = edmSimpleType.valueToString(data.get(propertyInfo.getName()), EdmLiteralKind.DEFAULT, propertyInfo.getFacets());
+            etag =
+                edmSimpleType.valueToString(data.get(propertyInfo.getName()), EdmLiteralKind.DEFAULT, propertyInfo
+                    .getFacets());
           } else {
-            etag = etag + Edm.DELIMITER + edmSimpleType.valueToString(data.get(propertyInfo.getName()), EdmLiteralKind.DEFAULT, propertyInfo.getFacets());
+            etag =
+                etag
+                    + Edm.DELIMITER
+                    + edmSimpleType.valueToString(data.get(propertyInfo.getName()), EdmLiteralKind.DEFAULT,
+                        propertyInfo.getFacets());
           }
         }
       }
@@ -166,7 +176,8 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  private void appendAtomNavigationLinks(final XMLStreamWriter writer, final EntityInfoAggregator eia, final Map<String, Object> data) throws EntityProviderException, EdmException, URISyntaxException {
+  private void appendAtomNavigationLinks(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final Map<String, Object> data) throws EntityProviderException, EdmException, URISyntaxException {
     for (String name : eia.getSelectedNavigationPropertyNames()) {
       NavigationPropertyInfo info = eia.getNavigationPropertyInfo(name);
       boolean isFeed = (info.getMultiplicity() == EdmMultiplicity.MANY);
@@ -175,7 +186,9 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  private void appendAtomNavigationLink(final XMLStreamWriter writer, final String self, final String navigationPropertyName, final boolean isFeed, final EntityInfoAggregator eia, final Map<String, Object> data) throws EntityProviderException, EdmException, URISyntaxException {
+  private void appendAtomNavigationLink(final XMLStreamWriter writer, final String self,
+      final String navigationPropertyName, final boolean isFeed, final EntityInfoAggregator eia,
+      final Map<String, Object> data) throws EntityProviderException, EdmException, URISyntaxException {
     try {
       writer.writeStartElement(FormatXml.ATOM_LINK);
       writer.writeAttribute(FormatXml.ATOM_HREF, self);
@@ -195,7 +208,9 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  private void appendInlineFeed(final XMLStreamWriter writer, final String navigationPropertyName, final EntityInfoAggregator eia, final Map<String, Object> data, final String self) throws EntityProviderException, XMLStreamException, EdmException, URISyntaxException {
+  private void appendInlineFeed(final XMLStreamWriter writer, final String navigationPropertyName,
+      final EntityInfoAggregator eia, final Map<String, Object> data, final String self)
+      throws EntityProviderException, XMLStreamException, EdmException, URISyntaxException {
 
     if (eia.getExpandedNavigationPropertyNames().contains(navigationPropertyName)) {
       if (properties.getCallbacks() != null && properties.getCallbacks().containsKey(navigationPropertyName)) {
@@ -228,7 +243,8 @@ public class AtomEntryEntityProducer {
         EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
         EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
         AtomFeedProducer inlineFeedProducer = new AtomFeedProducer(inlineProperties);
-        EntityInfoAggregator inlineEia = EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
+        EntityInfoAggregator inlineEia =
+            EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
         inlineFeedProducer.append(writer, inlineEia, inlineData, true);
 
         writer.writeEndElement();
@@ -236,7 +252,9 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  private void appendInlineEntry(final XMLStreamWriter writer, final String navigationPropertyName, final EntityInfoAggregator eia, final Map<String, Object> data) throws EntityProviderException, XMLStreamException, EdmException {
+  private void appendInlineEntry(final XMLStreamWriter writer, final String navigationPropertyName,
+      final EntityInfoAggregator eia, final Map<String, Object> data) throws EntityProviderException,
+      XMLStreamException, EdmException {
 
     if (eia.getExpandedNavigationPropertyNames().contains(navigationPropertyName)) {
       if (properties.getCallbacks() != null && properties.getCallbacks().containsKey(navigationPropertyName)) {
@@ -265,7 +283,8 @@ public class AtomEntryEntityProducer {
           EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
           EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
           AtomEntryEntityProducer inlineProducer = new AtomEntryEntityProducer(inlineProperties);
-          EntityInfoAggregator inlineEia = EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
+          EntityInfoAggregator inlineEia =
+              EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
           inlineProducer.append(writer, inlineEia, inlineData, false, false);
         }
 
@@ -275,7 +294,8 @@ public class AtomEntryEntityProducer {
 
   }
 
-  private void appendAtomEditLink(final XMLStreamWriter writer, final EntityInfoAggregator eia, final Map<String, Object> data) throws EntityProviderException {
+  private void appendAtomEditLink(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final Map<String, Object> data) throws EntityProviderException {
     try {
       String self = createSelfLink(eia, data, null);
 
@@ -291,7 +311,8 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  private void appendAtomContentLink(final XMLStreamWriter writer, final EntityInfoAggregator eia, final Map<String, Object> data, String mediaResourceMimeType) throws EntityProviderException {
+  private void appendAtomContentLink(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final Map<String, Object> data, String mediaResourceMimeType) throws EntityProviderException {
     try {
       String self = createSelfLink(eia, data, "$value");
 
@@ -309,7 +330,8 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  private void appendAtomContentPart(final XMLStreamWriter writer, final EntityInfoAggregator eia, final Map<String, Object> data, String mediaResourceMimeType) throws EntityProviderException {
+  private void appendAtomContentPart(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final Map<String, Object> data, String mediaResourceMimeType) throws EntityProviderException {
     try {
       String self = createSelfLink(eia, data, "$value");
 
@@ -326,7 +348,8 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  private void appendAtomMandatoryParts(final XMLStreamWriter writer, final EntityInfoAggregator eia, final Map<String, Object> data) throws EntityProviderException {
+  private void appendAtomMandatoryParts(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final Map<String, Object> data) throws EntityProviderException {
     try {
       writer.writeStartElement(FormatXml.ATOM_ID);
       location = properties.getServiceRoot().toASCIIString() + createSelfLink(eia, data, null);
@@ -360,7 +383,8 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  String getUpdatedString(final EntityInfoAggregator eia, final Map<String, Object> data) throws EdmSimpleTypeException {
+  String getUpdatedString(final EntityInfoAggregator eia, final Map<String, Object> data) 
+      throws EdmSimpleTypeException {
     Object updateDate = null;
     EdmFacets updateFacets = null;
     EntityPropertyInfo updatedInfo = eia.getTargetPathInfo(EdmTargetPath.SYNDICATION_UPDATED);
@@ -373,11 +397,13 @@ public class AtomEntryEntityProducer {
     if (updateDate == null) {
       updateDate = new Date();
     }
-    String valueToString = EdmDateTimeOffset.getInstance().valueToString(updateDate, EdmLiteralKind.DEFAULT, updateFacets);
+    String valueToString =
+        EdmDateTimeOffset.getInstance().valueToString(updateDate, EdmLiteralKind.DEFAULT, updateFacets);
     return valueToString;
   }
 
-  private String getTargetPathValue(final EntityInfoAggregator eia, final String targetPath, final Map<String, Object> data) throws EntityProviderException {
+  private String getTargetPathValue(final EntityInfoAggregator eia, final String targetPath,
+      final Map<String, Object> data) throws EntityProviderException {
     try {
       EntityPropertyInfo info = eia.getTargetPathInfo(targetPath);
       if (info != null) {
@@ -391,7 +417,8 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  private void appendAtomOptionalParts(final XMLStreamWriter writer, final EntityInfoAggregator eia, final Map<String, Object> data) throws EntityProviderException {
+  private void appendAtomOptionalParts(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final Map<String, Object> data) throws EntityProviderException {
     try {
       String authorEmail = getTargetPathValue(eia, EdmTargetPath.SYNDICATION_AUTHOREMAIL, data);
       String authorName = getTargetPathValue(eia, EdmTargetPath.SYNDICATION_AUTHORNAME, data);
@@ -435,7 +462,8 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  private void appendAtomOptionalPart(final XMLStreamWriter writer, final String name, final String value, final boolean writeType) throws EntityProviderException {
+  private void appendAtomOptionalPart(final XMLStreamWriter writer, final String name, final String value,
+      final boolean writeType) throws EntityProviderException {
     try {
       if (value != null) {
         writer.writeStartElement(name);
@@ -450,7 +478,8 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  static String createSelfLink(final EntityInfoAggregator eia, final Map<String, Object> data, final String extension) throws EntityProviderException {
+  static String createSelfLink(final EntityInfoAggregator eia, final Map<String, Object> data, final String extension)
+      throws EntityProviderException {
     StringBuilder sb = new StringBuilder();
     if (!eia.isDefaultEntityContainer()) {
       sb.append(Encoder.encode(eia.getEntityContainerName())).append(Edm.DELIMITER);
@@ -461,7 +490,8 @@ public class AtomEntryEntityProducer {
     return sb.toString();
   }
 
-  private static String createEntryKey(final EntityInfoAggregator entityInfo, final Map<String, Object> data) throws EntityProviderException {
+  private static String createEntryKey(final EntityInfoAggregator entityInfo, final Map<String, Object> data)
+      throws EntityProviderException {
     final List<EntityPropertyInfo> keyPropertyInfos = entityInfo.getKeyPropertyInfos();
 
     StringBuilder keys = new StringBuilder();
@@ -477,7 +507,8 @@ public class AtomEntryEntityProducer {
 
       final EdmSimpleType type = (EdmSimpleType) keyPropertyInfo.getType();
       try {
-        keys.append(Encoder.encode(type.valueToString(data.get(name), EdmLiteralKind.URI, keyPropertyInfo.getFacets())));
+        keys.append(Encoder.encode(type.valueToString(data.get(name), EdmLiteralKind.URI, 
+            keyPropertyInfo.getFacets())));
       } catch (final EdmSimpleTypeException e) {
         throw new EntityProviderException(EntityProviderException.COMMON, e);
       }
@@ -486,7 +517,8 @@ public class AtomEntryEntityProducer {
     return keys.toString();
   }
 
-  private void appendProperties(final XMLStreamWriter writer, final EntityInfoAggregator eia, final Map<String, Object> data) throws EntityProviderException {
+  private void appendProperties(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final Map<String, Object> data) throws EntityProviderException {
     try {
       List<String> propertyNames = eia.getSelectedPropertyNames();
       if (!propertyNames.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomFeedProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomFeedProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomFeedProducer.java
index 4e37197..5684814 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomFeedProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomFeedProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -42,7 +42,7 @@ import org.apache.olingo.odata2.core.ep.util.FormatXml;
 
 /**
  * Serializes an ATOM feed.
- *  
+ * 
  */
 public class AtomFeedProducer {
 
@@ -52,7 +52,8 @@ public class AtomFeedProducer {
     this.properties = properties == null ? EntityProviderWriteProperties.serviceRoot(null).build() : properties;
   }
 
-  public void append(final XMLStreamWriter writer, final EntityInfoAggregator eia, final List<Map<String, Object>> data, final boolean isInline) throws EntityProviderException {
+  public void append(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final List<Map<String, Object>> data, final boolean isInline) throws EntityProviderException {
     try {
       writer.writeStartElement(FormatXml.ATOM_FEED);
       TombstoneCallback callback = null;
@@ -65,7 +66,8 @@ public class AtomFeedProducer {
           writer.writeNamespace(TombstoneCallback.PREFIX_TOMBSTONE, TombstoneCallback.NAMESPACE_TOMBSTONE);
         }
       }
-      writer.writeAttribute(Edm.PREFIX_XML, Edm.NAMESPACE_XML_1998, FormatXml.XML_BASE, properties.getServiceRoot().toASCIIString());
+      writer.writeAttribute(Edm.PREFIX_XML, Edm.NAMESPACE_XML_1998, FormatXml.XML_BASE, properties.getServiceRoot()
+          .toASCIIString());
 
       // write all atom infos (mandatory and optional)
       appendAtomMandatoryParts(writer, eia);
@@ -91,15 +93,18 @@ public class AtomFeedProducer {
   }
 
   private TombstoneCallback getTombstoneCallback() {
-    if (properties.getCallbacks() != null && properties.getCallbacks().containsKey(TombstoneCallback.CALLBACK_KEY_TOMBSTONE)) {
-      TombstoneCallback callback = (TombstoneCallback) properties.getCallbacks().get(TombstoneCallback.CALLBACK_KEY_TOMBSTONE);
+    if (properties.getCallbacks() != null
+        && properties.getCallbacks().containsKey(TombstoneCallback.CALLBACK_KEY_TOMBSTONE)) {
+      TombstoneCallback callback =
+          (TombstoneCallback) properties.getCallbacks().get(TombstoneCallback.CALLBACK_KEY_TOMBSTONE);
       return callback;
     } else {
       return null;
     }
   }
 
-  private void appendDeletedEntries(final XMLStreamWriter writer, final EntityInfoAggregator eia, final TombstoneCallback callback) throws EntityProviderException {
+  private void appendDeletedEntries(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final TombstoneCallback callback) throws EntityProviderException {
     TombstoneCallbackResult callbackResult = callback.getTombstoneCallbackResult();
     List<Map<String, Object>> tombstoneData = callbackResult.getDeletedEntriesData();
     if (tombstoneData != null) {
@@ -131,14 +136,16 @@ public class AtomFeedProducer {
     }
   }
 
-  private void appendEntries(final XMLStreamWriter writer, final EntityInfoAggregator eia, final List<Map<String, Object>> data) throws EntityProviderException {
+  private void appendEntries(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final List<Map<String, Object>> data) throws EntityProviderException {
     AtomEntryEntityProducer entryProvider = new AtomEntryEntityProducer(properties);
     for (Map<String, Object> singleEntryData : data) {
       entryProvider.append(writer, eia, singleEntryData, false, true);
     }
   }
 
-  private void appendInlineCount(final XMLStreamWriter writer, final Integer inlineCount) throws EntityProviderException {
+  private void appendInlineCount(final XMLStreamWriter writer, final Integer inlineCount)
+      throws EntityProviderException {
     if (inlineCount == null || inlineCount < 0) {
       throw new EntityProviderException(EntityProviderException.INLINECOUNT_INVALID);
     }
@@ -151,7 +158,8 @@ public class AtomFeedProducer {
     }
   }
 
-  private void appendAtomSelfLink(final XMLStreamWriter writer, final EntityInfoAggregator eia) throws EntityProviderException {
+  private void appendAtomSelfLink(final XMLStreamWriter writer, final EntityInfoAggregator eia)
+      throws EntityProviderException {
 
     URI self = properties.getSelfLink();
     String selfLink = "";
@@ -182,7 +190,8 @@ public class AtomFeedProducer {
     return sb.toString();
   }
 
-  private void appendAtomMandatoryParts(final XMLStreamWriter writer, final EntityInfoAggregator eia) throws EntityProviderException {
+  private void appendAtomMandatoryParts(final XMLStreamWriter writer, final EntityInfoAggregator eia)
+      throws EntityProviderException {
     try {
       writer.writeStartElement(FormatXml.ATOM_ID);
       writer.writeCharacters(createAtomId(eia));
@@ -198,7 +207,8 @@ public class AtomFeedProducer {
       Object updateDate = null;
       EdmFacets updateFacets = null;
       updateDate = new Date();
-      writer.writeCharacters(EdmDateTimeOffset.getInstance().valueToString(updateDate, EdmLiteralKind.DEFAULT, updateFacets));
+      writer.writeCharacters(EdmDateTimeOffset.getInstance().valueToString(updateDate, EdmLiteralKind.DEFAULT,
+          updateFacets));
       writer.writeEndElement();
 
       writer.writeStartElement(FormatXml.ATOM_AUTHOR);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomServiceDocumentProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomServiceDocumentProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomServiceDocumentProducer.java
index 5291efb..1c82ce2 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomServiceDocumentProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomServiceDocumentProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -35,8 +35,8 @@ import org.apache.olingo.odata2.core.commons.ContentType;
 import org.apache.olingo.odata2.core.ep.util.FormatXml;
 
 /**
- * Writes the  OData service document in XML.
- *  
+ * Writes the OData service document in XML.
+ * 
  */
 public class AtomServiceDocumentProducer {
 
@@ -82,29 +82,30 @@ public class AtomServiceDocumentProducer {
         xmlStreamWriter.writeEndElement();
       }
 
-      //      Collection<Schema> schemas = edmProvider.getSchemas();
-      //      if (schemas != null) {
-      //        for (Schema schema : schemas) {
-      //          Collection<EntityContainer> entityContainers = schema.getEntityContainers();
-      //          if (entityContainers != null) {
-      //            for (EntityContainer entityContainer : entityContainers) {
-      //              Collection<EntitySet> entitySets = entityContainer.getEntitySets();
-      //              for (EntitySet entitySet : entitySets) {
-      //                xmlStreamWriter.writeStartElement(FormatXml.APP_COLLECTION);
-      //                if (entityContainer.isDefaultEntityContainer()) {
-      //                  xmlStreamWriter.writeAttribute(FormatXml.ATOM_HREF, entitySet.getName());
-      //                } else {
-      //                  xmlStreamWriter.writeAttribute(FormatXml.ATOM_HREF, entityContainer.getName() + Edm.DELIMITER + entitySet.getName());
-      //                }
-      //                xmlStreamWriter.writeStartElement(Edm.NAMESPACE_ATOM_2005, FormatXml.ATOM_TITLE);
-      //                xmlStreamWriter.writeCharacters(entitySet.getName());
-      //                xmlStreamWriter.writeEndElement();
-      //                xmlStreamWriter.writeEndElement();
-      //              }
-      //            }
-      //          }
-      //        }
-      //      }
+      // Collection<Schema> schemas = edmProvider.getSchemas();
+      // if (schemas != null) {
+      // for (Schema schema : schemas) {
+      // Collection<EntityContainer> entityContainers = schema.getEntityContainers();
+      // if (entityContainers != null) {
+      // for (EntityContainer entityContainer : entityContainers) {
+      // Collection<EntitySet> entitySets = entityContainer.getEntitySets();
+      // for (EntitySet entitySet : entitySets) {
+      // xmlStreamWriter.writeStartElement(FormatXml.APP_COLLECTION);
+      // if (entityContainer.isDefaultEntityContainer()) {
+      // xmlStreamWriter.writeAttribute(FormatXml.ATOM_HREF, entitySet.getName());
+      // } else {
+      // xmlStreamWriter.writeAttribute(FormatXml.ATOM_HREF, entityContainer.getName() + Edm.DELIMITER +
+      // entitySet.getName());
+      // }
+      // xmlStreamWriter.writeStartElement(Edm.NAMESPACE_ATOM_2005, FormatXml.ATOM_TITLE);
+      // xmlStreamWriter.writeCharacters(entitySet.getName());
+      // xmlStreamWriter.writeEndElement();
+      // xmlStreamWriter.writeEndElement();
+      // }
+      // }
+      // }
+      // }
+      // }
 
       xmlStreamWriter.writeEndElement();
       xmlStreamWriter.writeEndElement();

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonCollectionEntityProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonCollectionEntityProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonCollectionEntityProducer.java
index 4a4d3f8..48900bf 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonCollectionEntityProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonCollectionEntityProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -31,11 +31,12 @@ import org.apache.olingo.odata2.core.ep.util.JsonStreamWriter;
 
 /**
  * Provider for writing a collection of simple-type or complex-type instances in JSON.
- *  
+ * 
  */
 public class JsonCollectionEntityProducer {
 
-  public void append(final Writer writer, final EntityPropertyInfo propertyInfo, final List<?> data) throws EntityProviderException {
+  public void append(final Writer writer, final EntityPropertyInfo propertyInfo, final List<?> data)
+      throws EntityProviderException {
     JsonStreamWriter jsonStreamWriter = new JsonStreamWriter(writer);
 
     try {
@@ -45,8 +46,10 @@ public class JsonCollectionEntityProducer {
 
       jsonStreamWriter.name(FormatJson.METADATA)
           .beginObject()
-          .namedStringValueRaw(FormatJson.TYPE,
-              "Collection(" + propertyInfo.getType().getNamespace() + Edm.DELIMITER + propertyInfo.getType().getName() + ")")
+          .namedStringValueRaw(
+              FormatJson.TYPE,
+              "Collection(" + propertyInfo.getType().getNamespace() + Edm.DELIMITER + propertyInfo.getType().getName()
+                  + ")")
           .endObject()
           .separator();
 
@@ -66,9 +69,11 @@ public class JsonCollectionEntityProducer {
       jsonStreamWriter.endObject()
           .endObject();
     } catch (final IOException e) {
-      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+          .getSimpleName()), e);
     } catch (final EdmException e) {
-      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+          .getSimpleName()), e);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonEntryEntityProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonEntryEntityProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonEntryEntityProducer.java
index 8ee51f7..3d2d98f 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonEntryEntityProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonEntryEntityProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -50,7 +50,7 @@ import org.apache.olingo.odata2.core.ep.util.JsonStreamWriter;
 /**
  * Producer for writing an entity in JSON, also usable for function imports
  * returning a single instance of an entity type.
- *  
+ * 
  */
 public class JsonEntryEntityProducer {
 
@@ -63,7 +63,8 @@ public class JsonEntryEntityProducer {
     this.properties = properties == null ? EntityProviderWriteProperties.serviceRoot(null).build() : properties;
   }
 
-  public void append(final Writer writer, final EntityInfoAggregator entityInfo, final Map<String, Object> data, final boolean isRootElement) throws EntityProviderException {
+  public void append(final Writer writer, final EntityInfoAggregator entityInfo, final Map<String, Object> data,
+      final boolean isRootElement) throws EntityProviderException {
     final EdmEntityType type = entityInfo.getEntityType();
 
     try {
@@ -89,10 +90,13 @@ public class JsonEntryEntityProducer {
       }
       if (type.hasStream()) {
         jsonStreamWriter.separator()
-            .namedStringValueRaw(FormatJson.CONTENT_TYPE,
+            .namedStringValueRaw(
+                FormatJson.CONTENT_TYPE,
                 properties.getMediaResourceMimeType() == null ?
-                    type.getMapping() == null || type.getMapping().getMimeType() == null || data.get(type.getMapping().getMimeType()) == null ?
-                        HttpContentType.APPLICATION_OCTET_STREAM : data.get(type.getMapping().getMimeType()).toString() :
+                    type.getMapping() == null || type.getMapping().getMimeType() == null
+                        || data.get(type.getMapping().getMimeType()) == null ?
+                        HttpContentType.APPLICATION_OCTET_STREAM : data.get(type.getMapping().getMimeType()).toString()
+                    :
                     properties.getMediaResourceMimeType())
             .separator()
             .namedStringValue(FormatJson.MEDIA_SRC, self + "/$value").separator()
@@ -104,7 +108,8 @@ public class JsonEntryEntityProducer {
         if (entityInfo.getSelectedPropertyNames().contains(propertyName)) {
           jsonStreamWriter.separator()
               .name(propertyName);
-          JsonPropertyEntityProducer.appendPropertyValue(jsonStreamWriter, entityInfo.getPropertyInfo(propertyName), data.get(propertyName));
+          JsonPropertyEntityProducer.appendPropertyValue(jsonStreamWriter, entityInfo.getPropertyInfo(propertyName),
+              data.get(propertyName));
         }
       }
 
@@ -114,7 +119,8 @@ public class JsonEntryEntityProducer {
               .name(navigationPropertyName);
           if (entityInfo.getExpandedNavigationPropertyNames().contains(navigationPropertyName)) {
             if (properties.getCallbacks() != null && properties.getCallbacks().containsKey(navigationPropertyName)) {
-              final EdmNavigationProperty navigationProperty = (EdmNavigationProperty) type.getProperty(navigationPropertyName);
+              final EdmNavigationProperty navigationProperty =
+                  (EdmNavigationProperty) type.getProperty(navigationPropertyName);
               final boolean isFeed = navigationProperty.getMultiplicity() == EdmMultiplicity.MANY;
               final EdmEntitySet entitySet = entityInfo.getEntitySet();
               final EdmEntitySet inlineEntitySet = entitySet.getRelatedEntitySet(navigationProperty);
@@ -123,7 +129,8 @@ public class JsonEntryEntityProducer {
               context.setSourceEntitySet(entitySet);
               context.setNavigationProperty(navigationProperty);
               context.setEntryData(data);
-              context.setCurrentExpandSelectTreeNode(properties.getExpandSelectTree().getLinks().get(navigationPropertyName));
+              context.setCurrentExpandSelectTreeNode(properties.getExpandSelectTree().getLinks().get(
+                  navigationPropertyName));
 
               ODataCallback callback = properties.getCallbacks().get(navigationPropertyName);
               if (callback == null) {
@@ -131,28 +138,33 @@ public class JsonEntryEntityProducer {
               }
               try {
                 if (isFeed) {
-                  final WriteFeedCallbackResult result = ((OnWriteFeedContent) callback).retrieveFeedResult((WriteFeedCallbackContext) context);
+                  final WriteFeedCallbackResult result =
+                      ((OnWriteFeedContent) callback).retrieveFeedResult((WriteFeedCallbackContext) context);
                   List<Map<String, Object>> inlineData = result.getFeedData();
                   if (inlineData == null) {
                     inlineData = new ArrayList<Map<String, Object>>();
                   }
                   final EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
-                  final EntityInfoAggregator inlineEntityInfo = EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
+                  final EntityInfoAggregator inlineEntityInfo =
+                      EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
                   new JsonFeedEntityProducer(inlineProperties).append(writer, inlineEntityInfo, inlineData, false);
 
                 } else {
-                  final WriteEntryCallbackResult result = ((OnWriteEntryContent) callback).retrieveEntryResult((WriteEntryCallbackContext) context);
+                  final WriteEntryCallbackResult result =
+                      ((OnWriteEntryContent) callback).retrieveEntryResult((WriteEntryCallbackContext) context);
                   Map<String, Object> inlineData = result.getEntryData();
                   if (inlineData != null && !inlineData.isEmpty()) {
                     final EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
-                    final EntityInfoAggregator inlineEntityInfo = EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
+                    final EntityInfoAggregator inlineEntityInfo =
+                        EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
                     new JsonEntryEntityProducer(inlineProperties).append(writer, inlineEntityInfo, inlineData, false);
                   } else {
                     jsonStreamWriter.unquotedValue("null");
                   }
                 }
               } catch (final ODataApplicationException e) {
-                throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+                throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+                    .getSimpleName()), e);
               }
             } else {
               writeDeferredUri(navigationPropertyName);
@@ -172,9 +184,11 @@ public class JsonEntryEntityProducer {
       writer.flush();
 
     } catch (final IOException e) {
-      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+          .getSimpleName()), e);
     } catch (final EdmException e) {
-      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+          .getSimpleName()), e);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonErrorDocumentProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonErrorDocumentProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonErrorDocumentProducer.java
index 7967412..54b5760 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonErrorDocumentProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonErrorDocumentProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -30,18 +30,23 @@ import org.apache.olingo.odata2.core.ep.util.JsonStreamWriter;
  */
 public class JsonErrorDocumentProducer {
 
-  public void writeErrorDocument(final Writer writer, final String errorCode, final String message, final Locale locale, final String innerError) throws IOException {
+  public void writeErrorDocument(final Writer writer, final String errorCode, final String message,
+      final Locale locale, final String innerError) throws IOException {
     JsonStreamWriter jsonStreamWriter = new JsonStreamWriter(writer);
 
-    jsonStreamWriter.beginObject()
+    jsonStreamWriter
+        .beginObject()
         .name(FormatJson.ERROR)
         .beginObject()
-        .namedStringValue(FormatJson.CODE, errorCode).separator()
+        .namedStringValue(FormatJson.CODE, errorCode)
+        .separator()
         .name(FormatJson.MESSAGE)
         .beginObject()
-        .namedStringValueRaw(FormatJson.LANG,
+        .namedStringValueRaw(
+            FormatJson.LANG,
             locale == null || locale.getLanguage() == null ? null :
-                locale.getLanguage() + (locale.getCountry() == null || locale.getCountry().isEmpty() ? "" : ("-" + locale.getCountry())))
+                locale.getLanguage()
+                    + (locale.getCountry() == null || locale.getCountry().isEmpty() ? "" : ("-" + locale.getCountry())))
         .separator()
         .namedStringValue(FormatJson.VALUE, message)
         .endObject();

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonFeedEntityProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonFeedEntityProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonFeedEntityProducer.java
index f9de3a3..9be2fb0 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonFeedEntityProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonFeedEntityProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -32,7 +32,7 @@ import org.apache.olingo.odata2.core.ep.util.JsonStreamWriter;
 
 /**
  * Producer for writing an entity collection (a feed) in JSON.
- *  
+ * 
  */
 public class JsonFeedEntityProducer {
 
@@ -42,7 +42,8 @@ public class JsonFeedEntityProducer {
     this.properties = properties == null ? EntityProviderWriteProperties.serviceRoot(null).build() : properties;
   }
 
-  public void append(final Writer writer, final EntityInfoAggregator entityInfo, final List<Map<String, Object>> data, final boolean isRootElement) throws EntityProviderException {
+  public void append(final Writer writer, final EntityInfoAggregator entityInfo, final List<Map<String, Object>> data,
+      final boolean isRootElement) throws EntityProviderException {
     JsonStreamWriter jsonStreamWriter = new JsonStreamWriter(writer);
 
     try {
@@ -87,7 +88,8 @@ public class JsonFeedEntityProducer {
 
       jsonStreamWriter.endObject();
     } catch (final IOException e) {
-      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+          .getSimpleName()), e);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonLinkEntityProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonLinkEntityProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonLinkEntityProducer.java
index a2de22c..69a0c5a 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonLinkEntityProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonLinkEntityProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -30,7 +30,7 @@ import org.apache.olingo.odata2.core.ep.util.JsonStreamWriter;
 
 /**
  * Producer for writing a link in JSON.
- *  
+ * 
  */
 public class JsonLinkEntityProducer {
 
@@ -40,7 +40,8 @@ public class JsonLinkEntityProducer {
     this.properties = properties == null ? EntityProviderWriteProperties.serviceRoot(null).build() : properties;
   }
 
-  public void append(final Writer writer, final EntityInfoAggregator entityInfo, final Map<String, Object> data) throws EntityProviderException {
+  public void append(final Writer writer, final EntityInfoAggregator entityInfo, final Map<String, Object> data)
+      throws EntityProviderException {
     JsonStreamWriter jsonStreamWriter = new JsonStreamWriter(writer);
 
     final String uri = (properties.getServiceRoot() == null ? "" : properties.getServiceRoot().toASCIIString())
@@ -51,7 +52,8 @@ public class JsonLinkEntityProducer {
       appendUri(jsonStreamWriter, uri);
       jsonStreamWriter.endObject();
     } catch (final IOException e) {
-      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+          .getSimpleName()), e);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonLinksEntityProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonLinksEntityProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonLinksEntityProducer.java
index 8b66fda..a3a5e79 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonLinksEntityProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonLinksEntityProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -32,7 +32,7 @@ import org.apache.olingo.odata2.core.ep.util.JsonStreamWriter;
 
 /**
  * Producer for writing a link collection in JSON.
- *  
+ * 
  */
 public class JsonLinksEntityProducer {
 
@@ -42,7 +42,8 @@ public class JsonLinksEntityProducer {
     this.properties = properties == null ? EntityProviderWriteProperties.serviceRoot(null).build() : properties;
   }
 
-  public void append(final Writer writer, final EntityInfoAggregator entityInfo, final List<Map<String, Object>> data) throws EntityProviderException {
+  public void append(final Writer writer, final EntityInfoAggregator entityInfo, final List<Map<String, Object>> data)
+      throws EntityProviderException {
     JsonStreamWriter jsonStreamWriter = new JsonStreamWriter(writer);
 
     try {
@@ -66,7 +67,8 @@ public class JsonLinksEntityProducer {
           jsonStreamWriter.separator();
         }
         JsonLinkEntityProducer.appendUri(jsonStreamWriter,
-            (serviceRoot == null ? "" : serviceRoot) + AtomEntryEntityProducer.createSelfLink(entityInfo, entryData, null));
+            (serviceRoot == null ? "" : serviceRoot)
+                + AtomEntryEntityProducer.createSelfLink(entityInfo, entryData, null));
       }
       jsonStreamWriter.endArray();
 
@@ -76,7 +78,8 @@ public class JsonLinksEntityProducer {
 
       jsonStreamWriter.endObject();
     } catch (final IOException e) {
-      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+          .getSimpleName()), e);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonPropertyEntityProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonPropertyEntityProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonPropertyEntityProducer.java
index 8ea01c9..659e4b9 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonPropertyEntityProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonPropertyEntityProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -37,11 +37,12 @@ import org.apache.olingo.odata2.core.ep.util.JsonStreamWriter;
 /**
  * Producer for writing a single simple or complex property in JSON, also usable
  * for function imports returning a single instance of a simple or complex type.
- *  
+ * 
  */
 public class JsonPropertyEntityProducer {
 
-  public void append(final Writer writer, final EntityPropertyInfo propertyInfo, final Object value) throws EntityProviderException {
+  public void append(final Writer writer, final EntityPropertyInfo propertyInfo, final Object value)
+      throws EntityProviderException {
     JsonStreamWriter jsonStreamWriter = new JsonStreamWriter(writer);
 
     try {
@@ -50,31 +51,39 @@ public class JsonPropertyEntityProducer {
           .beginObject();
 
       jsonStreamWriter.name(propertyInfo.getName());
-      appendPropertyValue(jsonStreamWriter, propertyInfo.isComplex() ? (EntityComplexPropertyInfo) propertyInfo : propertyInfo, value);
+      appendPropertyValue(jsonStreamWriter, propertyInfo.isComplex() ? (EntityComplexPropertyInfo) propertyInfo
+          : propertyInfo, value);
 
       jsonStreamWriter.endObject()
           .endObject();
     } catch (final IOException e) {
-      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+          .getSimpleName()), e);
     } catch (final EdmException e) {
-      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+          .getSimpleName()), e);
     }
   }
 
-  protected static void appendPropertyValue(final JsonStreamWriter jsonStreamWriter, final EntityPropertyInfo propertyInfo, final Object value) throws IOException, EdmException, EntityProviderException {
+  protected static void appendPropertyValue(final JsonStreamWriter jsonStreamWriter,
+      final EntityPropertyInfo propertyInfo, final Object value) throws IOException, EdmException,
+      EntityProviderException {
     if (propertyInfo.isComplex()) {
       if (value == null || value instanceof Map<?, ?>) {
         jsonStreamWriter.beginObject();
         appendPropertyMetadata(jsonStreamWriter, propertyInfo.getType());
-        for (final EntityPropertyInfo childPropertyInfo : ((EntityComplexPropertyInfo) propertyInfo).getPropertyInfos()) {
+        for (final EntityPropertyInfo childPropertyInfo : ((EntityComplexPropertyInfo) propertyInfo).getPropertyInfos())
+        {
           jsonStreamWriter.separator();
           final String name = childPropertyInfo.getName();
           jsonStreamWriter.name(name);
-          appendPropertyValue(jsonStreamWriter, childPropertyInfo, value == null ? null : ((Map<?, ?>) value).get(name));
+          appendPropertyValue(jsonStreamWriter, childPropertyInfo, 
+              value == null ? null : ((Map<?, ?>) value).get(name));
         }
         jsonStreamWriter.endObject();
       } else {
-        throw new EntityProviderException(EntityProviderException.ILLEGAL_ARGUMENT.addContent("A complex property must have a Map as data"));
+        throw new EntityProviderException(EntityProviderException.ILLEGAL_ARGUMENT
+            .addContent("A complex property must have a Map as data"));
       }
     } else {
       final EdmSimpleType type = (EdmSimpleType) propertyInfo.getType();
@@ -105,7 +114,8 @@ public class JsonPropertyEntityProducer {
     }
   }
 
-  protected static void appendPropertyMetadata(final JsonStreamWriter jsonStreamWriter, final EdmType type) throws IOException, EdmException {
+  protected static void appendPropertyMetadata(final JsonStreamWriter jsonStreamWriter, final EdmType type)
+      throws IOException, EdmException {
     jsonStreamWriter.name(FormatJson.METADATA)
         .beginObject()
         .namedStringValueRaw(FormatJson.TYPE, type.getNamespace() + Edm.DELIMITER + type.getName())

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonServiceDocumentProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonServiceDocumentProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonServiceDocumentProducer.java
index a58c9d8..6b2134b 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonServiceDocumentProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonServiceDocumentProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -30,8 +30,8 @@ import org.apache.olingo.odata2.core.ep.util.FormatJson;
 import org.apache.olingo.odata2.core.ep.util.JsonStreamWriter;
 
 /**
- * Writes the  OData service document in JSON.
- *  
+ * Writes the OData service document in JSON.
+ * 
  */
 public class JsonServiceDocumentProducer {
 
@@ -60,9 +60,11 @@ public class JsonServiceDocumentProducer {
           .endObject()
           .endObject();
     } catch (final IOException e) {
-      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+          .getSimpleName()), e);
     } catch (final ODataException e) {
-      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass().getSimpleName()), e);
+      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
+          .getSimpleName()), e);
     }
 
   }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/TombstoneProducer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/TombstoneProducer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/TombstoneProducer.java
index 1474909..7f1babb 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/TombstoneProducer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/TombstoneProducer.java
@@ -1,20 +1,20 @@
 /*******************************************************************************
  * 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
 
@@ -47,13 +47,15 @@ public class TombstoneProducer {
   /**
    * Appends tombstones to an already started feed.
    * If the list is empty no elements will be appended.
-   * @param writer         same as in feed
-   * @param eia            same as in feed
-   * @param properties     same as in feed
+   * @param writer same as in feed
+   * @param eia same as in feed
+   * @param properties same as in feed
    * @param deletedEntries data to be appended
    * @throws EntityProviderException
    */
-  public void appendTombstones(final XMLStreamWriter writer, final EntityInfoAggregator eia, final EntityProviderWriteProperties properties, final List<Map<String, Object>> deletedEntries) throws EntityProviderException {
+  public void appendTombstones(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final EntityProviderWriteProperties properties, final List<Map<String, Object>> deletedEntries)
+      throws EntityProviderException {
     try {
       for (Map<String, Object> deletedEntry : deletedEntries) {
         writer.writeStartElement(TombstoneCallback.NAMESPACE_TOMBSTONE, FormatXml.ATOM_TOMBSTONE_DELETED_ENTRY);
@@ -70,7 +72,8 @@ public class TombstoneProducer {
     }
   }
 
-  private void appendWhenAttribute(final XMLStreamWriter writer, final EntityInfoAggregator eia, final Map<String, Object> deletedEntry) throws XMLStreamException, EdmSimpleTypeException {
+  private void appendWhenAttribute(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final Map<String, Object> deletedEntry) throws XMLStreamException, EdmSimpleTypeException {
     Object updateDate = null;
     EntityPropertyInfo updatedInfo = eia.getTargetPathInfo(EdmTargetPath.SYNDICATION_UPDATED);
     if (updatedInfo != null) {
@@ -84,17 +87,23 @@ public class TombstoneProducer {
     }
   }
 
-  private void appendCustomWhenAttribute(final XMLStreamWriter writer, final Object updateDate, final EntityPropertyInfo updatedInfo) throws XMLStreamException, EdmSimpleTypeException {
+  private void appendCustomWhenAttribute(final XMLStreamWriter writer, final Object updateDate,
+      final EntityPropertyInfo updatedInfo) throws XMLStreamException, EdmSimpleTypeException {
     EdmFacets updateFacets = updatedInfo.getFacets();
-    writer.writeAttribute(FormatXml.ATOM_TOMBSTONE_WHEN, EdmDateTimeOffset.getInstance().valueToString(updateDate, EdmLiteralKind.DEFAULT, updateFacets));
+    writer.writeAttribute(FormatXml.ATOM_TOMBSTONE_WHEN, EdmDateTimeOffset.getInstance().valueToString(updateDate,
+        EdmLiteralKind.DEFAULT, updateFacets));
   }
 
-  private void appendRefAttribute(final XMLStreamWriter writer, final EntityInfoAggregator eia, final EntityProviderWriteProperties properties, final Map<String, Object> deletedEntry) throws XMLStreamException, EntityProviderException {
-    String ref = properties.getServiceRoot().toASCIIString() + AtomEntryEntityProducer.createSelfLink(eia, deletedEntry, null);
+  private void appendRefAttribute(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final EntityProviderWriteProperties properties, final Map<String, Object> deletedEntry)
+      throws XMLStreamException, EntityProviderException {
+    String ref =
+        properties.getServiceRoot().toASCIIString() + AtomEntryEntityProducer.createSelfLink(eia, deletedEntry, null);
     writer.writeAttribute(FormatXml.ATOM_TOMBSTONE_REF, ref);
   }
 
-  private void appendDefaultWhenAttribute(final XMLStreamWriter writer) throws XMLStreamException, EdmSimpleTypeException {
+  private void appendDefaultWhenAttribute(final XMLStreamWriter writer) throws XMLStreamException,
+      EdmSimpleTypeException {
     if (defaultDateString == null) {
       Object defaultDate = new Date();
       defaultDateString = EdmDateTimeOffset.getInstance().valueToString(defaultDate, EdmLiteralKind.DEFAULT, null);