r3262: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 31 Oct 2002 20:53:03 +0000 (20:53 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 31 Oct 2002 20:53:03 +0000 (20:53 +0000)
pubmed.lisp

index c20d11138bfb04c8299a8fae9b3bc5992ae52e12..88dcb611b4c13a41cb415fc7c9699759506101c7 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Jun 2001
 ;;;;
-;;;; $Id: pubmed.lisp,v 1.3 2002/10/31 19:42:26 kevin Exp $
+;;;; $Id: pubmed.lisp,v 1.4 2002/10/31 20:53:03 kevin Exp $
 ;;;;
 ;;;; This file, part of cl-pubmed, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
 
 (defmethod print-object ((obj pm-article) (s stream))
   (print-unreadable-object (obj s :type t :identity t)
-    (format s "pmid: ~d" (article-pmid obj))))
+    (format s "pmid:~d, title:~S" (article-pmid obj)
+           (article-title obj))))
 
 (defun article-equal-p (a b)
   (check-type a pm-article)
@@ -290,12 +291,12 @@ XML string of PubMed search results and XML search status"
   "Extract article contents from PubMed XML string and return results in pm-article class"
   (let ((article (make-instance 'pm-article)))
     (setf 
-       (article-pmid article) (parse-integer (xml-tag-contents "PMID" xmlstr a-start))
-       (article-title article) (xml-tag-contents "ArticleTitle" xmlstr a-start)
-       (article-journal article) (xml-tag-contents "MedlineTA" xmlstr a-start)
-       (article-pages article) (xml-tag-contents "MedlinePgn" xmlstr a-start)
-       (article-affiliation article) (xml-tag-contents "Affiliation" xmlstr a-start)
-       (article-abstract article) (xml-tag-contents "AbstractText" xmlstr a-start))
+       (article-pmid article) (parse-integer (xml-tag-contents "PMID" xmlstr a-start a-end))
+       (article-title article) (xml-tag-contents "ArticleTitle" xmlstr a-start a-end)
+       (article-journal article) (xml-tag-contents "MedlineTA" xmlstr a-start a-end)
+       (article-pages article) (xml-tag-contents "MedlinePgn" xmlstr a-start a-end)
+       (article-affiliation article) (xml-tag-contents "Affiliation" xmlstr a-start a-end)
+       (article-abstract article) (xml-tag-contents "AbstractText" xmlstr a-start a-end))
     (multiple-value-bind (ji-start ji-end ji-next)
        (positions-xml-tag-contents "JournalIssue" xmlstr a-start a-end)
       (declare (ignore ji-next))