JSON Schema in RDF

2020.10.02 15:44

졸리운_곰 조회 수:117

JSON Schema in RDF

Thing Description (TD) Ontology

W3C Editor's Draft 

This version:
https://www.w3.org/2019/wot/td
Latest published version:
https://www.w3.org/TR/wot-td-ontology/
Latest editor's draft:
https://www.w3.org/2019/wot/td
Editors:
Victor Charpenay (Siemens AG)
Maxime Lefrançois (École des Mines de Saint-Étienne)
María Poveda Villalón (Universidad Politécnica de Madrid)
Sebastian Käbisch (Siemens AG)

Abstract

The Thing Description (TD) ontology is an RDF axiomatization of the TD information model, one of the building blocks of the Web of Things (WoT). Besides providing an alternative to the standard JSON representation format for TD documents, the TD ontology can also be used to process contextual information on Things and for alignments with other WoT-related ontologies.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.

Validation of the document by the Working Group is expected by the end of June 2019.

Publication as an Editor's Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the W3C Patent PolicyW3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

This document is governed by the 1 March 2019 W3C Process Document.

 

1. Introduction

The TD ontology is an idiomatic RDF axiomatization of the TD information model [WOT-THING-DESCRIPTION], which can be used to describe WoT things and their interaction affordances. The TD ontology imports the hypermedia controls ontology. However, although the TD information model also includes terms for data schemas and security configurations, the TD ontology does not force the use of the corresponding JSON schema and WoT security vocabularies. Other schema languages like SHACL [shacl] can thus be leveraged to describe WoT Things.

2. Terminology

The fundamental WoT terminology such as ThingConsumerThing Description (TD), Interaction ModelInteraction AffordancePropertyActionEventProtocol BindingServient, etc. is defined in Section 3 of the WoT Architecture specification [WOT-ARCHITECTURE].

The Thing Description terminology such as TD Information ModelTD DocumentTerm (Vocabulary Term), etc. is defined in Section 3 of the WoT Thing Description specification [WOT-THING-DESCRIPTION].

3. Axiomatization

3.1 Classes

3.1.1 ArraySchema

IRI: https://www.w3.org/2019/wot/json-schema#ArraySchema

Metadata describing data of type array. This subclass is indicated by the value array assigned to type in DataSchema instances.
Sub-class of jsonschema:DataSchema
In the domain of jsonschema:items
jsonschema:maxItems
jsonschema:minItems

3.1.2 BooleanSchema

IRI: https://www.w3.org/2019/wot/json-schema#BooleanSchema

Metadata describing data of type boolean. This subclass is indicated by the value boolean assigned to type in DataSchema instances.
Sub-class of jsonschema:DataSchema

3.1.3 DataSchema

IRI: https://www.w3.org/2019/wot/json-schema#DataSchema

Metadata that describes the data format used. It can be used for validation.
Super-class of jsonschema:ArraySchema
jsonschema:BooleanSchema
jsonschema:IntegerSchema
jsonschema:NullSchema
jsonschema:NumberSchema
jsonschema:ObjectSchema
jsonschema:StringSchema
In the domain of jsonschema:allOf
jsonschema:anyOf
jsonschema:const
jsonschema:enum
jsonschema:oneOf
jsonschema:propertyName
jsonschema:readOnly
jsonschema:writeOnly
In the range of jsonschema:allOf
jsonschema:anyOf
jsonschema:items
jsonschema:oneOf
jsonschema:properties

3.1.4 IntegerSchema

IRI: https://www.w3.org/2019/wot/json-schema#IntegerSchema

Metadata describing data of type integer. This subclass is indicated by the value integer assigned to type in DataSchema instances.
Sub-class of jsonschema:DataSchema
In the domain of jsonschema:maximum
jsonschema:minimum

3.1.5 NullSchema

IRI: https://www.w3.org/2019/wot/json-schema#NullSchema

Metadata describing data of type null. This subclass is indicated by the value null assigned to type in DataSchema instances. This Subclass describes only one acceptable value, namely null. It can be used as part of a oneOf declaration, where it is used to indicate, that the data can also be null.
Sub-class of jsonschema:DataSchema

3.1.6 NumberSchema

IRI: https://www.w3.org/2019/wot/json-schema#NumberSchema

Metadata describing data of type number. This subclass is indicated by the value number assigned to type in DataSchema instances.
Sub-class of jsonschema:DataSchema
In the domain of jsonschema:maximum
jsonschema:minimum

