;;;; 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)
"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))