r9521: rrf updates
[umlisp.git] / classes.lisp
index 9b5a71f97d1dce7651559cccbd6ce1f5977676e5..e62c1ee190c2760c7a647aaf4f2b6bb189b65064 100644 (file)
@@ -2,15 +2,15 @@
 ;;;; *************************************************************************
 ;;;; FILE IDENTIFICATION
 ;;;;
 ;;;; *************************************************************************
 ;;;; FILE IDENTIFICATION
 ;;;;
-;;;; Name:          classes.lisp
-;;;; Purpose:       Class defintions for UMLisp
-;;;; Programmer:    Kevin M. Rosenberg
-;;;; Date Started:  Apr 2000
+;;;; Name:     classes.lisp
+;;;; Purpose:  Class defintions for UMLisp
+;;;; Author:   Kevin M. Rosenberg
+;;;; Created:  Apr 2000
 ;;;;
 ;;;;
-;;;; $Id: classes.lisp,v 1.42 2003/06/29 16:21:09 kevin Exp $
+;;;; $Id$
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;
 ;;;; This file, part of UMLisp, is
-;;;;    Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D.
+;;;;    Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D.
 ;;;;
 ;;;; UMLisp users are granted the rights to distribute and use this software
 ;;;; as governed by the terms of the GNU General Public License.
 ;;;;
 ;;;; UMLisp users are granted the rights to distribute and use this software
 ;;;; as governed by the terms of the GNU General Public License.
@@ -67,8 +67,8 @@
    (son :value-type string :initarg :son :reader son)
    (sf :value-type string :initarg :sf :reader sf)
    (sver :value-type string :initarg :sver :reader sver)
    (son :value-type string :initarg :son :reader son)
    (sf :value-type string :initarg :sf :reader sf)
    (sver :value-type string :initarg :sver :reader sver)
-   (mstart :value-type string :initarg :mstart :reader mstart)
-   (mend :value-type string :initarg :mend :reader mend)
+   (vstart :value-type string :initarg :vstart :reader vstart)
+   (vend :value-type string :initarg :vend :reader vend)
    (imeta :value-type string :initarg :imeta :reader imeta)
    (rmeta :value-type string :initarg :rmeta :reader rmeta)
    (slc :value-type cdata :initarg :slc :reader slc)
    (imeta :value-type string :initarg :imeta :reader imeta)
    (rmeta :value-type string :initarg :rmeta :reader rmeta)
    (slc :value-type cdata :initarg :slc :reader slc)
    (sabin :value-type string :initarg :sabin :reader sabin))
   (:metaclass hyperobject-class)
   (:user-name "Source Abbreviation")
    (sabin :value-type string :initarg :sabin :reader sabin))
   (:metaclass hyperobject-class)
   (:user-name "Source Abbreviation")
-  (:default-print-slots vcui rcui vsab rsab son sf sver mstart mend imeta
+  (:default-print-slots vcui rcui vsab rsab son sf sver vstart vend imeta
                rmeta slc scc srl tfr cfr cxty ttyl atnl lat cenc
                curver sabin))
 
                rmeta slc scc srl tfr cfr cxty ttyl atnl lat cenc
                curver sabin))
 