3.1.7 ObjectSchema

IRI: https://www.w3.org/2019/wot/json-schema#ObjectSchema

Metadata describing data of type object. This subclass is indicated by the value object assigned to type in DataSchema instances.
Sub-class of jsonschema:DataSchema
In the domain of jsonschema:properties
jsonschema:required

3.1.8 StringSchema

IRI: https://www.w3.org/2019/wot/json-schema#StringSchema

Metadata describing data of type string. This subclass is indicated by the value string assigned to type in DataSchema instances.
Sub-class of jsonschema:DataSchema
In the domain of jsonschema:format

3.2 Object Properties

3.2.1 allOf

IRI: https://www.w3.org/2019/wot/json-schema#allOf

Used to ensure that the data is valid against all of the specified schemas in the array.
Domain includes jsonschema:DataSchema
Range includes jsonschema:DataSchema

3.2.2 anyOf

IRI: https://www.w3.org/2019/wot/json-schema#anyOf

Used to ensure that the data is valid against any of the specified schemas in the array.
Domain includes jsonschema:DataSchema
Range includes jsonschema:DataSchema

3.2.3 items

IRI: https://www.w3.org/2019/wot/json-schema#items

Used to define the characteristics of an array.
Domain includes jsonschema:ArraySchema
Range includes jsonschema:DataSchema

3.2.4 oneOf

IRI: https://www.w3.org/2019/wot/json-schema#oneOf

Used to ensure that the data is valid against exactly one of the specified schemas in the array.
Domain includes jsonschema:DataSchema
Range includes jsonschema:DataSchema

3.2.5 properties

IRI: https://www.w3.org/2019/wot/json-schema#properties

Data schema nested definitions
Domain includes jsonschema:ObjectSchema
Range includes jsonschema:DataSchema

3.3 Datatype Properties

3.3.1 const

IRI: https://www.w3.org/2019/wot/json-schema#const

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

Provides a constant value.
Domain includes jsonschema:DataSchema

3.3.2 enum

IRI: https://www.w3.org/2019/wot/json-schema#enum

Restricted set of values provided as an array.
Domain includes jsonschema:DataSchema

3.3.3 format

IRI: https://www.w3.org/2019/wot/json-schema#format

Allows validation based on a format pattern such as "date-time", "email", "uri", etc.
Domain includes jsonschema:StringSchema

3.3.4 maxItems

IRI: https://www.w3.org/2019/wot/json-schema#maxItems

Defines the maximum number of items that have to be in the array.
Domain includes jsonschema:ArraySchema

3.3.5 maximum

IRI: https://www.w3.org/2019/wot/json-schema#maximum

Specifies a maximum numeric value. Only applicable for associated number or integer types.
Domain includes jsonschema:IntegerSchema
jsonschema:NumberSchema

3.3.6 minItems

IRI: https://www.w3.org/2019/wot/json-schema#minItems

Defines the minimum number of items that have to be in the array.
Domain includes jsonschema:ArraySchema

3.3.7 minimum

IRI: https://www.w3.org/2019/wot/json-schema#minimum

Specifies a minimum numeric value. Only applicable for associated number or integer types.
Domain includes jsonschema:IntegerSchema
jsonschema:NumberSchema

3.3.8 propertyName

IRI: https://www.w3.org/2019/wot/json-schema#propertyName

Used to store the indexing name in the parent object when this schema appears as a property of an object schema.
Domain includes jsonschema:DataSchema

3.3.9 readOnly

IRI: https://www.w3.org/2019/wot/json-schema#readOnly

Boolean value that is a hint to indicate whether a property interaction / value is read only (=true) or not (=false)
Domain includes jsonschema:DataSchema

3.3.10 required

IRI: https://www.w3.org/2019/wot/json-schema#required

Defines which members of the object type are mandatory.
Domain includes jsonschema:ObjectSchema

3.3.11 writeOnly

IRI: https://www.w3.org/2019/wot/json-schema#writeOnly

Boolean value that is a hint to indicate whether a property interaction / value is write only (=true) or not (=false)
Domain includes jsonschema:DataSchema

4. Alignments

The TD ontology shares commonalities with other WoT-related vocabularies, in particular with SOSA [vocab-ssn] and schema.org. Alignments between these vocabularies are provided in a human-readable way in the following.

4.1 SOSA

