Skip to content

Commit 4285b8a

Browse files
committed
add mira to jsonld
1 parent 077abd9 commit 4285b8a

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

apps/website/app/utils/conversion/jsonld.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ type PlatformAccount = Tables<"PlatformAccount">;
88

99
// This is a temporary hack
1010
const KnownSchemaEntities: Record<string, string[]> = {
11-
Claim: ["dg"],
12-
Evidence: ["dg"],
13-
Question: ["dg"],
11+
Claim: ["dg", "mira"],
12+
Evidence: ["dg", "mira"],
13+
Question: ["dg", "mira"],
1414
SourceDocument: ["dg"],
1515
describesActivity: ["dg"],
1616
observationStatement: ["dg"],
@@ -23,6 +23,13 @@ const KnownSchemaEntities: Record<string, string[]> = {
2323
supportedBy: ["dg"],
2424
addresses: ["dg"],
2525
addressedBy: ["dg"],
26+
Request: ["mira"],
27+
Protocol: ["mira"],
28+
follows: ["mira"],
29+
grounds: ["mira"],
30+
is_grounded_in: ["mira"],
31+
request_for: ["mira"],
32+
request_target: ["mira"],
2633
};
2734

2835
export const asJsonLD = async ({

apps/website/public/schema/context.jsonld

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"sioc": "http://rdfs.org/sioc/ns#",
99
"dgc": "https://discoursegraphs.com/schema/dg_core#",
1010
"dgb": "https://discoursegraphs.com/schema/dg_base#",
11+
"mira": "http://purl.org/mira-science/mira#",
1112
"predicate": "rdf:predicate",
1213
"subClassOf": "rdfs:subClassOf",
1314
"label": "rdfs:label",
@@ -60,6 +61,14 @@
6061
"supports": { "@id": "dgc:supports", "@type": "@id" },
6162
"supportedBy": { "@id": "dgc:supportedBy", "@type": "@id" },
6263
"addresses": { "@id": "dgc:addresses", "@type": "@id" },
63-
"addressedBy": { "@id": "dgc:addressedBy", "@type": "@id" }
64+
"addressedBy": { "@id": "dgc:addressedBy", "@type": "@id" },
65+
66+
"Request": "mira:Request",
67+
"Protocol": "mira:Protocol",
68+
"follows": { "@id": "mira:follows", "@type": "@id" },
69+
"grounds": { "@id": "mira:grounds", "@type": "@id" },
70+
"is_grounded_in": { "@id": "mira:is_grounded_in", "@type": "@id" },
71+
"request_for": { "@id": "mira:request_for", "@type": "@id" },
72+
"request_target": { "@id": "mira:request_target", "@type": "@id" }
6473
}
6574
}

0 commit comments

Comments
 (0)