Author: mibo
Date: Wed Jun 17 19:09:25 2015
New Revision: 1686093
URL: http://svn.apache.org/r1686093
Log:
CMS commit to olingo by mibo
Modified:
olingo/site/trunk/content/doc/odata4/tutorials/read/tutorial_read.mdtext
Modified:
olingo/site/trunk/content/doc/odata4/tutorials/read/tutorial_read.mdtext
URL:
http://svn.apache.org/viewvc/olingo/site/trunk/content/doc/odata4/tutorials/read/tutorial_read.mdtext?rev=1686093&r1=1686092&r2=1686093&view=diff
==============================================================================
--- olingo/site/trunk/content/doc/odata4/tutorials/read/tutorial_read.mdtext
(original)
+++ olingo/site/trunk/content/doc/odata4/tutorials/read/tutorial_read.mdtext
Wed Jun 17 19:09:25 2015
@@ -306,16 +306,16 @@ The service document can be invoked via
<serviceroot>/
The information that is given by these 2 URIs, has to be implemented in the
service code.
-Olingo provides API for it and we will use it in the implementation of our
*EdmProvider.*
+Olingo provides API for it and we will use it in the implementation of our
*CsdlEdmProvider*.
### 4.1.2. Create class
Create package *myservice.mynamespace.service*
-Create class *DemoEdmProvider* and specify the superclass
*org.apache.olingo.server.api.edm.provider.EdmProvider*
+Create class *DemoEdmProvider* and specify the superclass
*org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmProvider*
Note: **edm** is the abbreviation for **Entity Data Model**.
-Accordingly, we understand that the *EdmProvider* is supposed to provide
static descriptive information.
+Accordingly, we understand that the *CsdlEdmProvider* is supposed to provide
static descriptive information.
The Entity Model of the service can be defined in the EDM Provider. The EDM
model basically defines the available EntityTypes and the relation between the
entities. An EntityType consists of primitive, complex or navigation
properties. The model can be invoked with the metadata document request.
@@ -331,7 +331,7 @@ You can find the Javadoc here: <http://o
### 4.1.3. Implement the required methods
-The base class *EdmProvider* provides methods for declaring the metadata of
all OData elements.
+The base class *AbstractCsdlEdmProvider* provides methods for declaring the
metadata of all OData elements.
For example:
* The entries that are displayed in the service document are provided by the
method
@@ -817,7 +817,7 @@ Override the `service()` method.
Basically, what we are doing here is to create an `ODataHttpHandler`, which is
a class that is provided by _Olingo_.
It receives the user request and if the URL conforms to the OData
specification, the request is delegated to the processor implementation of the
OData service.
This means that the handler has to be configured with all processor
implementations that have been created along with the OData service (in our
example, only one processor).
-Furthermore, the `ODataHttpHandler` needs to carry the knowledge about the
`EdmProvider`.
+Furthermore, the `ODataHttpHandler` needs to carry the knowledge about the
`CsdlEdmProvider`.
This is where our two implemented classes come together, the metadata
declaration and the data provisioning.
@@ -831,12 +831,28 @@ This is where our two implemented classe
@Override
protected void service(final HttpServletRequest req, final
HttpServletResponse resp) throws ServletException, IOException {
+<<<<<<< .mine
+ try {
+ // create odata handler and configure it with
CsdlEdmProvider and Processor
+ OData odata = OData.newInstance();
+ ServiceMetadata edm = odata.createServiceMetadata(new
ExampleEdmProvider(), new ArrayList<EdmxReference>());
+ ODataHttpHandler handler = odata.createHandler(edm);
+ handler.register(new DemoEntityCollectionProcessor());
+||||||| .r1680189
+ try {
+ // create odata handler and configure it with
EdmProvider and Processor
+ OData odata = OData.newInstance();
+ ServiceMetadata edm = odata.createServiceMetadata(new
ExampleEdmProvider(), new ArrayList<EdmxReference>());
+ ODataHttpHandler handler = odata.createHandler(edm);
+ handler.register(new DemoEntityCollectionProcessor());
+=======
try {
// create odata handler and configure it with EdmProvider and
Processor
OData odata = OData.newInstance();
ServiceMetadata edm = odata.createServiceMetadata(new
DemoEdmProvider(), new ArrayList<EdmxReference>());
ODataHttpHandler handler = odata.createHandler(edm);
handler.register(new DemoEntityCollectionProcessor());
+>>>>>>> .r1686092
// let the handler do the work
handler.process(req, resp);
@@ -1014,4 +1030,9 @@ Further topics to be covered by follow-u
**Further reading**
OData specification: <http://odata.org/>
+<<<<<<< .mine
+Olingo Javadoc: <http://olingo.apache.org/javadoc/odata4/index.html>|||||||
.r1680189
+Olingo Javadoc: <http://olingo.apache.org/javadoc/odata4/index.html>
+=======
Olingo Javadoc:
[http://olingo.apache.org/javadoc/odata4/index.html](/javadoc/odata4/index.html)
+>>>>>>> .r1686092