简体   繁体   English

如何在JSON-LD中引用RDF语句? 如何陈述陈述?

[英]How to refer to RDF statements in JSON-LD? How to state(ment) about statements?

Suppose you have a simple RDF statement x:Object x:predicate x:Subject , which is expressed in JSON-LD as {"@id": "x:Object", "x:predicate": {"@id": "x:Subject"}} . 假设您有一个简单的RDF语句x:Object x:predicate x:Subject ,在JSON-LD中表示为{"@id": "x:Object", "x:predicate": {"@id": "x:Subject"}} How do you refer to the specific object-predicate-subject relation, how do you "adress" the factual relation? 您如何指称特定的宾语-谓语-主体关系,如何“处理”事实关系? What's the "@id" or the inline identity of a statement in JSON-LD? JSON-LD中的语句的"@id"或内联标识是什么? How do you ascribe "meta data" to a statement? 您如何将“元数据”归因于声明?

How do you express statements in JSON-LD, where the subject is another statement, eg [x:Subject x:predicate x:Object] x:metaPredicate x:MetaObject ? 您如何用JSON-LD表示语句,而主题是另一条语句,例如[x:Subject x:predicate x:Object] x:metaPredicate x:MetaObject

How do you express statements in JSON-LD, where the object is another statement, eg x:MetaSubject x:metaPredicate [x:Subject x:predicate x:Object] ? 您如何在JSON-LD中表达语句,而对象是另一个语句,例如x:MetaSubject x:metaPredicate [x:Subject x:predicate x:Object]

How do you express statements in JSON-LD, where the predicate is another statement (strange but possible), eg x:MetaSubject [x:Subject x:predicate x:Object] x:MetaObject ? 您如何在JSON-LD中表达谓词是另一个陈述(奇怪但可能)的语句,例如x:MetaSubject [x:Subject x:predicate x:Object] x:MetaObject

(PS: I realize the [] syntax of my samples is not conformant Turtle, but they serve to express my thoughts/questions.) (附言:我意识到我的样本的[]语法不是一致的Turtle,但是它们用来表达我的想法/问题。)

You need to use reification, there exists a standardized vocabulary for that. 您需要使用版本化,为此存在一个标准化的词汇表 In JSON-LD it would look somewhat like this: 在JSON-LD中,它看起来像这样:

{
  "@context": {
    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
    "subject": { "@id": "rdf:subject", "@type": "@id" },
    "predicate": { "@id": "rdf:predicate", "@type": "@id" },
    "object": { "@id": "rdf:object", "@type": "@id" }
  },
  "@type": "rdf:Statement",
  "subject": "x:Subject",
  "predicate": "x:predicate",
  "object": { "@id": "x:Object" },
  "x:metaPredicate": "x:MetaObject"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM