aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-10-24 16:52:36 +0300
committerBonfaceKilz2023-10-27 13:45:32 +0300
commit5dbf3468412b5cb7c5a490700fb27368f1928880 (patch)
treefdd8e241326757de1ba226c06f71fb6435ea0214
parentd90ebbefc517e28a00f322b4bda1a721788eff36 (diff)
downloadgenenetwork3-5dbf3468412b5cb7c5a490700fb27368f1928880.tar.gz
Remove un-necessary prefixes when fetching gn genewiki entries.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r--gn3/api/metadata.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py
index d18fff9..e484b05 100644
--- a/gn3/api/metadata.py
+++ b/gn3/api/metadata.py
@@ -626,10 +626,15 @@ CONSTRUCT {
if not results:
return jsonify({})
frame = {
- "@context": PREFIXES | {
+ "@context": {
"data": "@graph",
"type": "@type",
"id": "@id",
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+ "gnt": "http://genenetwork.org/term/",
+ "xkos": "http://rdf-vocabulary.ddialliance.org/xkos#",
+ "gnc": "http://genenetwork.org/category/",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
"name": "rdfs:label",
"chr": "gnt:chr",
"mb": "gnt:mb",
@@ -717,10 +722,16 @@ CONSTRUCT {
results = sparql.queryAndConvert()
results = json.loads(results.serialize(format="json-ld"))
context = {
- "@context": PREFIXES | {
+ "@context": {
"data": "@graph",
"type": "@type",
"id": "@id",
+ "ex": "http://example.org/stuff/1.0/",
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+ "gnt": "http://genenetwork.org/term/",
+ "gnc": "http://genenetwork.org/category/",
+ "dct": "http://purl.org/dc/terms/",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
"entries": "ex:entries",
"comment": "rdfs:comment",
"category": 'gnt:belongsToCategory',