1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: umlisp -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
5 ;;;; Name: data-structures.lisp
6 ;;;; Purpose: Basic data objects for UMLisp
7 ;;;; Author: Kevin M. Rosenberg
8 ;;;; Date Started: Apr 2000
10 ;;;; $Id: data-structures.lisp,v 1.12 2003/06/10 22:30:16 kevin Exp $
12 ;;;; This file, part of UMLisp, is
13 ;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D.
15 ;;;; UMLisp users are granted the rights to distribute and use this software
16 ;;;; as governed by the terms of the GNU General Public License.
17 ;;;; *************************************************************************
24 (make-pathname :directory '(:absolute "data" "umls" "2003AA"))
25 "Path for base of UMLS data files")
29 (make-pathname :directory '(:relative "META"))
34 (make-pathname :directory '(:relative "LEX"))
39 (make-pathname :directory '(:relative "NET"))
46 ;;; Structures for parsing UMLS text files
48 (defparameter *umls-files* nil
49 "List of umls file structures. Used when parsing text files.")
50 (defparameter *umls-cols* nil
51 "List of meta column structures. Used when parsing text files.")
54 ;; Preliminary objects to replace structures
57 ((fil :initarg :fil :accessor fil)
58 (table :initarg :table :accessor table)
59 (des :initarg :des :accessor des)
60 (fmt :initarg :fmt :accessor fmt)
61 (cls :initarg :cls :accessor cls)
62 (rws :initarg :rws :accessor rws)
63 (bts :initarg :bts :accessor bts)
64 (fields :initarg :fields :accessor fields)
65 (ucols :initarg :ucols :accessor ucols))
66 (:default-initargs :fil nil :table nil :des nil :fmt nil :cls nil :rws nil :bts nil
67 :fields nil :ucols nil)
68 (:documentation "UMLS File"))
71 ((col :initarg :col :accessor col)
72 (des :initarg :des :accessor des)
73 (ref :initarg :ref :accessor ref)
74 (min :initarg :min :accessor cmin)
75 (av :initarg :av :accessor av)
76 (max :initarg :max :accessor cmax)
77 (fil :initarg :fil :accessor fil)
78 (sqltype :initarg :sqltype :accessor sqltype)
79 (dty :initarg :dty :accessor dty :documentation "new in 2002: suggested SQL datatype")
80 (parse-fun :initarg :parse-fun :accessor parse-fun)
81 (quote-str :initarg :quote-str :accessor quote-str)
82 (datatype :initarg :datatype :accessor datatype)
83 (custom-value-fun :initarg :custom-value-fun :accessor custom-value-fun))
84 (:default-initargs :col nil :des nil :ref nil :min nil :av nil :max nil :fil nil
85 :sqltype nil :dty nil :parse-fun nil :datatype nil
86 :custom-value-fun nil)
87 (:documentation "UMLS column"))
90 (defmethod print-object ((obj ufile) (s stream))
91 (print-unreadable-object (obj s :type t)
92 (format s "~A" (fil obj))))
94 (defmethod print-object ((obj ucol) (s stream))
95 (print-unreadable-object (obj s :type t)
96 (format s "~A" (col obj))))