我有一些想要序列化为 N-Quads 的 JSON-LD 对象,但我不知道如何将图形信息添加到 JSON-LD。这是我拥有的 JSON-LD 的一个示例:
{
'name':u'Meppel',
'classification':u'Municipality',
'ori_identifier': u'https://id.openraadsinformatie.nl/1',
'had_primary_source': u'https://argu.co/voc/mapping/meppel/cbs/identifier/gm0119',
'collection':u'meppel',
'@context':{
'name':{
'@id':'http://www.w3.org/2004/02/skos/core#prefLabel'
},
'classification':{
'@id':'http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#categories'
},
'ori_identifier':'@id',
'had_primary_source':{
'@id':'http://www.w3.org/ns/prov#hadPrimarySource'
},
'collection':{
'@id':'https://argu.co/ns/meta#collection'
},
'@base':'https://id.openraadsinformatie.nl/',
'Organization':'http://www.w3.org/ns/org#Organization',
'description':{
'@id':'http://purl.org/dc/terms/description'
}
},
'@type':'Organization',
'description':u'Gemeentelijke herindeling per 01-01-1998\r\nBegindatum voor 1830'
}
当将此序列化为 n-quads 时,我想将图形信息添加为第四列,以便它序列化为:
<https://id.openraadsinformatie.nl/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/org#Organization> <http://purl.org/link-lib/supplant> .
<https://id.openraadsinformatie.nl/1> <http://www.w3.org/2004/02/skos/core#prefLabel> "Meppel" <http://purl.org/link-lib/supplant> .
<https://id.openraadsinformatie.nl/1> <http://www.w3.org/ns/prov#hadPrimarySource> "https://argu.co/voc/mapping/meppel/ibabs/identifier/41121" <http://purl.org/link-lib/supplant> .
如何将图形名称 ( http://purl.org/link-lib/supplant
) 添加到 JSON-LD?我尝试简单地将一个添加@graph
到 JSON-LD 对象但没有成功。