about summary refs log tree commit diff
path: root/examples/generif.scm
diff options
context:
space:
mode:
Diffstat (limited to 'examples/generif.scm')
-rwxr-xr-xexamples/generif.scm23
1 files changed, 8 insertions, 15 deletions
diff --git a/examples/generif.scm b/examples/generif.scm
index d214cd1..d4d483e 100755
--- a/examples/generif.scm
+++ b/examples/generif.scm
@@ -49,7 +49,7 @@
            (left-join Species "ON Species.SpeciesId = GeneRIF.SpeciesId")
            (left-join GeneRIFXRef "ON GeneRIFXRef.GeneRIFId = GeneRIF.Id")
            (left-join GeneCategory "ON GeneRIFXRef.GeneCategoryId = GeneCategory.Id"))
-          "WHERE GeneRIF.display > 0 AND GeneRIF.VersionId = 0 AND GeneRIF.comment IS NOT NULL GROUP BY GeneRIF.comment, BINARY GeneRIF.symbol")
+          "WHERE GeneRIF.display > 0 AND GeneRIF.comment IS NOT NULL GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol, GeneRIF.SpeciesId, GeneRIF.createtime, GeneRIF.reason")
   (schema-triples
    (gnc:GeneWikiEntry a rdfs:Class)
    (gnc:GNWikiEntry rdfs:subClassOf gnc:GeneWikiEntry)
@@ -84,16 +84,9 @@
                 (initial (sanitize-rdf-string (field GeneRIF initial)))
                 (reason (field GeneRIF reason))
                 (email (sanitize-rdf-string (field GeneRIF email)))
-                (categories
-                 (remove (lambda (x)
-                           (or (eq? x #f)
-                               (and (string? x)
-                                    (string-null? x))))
-                         (remove-duplicates
-                          (string-split-substring
-                           (field ("GROUP_CONCAT(DISTINCT GeneCategory.Name SEPARATOR '$$')"
-                                   GeneCategory))
-                           "$$")))))
+                (category
+                 (field ("GROUP_CONCAT(DISTINCT GeneCategory.Name SEPARATOR '; ')"
+                         GeneCategory))))
            (string->symbol
             (string-append
              "[ "
@@ -123,11 +116,11 @@
                  ""
                  (format #f "gnt:reason ~s ; " reason))
              (if (string-blank? initial) "" (format #f "gnt:initial ~s ; " initial))
-             (if (not (null? categories))
+             (if (string-blank? category)
+                 ""
                  (format #f
-                         "~{gnt:belongsToCategory ~s ; ~}"
-                         categories)
-                 "")
+                         "gnt:belongsToCategory ~s ; "
+                         category))
              (if (and (string? web-url) (not (string-null? web-url)))
                  (format #f "foaf:homepage ~s ; "
                          web-url)