You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by sk...@apache.org on 2013/09/30 16:29:54 UTC
svn commit: r1527594 -
/incubator/olingo/site/trunk/content/doc/tutorials/read_expand.mdtext
Author: sklevenz
Date: Mon Sep 30 14:29:54 2013
New Revision: 1527594
URL: http://svn.apache.org/r1527594
Log:
CMS commit to olingo by sklevenz
Modified:
incubator/olingo/site/trunk/content/doc/tutorials/read_expand.mdtext
Modified: incubator/olingo/site/trunk/content/doc/tutorials/read_expand.mdtext
URL: http://svn.apache.org/viewvc/incubator/olingo/site/trunk/content/doc/tutorials/read_expand.mdtext?rev=1527594&r1=1527593&r2=1527594&view=diff
==============================================================================
--- incubator/olingo/site/trunk/content/doc/tutorials/read_expand.mdtext (original)
+++ incubator/olingo/site/trunk/content/doc/tutorials/read_expand.mdtext Mon Sep 30 14:29:54 2013
@@ -53,6 +53,7 @@ In our sample we create a class `MyCallb
#### Sample Code
+ :::java
@Override
public WriteEntryCallbackResult retrieveEntryResult(WriteEntryCallbackContext context) throws ODataApplicationException {
WriteEntryCallbackResult result = new WriteEntryCallbackResult();
@@ -88,6 +89,7 @@ It is possible to create an additional c
#### Sample Code
+ :::java
@Override
public WriteFeedCallbackResult retrieveFeedResult(WriteFeedCallbackContext context) throws ODataApplicationException {
WriteFeedCallbackResult result = new WriteFeedCallbackResult();
@@ -121,6 +123,7 @@ To improve code readability the `isNavig
#### Sample Code
+ :::java
private boolean isNavigationFromTo(WriteCallbackContext context, String entitySetName, String navigationPropertyName) throws EdmException {
if(entitySetName == null || navigationPropertyName == null) {
return false;
@@ -135,6 +138,7 @@ The necessary callbacks (`MyCallback` cl
The following code show the few lines we need for extending the read of a car with its expanded manufacturer.
+ :::java
// create and register callback
Map<String, ODataCallback> callbacks = new HashMap<String, ODataCallback>();
callbacks.put(ENTITY_NAME_MANUFACTURER, new MyCallback(dataStore, serviceRoot));
@@ -144,6 +148,7 @@ The following code show the few lines we
The following code show the few lines we need for extending the read of a manufacturer with its expanded cars.
+ :::java
// create and register callback
Map<String, ODataCallback> callbacks = new HashMap<String, ODataCallback>();
callbacks.put(ENTITY_SET_NAME_CARS, new MyCallback(dataStore, serviceRoot));
@@ -153,6 +158,7 @@ The following code show the few lines we
The complete `readEntity(...)` method should now look like:
+ :::java
public ODataResponse readEntity(GetEntityUriInfo uriInfo, String contentType) throws ODataException {
if (uriInfo.getNavigationSegments().size() == 0) {