diff options
author | Munyoki Kilyungi | 2024-08-27 11:36:43 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-08-29 10:42:16 +0300 |
commit | 6e0e1293551c0f64d6008189d1a5fc426d2ae0b4 (patch) | |
tree | c5fe15f1b5697ce79b85e461f9b90814350542ed /gn3 | |
parent | b84775931c369299504dfe2dd42491d042197483 (diff) | |
download | genenetwork3-6e0e1293551c0f64d6008189d1a5fc426d2ae0b4.tar.gz |
Add "created" to wiki return.
* gn3/db/rdf.py (get_wiki_entries_by_symbol): Add "created" to
dictionary.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/db/rdf.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gn3/db/rdf.py b/gn3/db/rdf.py index e7942be..f79493b 100644 --- a/gn3/db/rdf.py +++ b/gn3/db/rdf.py @@ -55,13 +55,15 @@ CONSTRUCT { foaf:mbox ?email ; gnt:initial ?usercode ; gnt:belongsToCategory ?category ; - gnt:hasVersion ?versionId + gnt:hasVersion ?versionId ; + dct:created ?created } WHERE { ?symbolId rdfs:comment _:node ; rdfs:label '$symbol' . _:node rdf:type gnc:GNWikiEntry ; dct:hasVersion "0"^^xsd:int ; dct:hasVersion ?version ; + dct:created ?createTime ; rdfs:comment ?wikientry . OPTIONAL { _:node gnt:reason ?reason } . OPTIONAL { @@ -74,6 +76,7 @@ CONSTRUCT { OPTIONAL { _:node gnt:mbox ?email . } . OPTIONAL { _:node gnt:belongsToCategory ?category . } BIND (str(?version) AS ?versionId) . + BIND (str(?createTime) AS ?created) . BIND (str(?pubmedId) AS ?pmid) } """).substitute(prefix=RDF_PREFIXES, symbol=symbol,) @@ -89,7 +92,8 @@ CONSTRUCT { "pubmed_id": "dct:references", "email": "foaf:mbox", "initial": "gnt:initial", - "comment": "rdfs:comment" + "comment": "rdfs:comment", + "created": "dct:created", } results = query_frame_and_compact( query, context, |