Skip to content

Commit 456b4ed

Browse files
committed
Update docs - add VocabProperty
1 parent 9d7dbd4 commit 456b4ed

File tree

8 files changed

+91
-74
lines changed

8 files changed

+91
-74
lines changed

.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ EXPOSED_PORT=1026
44

55
# Orion variables
66
ORION_LD_PORT=1026
7-
ORION_LD_VERSION=1.6.0
7+
ORION_LD_VERSION=1.8.0
88

99
# Scorpio variables
1010
SCORPIO_PORT=9090
11-
SCORPIO_VERSION=5.0.2
11+
SCORPIO_VERSION=5.0.5
1212

1313
# Stellio variables
14-
STELLIO_DOCKER_TAG=2.17.0
14+
STELLIO_DOCKER_TAG=2.18.1
1515
STELLIO_PORT=8080
1616
STELLIO_TIMESCALE_POSTGIS=16-2.16.0-3.3
1717

README.ja.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,9 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/create' \
452452
{
453453
"id": "urn:ngsi-ld:TemperatureSensor:002",
454454
"type": "TemperatureSensor",
455-
"category": ["sensor"],
455+
"category": {
456+
"vocab": ["sensor"]
457+
},
456458
"temperature": {
457459
"value": 20,
458460
"unitCode": "CEL"
@@ -461,7 +463,9 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/create' \
461463
{
462464
"id": "urn:ngsi-ld:TemperatureSensor:003",
463465
"type": "TemperatureSensor",
464-
"category": ["sensor" , "actuator"],
466+
"category": {
467+
"vocab": ["sensor" , "actuator"]
468+
},
465469
"temperature": {
466470
"value": 2,
467471
"unitCode": "CEL"
@@ -471,8 +475,8 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/create' \
471475
"id": "urn:ngsi-ld:TemperatureSensor:004",
472476
"type": "TemperatureSensor",
473477
"category": {
474-
"type": "Property",
475-
"value": "sensor"
478+
"type": "VocabProperty",
479+
"vocab": "sensor"
476480
},
477481
"temperature": {
478482
"type": "Property",
@@ -604,7 +608,7 @@ TemperatureSensor `urn:ngsi-ld:TemperatureSensor:001` は _concise_ NGSI-LD と
604608
"category": {
605609
"createdAt": "2020-08-27T14:33:06Z",
606610
"modifiedAt": "2020-08-27T14:33:06Z",
607-
"value": "sensor"
611+
"vocab": "sensor"
608612
},
609613
"temperature": {
610614
"createdAt": "2020-08-27T14:33:06Z",
@@ -1069,7 +1073,7 @@ curl -iX PATCH 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Temperatur
10691073
-H 'Content-Type: application/json' \
10701074
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
10711075
--data-raw '{
1072-
"value": ["sensor", "actuator"]
1076+
"vocab": ["sensor", "actuator"]
10731077
}'
10741078
```
10751079

@@ -1092,7 +1096,7 @@ curl -iX PATCH 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Temperatur
10921096
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
10931097
--data-raw '{
10941098
"category": {
1095-
"value": [
1099+
"vocab": [
10961100
"sensor",
10971101
"actuator"
10981102
]

README.md

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,9 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/create' \
436436
{
437437
"id": "urn:ngsi-ld:TemperatureSensor:002",
438438
"type": "TemperatureSensor",
439-
"category": ["sensor"],
439+
"category": {
440+
"vocab": ["sensor"]
441+
},
440442
"temperature": {
441443
"value": 20,
442444
"unitCode": "CEL"
@@ -445,7 +447,9 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/create' \
445447
{
446448
"id": "urn:ngsi-ld:TemperatureSensor:003",
447449
"type": "TemperatureSensor",
448-
"category": ["sensor" , "actuator"],
450+
"category": {
451+
"vocab": ["sensor" , "actuator"]
452+
},
449453
"temperature": {
450454
"value": 2,
451455
"unitCode": "CEL"
@@ -455,8 +459,8 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/create' \
455459
"id": "urn:ngsi-ld:TemperatureSensor:004",
456460
"type": "TemperatureSensor",
457461
"category": {
458-
"type": "Property",
459-
"value": "sensor"
462+
"type": "VocabProperty",
463+
"vocab": "sensor"
460464
},
461465
"temperature": {
462466
"type": "Property",
@@ -581,7 +585,7 @@ to content negotiation if the `Accept:application/json` had been set). The full
581585
"category": {
582586
"createdAt": "2020-08-27T14:33:06Z",
583587
"modifiedAt": "2020-08-27T14:33:06Z",
584-
"value": "sensor"
588+
"vocab": "sensor"
585589
},
586590
"temperature": {
587591
"createdAt": "2020-08-27T14:33:06Z",
@@ -940,8 +944,12 @@ The response details the selected attributes from the selected entities is retur
940944
"observedAt": "2022-03-01T15:49:57.039Z",
941945
"unitCode": "5K"
942946
},
943-
"phenologicalCondition": "femaleAdult",
944-
"reproductiveCondition": "active",
947+
"phenologicalCondition": {
948+
"vocab": "femaleAdult"
949+
},
950+
"reproductiveCondition": {
951+
"vocab": "active"
952+
},
945953
"name": "Carnation",
946954
"legalID": "M-sow010-Carnation",
947955
"sex": "female",
@@ -979,8 +987,12 @@ The response details the selected attributes from the selected entities is retur
979987
"observedAt": "2022-03-01T15:49:57.287Z",
980988
"unitCode": "5K"
981989
},
982-
"phenologicalCondition": "femaleAdult",
983-
"reproductiveCondition": "inCalf",
990+
"phenologicalCondition": {
991+
"vocab": "femaleAdult"
992+
},
993+
"reproductiveCondition": {
994+
"vocab": "inCalf"
995+
},
984996
"name": "Peach",
985997
"legalID": "M-sow006-Peach",
986998
"sex": "female",
@@ -1027,7 +1039,7 @@ curl -iX PATCH 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Temperatur
10271039
-H 'Content-Type: application/json' \
10281040
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
10291041
--data-raw '{
1030-
"value": ["sensor", "actuator"]
1042+
"vocab": ["sensor", "actuator"]
10311043
}'
10321044
```
10331045

@@ -1048,7 +1060,7 @@ curl -iX PATCH 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Temperatur
10481060
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
10491061
--data-raw '{
10501062
"category": {
1051-
"value": [
1063+
"vocab": [
10521064
"sensor",
10531065
"actuator"
10541066
]
@@ -1073,18 +1085,22 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert?options=
10731085
{
10741086
"id": "urn:ngsi-ld:TemperatureSensor:003",
10751087
"type": "TemperatureSensor",
1076-
"category": [
1077-
"actuator",
1078-
"sensor"
1079-
]
1088+
"category": {
1089+
"vocab": [
1090+
"actuator",
1091+
"sensor"
1092+
]
1093+
}
10801094
},
10811095
{
10821096
"id": "urn:ngsi-ld:TemperatureSensor:004",
10831097
"type": "TemperatureSensor",
1084-
"category": [
1085-
"actuator",
1086-
"sensor"
1087-
]
1098+
"category": {
1099+
"vocab": [
1100+
"actuator",
1101+
"sensor"
1102+
]
1103+
}
10881104
}
10891105
]'
10901106
```
@@ -1110,10 +1126,12 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/update?options=
11101126
{
11111127
"id": "urn:ngsi-ld:TemperatureSensor:003",
11121128
"type": "TemperatureSensor",
1113-
"category":[
1114-
"actuator",
1115-
"sensor"
1116-
]
1129+
"category": {
1130+
"vocab": [
1131+
"actuator",
1132+
"sensor"
1133+
]
1134+
}
11171135
},
11181136
{
11191137
"id": "urn:ngsi-ld:TemperatureSensor:004",

docker-compose/stellio.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@ services:
44
hostname: stellio
55
labels:
66
org.fiware: 'tutorial'
7-
image: stellio/stellio-api-gateway:${STELLIO_DOCKER_TAG}
7+
image: quay.io/fiware/stellio-api-gateway:${STELLIO_DOCKER_TAG}
88
environment:
99
- SPRING_PROFILES_ACTIVE=docker
1010
ports:
11-
- ${EXPOSED_PORT:-1026}:${STELLIO_PORT:-9090}
11+
- "${EXPOSED_PORT}:${STELLIO_PORT}"
12+
networks:
13+
- default
1214

1315
search-service:
1416
container_name: stellio-search-service
1517
labels:
1618
org.fiware: 'tutorial'
17-
image: stellio/stellio-search-service:${STELLIO_DOCKER_TAG}
19+
image: quay.io/fiware/stellio-search-service:${STELLIO_DOCKER_TAG}
1820
environment:
1921
- SPRING_PROFILES_ACTIVE=docker
2022
- SPRING_R2DBC_URL=r2dbc:postgresql://postgres/stellio_search
@@ -32,6 +34,8 @@ services:
3234
- APPLICATION_PAGINATION_LIMIT-MAX=1000
3335
ports:
3436
- 8083:8083
37+
networks:
38+
- default
3539
restart: always
3640
depends_on:
3741
postgres:
@@ -43,7 +47,7 @@ services:
4347
container_name: stellio-subscription-service
4448
labels:
4549
org.fiware: 'tutorial'
46-
image: stellio/stellio-subscription-service:${STELLIO_DOCKER_TAG}
50+
image: quay.io/fiware/stellio-subscription-service:${STELLIO_DOCKER_TAG}
4751
environment:
4852
- SPRING_PROFILES_ACTIVE=docker
4953
- SPRING_R2DBC_URL=r2dbc:postgresql://postgres/stellio_subscription
@@ -61,6 +65,8 @@ services:
6165
- APPLICATION_PAGINATION_LIMIT-MAX=1000
6266
ports:
6367
- 8085:8084
68+
networks:
69+
- default
6470
restart: always
6571
depends_on:
6672
postgres:
@@ -71,10 +77,12 @@ services:
7177
kafka:
7278
labels:
7379
org.fiware: 'tutorial'
74-
image: confluentinc/cp-kafka:7.3.1
80+
image: confluentinc/cp-kafka:7.6.0
7581
container_name: kafka
7682
ports:
7783
- 29092:29092
84+
networks:
85+
- default
7886
restart: always
7987
environment:
8088
KAFKA_BROKER_ID: 1
@@ -88,17 +96,14 @@ services:
8896
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
8997
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
9098
KAFKA_LOG4J_ROOT_LOGLEVEL: INFO
91-
volumes:
92-
- ./stellio/kafka/update_run.sh:/tmp/update_run.sh
93-
command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'"
99+
CLUSTER_ID: NjExODZhMWVjMzllMTFlZm
94100

95101

96102
# Databases
97103
postgres:
98104
labels:
99105
org.fiware: 'tutorial'
100106
image: stellio/stellio-timescale-postgis:${STELLIO_TIMESCALE_POSTGIS}
101-
102107
hostname: postgres
103108
container_name: db-postgres
104109
environment:
@@ -109,6 +114,8 @@ services:
109114
- ACCEPT_TIMESCALE_TUNING=TRUE
110115
ports:
111116
- 5432:5432
117+
networks:
118+
- default
112119
volumes:
113120
- postgres-db:/var/lib/postgresql
114121
healthcheck:
@@ -117,7 +124,6 @@ services:
117124
timeout: 5s
118125
retries: 20
119126
start_period: 10s
120-
121127
# IoT-Agent connects to the Stellio Broker
122128
iot-agent:
123129
environment:

docker-compose/stellio/kafka/update_run.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

import-data

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ EOF
2020

2121
function addCondition()
2222
{
23-
animals="$animals \"sex\": { \"type\": \"VocabularyProperty\", \"vocab\": \"$1\"},"
23+
animals="$animals \"sex\": { \"type\": \"VocabProperty\", \"vocab\": \"$1\"},"
2424
if [ "$1" == "male" ]; then
25-
animals="$animals \"phenologicalCondition\": { \"type\": \"VocabularyProperty\", \"vocab\": \"maleAdult\"},";
26-
animals="$animals \"reproductiveCondition\": { \"type\": \"VocabularyProperty\", \"vocab\": \"active\"},";
25+
animals="$animals \"phenologicalCondition\": { \"type\": \"VocabProperty\", \"vocab\": \"maleAdult\"},";
26+
animals="$animals \"reproductiveCondition\": { \"type\": \"VocabProperty\", \"vocab\": \"active\"},";
2727
else
28-
animals="$animals \"phenologicalCondition\": { \"type\": \"VocabularyProperty\", \"vocab\": \"femaleAdult\"},";
28+
animals="$animals \"phenologicalCondition\": { \"type\": \"VocabProperty\", \"vocab\": \"femaleAdult\"},";
2929

3030
if [ $((count%11)) -eq 0 ]; then
31-
animals="$animals \"reproductiveCondition\": { \"type\": \"VocabularyProperty\", \"vocab\": \"inactive\"},";
31+
animals="$animals \"reproductiveCondition\": { \"type\": \"VocabProperty\", \"vocab\": \"inactive\"},";
3232
elif [ $((count%7)) -eq 0 ]; then
33-
animals="$animals \"reproductiveCondition\": { \"type\": \"VocabularyProperty\", \"vocab\": \"inHeat\"},";
33+
animals="$animals \"reproductiveCondition\": { \"type\": \"VocabProperty\", \"vocab\": \"inHeat\"},";
3434
elif [ $((count%5)) -eq 0 ]; then
35-
animals="$animals \"reproductiveCondition\": { \"type\": \"VocabularyProperty\", \"vocab\": \"inCalf\"},";
35+
animals="$animals \"reproductiveCondition\": { \"type\": \"VocabProperty\", \"vocab\": \"inCalf\"},";
3636
else
37-
animals="$animals \"reproductiveCondition\": { \"type\": \"VocabularyProperty\", \"vocab\": \"active\"},";
37+
animals="$animals \"reproductiveCondition\": { \"type\": \"VocabProperty\", \"vocab\": \"active\"},";
3838
fi
3939
fi
4040
}
@@ -117,7 +117,7 @@ curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOper
117117
{
118118
"id": "urn:ngsi-ld:Building:farm001",
119119
"type": "Building",
120-
"category": {"type": "Property", "value": ["farm"]},
120+
"category": {"type": "VocabProperty", "vocab": ["farm"]},
121121
"address": {
122122
"type": "Property",
123123
"value": { "streetAddress": "Großer Stern 1", "addressRegion": "Berlin", "addressLocality": "Tiergarten", "postalCode": "10557"},
@@ -133,7 +133,7 @@ curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOper
133133
{
134134
"id": "urn:ngsi-ld:Building:barn002",
135135
"type": "Building",
136-
"category": {"type": "Property", "value": ["barn"]},
136+
"category": {"type": "VocabProperty", "vocab": ["barn"]},
137137
"address": {
138138
"type": "Property",
139139
"value": { "streetAddress": "Straße des 17. Juni", "addressRegion": "Berlin", "addressLocality": "Tiergarten", "postalCode": "10557"},
@@ -149,7 +149,7 @@ curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOper
149149
{
150150
"id": "urn:ngsi-ld:Building:tower003",
151151
"type": "Building",
152-
"category": {"type": "Property", "value": ["water_tower"]},
152+
"category": {"type": "VocabProperty", "vocab": ["water_tower"]},
153153
"address": {
154154
"type": "Property",
155155
"value": { "streetAddress": "John-Foster-Dulles-Allee", "addressRegion": "Berlin", "addressLocality": "Tiergarten", "postalCode": "10557"},
@@ -165,7 +165,7 @@ curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOper
165165
{
166166
"id": "urn:ngsi-ld:Building:farm002",
167167
"type": "Building",
168-
"category": {"type": "Property", "value": ["farm"]},
168+
"category": {"type": "VocabProperty", "vocab": ["farm"]},
169169
"address": {
170170
"type": "Property",
171171
"value": { "streetAddress": "Hardenbergplatz 8", "addressRegion": "Berlin", "addressLocality": "Tiergarten", "postalCode": "10787"},

0 commit comments

Comments
 (0)