olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r1687123 - /olingo/site/trunk/content/doc/odata4/tutorials/read/tutorial_read.mdtext
Date Tue, 23 Jun 2015 19:48:48 GMT
Author: mibo
Date: Tue Jun 23 19:48:48 2015
New Revision: 1687123

URL: http://svn.apache.org/r1687123
Log:
Fixed indent of code samples

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=1687123&r1=1687122&r2=1687123&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 Tue Jun 23 19:48:48
2015
@@ -171,59 +171,59 @@ In our example, the pom.xml file looks a
 
     :::xml
     <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    	<modelVersion>4.0.0</modelVersion>
-    	<groupId>my.group.id</groupId>
-    	<artifactId>DemoService</artifactId>
-    	<packaging>war</packaging>
-    	<version>0.0.1</version>
-
-    	<name>DemoService Maven Webapp</name>
-
-    	<properties>
-    		<javax.version>2.5</javax.version>
-    		<odata.version>4.0.0-beta-03</odata.version>
-    		<slf4j.version>1.7.7</slf4j.version>
-    	</properties>
-
-    	<dependencies>
-    		<dependency>
-    			<groupId>javax.servlet</groupId>
-    			<artifactId>servlet-api</artifactId>
-    			<version>${javax.version}</version>
-    			<scope>provided</scope>
-    		</dependency>
-
-    		<dependency>
-    			<groupId>org.apache.olingo</groupId>
-    			<artifactId>odata-server-api</artifactId>
-    			<version>${odata.version}</version>
-    		</dependency>
-    		<dependency>
-    			<groupId>org.apache.olingo</groupId>
-    			<artifactId>odata-server-core</artifactId>
-    			<version>${odata.version}</version>
-    			<scope>runtime</scope>
-    		</dependency>
-
-    		<dependency>
-    			<groupId>org.apache.olingo</groupId>
-    			<artifactId>odata-commons-api</artifactId>
-    			<version>${odata.version}</version>
-    		</dependency>
-    		<dependency>
-    			<groupId>org.apache.olingo</groupId>
-    			<artifactId>odata-commons-core</artifactId>
-    			<version>${odata.version}</version>
-    		</dependency>
-
-    		<dependency>
-    			<groupId>org.slf4j</groupId>
-    			<artifactId>slf4j-simple</artifactId>
-    			<version>${slf4j.version}</version>
-    			<scope>runtime</scope>
-    		</dependency>
-    	</dependencies>
+      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+      <modelVersion>4.0.0</modelVersion>
+      <groupId>my.group.id</groupId>
+      <artifactId>DemoService</artifactId>
+      <packaging>war</packaging>
+      <version>0.0.1</version>
+
+      <name>DemoService Maven Webapp</name>
+
+      <properties>
+        <javax.version>2.5</javax.version>
+        <odata.version>4.0.0-beta-03</odata.version>
+        <slf4j.version>1.7.7</slf4j.version>
+      </properties>
+
+      <dependencies>
+        <dependency>
+          <groupId>javax.servlet</groupId>
+          <artifactId>servlet-api</artifactId>
+          <version>${javax.version}</version>
+          <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.olingo</groupId>
+          <artifactId>odata-server-api</artifactId>
+          <version>${odata.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.olingo</groupId>
+          <artifactId>odata-server-core</artifactId>
+          <version>${odata.version}</version>
+          <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.olingo</groupId>
+          <artifactId>odata-commons-api</artifactId>
+          <version>${odata.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.olingo</groupId>
+          <artifactId>odata-commons-core</artifactId>
+          <version>${odata.version}</version>
+        </dependency>
+
+        <dependency>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-simple</artifactId>
+          <version>${slf4j.version}</version>
+          <scope>runtime</scope>
+        </dependency>
+      </dependencies>
     </project>
 
 
@@ -342,15 +342,15 @@ In our simple example, we implement the
 These are:
 
 * **_getEntityType()_**  
-	Here we declare the EntityType “Product” and a few of its properties
+  Here we declare the EntityType “Product” and a few of its properties
 * **_getEntitySet()_**  
-	Here we state that the list of products can be called via the EntitySet “Products”
+  Here we state that the list of products can be called via the EntitySet “Products”
 * **_getEntityContainer()_**  
-	Here we provide a Container element that is necessary to host the EntitySet.
+  Here we provide a Container element that is necessary to host the EntitySet.
 * **_getSchemas()_**  
-	The Schema is the root element to carry the elements.
+  The Schema is the root element to carry the elements.
 * **_getEntityContainerInfo()_**
-	Information about the EntityContainer to be displayed in the Service Document
+  Information about the EntityContainer to be displayed in the Service Document
 
 In Eclipse, in order to select the methods to override, right click into the Java editor
and from the context menu choose *Source -> Override/Implement Methods…*
 Select the mentioned methods and press OK.
@@ -459,16 +459,16 @@ In our example, we have only one _Entity
     @Override
     public EntityContainer getEntityContainer() throws ODataException {
 
-    	// create EntitySets
-    	List<EntitySet> entitySets = new ArrayList<EntitySet>();
-    	entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));
-
-    	// create EntityContainer
-    	EntityContainer entityContainer = new EntityContainer();
-    	entityContainer.setName(CONTAINER_NAME);
-    	entityContainer.setEntitySets(entitySets);
+      // create EntitySets
+      List<EntitySet> entitySets = new ArrayList<EntitySet>();
+      entitySets.add(getEntitySet(CONTAINER, ES_PRODUCTS_NAME));
+
+      // create EntityContainer
+      EntityContainer entityContainer = new EntityContainer();
+      entityContainer.setName(CONTAINER_NAME);
+      entityContainer.setEntitySets(entitySets);
 
-    	return entityContainer;
+      return entityContainer;
     }
 
 
@@ -627,7 +627,7 @@ Within our package `myservice.mynamespac
 After creation of the Java class, we can see that there are 2 methods to be implemented:
 
   * _init()_  
-	  This method is invoked by the _Olingo_ library, allowing us to store the context object
+    This method is invoked by the _Olingo_ library, allowing us to store the context object
   * _readEntityCollection()_  
     Here we have to fetch the required data and pass it back to the _Olingo_ library
 
@@ -645,7 +645,7 @@ We will need it later, so we store it as
 
     :::java
     public void init(OData odata, ServiceMetadata serviceMetadata) {
-    	this.odata = odata;
+      this.odata = odata;
     }
 
 
@@ -830,8 +830,8 @@ This is where our two implemented classe
 
       @Override
       protected void service(final HttpServletRequest req, final HttpServletResponse resp)
throws ServletException, IOException {
-    		try {
-    			// create odata handler and configure it with CsdlEdmProvider and Processor
+        try {
+          // create odata handler and configure it with CsdlEdmProvider and Processor
           OData odata = OData.newInstance();
           ServiceMetadata edm = odata.createServiceMetadata(new DemoEdmProvider(), new ArrayList<EdmxReference>());
           ODataHttpHandler handler = odata.createHandler(edm);
@@ -839,7 +839,6 @@ This is where our two implemented classe
 
           // let the handler do the work
           handler.process(req, resp);
-
         } catch (RuntimeException e) {
           LOG.error("Server Error occurred in ExampleServlet", e);
           throw new ServletException(e);



Mime
View raw message