All alignments with SOSA are also available here in OWL: td-sosa.ttl.

Alignment of td:Thing with SOSA:

Sub-Class Super-Class
td:Thing sosa:Sensor or
sosa:Actuator or
sosa:Platform or
sosa:FeatureOfInterest
td:Thing and
sosa:FeatureOfInterest
ssn:hasProperty some (
(sosa:isObservedBy some sosa:Sensor) or
(sosa:isActedOnBy some sosa:Actuator)
)
td:Thing and
sosa:Sensor
sosa:observes some
sosa:ObservableProperty
td:Thing and
sosa:Actuator
sosa:actsOnProperty some
sosa:ActuatableProperty
td:Thing and
sosa:Platform
sosa:hosts some (
(
sosa:Sensor and
sosa:observes some
sosa:ObservableProperty
) or (
sosa:Actuator and
sosa:actsOnProperty some
sosa:ActuatableProperty
)
)

Alignment of td:InteractionAffordance with SOSA:

Sub-Class Super-Class
td:PropertyAffordance and
td:hasForm some
hctl:hasOperationType value
td:readProperty
ssn:forProperty some sosa:ObservableProperty
td:PropertyAffordance and
td:hasForm some
hctl:hasOperationType value
td:writeProperty
ssn:forProperty some sosa:ActuatableProperty
td:ActionAffordance ssn:forProperty some
sosa:ActuatableProperty
td:EventAffordance ssn:forProperty some
sosa:ObservableProperty

4.2 Schema.org

The alignments with schema.org's actions are also available here in OWL: td-sdo.ttl.

Sub-Class Super-Class
td:InteractionAffordance schema:Action and
schema:actionStatus value schema:PotentialActionStatus
Sub-Property Super-Property
td:hasInteractionAffordance schema:potentialAction

5. Usage Examples

5.1 Thing Description JSON-LD 1.1 Instance to RDF Dataset

The following example shows a TD instance from Example 1 Thing Description specification [WOT-THING-DESCRIPTION] in JSON-LD 1.1 (JSON-LD 1.1 tab) and in a RDF dataset (RDF tab).

The RDF dataset contains the corresponding Thing Description IRIs as defined in this document. This IRI mapping is provided by the Thing Description context file https://www.w3.org/2019/wot/td/v1. For instance, the field actions is transformed to <https://www.w3.org/2019/wot/td#hasActionAffordance>.

5.2 Merging Thing Descriptions

The following example includes two TD documents in the standard TD JSON representation format [WOT-THING-DESCRIPTION], identified by a unique electronic product code [RFC5134].

If these two documents are being merged together with contextual information in the form of an RDF graph that uses the same identifiers, it is possible to retrieve form metadata of these TDs depending on the relations that exist between Things. Here, the two Things share information on room 101 of some example building.

5.3 Internal State of a Thing

It is possible for affordances of different kinds to have the same effect. For instance, an affordance to a writable property may be equivalent to an affordance to invoke an action that changes the property value. Similarly, for every observable property, there may be an equivalent affordance to subscribe to an event that occurs at every property value change.

WoT clients can avoid having to deal with these discrepancies by using the generic td:hasInteractionAffordance predicate. They can then decide to perform an action based solely on the operation type of the form embedded in the affordance object.

5.4 Specifying Affordances by Device Classes

It is possible to use the TD ontology to extend the definition of well-known subclasses of Thing by defining expected affordances that Things of such types should present. The following example specifies that every temperature sensor presents an affordance to a temperature property (expressed in the SAREF vocabulary [smartM2M]).

A. References

A.1 Informative references

