[Fencommits] fenfire-hs: fix: sort connections by property, even if the properties don't have rdfs:labels

Benja Fallenstein benja.fallenstein at gmail.com
Wed Mar 28 00:35:08 EEST 2007


Wed Mar 28 00:34:46 EEST 2007  Benja Fallenstein <benja.fallenstein at gmail.com>
  * fix: sort connections by property, even if the properties don't have rdfs:labels
diff -rN -u old-fenfire-hs/Fenfire.fhs new-fenfire-hs/Fenfire.fhs
--- old-fenfire-hs/Fenfire.fhs	2007-03-28 00:35:08.000000000 +0300
+++ new-fenfire-hs/Fenfire.fhs	2007-03-28 00:35:08.000000000 +0300
@@ -96,7 +96,8 @@
     cmp n1 n2 | Just d1 <- f n1, Just d2 <- f n2 = compare d1 d2 where
         f n = msum [g dc_date n, g dcterms_created n]
         g prop n = iquery (n, prop, X) :: Maybe Node
-    cmp n1 n2 = compare (getText n1) (getText n2)
+    cmp n1 n2 = compare (f n1) (f n2) where
+        f n = maybe (Left n) Right $ getText n
     cmp' (p1,n1) (p2,n2) = catOrds (cmp p1 p2) (cmp n1 n2)
     catOrds EQ o = o; catOrds o _ = o
 




More information about the Fencommits mailing list