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 2015/09/17 12:38:20 UTC
svn commit: r1703559 -
/olingo/site/trunk/content/doc/odata4/tutorials/navigation/tutorial_navigation.mdtext
Author: chrish
Date: Thu Sep 17 10:38:18 2015
New Revision: 1703559
URL: http://svn.apache.org/r1703559
Log:
CMS commit to olingo by chrish
Modified:
olingo/site/trunk/content/doc/odata4/tutorials/navigation/tutorial_navigation.mdtext
Modified: olingo/site/trunk/content/doc/odata4/tutorials/navigation/tutorial_navigation.mdtext
URL: http://svn.apache.org/viewvc/olingo/site/trunk/content/doc/odata4/tutorials/navigation/tutorial_navigation.mdtext?rev=1703559&r1=1703558&r2=1703559&view=diff
==============================================================================
--- olingo/site/trunk/content/doc/odata4/tutorials/navigation/tutorial_navigation.mdtext (original)
+++ olingo/site/trunk/content/doc/odata4/tutorials/navigation/tutorial_navigation.mdtext Thu Sep 17 10:38:18 2015
@@ -569,21 +569,21 @@ The following snippet shows the implemen
}else{ // this would be the case for e.g. Products(1)/Category/Products
throw new ODataApplicationException("Not supported", HttpStatusCode.NOT_IMPLEMENTED.getStatusCode(),Locale.ROOT);
}
-
+
// 3rd: create and configure a serializer
ContextURL contextUrl = ContextURL.with().entitySet(responseEdmEntitySet).build();
final String id = request.getRawBaseUri() + "/" + responseEdmEntitySet.getName();
EntityCollectionSerializerOptions opts = EntityCollectionSerializerOptions.with().contextURL(contextUrl).id(id).build();
EdmEntityType edmEntityType = responseEdmEntitySet.getEntityType();
-
+
ODataSerializer serializer = odata.createSerializer(responseFormat);
SerializerResult serializerResult = serializer.entityCollection(this.srvMetadata, edmEntityType, responseEntityCollection, opts);
// 4th: configure the response object: set the body, headers and status code
response.setContent(serializerResult.getContent());
response.setStatusCode(HttpStatusCode.OK.getStatusCode());
- response.setHeader(HttpHeader.CONTENT_TYPE, responseFormat.toContentTypeString());
-}
+ response.setHeader(HttpHeader.CONTENT_TYPE, responseFormat.toContentTypeString());
+ }
## 3.3. Implement the to-one navigation