You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by wa...@apache.org on 2021/06/05 19:50:18 UTC

[olingo-site] 14/15: cleanup of odata4 and javascript docs

This is an automated email from the ASF dual-hosted git repository.

wave pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/olingo-site.git

commit fa94792707aa70893e0da2d44d9e9abda18b27e6
Author: Dave Fisher <da...@davefisher.tech>
AuthorDate: Sat Jun 5 12:40:13 2021 -0700

    cleanup of odata4 and javascript docs
---
 content/doc/javascript/index.md                    |  5 +----
 content/doc/odata4/eclipse.md                      |  4 +---
 .../tutorials/deep_insert/tutorial_deep_insert.md  |  2 +-
 .../doc/odata4/tutorials/sqo_es/tutorial_sqo_es.md | 22 +++++++++++-----------
 .../doc/odata4/tutorials/sqo_f/tutorial_sqo_f.md   | 18 +++++++++---------
 5 files changed, 23 insertions(+), 28 deletions(-)

diff --git a/content/doc/javascript/index.md b/content/doc/javascript/index.md
index c4001e1..4fc87bf 100644
--- a/content/doc/javascript/index.md
+++ b/content/doc/javascript/index.md
@@ -7,10 +7,7 @@ This library "odatajs-4.0.0.min.js" supports only the OData V4 protocol.
 
 For using the OData protocols V1-V3 please refer to the [datajs library](http://datajs.codeplex.com/)
 
-The odatajs library can be included in any html page with the script tag (for example)
-```
-<script type="text/javascript" src="./sources/odatajs-4.0.0.min.js"></script>
-```
+The odatajs library can be included in any html page with the script tag (for example) `&lt;script type="text/javascript" src="./sources/odatajs-4.0.0.min.js"&gt;&lt;/script&gt;`
 and its features can be used through the `odatajs` namespace (or `window.odatajs`). The odatajs library can be used together with the datajs library which uses the `window.OData` namespace.
 
 For API documentation please see [ODatajs API documentation](/doc/javascript/apidoc/index.html)
diff --git a/content/doc/odata4/eclipse.md b/content/doc/odata4/eclipse.md
index 8ef53ea..75aa307 100644
--- a/content/doc/odata4/eclipse.md
+++ b/content/doc/odata4/eclipse.md
@@ -8,8 +8,6 @@ Title:     Eclipse
 
 With the Maven project files can be generated with:
 
-```
-mvn eclipse:clean eclipse:eclipse
-```
+`mvn eclipse:clean eclipse:eclipse`
 
 As result each Maven module will get a consistent `.project`, `.classpath` and `.settings` file with which each module can be imported as existing project to Eclipse. 
diff --git a/content/doc/odata4/tutorials/deep_insert/tutorial_deep_insert.md b/content/doc/odata4/tutorials/deep_insert/tutorial_deep_insert.md
index 85af708..6b3e252 100644
--- a/content/doc/odata4/tutorials/deep_insert/tutorial_deep_insert.md
+++ b/content/doc/odata4/tutorials/deep_insert/tutorial_deep_insert.md
@@ -65,7 +65,7 @@ As a shortcut you should checkout the prepared tutorial project in the [git repo
 
 Afterwards do a Deploy and run: it should be working. At this state you can perform CRUD operations and do navigations between products and categories.
 
-# 2. Implementation
+# 3. Implementation
 
 Before we start with the implementation, please have a look at the class `myservice.mynamespace.data.Storage`. In difference to the [navigation tutorial](/doc/odata4/tutorials/navigation/tutorial_navigation.html) the relations between two entities can not be hard coded because we would like to create and change relations between entities dynamically. In the constructor of the data storage the creation of the sample data is called. After that the method `linkProductsAndCategories`is calle [...]
 
diff --git a/content/doc/odata4/tutorials/sqo_es/tutorial_sqo_es.md b/content/doc/odata4/tutorials/sqo_es/tutorial_sqo_es.md
index c41c65f..971f00b 100755
--- a/content/doc/odata4/tutorials/sqo_es/tutorial_sqo_es.md
+++ b/content/doc/odata4/tutorials/sqo_es/tutorial_sqo_es.md
@@ -102,16 +102,16 @@ The drawback of this implementation is, that the full payload is fetched from th
 In this tutorial we use the simple implementation to show the concept for `$select` so that there are only a few steps that have to be done by us.  
 
   * We have to get the SelectOption from the UriInfo:
-
-```java
+    
+    ```java
         // 3rd: apply system query options
         SelectOption selectOption = uriInfo.getSelectOption();
-```
+    ```
 
   * We have to take care about the context URL, which is different in case that `$select` is used.
-  Again, the Olingo library provides some support, which we use to build the select list that has to be passed to the ContextURL builder:
-
-```java
+    Again, the Olingo library provides some support, which we use to build the select list that has to be passed to the ContextURL builder:
+    
+    ```java
         // we need the property names of the $select, in order to build the context URL
         String selectList = odata.createUriHelper().buildContextURLSelectList(edmEntityType,
                                                                               null, selectOption);
@@ -119,17 +119,17 @@ In this tutorial we use the simple implementation to show the concept for `$sele
                                           .entitySet(edmEntitySet)
                                           .selectList(selectList)
                                           .build();
-```
+    ```
 
   * Furthermore, the serializer has to know about the usage of `$select`.
-  Therefore, the serializer options instance is initialized with the selectOption object that we’ve obtained above. If this object is not null, then the serializer will take care to consider the `$select` statement
-
-```java
+    Therefore, the serializer options instance is initialized with the selectOption object that we’ve obtained above. If this object is not null, then the serializer will take care to consider the `$select` statement
+    
+    ```java
         EntityCollectionSerializerOptions opts = EntityCollectionSerializerOptions.with()
                                                                                   .contextURL(contextUrl)
                                                                                   .select(selectOption)
                                                                                   .build();
-```
+    ```
 
 
 **The full implementation of the `readEntityCollection()` method:**
diff --git a/content/doc/odata4/tutorials/sqo_f/tutorial_sqo_f.md b/content/doc/odata4/tutorials/sqo_f/tutorial_sqo_f.md
index bfaedfa..b86779e 100644
--- a/content/doc/odata4/tutorials/sqo_f/tutorial_sqo_f.md
+++ b/content/doc/odata4/tutorials/sqo_f/tutorial_sqo_f.md
@@ -99,15 +99,15 @@ Key
 
 So the following actions have to be done (The values of the properties are fictitious):
 
-Action                                                        | Result - Type | Result              | Method
---------------------------------------------------------------|---------------|---------------------|------
-1. Get the value of the property “Price”                      | Edm.Double    | 500.00              | visitMember
-2. Determine the Type and value of the literal 2000.00        | Edm.Double    | 2000.00             | visitLiteral
-3. Calculate – 500.00 **lt** 2000                             | Edm.Boolean   | true                | visitBinaryOperator
-4. Get the value of the Property “Description”                | Edm.String    | "Notebook basic..." | visitMember
-5. Determine the type and value of the literal ‘Notebook’     | Edm.String    | “Notebook”          | visitLiteral
-6. Calculate – **contains**(“Notebook Basic…”, “Notebook”)    | Edm.Boolean   | true                | visitMethodCall
-7. Calculate – true **and** true                              | Edm.Boolean   | true                | visitBinaryOperator
+| Action                                                        | Result - Type | Result              | Method
+|---------------------------------------------------------------|---------------|---------------------|------
+| 1. Get the value of the property “Price”                      | Edm.Double    | 500.00              | visitMember
+| 2. Determine the Type and value of the literal 2000.00        | Edm.Double    | 2000.00             | visitLiteral
+| 3. Calculate – 500.00 **lt** 2000                             | Edm.Boolean   | true                | visitBinaryOperator
+| 4. Get the value of the Property “Description”                | Edm.String    | "Notebook basic..." | visitMember
+| 5. Determine the type and value of the literal ‘Notebook’     | Edm.String    | “Notebook”          | visitLiteral
+| 6. Calculate – **contains**(“Notebook Basic…”, “Notebook”)    | Edm.Boolean   | true                | visitMethodCall
+| 7. Calculate – true **and** true                              | Edm.Boolean   | true                | visitBinaryOperator
 
 Olingo uses the vistor pattern to traverse the AST. Each of these actions is mapped to one method of the ExpressionVistor interface. You can see the name of the methods in last column of table 1. As service developers we have to implement this methods but we do not have to take care about calling them. The libaray will call the proper method and we have only to calculate the result.