From 60befb77a4bb47d1feb31c3e916d828bde85e66b Mon Sep 17 00:00:00 2001
From: Abbe98
Date: Thu, 24 Oct 2024 19:52:48 +0200
Subject: [PATCH] structured previews: first draft
---
.../valid/example.json | 11 +++++
1.0-draft/index.html | 44 +++++++++++++++++++
2 files changed, 55 insertions(+)
create mode 100644 1.0-draft/examples/structured-preview-response/valid/example.json
diff --git a/1.0-draft/examples/structured-preview-response/valid/example.json b/1.0-draft/examples/structured-preview-response/valid/example.json
new file mode 100644
index 0000000..a0a591d
--- /dev/null
+++ b/1.0-draft/examples/structured-preview-response/valid/example.json
@@ -0,0 +1,11 @@
+{
+ "id": "http://www.wikidata.org/entity/Q2",
+ "name": "Earth",
+ "description": "third planet from the Sun in the Solar System",
+ "url": "https://www.wikidata.org/wiki/Q2",
+ "image": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/The_Blue_Marble_%285052124705%29.jpg/330px-The_Blue_Marble_%285052124705%29.jpg",
+ "tags": [
+ ["terrestrial planet", "http://www.wikidata.org/entity/Q128207"],
+ ["inner planet of the Solar System", "http://www.wikidata.org/entity/Q3504248"]
+ ]
+}
diff --git a/1.0-draft/index.html b/1.0-draft/index.html
index 5ef775e..ff784fb 100644
--- a/1.0-draft/index.html
+++ b/1.0-draft/index.html
@@ -54,6 +54,10 @@
company: "National Library of Finland",
companyURL: "https://www.kansalliskirjasto.fi/en"
},
+ {
+ name: "Albin Larsson",
+ url: "https://byabbe.se/",
+ }
// add yourself here!
{
name: "Add Yourself Here!"
@@ -700,6 +704,46 @@ Preview Queries
+
+ Structured Preview Service
+
+ This section specifies how reconciliation services can provide previews of their entities in a structured format.
+
+
+ Structured Preview Endpoint
+
+ When supported, the structured preview service is queried by resolving the URI template /structured-preview?id={id}
relative to the reconciliation endpoint, where id
is subsituted by the entity identifier.
+
+
+
+ Structured Preview Responses
+
+ A response to a structured preview query must be a JSON object with the following fields describing the entity:
+
+ id
+ - The identifier of the entity;
+ name
+ - Its corresponding human-readable name, to be displayed prominently to the user;
+
+
+ The response may also contain the following optional fields:
+
+ description
+ - An optional description which can be provided to disambiguate namesakes, providing more context. This could for instance be displayed underneath the
name
;
+ url
+ - An optional URL to a page with more information about the entity;
+ image
+ - An optional URL to an image representing the entity;
+ tags
+ - An optional list of tags and optionally an URL associated with each tag. Tags can represent entity types, categories among other things;
+
+
+
+ For instance, a structured preview service could return the following response:
+
+
+
+