-(defclass uso (umlsclass)
-  ((sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab)
-   (code :value-type string :initarg :code :reader code)
-   (tty :value-type string :initarg :tty :reader tty :hyperlink find-btty-tty)
-   (srl :value-type fixnum :initarg :srl :reader srl))
-  (:metaclass hyperobject-class)
-  (:user-name "Source")
-  (:default-print-slots sab code tty srl))
-
 (defclass ucxt (umlsclass)
   ((sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab)
    (code :value-type string :initarg :code :reader code)
 (defclass ucxt (umlsclass)
   ((sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab)
    (code :value-type string :initarg :code :reader code)
    (str :value-type cdata :initarg :str :reader str)
    (lrl :value-type fixnum :initarg :lrl :reader lrl)
    (stt :value-type string :initarg :stt :reader stt)
    (str :value-type cdata :initarg :str :reader str)
    (lrl :value-type fixnum :initarg :lrl :reader lrl)
    (stt :value-type string :initarg :stt :reader stt)
-   (s#so :reader s#so :subobject (find-uso-cuisui cui sui))
+   (s#so :reader s#atom :subobject (find-uso-cuisui cui sui))
    (s#sat :reader s#sat :subobject (find-usat-ui cui lui sui))
    (s#cxt :reader s#cxt :subobject (find-ucxt-cuisui cui sui)))
   (:metaclass hyperobject-class)
   (:user-name "String")
   (:default-print-slots sui stt lrl str))
 
    (s#sat :reader s#sat :subobject (find-usat-ui cui lui sui))
    (s#cxt :reader s#cxt :subobject (find-ucxt-cuisui cui sui)))
   (:metaclass hyperobject-class)
   (:user-name "String")
   (:default-print-slots sui stt lrl str))
 
+(defclass uso (umlsclass)
+  ((aui :value-type fixnum :initarg :aui :reader aui :print-formatter fmt-aui)
+   (cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui
+       :hyperlink find-ucon-cui)
+   (sui :value-type fixnum :initarg :cui :reader sui :print-formatter fmt-sui
+       :hyperlink find-ucon-sui)
+   (saui :value-type string :initarg :saui :reader saui)
+   (sdui :value-type string :initarg :sdui :reader sdui)
+   (scui :value-type string :initarg :scui :reader scui)
+   (tty :value-type string :initarg :tty :reader tty :hyperlink find-btty-tty)
+   (sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab)
+   (code :value-type string :initarg :code :reader code)
+   (srl :value-type fixnum :initarg :srl :reader srl))
+  (:metaclass hyperobject-class)
+  (:user-name "Source")
+  (:default-print-slots aui sab code saui adui scui tty srl))
+
 (defclass ulo (umlsclass)
   ((isn :value-type string :initarg :isn :reader isn)
    (fr :value-type fixnum :initarg :fr :reader fr)
 (defclass ulo (umlsclass)
   ((isn :value-type string :initarg :isn :reader isn)
    (fr :value-type fixnum :initarg :fr :reader fr)
   (:default-print-slots soc cot cof coa cui2 pfstr2))
 
        
   (:default-print-slots soc cot cof coa cui2 pfstr2))
 
        
-(defclass uatx (umlsclass)
-  ((sab :value-type string :initarg :sab :reader sab)
-   (rel :value-type string :initarg :rel :reader rel)
-   (atx :value-type cdata :initarg :atx :reader atx))
-  (:metaclass hyperobject-class)
-  (:user-name "Associated Expression")
-  (:default-print-slots sab rel atx))
-
 (defclass ucon (umlsclass)
   ((cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui
        :hyperlink find-ucon-cui)
 (defclass ucon (umlsclass)
   ((cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui
        :hyperlink find-ucon-cui)
    (pfstr :value-type cdata :initarg :pfstr :reader pfstr)
    (s#def :reader s#def :subobject (find-udef-cui cui))
    (s#sty :reader s#sty :subobject (find-usty-cui cui))
    (pfstr :value-type cdata :initarg :pfstr :reader pfstr)
    (s#def :reader s#def :subobject (find-udef-cui cui))
    (s#sty :reader s#sty :subobject (find-usty-cui cui))
-   (s#atx :reader s#atx :subobject (find-uatx-cui cui))
    (s#lo :reader s#lo :subobject (find-ulo-cui cui))
    (s#term :reader s#term :subobject (find-uterm-cui cui))
    (s#sat :reader s#sat :subobject (find-usat-ui cui))
    (s#lo :reader s#lo :subobject (find-ulo-cui cui))
    (s#term :reader s#term :subobject (find-uterm-cui cui))
    (s#sat :reader s#sat :subobject (find-usat-ui cui))
              "Fully Inherited Set of Relations (strings)")
   (:default-print-slots sty rl sty2))
 
              "Fully Inherited Set of Relations (strings)")
   (:default-print-slots sty rl sty2))
 
+
+;;; **************************
+;;; Local Classes
+;;; **************************
+
+(defclass ustats (umlsclass)
+  ((name :value-type string :initarg :name :reader name)
+   (hits :value-type integer :initarg :hits :reader hits
+        :user-name "count"
+        :print-formatter fmt-comma-integer)
+   (srl :value-type fixnum :initarg :srl :reader srl))
+  (:metaclass hyperobject-class)
+  (:default-initargs :name nil :hits nil :srl nil)
+  (:user-name "UMLS Statistic")
+  (:default-print-slots name hits srl)
+  (:documentation "Custom Table: UMLS Database statistics."))
+
+  
+(defclass bsab (umlsclass)
+  ((sab :value-type string :initarg :sab :reader sab
+       :hyperlink find-ustr-sab
+       :hyperlink-parameters (("subobjects" . "no")))
+   (name :value-type string :initarg :name :reader name)
+   (hits :value-type fixnum :initarg :hits :reader hits
+        :user-name "count"
+        :print-formatter fmt-comma-integer))
+  (:metaclass hyperobject-class)
+  (:default-initargs :sab nil :name nil :hits nil)
+  (:user-name "Source of Abbreviation")
+  (:default-print-slots sab name hits)
+  (:documentation "Bonus SAB file"))
+  
+(defclass btty (umlsclass)
+  ((tty :value-type string :initarg :tty :reader tty)
+   (name :value-type string :initarg :name :reader name)
+   (hits :value-type fixnum :initarg :hits :reader hits
+        :user-name "count"
+        :print-formatter fmt-comma-integer))
+  (:metaclass hyperobject-class)
+  (:default-initargs :tty nil :name nil :hits nil)
+  (:user-name "Bonus TTY")
+  (:default-print-slots tty name hits)
+  (:documentation "Bonus TTY file"))
+  
+(defclass brel (umlsclass)
+  ((sab :value-type string :initarg :sab :reader sab)
+   (sl :value-type string :initarg :sl :reader sl)
+   (rel :value-type string :initarg :rel :reader rel)
+   (rela :value-type string :initarg :rela :reader rela)
+   (hits :value-type fixnum :initarg :hits :reader hits
+        :user-name "count"
+        :print-formatter fmt-comma-integer))
+  (:metaclass hyperobject-class)
+  (:default-initargs :sab nil :sl nil :rel nil :rela nil :hits nil)
+  (:user-name "Bonus REL")
+  (:default-print-slots sab sl rel rela hits)
+  (:documentation "Bonus REL file"))
+
+(defclass batn (umlsclass)
+  ((sab :value-type string :initarg :sab :reader sab)
+   (atn :value-type string :initarg :atn :reader atn)
+   (hits :value-type fixnum :initarg :hits :reader hits
+        :user-name "count"
+        :print-formatter fmt-comma-intger))
+  (:metaclass hyperobject-class)
+  (:default-initargs :sab nil :atn nil)
+  (:user-name "Bonus ATN")
+  (:default-print-slots sab atn hits)
+  (:documentation "Bonus ATN file"))