[RFC5134]
A Uniform Resource Name Namespace for the EPCglobal Electronic Product Code (EPC) and Related Standards. M. Mealling. IETF. January 2008. Informational. URL: https://tools.ietf.org/html/rfc5134
[shacl]
Shapes Constraint Language (SHACL). Holger Knublauch; Dimitris Kontokostas. W3C. 20 July 2017. W3C Recommendation. URL: https://www.w3.org/TR/shacl/
[smartM2M]
ETSI TS 103 264 V2.1.1 (2017-03): SmartM2M; Smart Appliances; Reference Ontology and oneM2M Mapping. ETSI. March 2017. Published. URL: http://www.etsi.org/deliver/etsi_ts/103200_103299/103264/02.01.01_60/ts_103264v020101p.pdf
[vocab-ssn]
Semantic Sensor Network Ontology. Armin Haller; Krzysztof Janowicz; Simon Cox; Danh Le Phuoc; Kerry Taylor; Maxime Lefrançois. W3C. 19 October 2017. W3C Recommendation. URL: https://www.w3.org/TR/vocab-ssn/
[WOT-ARCHITECTURE]
Web of Things (WoT) Architecture. Matthias Kovatsch; Ryuichi Matsukura; Michael Lagally; Toru Kawaguchi; Kunihiko Toumura; Kazuo Kajimoto. W3C. 9 April 2020. W3C Recommendation. URL: https://www.w3.org/TR/wot-architecture/
[WOT-THING-DESCRIPTION]
Web of Things (WoT) Thing Description. Sebastian Käbisch; Takuki Kamiya; Michael McCool; Victor Charpenay; Matthias Kovatsch. W3C. 9 April 2020. W3C Recommendation. URL: https://www.w3.org/TR/wot-thing-description/

[출처] https://www.w3.org/2019/wot/json-schema

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
1075 [ 一日30分 인생승리의 학습법] Visual Basic application on linux 졸리운_곰 2022.02.22 16
1074 [ 一日30分 인생승리의 학습법] Truffle을 이용한 DApp 개발환경 구성 file 졸리운_곰 2022.02.20 86
1073 [ 一日30分 인생승리의 학습법]LaTeX 활용해서 논문쓰장 file 졸리운_곰 2022.02.17 20
1072 [ 一日30分 인생승리의 학습법] LaTeX 초보자가 감을 잡는 것을 돕는 몇가지 팁 졸리운_곰 2022.02.17 279
1071 [ 一日30分 인생승리의 학습법] 수식 입력이 가능한 마인드맵 프로그램, 프리플레인(freeplane) file 졸리운_곰 2022.02.16 37
1070 [ 一日30分 인생승리의 학습법] Awesome Metaverse Awesome 짱!~ 메티버스 오픈소스 file 졸리운_곰 2022.02.13 11
1069 [ 一日30分 인생승리의 학습법] 제 NAS의 Docker 목록 file 졸리운_곰 2022.01.31 105
1068 [ 一日30分 인생승리의 학습법] gw basic 튜터리얼, 메뉴얼, A GW-BASIC Tutorial 졸리운_곰 2022.01.22 21
1067 [ 一日30分 인생승리의 학습법] Web Search Engine : 웹 검색 엔진 google/ naver 만들기 file 졸리운_곰 2022.01.17 28
1066 [ 一日30分 인생승리의 학습법] AILog 2 A logic programming language with probabilities and logical explanation and debugging faculities file 졸리운_곰 2022.01.16 12
1065 [ 一日30分 인생승리의 학습법] 소스 인사이트( source insight ) 사용법 file 졸리운_곰 2022.01.13 20
1064 [ 一日30分 인생승리의 학습법][메타버스란 무엇인가?] The Metaverse Has Already Arrived. Here’s What That Actually Means file 졸리운_곰 2021.12.29 24
1063 [ 一日30分 인생승리의 학습법] English to Logic, Truth-Functional Propositional Logic 졸리운_곰 2021.12.15 16
1062 [ 一日30分 인생승리의 학습법][실무행정] 기안문 공문서 기안문 작성법, 행정안전부 지침 및 시행 file 졸리운_곰 2021.12.11 42
1061 [ 一日30分 인생승리의 학습법][실무행정] 기안문 작성하기 졸리운_곰 2021.12.11 17
1060 [ 一日30分 인생승리의 학습법] 셀레니움 헤드리스 테스트를 위한 HTMLUnitDriver 및 PhantomJS file 졸리운_곰 2021.11.26 24
1059 [ 一日30分 인생승리의 학습법] 메타버스로 날개 단 오픈소스 프로젝트 file 졸리운_곰 2021.11.23 230
1058 [ 一日30分 인생승리의 학습법] Best JavaScript machine learning libraries in 2021 file 졸리운_곰 2021.11.20 8
1057 [ 一日30分 인생승리의 학습법] 프로그래밍 언어별 딥러닝 라이브러리 정리 file 졸리운_곰 2021.11.19 30
1056 [오픈소스 라이센스 상용화 라이센스 검토] [Software] 공개 SW 라이센스(GPL, LGPL, BSD) 졸리운_곰 2021.11.18 10
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED