X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=class-support.lisp;h=e4f49cbcedeb36749d18008bfc56036fbd937dc7;hb=c01a3503e58ba9d4e7fadb42f3f0f69c38496e10;hp=3847eb5ef2813d876b4e41be5b76692a7ac20f4f;hpb=011a13e252a94773802021a264400f696d3b3598;p=umlisp.git diff --git a/class-support.lisp b/class-support.lisp index 3847eb5..e4f49cb 100644 --- a/class-support.lisp +++ b/class-support.lisp @@ -330,33 +330,6 @@ ((char-equal #\O c) "Other")))) - -(defgeneric cxt-ancestors (obj)) -(defmethod cxt-ancestors ((con ucon)) - (loop for term in (s#term con) - append (cxt-ancestors term))) - - -(defmethod cxt-ancestors ((term uterm)) - (loop for str in (s#str term) - append (cxt-ancestors str))) - -(defmethod cxt-ancestors ((str ustr)) - "Return the ancestory contexts of a ustr" - (let* ((anc (remove-if-not - (lambda (cxt) (string-equal "ANC" (cxl cxt))) - (s#cxt str))) - (num-contexts (if anc - (apply #'max (mapcar (lambda (cxt) (cxn cxt)) anc)) - 0)) - (anc-lists '())) - (dotimes (i num-contexts (nreverse anc-lists)) - (let* ((anc-this-cxn (remove-if-not - (lambda (cxt) (= (1+ i) (cxn cxt))) anc))) - (push - (sort anc-this-cxn (lambda (a b) (< (rank a) (rank b)))) - anc-lists))))) - (defun uso-unique-codes (usos) (let ((sab-codes (make-hash-table :test 'equal))) (dolist (uso usos)