From d31820a74816f320079eeed9448c41272f7c9692 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sat, 12 Jun 2004 17:31:38 +0000 Subject: [PATCH] r9599: add rank slot to read ucxt --- class-support.lisp | 39 ++++++++++++++++++++++----------------- classes.lisp | 2 +- sql-classes.lisp | 5 +++-- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/class-support.lisp b/class-support.lisp index 208e1a3..c14291d 100644 --- a/class-support.lisp +++ b/class-support.lisp @@ -242,21 +242,23 @@ (defvar +language-abbreviations+ - '(("BAQ" . "Basque") - ("DAN" . "Danish") - ("DUT" . "Dutch") - ("ENG" . "English") - ("FIN" . "Finnish") - ("FRE" . "French") - ("GER" . "German") - ("HEB" . "Hebrew") - ("HUN" . "Hungarian") - ("ITA" . "Italian") - ("NOR" . "Norwegian") - ("POR" . "Portuguese") - ("RUS" . "Russian") - ("SPA" . "Spanish") - ("SWE" . "Swedish"))) + '(("BAQ" . "Basque") + ("CZE" . "Chech") + ("DAN" . "Danish") + ("DUT" . "Dutch") + ("ENG" . "English") + ("FIN" . "Finnish") + ("FRE" . "French") + ("GER" . "German") + ("HEB" . "Hebrew") + ("HUN" . "Hungarian") + ("ITA" . "Italian") + ("JPN" . "Japanese") + ("NOR" . "Norwegian") + ("POR" . "Portuguese") + ("RUS" . "Russian") + ("SPA" . "Spanish") + ("SWE" . "Swedish"))) (defvar *lat-info-table* (make-hash-table :size 30 :test 'equal)) (defvar *is-lat-table-init* nil) @@ -267,7 +269,10 @@ (setq *is-lat-table-init* t)) (defun lat-abbr-info (lat) - (nth-value 0 (gethash (string-downcase lat) *lat-info-table*))) + (aif (nth-value 0 (gethash (string-downcase lat) *lat-info-table*)) + it + lat)) + (defun stt-abbr-info (stt) @@ -332,7 +337,7 @@ (let* ((anc-this-cxn (remove-if-not (lambda (cxt) (= (1+ i) (cxn cxt))) anc))) (push - (sort anc-this-cxn (lambda (a b) (< (rnk a) (rnk b)))) + (sort anc-this-cxn (lambda (a b) (< (rank a) (rank b)))) anc-lists))))) diff --git a/classes.lisp b/classes.lisp index 5e9fd37..feb970c 100644 --- a/classes.lisp +++ b/classes.lisp @@ -97,7 +97,7 @@ (code :value-type string :initarg :code :reader code) (cxn :value-type fixnum :initarg :cxn :reader cxn) (cxl :value-type string :initarg :cxl :reader cxl) - (rnk :value-type string :initarg :rnk :reader rnk) + (rank :value-type string :initarg :rank :reader rank) (cxs :value-type cdata :initarg :cxs :reader cxs) (cui2 :value-type fixnum :initarg :cui2 :reader cui2 :hyperlink find-ucon-cui :print-formatter fmt-cui) diff --git a/sql-classes.lisp b/sql-classes.lisp index e70c638..3a1ac39 100644 --- a/sql-classes.lisp +++ b/sql-classes.lisp @@ -507,9 +507,10 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS" (defun find-ucxt-cuisui (cui sui &key (srl *current-srl*)) (ensure-cui-integer cui) (ensure-sui-integer sui) - (collect-umlisp-query (mrcxt (sab code cxn cxl cxs cui2 hcd rela xc) + (collect-umlisp-query (mrcxt (sab rank code cxn cxl cxs cui2 hcd rela xc) srl kcuisui (make-cuisui cui sui) :lrl ksrl) - (make-instance 'ucxt :sab sab :code code + (make-instance 'ucxt :sab sab :code code + :rank rank :cxn (ensure-integer cxn) :cxl cxl :cxs cxs :hcd hcd :rela rela :xc xc :cui2 (ensure-integer cui2)))) -- 2.34.1