about summary refs log tree commit diff
path: root/examples/dump-publication.scm
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-07-19 14:28:15 +0300
committerMunyoki Kilyungi2023-07-21 14:36:41 +0300
commitddb909bbe6ee37eb19e5c161a6ceb8eabe88561c (patch)
treef48d05de98a5c58a998ab571daf44c6cb7834193 /examples/dump-publication.scm
parent1d38755284196e62b2b16eda9cfaecd20e0c9a42 (diff)
downloadgn-transform-databases-ddb909bbe6ee37eb19e5c161a6ceb8eabe88561c.tar.gz
Rename 'gn-id' prefix to 'gn'
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples/dump-publication.scm')
-rwxr-xr-xexamples/dump-publication.scm43
1 files changed, 22 insertions, 21 deletions
diff --git a/examples/dump-publication.scm b/examples/dump-publication.scm
index ff46d3d..6f349d6 100755
--- a/examples/dump-publication.scm
+++ b/examples/dump-publication.scm
@@ -21,15 +21,15 @@
 (define-dump dump-publication
   (tables (Publication))
   (schema-triples
-   (gn:pubMedId rdfs:range rdfs:Literal)
-   (gn:title rdfs:range rdfs:Literal)
-   (gn:journal rdfs:range rdfs:Literal)
-   (gn:volume rdfs:range rdfs:Literal)
-   (gn:pages rdfs:range rdfs:Literal)
-   (gn:month rdfs:range rdfs:Literal)
-   (gn:year rdfs:range rdfs:Literal)
-   (gn:author rdfs:range rdfs:Literal)
-   (gn:abstract rdfs:range rdfs:Literal))
+   (gn-term:pubMedId rdfs:range rdfs:Literal)
+   (gn-term:title rdfs:range rdfs:Literal)
+   (gn-term:journal rdfs:range rdfs:Literal)
+   (gn-term:volume rdfs:range rdfs:Literal)
+   (gn-term:pages rdfs:range rdfs:Literal)
+   (gn-term:month rdfs:range rdfs:Literal)
+   (gn-term:year rdfs:range rdfs:Literal)
+   (gn-term:author rdfs:range rdfs:Literal)
+   (gn-term:abstract rdfs:range rdfs:Literal))
   (triples
       (let ((pmid (field
                    ("IF(Publication.PubMed_ID IS NULL, '', CONVERT(Publication.PubMed_Id, INT))"
@@ -40,18 +40,19 @@
                                 (number->string publication-id))
             (ontology 'publication: pmid)))
     (set rdf:type 'gn:publication)
-    (set gn:pubMedId (ontology 'pubmed: (field ("IFNULL(PubMed_ID, '')" pubmedId))))
-    (set gn:title (delete-substrings (field Publication Title)
-                                     "Unknown"))
-    (set gn:journal (delete-substrings (field Publication Journal)
-                                       "Unknown"))
-    (set gn:volume (delete-substrings (field Publication Volume)
-                                      "Unknown"))
-    (set gn:pages (delete-substrings (field Publication Pages)
-                                     "Unknown"))
-    (set gn:month (delete-substrings (field Publication Month)
-                                     "Unknown"))
-    (set gn:year (field Publication Year))
+    (set gn-term:pubMedId
+         (ontology 'pubmed: (field ("IFNULL(PubMed_ID, '')" pubmedId))))
+    (set gn-term:title (delete-substrings (field Publication Title)
+                                          "Unknown"))
+    (set gn-term:journal (delete-substrings (field Publication Journal)
+                                            "Unknown"))
+    (set gn-term:volume (delete-substrings (field Publication Volume)
+                                           "Unknown"))
+    (set gn-term:pages (delete-substrings (field Publication Pages)
+                                          "Unknown"))
+    (set gn-term:month (delete-substrings (field Publication Month)
+                                          "Unknown"))
+    (set gn-term:year (field Publication Year))
     (multiset gn:author
               ;; The authors field is a comma
               ;; separated list. Split it.