From 7394c64dfb89cb77e2b45a8dc8800a7ca4eebc75 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Mon, 18 Dec 2023 15:33:00 +0100 Subject: [PATCH] Add Notes --- README.ja.md | 24 ++++++++++++------------ README.md | 30 ++++++++++++++++-------------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/README.ja.md b/README.ja.md index 72ab3e3..52316e2 100644 --- a/README.ja.md +++ b/README.ja.md @@ -220,7 +220,7 @@ git checkout NGSI-LD さまざまなデバイスを区別するために、各温度センサには `type=TemperatureSensor` が割り当てられています。`category` などの実際のプロパティは、各デバイスにプロパティとして追加されています。 -#### :one: リクエスト: +#### 1️⃣ リクエスト: ```console curl -X POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \ @@ -257,7 +257,7 @@ curl -X POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \ 同様に、`type=FillingLevelSensor` を使用して一連の **FillingLevelSensors** エンティティを作成できます。 -#### :two: リクエスト: +#### 2️⃣ リクエスト: ```console curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \ @@ -298,7 +298,7 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \ デバイス情報は、`/ngsi-ld/v1/entities` エンドポイントで GET リクエストを行うことでリクエストできます。たとえば、 デバイスのコンテキスト・データを返すためです。 -#### :three: リクエスト: +#### 3️⃣ リクエスト: ```console curl -X GET 'http://localhost:1026/ngsi-ld/v1/entities/?type=TemperatureSensor,FillingLevelSensor&options=keyValues' \ @@ -348,7 +348,7 @@ curl -X GET 'http://localhost:1026/ngsi-ld/v1/entities/?type=TemperatureSensor,F URN は、標準形式に従います: `urn:ngsi-ld::` -#### :four: リクエスト: +#### 4️⃣ リクエスト: 次のリクエストは、6つのデバイスを `urn:ngsi-ld:Building:farm001`, `urn:ngsi-ld:Building:barn002` および `urn:ngsi-ld:Building:farm002` に6つのデバイスを関連付けます。 @@ -395,7 +395,7 @@ curl -G -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \ これで、デバイス情報が再度リクエストされると、レスポンスが変更され、前の手順で追加された新しいプロパティ `controlledAsset`が含まれます。 -#### :five: リクエスト: +#### 5️⃣ リクエスト: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor001' \ @@ -431,7 +431,7 @@ curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Temperatu `options=keyValues` 設定を使用して、既知の **Device** エンティティから属性リレーションシップ情報を取得するように リクエストすることもできます。 -#### :six: リクエスト: +#### 6️⃣ リクエスト: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \ @@ -460,7 +460,7 @@ curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Temperatu 親から子への読み取りは、次のクエリを使用して実行できます: -#### :seven: リクエスト: +#### 7️⃣ リクエスト: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities' \ @@ -493,7 +493,7 @@ curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities' \ 平易な英語では、これは "`urn:ngsi-ld:Building:farm001` に2つのデバイスがあります" と解釈できます。 リクエストは、`count=true` を使用して変更でき、基準を満たすエンティティの数を返します。 -#### :eight: リクエスト: +#### 8️⃣ リクエスト: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities' \ @@ -529,7 +529,7 @@ NGSILD-Results-Count: 2 タスクの割り当ては、リレーションシップ情報とその他の追加プロパティ (`description` および `status` など) を保持する エンティティを作成するだけで実行できます。 -#### :nine: リクエスト: +#### 9️⃣ リクエスト: ```console curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/entities/' \ @@ -557,7 +557,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/entities/' \ "フィールド `urn:ngsi-ld:PartField:002` でアクティビティが割り当てられているワーカーはどれですか?" というクエリを実行できます。 -#### :one::zero: リクエスト: +#### 1️⃣0️⃣ リクエスト: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities' \ @@ -584,7 +584,7 @@ curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities' \ 同様に、次に示されているようにリクエストを変更することによって、"どのフィールドが `urn:ngsi-ld:Herbicide:001` を使用して処理されるか?” をリクエストできます。 -#### :one::one: リクエスト: +#### 1️⃣1️⃣ リクエスト: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities' \ @@ -624,7 +624,7 @@ _Properties-of-Properties_ および _Relationships of Properties_ はメタデ あります。たとえば、納屋 (barn) のセンサの温度測定値は、納屋自体の温度測定値でもあります。ダミーの読み取り値は すでに `urn:ngsi-ld:Building:farm001` エンティティに追加されており、GET リクエストで取得できます: -#### :one::two: リクエスト: +#### 1️⃣2️⃣ リクエスト: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:farm001' \ diff --git a/README.md b/README.md index 27cd051..9c3f67f 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,8 @@ liable to change. An organic **Fertilizer**, such as a fish hydrolysate, could c and the `fillingLevel` of the barn could be reduced and so on. An organic **Fertilizer** such as a fish hydrolysate could change its `formula`, hay could be sold and the `fillingLevel` of the barn could be reduced and so on. -> **Note** this tutorial uses the following typographic styling : +> [!NOTE] +> This tutorial uses the following typographic styling : > > - Entity types have been made **bold text**. > - Data attributes are written in `monospace text`. @@ -182,7 +183,8 @@ git checkout NGSI-LD This command will also import seed data (**Building**, **Person**, **TemperatureSensor**, **FillingLevelSensor**, **Herbicide** and **PartField**) on startup. -> :information_source: **Note:** If you want to clean up and start over again you can do so with the following command: +> [!NOTE] +> If you want to clean up and start over again you can do so with the following command: > > ```console > ./services stop @@ -201,7 +203,7 @@ create new entities if they are not present and overwrite existing entities if t To differentiate different **Device**, each temperature sensor has been assigned `type=TemperatureSensor`. Real-world properties such as `category` have been added as properties to each device. -#### :one: Request: +#### 1️⃣ Request: ```console curl -X POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \ @@ -238,7 +240,7 @@ curl -X POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \ Similarly, we can create a series of **FillingLevelSensors** entities by using the `type=FillingLevelSensor`. -#### :two: Request: +#### 2️⃣ Request: ```console curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \ @@ -280,7 +282,7 @@ is that each `id` is a URN follows a standard format: `urn:ngsi-ld: Device information can be requested by making a GET request on the `/ngsi-ld/v1/entities` endpoint. For example to return the context data of the devices -#### :three: Request: +#### 3️⃣ Request: ```console curl -X GET 'http://localhost:1026/ngsi-ld/v1/entities/?type=TemperatureSensor,FillingLevelSensor&options=keyValues' \ @@ -329,7 +331,7 @@ and the value of the `controlledAsset` attribute corresponds to a URN associated The URN follows a standard format: `urn:ngsi-ld::` -#### :four: Request: +#### 4️⃣ Request: The following request associates six devices to `urn:ngsi-ld:Building:farm001`, `urn:ngsi-ld:Building:barn002` and `urn:ngsi-ld:Building:farm002` @@ -393,7 +395,7 @@ curl -L 'http://localhost:1026/ngsi-ld/v1/entityOperations/update?options=update Now when the devcie information is requested again, the response has changed and includes a new property `controlledAsset`, which has been added in the previous step. -#### :five: Request: +#### 5️⃣ Request: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \ @@ -425,7 +427,7 @@ The updated response including the `controlledAsset` attribute is shown below: We can also make a request to retrieve the `controlledAsset` attribute relationship information from a known **Device** entity by using the `options=keyValues` setting -#### :six: Request: +#### 6️⃣ Request: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \ @@ -452,7 +454,7 @@ This can be interpreted as _"I am making sensor readings inside the **Building** Reading from a parent to a child can be done using the following query: -#### :seven: Request: +#### 7️⃣ Request: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities' \ @@ -485,7 +487,7 @@ response is a JSON array as shown. In plain English, this can be interpreted as _"There are two devices in `urn:ngsi-ld:Building:farm001`"_. The request can be altered use the `count=true` to return the number of entities which fulfill the criteria. -#### :eight: Request: +#### 8️⃣ Request: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities' \ @@ -519,7 +521,7 @@ new data entity **Task** which exists to associate data from other entities. It Assigning a task is simply done by creating an entity holding the relationship information and any other additional properties (such as `description` and `status`) -#### :nine: Request: +#### 9️⃣ Request: ```console curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/entities/' \ @@ -544,7 +546,7 @@ When reading from a bridge table entity, the `type` of the entity must be known. After creating at least one **Task** entity we can query _Which workers are assigned activities in field `urn:ngsi-ld:PartField:002`?_ by making the following request -#### :one::zero: Request: +#### 1️⃣0️⃣ Request: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities' \ @@ -570,7 +572,7 @@ curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities' \ Similarly we can request _Which fields are treated using `urn:ngsi-ld:Herbicide:001`?_ by altering the request as shown: -#### :one::one: Request: +#### 1️⃣1️⃣ Request: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities' \ @@ -607,7 +609,7 @@ this data into another entity. For example, the temperature reading of a sensor reading of the barn itself. A dummy reading has already been added into the `urn:ngsi-ld:Building:farm001` Entity and can be retrieved with a GET request: -#### :one::two: Request: +#### 1️⃣2️⃣ Request: ```console curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:farm001' \