将 'license' 字段添加到 schema.org 地方记录
Adding a 'license' field to a schema.org Place record
我有一个位置数据库,我想将其发布为开放数据。每条记录都可以有多个许可证之一,具体取决于数据的来源,因此每条记录都需要附加一个许可证。我将数据发布为 json-ld
。示例记录:
{
"@context": "http://schema.org",
"@type": "Place",
"name": "METROPOLITAN MUSEUM OF ART",
"address": {
"@type": "PostalAddress",
"streetAddress": "1000 5TH AVE",
"addressLocality": "NEW YORK",
"addressRegion": "NY",
"addressCountry": "United States",
"postalCode": "10028-0198"
},
"hasMap": "http://www.openstreetmap.org/?mlat=40.7784&mlon=-73.9627#map=15/40.7784/-73.9627",
"geo": {
"@type": "GeoCoordinates",
"latitude": 40.7784,
"longitude": -73.9627
},
"description": null,
"telephone": "+1 (212) 472-2764",
"url": "http://www.metmuseum.org",
"openingHours": null,
"photo": {
"@type": "ImageObject",
"contentUrl": "http://127.0.0.1:8888/fSunhLAJFSmnx55GNJee2-YKcgE=/1000x1000/museums/logos/000/149/449/original/NYC_-_Metropolitan_-_Temple_of_Dendur.JPG",
"creator": "Jean-Christophe BENOIST",
"license": "CC BY 3.0"
}
}
如果可能,schema.org Place model doesn't have a field for 'license'. What is the correct way to add a license type field to the record? Essentially I want to embed a CreativeWork 字段。
您似乎想为 关于 Place
的文档提供许可,而不是 Place
本身。
所以选择 CreativeWork
(or one of its sub-types, like WebPage
if the document is a web page) and make use of its license
属性。
要说明此 CreativeWork
与 Place
有关,您可以使用 about
property, and to state that the Place
is the primary entity described in this document, you could use the mainEntity
属性.
如果你想保持Place
为顶级节点,你可以使用JSON-LD的@reverse
for the about
property, and use mainEntity
’s inverse property, mainEntityOfPage
.
使用 http://schema.org/Dataset (which is a type of CreativeWork
) will allow you to set a license. Place
is a field within Dataset
so they fit together. The license
for your ImageObject
should also be the URL of the license 而不是文本(这是我在遇到问题后发现的)。
数据集包括datasetTimeinterval
、distribution
、includedDataCatalog
和spatial
(一个Place
)。数据集只有 introduced in May
我有一个位置数据库,我想将其发布为开放数据。每条记录都可以有多个许可证之一,具体取决于数据的来源,因此每条记录都需要附加一个许可证。我将数据发布为 json-ld
。示例记录:
{
"@context": "http://schema.org",
"@type": "Place",
"name": "METROPOLITAN MUSEUM OF ART",
"address": {
"@type": "PostalAddress",
"streetAddress": "1000 5TH AVE",
"addressLocality": "NEW YORK",
"addressRegion": "NY",
"addressCountry": "United States",
"postalCode": "10028-0198"
},
"hasMap": "http://www.openstreetmap.org/?mlat=40.7784&mlon=-73.9627#map=15/40.7784/-73.9627",
"geo": {
"@type": "GeoCoordinates",
"latitude": 40.7784,
"longitude": -73.9627
},
"description": null,
"telephone": "+1 (212) 472-2764",
"url": "http://www.metmuseum.org",
"openingHours": null,
"photo": {
"@type": "ImageObject",
"contentUrl": "http://127.0.0.1:8888/fSunhLAJFSmnx55GNJee2-YKcgE=/1000x1000/museums/logos/000/149/449/original/NYC_-_Metropolitan_-_Temple_of_Dendur.JPG",
"creator": "Jean-Christophe BENOIST",
"license": "CC BY 3.0"
}
}
如果可能,schema.org Place model doesn't have a field for 'license'. What is the correct way to add a license type field to the record? Essentially I want to embed a CreativeWork 字段。
您似乎想为 关于 Place
的文档提供许可,而不是 Place
本身。
所以选择 CreativeWork
(or one of its sub-types, like WebPage
if the document is a web page) and make use of its license
属性。
要说明此 CreativeWork
与 Place
有关,您可以使用 about
property, and to state that the Place
is the primary entity described in this document, you could use the mainEntity
属性.
如果你想保持Place
为顶级节点,你可以使用JSON-LD的@reverse
for the about
property, and use mainEntity
’s inverse property, mainEntityOfPage
.
使用 http://schema.org/Dataset (which is a type of CreativeWork
) will allow you to set a license. Place
is a field within Dataset
so they fit together. The license
for your ImageObject
should also be the URL of the license 而不是文本(这是我在遇到问题后发现的)。
数据集包括datasetTimeinterval
、distribution
、includedDataCatalog
和spatial
(一个Place
)。数据集只有 introduced in May