Skip to content

Commit ef67230

Browse files
committed
Prettify
1 parent 0b43f33 commit ef67230

1 file changed

Lines changed: 24 additions & 35 deletions

File tree

README.md

Lines changed: 24 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ The tutorial uses [cUrl](https://ec.haxx.se/) commands throughout, but is also a
2525
- このチュートリアルは[日本語](README.ja.md)でもご覧いただけます。
2626

2727
> [!NOTE]
28-
> This tutorial is designed for **NGSI-v2** developers looking to switch or upgrade systems to
29-
> **NGSI-LD**, if you are building a linked data system from scratch or you are not already familiar with **NGSI-v2** then
30-
> it is recommmended that you look directly at the
31-
[NGSI-LD developers tutorial](https://ngsi-ld-tutorials.readthedocs.io/) documentation.
28+
>
29+
> This tutorial is designed for **NGSI-v2** developers looking to switch or upgrade systems to **NGSI-LD**, if you are
30+
> building a linked data system from scratch or you are not already familiar with **NGSI-v2** then it is recommmended
31+
> that you look directly at the [NGSI-LD developers tutorial](https://ngsi-ld-tutorials.readthedocs.io/) documentation.
3232
3333
## Contents
3434

@@ -187,6 +187,7 @@ git checkout NGSI-v2
187187
```
188188

189189
> [!NOTE]
190+
>
190191
> If you want to clean up and start over again you can do so with the following command:
191192
>
192193
> ```
@@ -409,17 +410,18 @@ data is obtained from the external registered sources.
409410
- A **redirect** Context Source Registration also specifies that the registered context data is held in a location
410411
external to the Context Broker, but potentially multiple distinct redirect registrations can apply at the same time.
411412

412-
413413
> [!NOTE]
414-
> Broadly speaking, the default mode of registration in NGSI-v2 can be said to be the equivalent of an **exclusive** registration in NGSI-LD.
415-
> Examples of the other NGSI-LD registration modes used in NGSI-LD data spacesa and _systems-of-systems_ can be found in a separate,
414+
>
415+
> Broadly speaking, the default mode of registration in NGSI-v2 can be said to be the equivalent of an **exclusive**
416+
> registration in NGSI-LD. Examples of the other NGSI-LD registration modes used in NGSI-LD data spacesa and
417+
> _systems-of-systems_ can be found in a separate,
416418
> [dedicated tutorial](https://github.com/FIWARE/tutorials.Context-Providers/tree/NGSI-LD).
417419
>
418-
> The **inclusive**, **auxiliary**, and **redirect** modes of NGSI-LD registration have no direct equivalent in NGSI-v2. However, it remains
419-
> possible to attach NGSI-v2 data sources into an NGSI-LD data space using a proxy serving a fixed `@context` - this is described in more detail in a
420+
> The **inclusive**, **auxiliary**, and **redirect** modes of NGSI-LD registration have no direct equivalent in NGSI-v2.
421+
> However, it remains possible to attach NGSI-v2 data sources into an NGSI-LD data space using a proxy serving a fixed
422+
> `@context` - this is described in more detail in a
420423
> [separate tutorial](https://github.com/FIWARE/tutorials.Linked-Data/tree/NGSI-LD)
421424
422-
423425
### Accepted Operations
424426

425427
**NGSI-LD** also defines groups of operations that are allowed on the registrant. The default group is called
@@ -534,9 +536,10 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/csourceRegistrations/' \
534536
```
535537

536538
> [!NOTE]
537-
> Note that `propertyNames` and `relationshipNames` have replaced the older `properties` attribute that was is
538-
> defined in the 1.1.1 NGSI-LD core context. It was replaced in order to offer full GeoJSON-LD support. Your context
539-
> broker may or may not support the updated core context
539+
>
540+
> Note that `propertyNames` and `relationshipNames` have replaced the older `properties` attribute that was is defined
541+
> in the 1.1.1 NGSI-LD core context. It was replaced in order to offer full GeoJSON-LD support. Your context broker may
542+
> or may not support the updated core context
540543
541544
### Read Registration Details
542545

@@ -572,21 +575,17 @@ returned, along with the `@context`.
572575
"type": "Building"
573576
}
574577
],
575-
"properties": [
576-
"tweets"
577-
]
578+
"properties": ["tweets"]
578579
}
579580
],
580-
"contextSourceInfo":[
581+
"contextSourceInfo": [
581582
{
582583
"key": "jsonldContext",
583584
"value": "http://context/user-context.jsonld"
584585
}
585586
],
586587
"mode": "exclusive",
587-
"operations": [
588-
"updateOps", "retrieveOps"
589-
]
588+
"operations": ["updateOps", "retrieveOps"]
590589
}
591590
]
592591
```
@@ -622,11 +621,7 @@ The response now holds an additional `tweets` Property, which returns the values
622621
"type": "Building",
623622
"furniture": {
624623
"type": "Relationship",
625-
"object": [
626-
"urn:ngsi-ld:Shelf:unit001",
627-
"urn:ngsi-ld:Shelf:unit002",
628-
"urn:ngsi-ld:Shelf:unit003"
629-
]
624+
"object": ["urn:ngsi-ld:Shelf:unit001", "urn:ngsi-ld:Shelf:unit002", "urn:ngsi-ld:Shelf:unit003"]
630625
},
631626
"address": {
632627
"type": "Property",
@@ -653,10 +648,7 @@ The response now holds an additional `tweets` Property, which returns the values
653648
"type": "GeoProperty",
654649
"value": {
655650
"type": "Point",
656-
"coordinates": [
657-
13.3986,
658-
52.5547
659-
]
651+
"coordinates": [13.3986, 52.5547]
660652
}
661653
},
662654
"tweets": {
@@ -695,7 +687,7 @@ in this case a request is merely returning the full `tweets` attribute.
695687

696688
The same request is made by the context broker itself when querying for registered attributes
697689

698-
#### 7️⃣ Request:
690+
#### 7️⃣ Request:
699691

700692
```console
701693
curl -L -X GET 'http://localhost:3000/static/tweets/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001?attrs=tweets' \
@@ -733,7 +725,7 @@ the response resembles any standard NGSI-LD request.
733725
For a read-write interface it is also possible to amend context data by making a PATCH request to the relevant
734726
`ngsi-ld/v1/entities/<entity-id>/attrs` endpoint.
735727

736-
#### 8️⃣ Request:
728+
#### 8️⃣ Request:
737729

738730
```console
739731
curl -L -X PATCH 'http://localhost:3000/static/tweets/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001/attrs' \
@@ -833,10 +825,7 @@ and then forwarded to the context provider endpoint.
833825
"@context": "http://context/user-context.jsonld",
834826
"id": "urn:ngsi-ld:Building:store001",
835827
"type": "Building",
836-
"tweets": [
837-
"This must be Thursday",
838-
"I never could get the hang of Thursdays."
839-
]
828+
"tweets": ["This must be Thursday", "I never could get the hang of Thursdays."]
840829
}
841830
```
842831

0 commit comments

Comments
 (0)