Skip to content

Commit

Permalink
Add Notes
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Dec 18, 2023
1 parent 798dea6 commit 7394c64
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
24 changes: 12 additions & 12 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' \
Expand Down Expand Up @@ -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' \
Expand Down Expand Up @@ -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' \
Expand Down Expand Up @@ -348,7 +348,7 @@ curl -X GET 'http://localhost:1026/ngsi-ld/v1/entities/?type=TemperatureSensor,F

URN は、標準形式に従います: `urn:ngsi-ld:<entity-type>:<entity-id>`

#### :four: リクエスト:
#### 4️⃣ リクエスト:

次のリクエストは、6つのデバイスを `urn:ngsi-ld:Building:farm001`, `urn:ngsi-ld:Building:barn002` および
`urn:ngsi-ld:Building:farm002` に6つのデバイスを関連付けます。
Expand Down Expand Up @@ -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' \
Expand Down Expand Up @@ -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' \
Expand Down Expand Up @@ -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' \
Expand Down Expand Up @@ -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' \
Expand Down Expand Up @@ -529,7 +529,7 @@ NGSILD-Results-Count: 2
タスクの割り当ては、リレーションシップ情報とその他の追加プロパティ (`description` および `status` など) を保持する
エンティティを作成するだけで実行できます。

#### :nine: リクエスト:
#### 9️⃣ リクエスト:

```console
curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/entities/' \
Expand Down Expand Up @@ -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' \
Expand All @@ -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' \
Expand Down Expand Up @@ -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' \
Expand Down
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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
Expand All @@ -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' \
Expand Down Expand Up @@ -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' \
Expand Down Expand Up @@ -280,7 +282,7 @@ is that each `id` is a URN follows a standard format: `urn:ngsi-ld:<entity-type>
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' \
Expand Down Expand Up @@ -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:<entity-type>:<entity-id>`

#### :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`
Expand Down Expand Up @@ -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' \
Expand Down Expand Up @@ -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' \
Expand All @@ -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' \
Expand Down Expand Up @@ -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' \
Expand Down Expand Up @@ -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/' \
Expand All @@ -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' \
Expand All @@ -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' \
Expand Down Expand Up @@ -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' \
Expand Down

0 comments on commit 7394c64

Please sign in to comment.